Translated Documents Resource

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.

DELETE /projects/p/{projectSlug}/iterations/i/{iterationSlug}/resource/translations/{locale}

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.

Request Parameters
name type description default
locale path The locale for which to get translations.  
docId query The document identifier.
Response Codes
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

Example

Request
DELETE /projects/p/{projectSlug}/iterations/i/{iterationSlug}/resource/translations/{locale}

              
Response
HTTP/1.1 200 OK

              

GET /projects/p/{projectSlug}/iterations/i/{iterationSlug}/resource/translations/{locale}

Retrieves a set of translations for a given locale.

Request Parameters
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
Response Codes
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
Response Body
media type data type
application/json Translations (JSON)
application/xml Translations (XML)

Example

Request
GET /projects/p/{projectSlug}/iterations/i/{iterationSlug}/resource/translations/{locale}
Accept: application/json
If-None-Match: ...

              
Response
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
}
                
              

PUT /projects/p/{projectSlug}/iterations/i/{iterationSlug}/resource/translations/{locale}

Updates the translations for a document and a locale.

Request Parameters
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
Request Body
media type data type description
application/json Translations (JSON) The translations to modify.
application/xml Translations (XML)
Response Codes
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.
        • string (JSON)
        • string (XML)
        500 If there is an unexpected error in the server while performing this operation
          Response Body
          media type data type
          application/json object (JSON)
          application/xml anyType (XML)

          Example

          Request
          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
          }
                          
                        
          Response
          HTTP/1.1 200 OK
          Content-Type: application/json
          
                          
          ...
                          
                        

          DELETE /projects/p/{projectSlug}/iterations/i/{iterationSlug}/r/{id}/translations/{locale}

          This method has been deprecated.

          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.

          Request Parameters
          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  
          Response Codes
          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

          Example

          Request
          DELETE /projects/p/{projectSlug}/iterations/i/{iterationSlug}/r/{id}/translations/{locale}
          
                        
          Response
          HTTP/1.1 200 OK
          
                        

          GET /projects/p/{projectSlug}/iterations/i/{iterationSlug}/r/{id}/translations/{locale}

          This method has been deprecated.

          Retrieves a set of translations for a given locale.

          Request Parameters
          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
          Response Codes
          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
          Response Body
          media type data type
          application/json Translations (JSON)
          application/xml Translations (XML)

          Example

          Request
          GET /projects/p/{projectSlug}/iterations/i/{iterationSlug}/r/{id}/translations/{locale}
          Accept: application/json
          If-None-Match: ...
          
                        
          Response
          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
          }
                          
                        

          PUT /projects/p/{projectSlug}/iterations/i/{iterationSlug}/r/{id}/translations/{locale}

          This method has been deprecated.

          Updates the translations for a document and a locale.

          Request Parameters
          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
          Request Body
          media type data type description
          application/json Translations (JSON) The translations to modify.
          application/xml Translations (XML)
          Response Codes
          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.
                • string (JSON)
                • string (XML)
                500 If there is an unexpected error in the server while performing this operation
                  Response Body
                  media type data type
                  application/json object (JSON)
                  application/xml anyType (XML)

                  Example

                  Request
                  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
                  }
                                  
                                
                  Response
                  HTTP/1.1 200 OK
                  Content-Type: application/json
                  
                                  
                  ...