Resources
We are deprecating the API versions namely API v2 and v2.5, to make way for the more usable and maintainable API v3.
As of April 7th, 2022 the API versions 2 and 2.5 will no longer be operational and relevant requests will begin to fail.
The resources endpoint handles CRUD operations on resources for a specific project, identified by project_slug.
You must authenticate with a token when calling this endpoint.
URL: api.transifex.com/organizations/<organization_slug>/projects/<project_slug>/resources/
GET
This API endpoint provides paginated items in sets of 100 and allows you to get a list of your resources by adding the parameters limit & offset at the end of the API endpoint.
Return a JSON-encoded list with the resources that belong to the specified project. The fields returned are:
id
- the unique ID of the resourceslug
- the unique slug of the resourcename
- the resource namepriority
- the priority of the resourcei18n_type
- the file format of the resourcestringcount
- the number of strings included in the resourcewordcount
- the number of words included in the resourcecategories
- the categories of the resourcecreated
- the date the resource was originally uploadedlast_update
- the date the resource was last updatedaccept_translations
- whether the resource is locked from being translatedstats
- statistics of the resource across languages for the different steps in your localization workflow: translation, review, and proofread (if available)
If you include language_code
as a GET parameter, the response returned will only contain stats for that target language code:
Example:
$ curl -i -L --user api:<token> -X GET https://api.transifex.com/organizations/transifex/projects/transifex/resources/?language_code=fr_FR
HTTP/1.1 200 OK
Server: nginx
Date: Fri, 02 Mar 2018 17:46:20 GMT
Content-Type: application/json
Content-Length: 115172
Connection: keep-alive
Vary: Accept-Encoding
X-Transifex-View: ResourceViewSet:list
X-Transifex-Project: transifex
Link: <https://api.transifex.com/organizations/transifex/projects/transifex/resources/?limit=20&offset=20>; rel="next"
X-Transifex-Organization: transifex
Allow: GET, OPTIONS
X-Transifex-User: <username>
[
{
"id": 27146,
"slug": "core",
"name": "Core",
"priority": "2",
"i18n_type": "PO",
"stringcount": 3296,
"wordcount": 23377,
"categories": null,
"created": "2012-06-18T12:32:28.583374Z",
"last_update": "2017-11-08T10:39:29.405332Z",
"accept_translations": true,
"stats": {
"last_activity": "2017-11-08T12:12:52.028696Z",
"reviewed_1": {
"wordcount": 14985,
"stringcount": 2571,
"percentage": 0.7800,
"last_activity": "2017-11-08T12:12:51.993861Z",
"name": "reviewed"
},
"translated": {
"wordcount": 14985,
"stringcount": 2571,
"percentage": 0.7800,
"last_activity": "2017-11-08T12:12:49.960100Z",
"name": "translated"
},
"reviewed_2": {
"wordcount": 14985,
"stringcount": 2571,
"percentage": 0.7800,
"last_activity": "2017-11-08T18:12:49.960100Z",
"name": "proofread"
},
"language_code": "fr_FR"
}
}
]
Getting details for a specified resource
URL: api.transifex.com/organizations/<organization_slug>/projects/<project_slug>/resources/<resource_slug>
GET
Return a JSON encoded string with the details for the specified resource. The fields returned are:
id
- the unique ID of the resourceslug
- the unique slug of the resourcename
- the resource namepriority
- the priority of the resourcei18n_type
- the file format of the resourcestringcount
- the number of strings included in the resourcewordcount
- the number of words included in the resourcecategories
- the categories of the resourcecreated
- the date the resource was originally uploadedlast_update
- the date the resource was last updatedaccept_translations
- whether the resource is locked from being translatedstats
- statistics of the resource for each language for the different steps in your localization workflow: translation, review, and proofread (if available)
Example:
$ curl -i -L --user api:<token> -X GET https://api.transifex.com/organizations/transifex/projects/transifex/resources/core/
HTTP/1.1 200 OK
...
{
"id": 27146,
"slug": "core",
"name": "Core",
"priority": "2",
"i18n_type": "PO",
"stringcount": 3296,
"wordcount": 23377,
"categories": null,
"created": "2012-06-18T12:32:28.583374Z",
"last_update": "2017-11-08T10:39:29.405332Z",
"accept_translations": true,
"stats": {
"lt": {
"reviewed_1": {
"wordcount": 0,
"stringcount": 0,
"percentage": 0,
"last_activity": null,
"name": "reviewed"
},
"reviewed_2": {
"wordcount": 0,
"stringcount": 0,
"percentage": 0,
"last_activity": null,
"name": "proofread"
},
"translated": {
"wordcount": 18926,
"stringcount": 2752,
"percentage": 0.8349,
"last_activity": "2017-10-12T12:03:22.704475Z",
"name": "translated"
}
},
"ja": {
"reviewed_1": {
"wordcount": 22780,
"stringcount": 3206,
"percentage": 0.9726,
"last_activity": "2017-07-28T14:47:18.055344Z",
"name": "reviewed"
},
"reviewed_2": {
"wordcount": 0,
"stringcount": 0,
"percentage": 0,
"last_activity": null,
"name": "proofread"
},
"translated": {
"wordcount": 23291,
"stringcount": 3295,
"percentage": 0.9996,
"last_activity": "2017-10-31T14:00:25.792557Z",
"name": "translated"
}
}
}
}