RWS Logo
Show / Hide Table of Contents

Translation Chains

List translation chains

Example Request:

curl "https://controller-host:8001/api/v2/translation-chains" \
	-X GET \
	-u u_jsmith@example.com_u0VmztKJrwqf:

Example Response:

{
    "chains": [
        {
            "config": {
                "id": "SpaEng_Generic_SRV_TNMV_8_4_x_2\u003e\u003eEngFra_Generic_SRV_TNMV_8_4_x_1",
                "label": "SpaFra_c3b0",
                "memberPairs": [
                    "SpaEng_Generic_SRV_TNMV_8_4_x_2",
                    "EngFra_Generic_SRV_TNMV_8_4_x_1"
                ],
                "isEdgeCloud": false
            },
            "autoManage": false,
            "isDeleted": false,
            "running": true,
            "expectedRunning": true
        }
    ],
    "options": {
        "includeDeleted": "excluded"
    }
}

Return a list of all defined translation chains

This endpoint is restricted to the following roles: admin, super admin

HTTP Request

GET /api/v2/translation-chains

Request Parameters

These parameters should be added to the URL as a query string.
Name Type Description Default Value
includeDeleted (optional) string Whether to include manually deleted chains. Valid values: only for just deleted chains, also for active and deleted chains, or excluded for just active chains excluded

Returns

Returns a list of translation chains as a TranslationChainsStatus object with the following attributes

Name Type Description
chains array of objects List of translation chains as an array of TranslationChainStatus objects
options object A TranslationChainsStatusOptions object with attribute:
→ includeDeleted string Value of the includeDeleted request parameter

Add a translation chain

Example Request:

curl "https://controller-host:8001/api/v2/translation-chains" \
	-X POST \
	-u u_jsmith@example.com_u0VmztKJrwqf: \
	--data-urlencode chainId="SpaEng_Generic_SRV_TNMV_8_4_x_2>>EngFra_Generic_SRV_TNMV_8_4_x_1"

Example Response:

{
    "config": {
        "id": "SpaEng_Generic_SRV_TNMV_8_4_x_2\u003e\u003eEngFra_Generic_SRV_TNMV_8_4_x_1",
        "label": "SpaFra_c3b0",
        "memberPairs": [
            "SpaEng_Generic_SRV_TNMV_8_4_x_2",
            "EngFra_Generic_SRV_TNMV_8_4_x_1"
        ],
        "isEdgeCloud": false
    },
    "autoManage": false,
    "isDeleted": false,
    "running": true,
    "expectedRunning": true
}

Adds a new translation chain

This endpoint is restricted to the following roles: admin, super admin

HTTP Request

POST /api/v2/translation-chains

Request Parameters

Name Type Description Default Value
chainId string Translation chain ID for the translation chain to add consisting of two member language pair IDs joined by the string '>>'

Returns

Returns the added translation chain as a TranslationChainStatus object with the following attributes

Name Type Description
config object Object describing basic information about the translation chain represented as a TranslationChainConfig object with these attributes:
→ id string The full language pair chain ID, e.g., lpid1>>lpid2
→ label string A short string naming the chain. For UI generation.
→ memberPairs array of strings List of the single language pair IDs that compose the chain.
→ isEdgeCloud boolean True if this chain should be treated as an EdgeCloud chain.
autoManage boolean True if this chain is being automatically managed by Edge, false if it is under manual management.
isDeleted boolean True if this represents a translation chain that has been manually deleted.
running boolean True if this chain and all its resources are running, and it is possible to submit translations to it.
expectedRunning boolean True if it is expected that this chain and all of its resources are running, and it should be possible to submit translations to it.

Adding a translation chain also places that chain under manual management. It will always be present even if the underlying resources are not available. To move a chain that has been manually added to automated management use the PUT /api/v2/translation-chains/{id} endpoint and set autoManage to true. Under automated management the translation chain will be present when its underlying resources are available and will be removed while the underlying resources are not available.

Update translation chain

Example Request:

curl "https://controller-host:8001/api/v2/translation-chains/SpaEng_Generic_SRV_TNMV_8_4_x_2>>EngFra_Generic_SRV_TNMV_8_4_x_1" \
	-X PUT \
	-u u_jsmith@example.com_u0VmztKJrwqf: \
	-d autoManage="true"

Example Response:

{
    "config": {
        "id": "SpaEng_Generic_SRV_TNMV_8_4_x_2\u003e\u003eEngFra_Generic_SRV_TNMV_8_4_x_1",
        "label": "SpaFra_c3b0",
        "memberPairs": [
            "SpaEng_Generic_SRV_TNMV_8_4_x_2",
            "EngFra_Generic_SRV_TNMV_8_4_x_1"
        ],
        "isEdgeCloud": false
    },
    "autoManage": true,
    "isDeleted": false,
    "running": true,
    "expectedRunning": true
}

Modify translation chain attributes

This endpoint is restricted to the following roles: admin, super admin

HTTP Request

PUT /api/v2/translation-chains/{id}

Path Parameters

Name Type Description
id string Translation chain ID to modify

Request Parameters

Name Type Description Default Value
autoManage (optional) boolean Whether this chain should be automatically managed (true) or not (false). Does not need to be an active chain. Automatic chain management must be enabled to use this.

Returns

Returns the modified translation chain as a TranslationChainStatus object.

Delete translation chain

Example Request:

curl "https://controller-host:8001/api/v2/translation-chains/SpaEng_Generic_SRV_TNMV_8_4_x_2>>EngFra_Generic_SRV_TNMV_8_4_x_1" \
	-X DELETE \
	-u u_jsmith@example.com_u0VmztKJrwqf:

Example Response:

{
    "config": {
        "id": "SpaEng_Generic_SRV_TNMV_8_4_x_2\u003e\u003eEngFra_Generic_SRV_TNMV_8_4_x_1",
        "label": "SpaFra_c3b0",
        "memberPairs": [
            "SpaEng_Generic_SRV_TNMV_8_4_x_2",
            "EngFra_Generic_SRV_TNMV_8_4_x_1"
        ],
        "isEdgeCloud": false
    },
    "autoManage": false,
    "isDeleted": false,
    "running": true,
    "expectedRunning": true
}

Delete a translation chain. Also prevents the chain from being recreated when automated chain management is enabled.

This endpoint is restricted to the following roles: admin, super admin

HTTP Request

DELETE /api/v2/translation-chains/{id}

Path Parameters

Name Type Description
id string Translation chain ID to delete

Returns

Returns the deleted translation chain as a TranslationChainStatus object. The value will represent the chain as it was before deletion.

Deleting a translation chain also places that chain under manual management. It will never be present even if the underlying resources are available and it could be used. To move a chain that has been manually deleted to automated management use the PUT /api/v2/translation-chains/{id} endpoint and set autoManage to true. Under automated management the translation chain will be present when its underlying resources are available and will be removed while the underlying resources are not available.

In this page
Back to top