Resources

Upload, download, list, and delete localization resource files within a LingoHub project.

Endpoints

GET /v1/{workspaceUrl}/projects/{projectUrl}/resources -- List resource files

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 file.

Query Parameters

ParameterTypeRequiredDescription
localeInFileNamestringNoControls locale rendering in file names: ALL (default), TARGETS, or NONE
addIso2SlugbooleanNoWhen true, the iso2_slug parameter is always appended to rendered resource file URLs
DetailValue
AuthresourcesView permission on the project
Response200V1ResourceInfoList with members[] array

GET /v1/{workspaceUrl}/projects/{projectUrl}/resources/{fileName} -- Download a resource file

Downloads the specified resource file as a raw byte stream with appropriate content-type headers. Supports extensive export customization through query parameters.

Path Parameters

ParameterTypeDescription
fileNamestringName of the resource file (e.g. en.json)

Query Parameters — Export Customization

All parameters are optional and override the project's default export settings.

ParameterTypeDescription
pathstringFile path, if fileName alone is not unique
iso2_slug / iso2_codestringOverride the locale code (aliases of each other)
source:blankContentHandlingstringBlank source segment handling: "keep" or "skip"
target:blankContentHandlingstringBlank target segment handling: "fallback", "use_source", "keep", or "skip"
source:filterByStatusstringSource status filter: "ALL", "TRANSLATED_AND_APPROVED", or "APPROVED"
target:filterByStatusstringTarget status filter: "ALL", "TRANSLATED_AND_APPROVED", or "APPROVED"
htmlEncoding / escapeModestringHTML escape strategy: "RAW", "ESCAPE", or "CDATA" (aliases of each other)
encodingstringCharacter set encoding for the exported file (e.g. "UTF-8", "ISO-8859-1")
addLocaleInformationToFilenamestringLocale in file name: "ALL", "TARGETS", or "NONE"
escapeCharactersbooleanWhether special characters should be escaped (format-dependent)
exportTargetCommentsbooleanInclude comments in target language exports
exportSourceLocalebooleanFor multi-language files: include the source language in the export
exportHeaderbooleanExport the file header (if applicable)
exportTitlebooleanExport segment titles (if applicable)
exportDescriptionbooleanExport segment descriptions
projectTypestringOverride export format — e.g. download an iOS .strings file as Android XML. Allowed: "ios.strings", "ios.stringsdict", "android.string.resources", "properties"
DetailValue
AuthresourcesView permission on the project
Response200 — raw file bytes with content-type and charset headers

POST /v1/{workspaceUrl}/projects/{projectUrl}/resources -- Upload a resource file

Uploads a single resource file (multipart/form-data). Language is detected automatically from the file name, or can be set explicitly.

Form Parameters

ParameterTypeRequiredDescription
filefileYesThe resource file to upload
pathstringNoTarget path for the resource container
iso2_slug / iso2_codestringNoOverride locale detection (aliases of each other)
source:createNewbooleanNoSource language: create new segments
source:updateExistingbooleanNoSource language: update changed segments
source:deactivateMissingbooleanNoSource language: deactivate missing segments
target:createNewbooleanNoTarget language: create new segments
target:updateExistingbooleanNoTarget language: update changed segments
target:deactivateMissingbooleanNoTarget language: deactivate missing segments
forcebooleanNoForce upload even if a file name collision is detected (default: false)
DetailValue
AuthresourcesManage permission on the project
Response201{"status": "Success"}

Note: If a collision is detected and force is not true, the endpoint returns 406 Not Acceptable with a descriptive message.


POST /v1/{workspaceUrl}/projects/{projectUrl}/resources/zip -- Upload a ZIP archive

Uploads a ZIP archive containing multiple resource files. The archive is extracted and all visible files are imported. Language detection is performed automatically from file names and paths.

Form Parameters

ParameterTypeRequiredDescription
filefileYesThe ZIP archive to upload
source:createNewbooleanNoSource language: create new segments
source:updateExistingbooleanNoSource language: update changed segments
source:deactivateMissingbooleanNoSource language: deactivate missing segments
target:createNewbooleanNoTarget language: create new segments
target:updateExistingbooleanNoTarget language: update changed segments
target:deactivateMissingbooleanNoTarget language: deactivate missing segments
DetailValue
AuthresourcesManage permission on the project
Response201{"status": "Success"}

DELETE /v1/{workspaceUrl}/projects/{projectUrl}/resources/{fileName} -- Delete a resource container

Permanently deletes the specified resource container and all its associated locale files.

Important: The fileName (and optional path) must identify the source language file of the resource container. If the file belongs to a target language, the request is rejected with 400.

Path / Query Parameters

ParameterTypeRequiredDescription
fileNamestringYesFile name of the source language resource file
pathstringNoFile path of the source language resource file
DetailValue
AuthresourcesManage permission on the project
Response200 — empty body

Common Error Responses

StatusMeaning
400Bad Request — invalid parameters or file does not belong to source language
401Unauthorized — authentication credentials are missing or invalid
403Forbidden — insufficient permissions for the requested operation
404Not Found — workspace, project, or resource file does not exist
406Not Acceptable — file name collision detected (upload only, use force=true)
500Internal Server Error — unexpected failure during import or export