Translated document API. This API uses format-independent data structures. For
format specific source document access see Files
projectSlug: Project Identifier.
iterationSlug: Project Iteration identifier.
Deletes a set of translations for a given locale. Also deletes any extensions recorded for the translations in question. The system will keep history of the translations.
| name | type | description | default |
|---|---|---|---|
| locale | path | The locale for which to get translations. | |
| docId | query | The document identifier. |
| code | condition |
|---|---|
| 200 | Successfully deleted the translations. |
| 404 | If a project, project iteration or document could not be found with the given parameters. |
| 401 | If the user does not have the proper permissions to perform this operation. |
| 500 | If there is an unexpected error in the server while performing this operation |
DELETE /projects/p/{projectSlug}/iterations/i/{iterationSlug}/resource/translations/{locale}
HTTP/1.1 200 OK
Retrieves a set of translations for a given locale.
| name | type | description | default | constraints | multivalued |
|---|---|---|---|---|---|
| If-None-Match | header | An Entity tag identifier. Based on this identifier (if provided), the server will decide if it needs to send a response to the client or not (See return section). | no | ||
| locale | path | The locale for which to get translations. | no | ||
| docId | query | The document identifier. | no | ||
| ext | query | The translation extensions to retrieve (e.g. "comment"). This parameter allows multiple values. | yes | ||
| skeletons | query | Indicates whether to generate untranslated entries or not. | boolean | no |
| code | condition |
|---|---|
| 200 | Successfully retrieved translations. The translation data will be contained in the response. |
| 404 | The project, version, or document could not be found with the given parameters. Also, if no translations are found for the given document and locale. |
| 304 | If the provided ETag matches the server's stored ETag, indicating that the last received response is still valid and should be reused. |
| 500 | If there is an unexpected error in the server while performing this operation |
| media type | data type |
|---|---|
| application/json | Translations (JSON) |
| application/xml | Translations (XML) |
GET /projects/p/{projectSlug}/iterations/i/{iterationSlug}/resource/translations/{locale}
Accept: application/json
If-None-Match: ...
HTTP/1.1 200 OK
Content-Type: application/json
{
"links" : [ { }, { } ],
"extensions" : [ { }, { } ],
"textFlowTargets" : [ {
"resId" : "...",
"state" : "Approved",
"sourceHash" : "...",
"extensions" : [ { }, { } ],
"revision" : 12345,
"textFlowRevision" : 12345,
"description" : "...",
"contents" : [ "An english string to translate", "A plural english string to translate" ]
}, {
"resId" : "...",
"state" : "Approved",
"sourceHash" : "...",
"extensions" : [ { }, { } ],
"revision" : 12345,
"textFlowRevision" : 12345,
"description" : "...",
"contents" : [ "A plural english string to translate", "An english string to translate" ]
} ],
"revision" : 12345
}
Updates the translations for a document and a locale.
| name | type | description | default | multivalued |
|---|---|---|---|---|
| locale | path | The locale for which to get translations. | no | |
| docId | query | The document identifier. | no | |
| ext | query | The translation extension types to modify (e.g. "comment"). This parameter allows multiple values. | yes | |
| merge | query | Indicates how to deal with existing translations (valid options: 'auto', 'import'). Import will overwrite all current values with the values being pushed (even empty ones), while Auto will check the history of your translations and will not overwrite any translations for which it detects a previous value is being pushed. | auto | no |
| media type | data type | description |
|---|---|---|
| application/json | Translations (JSON) | The translations to modify. |
| application/xml | Translations (XML) |
| code | condition | type |
|---|---|---|
| 200 | Translations were successfully updated. | |
| 404 | If a project, project iteration or document could not be found with the given parameters. | |
| 401 | If the user does not have the proper permissions to perform this operation. | |
| 400 | If there are problems with the passed parameters. e.g. Merge type is not one of the accepted types. This response should have a content message indicating a reason. |
|
| 500 | If there is an unexpected error in the server while performing this operation |
| media type | data type |
|---|---|
| application/json | object (JSON) |
| application/xml | anyType (XML) |
PUT /projects/p/{projectSlug}/iterations/i/{iterationSlug}/resource/translations/{locale}
Content-Type: application/json
Accept: application/json
{
"links" : [ { }, { } ],
"extensions" : [ { }, { } ],
"textFlowTargets" : [ {
"resId" : "...",
"state" : "New",
"sourceHash" : "...",
"extensions" : [ { }, { } ],
"revision" : 12345,
"textFlowRevision" : 12345,
"description" : "...",
"contents" : [ "An english string to translate", "A plural english string to translate" ]
}, {
"resId" : "...",
"state" : "Translated",
"sourceHash" : "...",
"extensions" : [ { }, { } ],
"revision" : 12345,
"textFlowRevision" : 12345,
"description" : "...",
"contents" : [ "A plural english string to translate", "An english string to translate" ]
} ],
"revision" : 12345
}
HTTP/1.1 200 OK
Content-Type: application/json
...
Deletes a set of translations for a given locale. Also deletes any extensions recorded for the translations in question. The system will keep history of the translations.
| name | type | description | constraints |
|---|---|---|---|
| id | path | The document identifier. Some document ids could have forward slashes ('/') in them which would cause conflicts with the browser's own url interpreter. For this reason, the supplied id must have all its '/' characters replaced with commas (','). | regex: [\-_a-zA-Z0-9]+([a-zA-Z0-9_\-,{.}]*[a-zA-Z0-9]+)? |
| locale | path | The locale for which to get translations. Deprecated. Use #deleteTranslationsWithDocId |
| code | condition |
|---|---|
| 200 | Successfully deleted the translations. |
| 404 | If a project, project iteration or document could not be found with the given parameters. |
| 401 | If the user does not have the proper permissions to perform this operation. |
| 500 | If there is an unexpected error in the server while performing this operation |
DELETE /projects/p/{projectSlug}/iterations/i/{iterationSlug}/r/{id}/translations/{locale}
HTTP/1.1 200 OK
Retrieves a set of translations for a given locale.
| name | type | description | constraints | multivalued |
|---|---|---|---|---|
| If-None-Match | header | An Entity tag identifier. Based on this identifier (if provided), the server will decide if it needs to send a response to the client or not (See return section). Deprecated. Use #getTranslationsWithDocId | no | |
| id | path | The document identifier. Some document ids could have forward slashes ('/') in them which would cause conflicts with the browser's own url interpreter. For this reason, the supplied id must have all its '/' characters replaced with commas (','). | regex: [\-_a-zA-Z0-9]+([a-zA-Z0-9_\-,{.}]*[a-zA-Z0-9]+)? | no |
| locale | path | The locale for which to get translations. | no | |
| ext | query | The translation extensions to retrieve (e.g. "comment"). This parameter allows multiple values. | yes | |
| skeletons | query | Indicates whether to generate untranslated entries or not. | boolean | no |
| code | condition |
|---|---|
| 200 | Successfully retrieved translations. The translation data will be contained in the response. |
| 404 | The project, version, or document could not be found with the given parameters. Also, if no translations are found for the given document and locale. |
| 304 | If the provided ETag matches the server's stored ETag, indicating that the last received response is still valid and should be reused. |
| 500 | If there is an unexpected error in the server while performing this operation |
| media type | data type |
|---|---|
| application/json | Translations (JSON) |
| application/xml | Translations (XML) |
GET /projects/p/{projectSlug}/iterations/i/{iterationSlug}/r/{id}/translations/{locale}
Accept: application/json
If-None-Match: ...
HTTP/1.1 200 OK
Content-Type: application/json
{
"links" : [ { }, { } ],
"extensions" : [ { }, { } ],
"textFlowTargets" : [ {
"resId" : "...",
"state" : "New",
"sourceHash" : "...",
"extensions" : [ { }, { } ],
"revision" : 12345,
"textFlowRevision" : 12345,
"description" : "...",
"contents" : [ "An english string to translate", "A plural english string to translate" ]
}, {
"resId" : "...",
"state" : "New",
"sourceHash" : "...",
"extensions" : [ { }, { } ],
"revision" : 12345,
"textFlowRevision" : 12345,
"description" : "...",
"contents" : [ "A plural english string to translate", "An english string to translate" ]
} ],
"revision" : 12345
}
Updates the translations for a document and a locale.
| name | type | description | default | constraints | multivalued |
|---|---|---|---|---|---|
| id | path | The document identifier. Some document ids could have forward slashes ('/') in them which would cause conflicts with the browser's own url interpreter. For this reason, the supplied id must have all its '/' characters replaced with commas (','). | regex: [\-_a-zA-Z0-9]+([a-zA-Z0-9_\-,{.}]*[a-zA-Z0-9]+)? | no | |
| locale | path | The locale for which to get translations. | no | ||
| ext | query | The translation extension types to modify (e.g. "comment"). This parameter allows multiple values. | yes | ||
| merge | query | Indicates how to deal with existing translations (valid options: 'auto', 'import'). Import will overwrite all current values with the values being pushed (even empty ones), while Auto will check the history of your translations and will not overwrite any translations for which it detects a previous value is being pushed. Deprecated. Use #putTranslationsWithDocId | auto | no |
| media type | data type | description |
|---|---|---|
| application/json | Translations (JSON) | The translations to modify. |
| application/xml | Translations (XML) |
| code | condition | type |
|---|---|---|
| 200 | Translations were successfully updated. | |
| 404 | If a project, project iteration or document could not be found with the given parameters. | |
| 401 | If the user does not have the proper permissions to perform this operation. | |
| 400 | If there are problems with the passed parameters. e.g. Merge type is not one of the accepted types. This response should have a content message indicating a reason. |
|
| 500 | If there is an unexpected error in the server while performing this operation |
| media type | data type |
|---|---|
| application/json | object (JSON) |
| application/xml | anyType (XML) |
PUT /projects/p/{projectSlug}/iterations/i/{iterationSlug}/r/{id}/translations/{locale}
Content-Type: application/json
Accept: application/json
{
"links" : [ { }, { } ],
"extensions" : [ { }, { } ],
"textFlowTargets" : [ {
"resId" : "...",
"state" : "NeedReview",
"sourceHash" : "...",
"extensions" : [ { }, { } ],
"revision" : 12345,
"textFlowRevision" : 12345,
"description" : "...",
"contents" : [ "An english string to translate", "A plural english string to translate" ]
}, {
"resId" : "...",
"state" : "Translated",
"sourceHash" : "...",
"extensions" : [ { }, { } ],
"revision" : 12345,
"textFlowRevision" : 12345,
"description" : "...",
"contents" : [ "A plural english string to translate", "An english string to translate" ]
} ],
"revision" : 12345
}
HTTP/1.1 200 OK
Content-Type: application/json
...