Skip to content

API V1 · Resources

List resource files

GET
/v1/{workspaceUrl}/projects/{projectUrl}/resources
curl --request GET \
--url https://api.lingohub.com/v1/acme-corp/projects/my-project/resources \
--header 'Authorization: Bearer YOUR_API_KEY'

Returns the list of resource files belonging to the specified project. Each entry includes the file name, its associated locale, and a HATEOAS link for downloading the resource file. Use the localeInFileName parameter to control whether locale information is rendered in file names.

workspaceUrl
required
string

The URL slug of the workspace. The project links that GET /v1/projects returns contain it: /v1/{workspaceUrl}/projects/{projectUrl}.

Example

acme-corp
projectUrl
required
string

The URL slug of the project within its workspace. The project links that GET /v1/projects returns contain it: /v1/{workspaceUrl}/projects/{projectUrl}.

Example

my-project
localeInFileName
string
Allowed values: ALL TARGETS NONE

Determines if the locale info should be rendered in the file name: ALL(default), TARGETS, NONE

addIso2Slug
boolean

If true the iso2_slug parameter will be always added to the rendered resource file URLs

branch
string

Name of the project branch. If omitted, the project’s default branch is used. Returns 422 if the branch name does not exist in the project.

Successfully returns the list of the project’s resource files.

Media typeapplication/json

A list of resource files belonging to a project, with HATEOAS navigation links.

object
members

The list of resource files in the project.

Array<object>

Information about a single resource file within a project, including its locale and HATEOAS links.

object
name

The name of the resource file including its extension.

string
links

HATEOAS links for the resource (e.g. self, download).

Array<object>

A link to a related resource. rel names the relation; type is set on links to resource files.

object
rel

The link relation type describing the relationship to the current resource.

string
href

The URL of the linked resource.

string
type

The media type of the linked resource.

string
project_locale

The locale (language code) of the resource file.

string
links

HATEOAS links for navigating the resource list (e.g. self).

Array<object>

A link to a related resource. rel names the relation; type is set on links to resource files.

object
rel

The link relation type describing the relationship to the current resource.

string
href

The URL of the linked resource.

string
type

The media type of the linked resource.

string

Examples

ExampleresourceFileList

Project with English and French JSON files

ResourceFileList

{
"members": [
{
"name": "src/app/translations/lang/en.json",
"links": [
{
"rel": "self",
"href": "https://api.lingohub.com/v1/lingohub/projects/lh-frontend/resources/en.json?path=src%2Fapp%2Ftranslations%2Flang",
"type": "text/json"
}
],
"project_locale": "en"
},
{
"name": "src/app/translations/lang/fr.json",
"links": [
{
"rel": "self",
"href": "https://api.lingohub.com/v1/lingohub/projects/lh-frontend/resources/fr.json?path=src%2Fapp%2Ftranslations%2Flang",
"type": "text/json"
}
],
"project_locale": "fr"
}
],
"links": [
{
"rel": "self",
"href": "https://api.lingohub.com/v1/lingohub/projects/lh-frontend/resources?localeInFileName=ALL"
}
]
}

Unauthorized: Authentication credentials are missing or invalid.

Media typeapplication/json
object
error
object
code
string
description
string
status
string
Allowed values: 100 CONTINUE 101 SWITCHING_PROTOCOLS 102 PROCESSING 103 EARLY_HINTS 200 OK 201 CREATED 202 ACCEPTED 203 NON_AUTHORITATIVE_INFORMATION 204 NO_CONTENT 205 RESET_CONTENT 206 PARTIAL_CONTENT 207 MULTI_STATUS 208 ALREADY_REPORTED 226 IM_USED 300 MULTIPLE_CHOICES 301 MOVED_PERMANENTLY 302 FOUND 303 SEE_OTHER 304 NOT_MODIFIED 307 TEMPORARY_REDIRECT 308 PERMANENT_REDIRECT 400 BAD_REQUEST 401 UNAUTHORIZED 402 PAYMENT_REQUIRED 403 FORBIDDEN 404 NOT_FOUND 405 METHOD_NOT_ALLOWED 406 NOT_ACCEPTABLE 407 PROXY_AUTHENTICATION_REQUIRED 408 REQUEST_TIMEOUT 409 CONFLICT 410 GONE 411 LENGTH_REQUIRED 412 PRECONDITION_FAILED 413 CONTENT_TOO_LARGE 413 PAYLOAD_TOO_LARGE 414 URI_TOO_LONG 415 UNSUPPORTED_MEDIA_TYPE 416 REQUESTED_RANGE_NOT_SATISFIABLE 417 EXPECTATION_FAILED 418 I_AM_A_TEAPOT 421 MISDIRECTED_REQUEST 422 UNPROCESSABLE_CONTENT 422 UNPROCESSABLE_ENTITY 423 LOCKED 424 FAILED_DEPENDENCY 425 TOO_EARLY 426 UPGRADE_REQUIRED 428 PRECONDITION_REQUIRED 429 TOO_MANY_REQUESTS 431 REQUEST_HEADER_FIELDS_TOO_LARGE 451 UNAVAILABLE_FOR_LEGAL_REASONS 500 INTERNAL_SERVER_ERROR 501 NOT_IMPLEMENTED 502 BAD_GATEWAY 503 SERVICE_UNAVAILABLE 504 GATEWAY_TIMEOUT 505 HTTP_VERSION_NOT_SUPPORTED 506 VARIANT_ALSO_NEGOTIATES 507 INSUFFICIENT_STORAGE 508 LOOP_DETECTED 509 BANDWIDTH_LIMIT_EXCEEDED 510 NOT_EXTENDED 511 NETWORK_AUTHENTICATION_REQUIRED
validationErrors
Array<object>
object
field
string
errors
Array<object>
object
code
string
description
string
parameters
object
key
additional properties

Example

{
"error": {
"status": "100 CONTINUE"
}
}

Forbidden: The authenticated user does not have resource view permission on this project.

Media typeapplication/json
object
url
string
message
string
text
string

Example generated

{
"url": "example",
"message": "example",
"text": "example"
}

Not Found: The specified workspace or project does not exist.

Media typeapplication/json
object
message
required
string | null
items
required
Array<string> | null

Example generated

{
"message": "example",
"items": [
"example"
]
}

Unprocessable Entity: The specified branch name does not exist in the project.

Media typeapplication/json
object
error
object
code
string
description
string
status
string
Allowed values: 100 CONTINUE 101 SWITCHING_PROTOCOLS 102 PROCESSING 103 EARLY_HINTS 200 OK 201 CREATED 202 ACCEPTED 203 NON_AUTHORITATIVE_INFORMATION 204 NO_CONTENT 205 RESET_CONTENT 206 PARTIAL_CONTENT 207 MULTI_STATUS 208 ALREADY_REPORTED 226 IM_USED 300 MULTIPLE_CHOICES 301 MOVED_PERMANENTLY 302 FOUND 303 SEE_OTHER 304 NOT_MODIFIED 307 TEMPORARY_REDIRECT 308 PERMANENT_REDIRECT 400 BAD_REQUEST 401 UNAUTHORIZED 402 PAYMENT_REQUIRED 403 FORBIDDEN 404 NOT_FOUND 405 METHOD_NOT_ALLOWED 406 NOT_ACCEPTABLE 407 PROXY_AUTHENTICATION_REQUIRED 408 REQUEST_TIMEOUT 409 CONFLICT 410 GONE 411 LENGTH_REQUIRED 412 PRECONDITION_FAILED 413 CONTENT_TOO_LARGE 413 PAYLOAD_TOO_LARGE 414 URI_TOO_LONG 415 UNSUPPORTED_MEDIA_TYPE 416 REQUESTED_RANGE_NOT_SATISFIABLE 417 EXPECTATION_FAILED 418 I_AM_A_TEAPOT 421 MISDIRECTED_REQUEST 422 UNPROCESSABLE_CONTENT 422 UNPROCESSABLE_ENTITY 423 LOCKED 424 FAILED_DEPENDENCY 425 TOO_EARLY 426 UPGRADE_REQUIRED 428 PRECONDITION_REQUIRED 429 TOO_MANY_REQUESTS 431 REQUEST_HEADER_FIELDS_TOO_LARGE 451 UNAVAILABLE_FOR_LEGAL_REASONS 500 INTERNAL_SERVER_ERROR 501 NOT_IMPLEMENTED 502 BAD_GATEWAY 503 SERVICE_UNAVAILABLE 504 GATEWAY_TIMEOUT 505 HTTP_VERSION_NOT_SUPPORTED 506 VARIANT_ALSO_NEGOTIATES 507 INSUFFICIENT_STORAGE 508 LOOP_DETECTED 509 BANDWIDTH_LIMIT_EXCEEDED 510 NOT_EXTENDED 511 NETWORK_AUTHENTICATION_REQUIRED
validationErrors
Array<object>
object
field
string
errors
Array<object>
object
code
string
description
string
parameters
object
key
additional properties

Example

{
"error": {
"status": "100 CONTINUE"
}
}