List the documents of the team
The documents of the team from every folder, newest first, one page at a time. Follow the next link until there is none to walk through them. Documents added or removed while you walk can shift the pages, so a document can be skipped or appear twice.
Besides self, the links of a page point to the other pages, with the same limit: first and last are always there, prev and next only when such a page exists. With no document, last is the same page as first.
apiKeyAuthorizationBearer <token>The key the team leader created in Redokun, sent as Authorization: Bearer rdk_.... A read key is rejected on every call that writes (any method other than GET, HEAD or OPTIONS).
offset?integerHow many items to skip
0 <= value0limit?integerHow many items the page holds at most
1 <= value <= 10015A page of the documents
application/json- response
documents*array<>Newest first
links*array<>The resources related to this one. Follow these links instead of building the URLs yourself, so a change of path does not break the client
curl -X GET 'https://api.redokun.com/v1/documents'{ "documents": [ { "id": 0, "filename": "string", "fileType": "string", "wordCount": 0, "revision": 0, "status": "UPLOADED", "indexingError": "string", "createdAt": "2019-08-24T14:15:22Z", "updatedAt": "2019-08-24T14:15:22Z", "language": { "name": "string", "code": "string" }, "links": [ { "rel": "string", "href": "string" } ] } ], "links": [ { "rel": "string", "href": "string" } ]}The translations of a document GET
The status and the progress of each language the document is translated into. Poll it while a pre-translation or a review is in progress, and go on when each language reaches the status you wait for. Poll every 10 to 30 seconds. A pre-translation fills the segments in steps, so `completedPercentage` does not grow smoothly: it jumps at the end of the translation memory step and at the end of the machine translation step. Each revision of the document has its own translations. The first upload of a document has them from the start, with no segments until the document is `INDEXED`: wait for that status of the document before you read the progress. A new revision has none until its indexing copies them from the previous revision, so until then the list is empty. The list is not paginated: all the translations are shown in one response. An id that belongs to an older revision of the document answers 303 and points to the translations of the latest revision. Following the redirect is a second call, and counts against the rate limit like any other.
Upload a document POST
Creates a document of the team from a file, owned by the account of the key, with one translation per target language. The file is checked at once (format, size, readable content), but its text is indexed afterwards: the document answers with status `UPLOADED` and no `wordCount`. Poll `GET /v1/documents/{id}` until the status is `INDEXED`, when the translation can start, or `INDEXING_ERROR`, when the file could not be processed. The body is `multipart/form-data`: `file` holds the document, the other parts are text, and `targetLanguages` is a JSON array, sent either as a text field or as an `application/json` part with a filename (e.g. `curl -F 'targetLanguages=@langs.json;type=application/json'`). Each target language lists the email addresses of its translators, possibly none. An address of a member of the team (a manager, the caller included, or a translator) is assigned as it is. Any other address is invited to the team as a translator, within the translator seats of the plan, and receives the invitation by email. A translator invited by a call that fails later stays invited.