Skip to content

API V1 · Resources

List resource files

GET
/v1/{workspaceUrl}/projects/{projectUrl}/resources
curl --request GET \
--url https://api.lingohub.com/v1/WORKSPACE_URL/projects/PROJECT_URL/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

WorkspaceUrl

projectUrl
required
string

ProjectUrl

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>
object
href
string
hreflang
string
title
string
type
string
deprecation
string
profile
string
name
string
templated
boolean
project_locale

The locale (language code) of the resource file.

string
links

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

Array<object>
object
href
string
hreflang
string
title
string
type
string
deprecation
string
profile
string
name
string
templated
boolean

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
url
string
message
string
text
string

Example generated

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

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
url
string
message
string
text
string

Example generated

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

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

Media typeapplication/json
object
url
string
message
string
text
string

Example generated

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