Skip to content

API V1 · Resources

Download a resource file

GET
/v1/{workspaceUrl}/projects/{projectUrl}/resources/{fileName}
curl --request GET \
--url https://api.lingohub.com/v1/WORKSPACE_URL/projects/PROJECT_URL/resources/FILE_NAME \
--header 'Authorization: Bearer YOUR_API_KEY'

Downloads the specified resource file from the project. Supports extensive export customization through query parameters including blank content handling, status filtering, character encoding, HTML encoding, and format conversion (e.g. export an iOS .strings file as Android XML). The response body contains the raw file content with appropriate content type headers. The response carries a weak ETag; send it back as If-None-Match to receive 304 Not Modified without a body while nothing in the project changed (If-Modified-Since alone is not evaluated: HTTP dates cannot tell two changes within one second apart). Send Accept-Encoding: gzip to receive the file compressed.

workspaceUrl
required
string

WorkspaceUrl

projectUrl
required
string

ProjectUrl

fileName
required
string

Name of the resource file to download

path
string

Path of the resource file to download. if the fileName won’t be unique.

iso2_slug
string

The iso code of the resource file locale. Overrides the language information that might be given in the path. Alias of ‘iso2_code’.

iso2_code
string

The iso code of the resource file locale. Overrides the language information that might be given in the path. Alias of ‘iso2_slug’.

source:blankContentHandling

Should the segment be exported if source content is blank.

string
Allowed values: fallback use_source master_locale keep blank skip
target:blankContentHandling

Should the segment be exported if target content is blank.

string
Allowed values: fallback use_source master_locale keep blank skip
source:filterByStatus

Filter for source segments based on status.

string
Allowed values: ALL TRANSLATED_AND_APPROVED TRANSLATED_AND_REVIEWED APPROVED REVIEWED
target:filterByStatus

Filter for target segments based on status.

string
Allowed values: ALL TRANSLATED_AND_APPROVED TRANSLATED_AND_REVIEWED APPROVED REVIEWED
htmlEncoding

If the segment content holds HTML. How should it be escaped

string
Allowed values: RAW ESCAPE CDATA
encoding
string

The character set encoding the file should have.

escapeMode
string
Allowed values: RAW ESCAPE CDATA

Alias of ‘htmlEncoding’

addLocaleInformationToFilename

If the language information should be added to the filename.

string
Allowed values: ALL TARGETS NONE
escapeCharacters
boolean

If special characters should be escaped. Different behavior according to resource type.

exportTargetComments
boolean

Should comments be exported to files of the target language

exportSourceLocale
boolean

If a resource file holds multiple languages, this indicates if the source language should be included in this export.

exportHeader
boolean

If the file header (if applicable) should be exported.

exportTitle
boolean

If the title of a segment (if applicable) should be exported.

exportDescription
boolean

If a resource file holds multiple languages, this indicates if the description of the segments should be exported at all.

projectType
string
Allowed values: ios.strings ios.stringsdict android.string.resources properties standard_json

Overrides the project type of the project for this export. Enables to eg. download an iOS file as Android XML or vice versa.

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 content of the specified resource file as a byte stream.

Media type*/*
string format: byte

Not Modified: the If-None-Match validator still matches, the file the client holds is current.

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, project, or resource file 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"
}

Internal Server Error: An unexpected error occurred during resource file export.

Media typeapplication/json
object
url
string
message
string
text
string

Example generated

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