OpenFolia

Read a translation import

GET
/translations/imports/{importId}

A translation import you uploaded, with one page of its report (meta.report, per module and target language; filter[state] for the units in one state) and its counts; once applied, its change set (relationships.changeSet) and commit (meta.commit), and the report as it was applied. Needs translation.manage.

Authorization

bearer
headerAuthorizationBearer <JWT>

A service account's token (ccms_sat_…, issued by POST /service-accounts/{id}/tokens), or, for local use and demo mode, the server's shared CCMS_API_TOKEN.

Path Parameters

importId*string

The translation import’s ID (a UUID). One that names no stored import, malformed or not, someone else’s or one removed after it expired, is 404.

Formatuuid

Query Parameters

filter[state]?string

Only the units in this state (ok, source-changed, broken-markup, unknown-block, unknown-module, outside-scope), and the modules with one; before paging. meta.counts stays the whole report’s.

Value in"ok""source-changed""broken-markup""unknown-block""unknown-module""outside-scope"
page[number]?integer

Page to return, from 1. Default: 1.

Range1 <= value
page[size]?integer

Resources per page. Default: 50, at most 200.

Range1 <= value <= 200

Header Parameters

X-Ccms-User?string

Demo mode only (CCMS_AUTH_MODE=demo): the user ID to act as. The bearer token is still required; without demo mode the header is refused (400).

Response Body

application/vnd.api+json
  1. response
data*
meta*
links*
Example Request
curl -X GET 'http://localhost:3000/translations/imports/497f6eca-6276-4993-bfeb-53cbbbba6f08'
Example Response
{  "data": {    "type": "TranslationImport",    "id": "string",    "attributes": {      "languages": [        "string"      ],      "baseRef": "string",      "baseCommit": "string",      "state": "validated",      "createdBy": {        "kind": "user",        "id": "string"      },      "createdAt": "2019-08-24T14:15:22Z",      "expiresAt": "2019-08-24T14:15:22Z"    },    "relationships": {      "job": {        "data": {          "type": "TranslationJob",          "id": "string"        }      },      "changeSet": {        "data": {          "type": "ChangeSet",          "id": "string"        }      }    },    "meta": {      "counts": {        "units": 0,        "ok": 0,        "sourceChanged": 0,        "brokenMarkup": 0,        "unknownBlock": 0,        "unknownModule": 0,        "outsideScope": 0      },      "report": [        {          "lang": "string",          "moduleId": "string",          "designId": "string",          "manualId": "string",          "config": true,          "title": "string",          "units": [            {              "blockId": "string",              "state": "ok",              "reason": "string",              "kind": "string",              "detail": "string",              "texts": {                "exported": "string",                "current": "string",                "target": "string",                "truncated": true              }            }          ]        }      ],      "commit": "string"    }  },  "meta": {    "page": {      "currentPage": -9007199254740991,      "lastPage": -9007199254740991,      "perPage": -9007199254740991,      "total": -9007199254740991    }  },  "links": {    "self": "string",    "first": "string",    "last": "string",    "prev": "string",    "next": "string"  }}