The Pootle API exposes a number of resources. Next you have a complete list of Translation project specific resources.
Note
All URLs listed here should be appended to the base URL of the API.
URL: | /projects/<PROJ>/ |
---|---|
Description: | Returns the translation projects (languages) list on a given
<PROJ> project. |
API versions: | 1 |
Method: | GET |
Returns: | List of translation projects (languages) on a given <PROJ>
project. |
{
"checkstyle": "standard",
"code": "firefox",
"description": "",
"fullname": "Firefox 22 (Aurora)",
"ignoredfiles": "",
"localfiletype": "po",
"resource_uri": "/api/v1/projects/4/",
"source_language": "/api/v1/languages/2/",
"translation_projects": [
"/api/v1/translation-projects/71/",
"/api/v1/translation-projects/72/",
"/api/v1/translation-projects/73/",
"/api/v1/translation-projects/74/"
],
"treestyle": "nongnu"
}
URL: | /languages/<LANG>/ |
---|---|
Description: | Returns the translation projects (projects) list on a given
<LANG> language. |
API versions: | 1 |
Method: | GET |
Returns: | List of translation projects (projects) on a given <LANG>
language. |
{
"code": "gl",
"description": "",
"fullname": "Galician",
"nplurals": 2,
"pluralequation": "(n != 1)",
"resource_uri": "/api/v1/languages/20/",
"specialchars": "",
"translation_projects": [
"/api/v1/translation-projects/12/",
"/api/v1/translation-projects/81/"
]
}
URL: | /translation-projects/ |
---|---|
Description: | Creates a new translation project. |
API versions: | 1 |
Method: | POST |
Returns: | HTTP 201 response with the relative URL for the newly created
translation project on its Location header. |
URL: | /translation-projects/<TRPR>/ |
---|---|
Description: | Returns the translation project with the <TRPR> ID. |
API versions: | 1 |
Method: | GET |
Returns: | Translation project with <TRPR> ID. |
{
"description": "",
"language": "/api/v1/languages/110/",
"pootle_path": "/fr/Firefox/",
"project": "/api/v1/projects/3/",
"real_path": "Firefox/fr",
"resource_uri": "/api/v1/translation-projects/65/",
"stores": [
"/api/v1/stores/77/",
"/api/v1/stores/76/",
"/api/v1/stores/75/"
]
}
URL: | /translation-projects/<TRPR>/ |
---|---|
Description: | Changes the translation project with the <TRPR> ID. |
API versions: | 1 |
Method: | PATCH or PUT |
Returns: | HTTP 204 NO CONTENT response. |
Note
The method used can be:
URL: | /translation-projects/<TRPR>/ |
---|---|
Description: | Deletes the translation project with the <TRPR> ID. |
API versions: | 1 |
Method: | DELETE |
Returns: | HTTP 204 NO CONTENT response. |
URL: | /translation-projects/<TRAP>/statistics/ |
---|---|
Description: | Returns the translation project with the <TRAP> ID, including
an extra field with its statistics. |
API versions: | 1 |
Method: | GET |
Returns: | Translation project with <TRAP> ID and its statistics. |
{
"description": "",
"language": "/api/v1/languages/110/",
"pootle_path": "/fr/Firefox/",
"project": "/api/v1/projects/3/",
"real_path": "Firefox/fr",
"resource_uri": "/api/v1/translation-projects/65/",
"statistics": {
"errors": 0,
"fuzzy": {
"percentage": 4,
"units": 1,
"words": 7
},
"suggestions": 3,
"total": {
"percentage": 100,
"units": 39,
"words": 167
},
"translated": {
"percentage": 94,
"units": 37,
"words": 157
},
"untranslated": {
"percentage": 2,
"units": 1,
"words": 3
}
},
"stores": [
"/api/v1/stores/77/",
"/api/v1/stores/76/",
"/api/v1/stores/75/"
]
}