projects/{did}/documents/offline/import/init (GET)

Prepare for the subsequent import of translated Word, Excel or XLIFF files to a project. This method does a couple of things:

URL

(GET) /api/projects/{pid}/documents/offline/import/init

PARAMETERS

The URL parameters are:

pid

The project ID

int, Mandatory

 

RESULTS

The result is a JSON object. The properties you need in the context of an import are just these:

canXliff

Indicates if importing XLIFF files is authorized.

bool

canOffice

Indicates if importing Microsoft Word or Excel files is authorized.

bool

files.key

The unique files collection identifier.

string

files.maxFileSizeMB

The maximum size limit for each file in MiB. The default is 50.

integer

files.maxFiles

The maximum number of files you can import in one step. The default is 50.

integer

files

This object represents a new empty files collection and its contents (the files array). With the files.key you can now start uploading files.

For a detailed description see the result documented in:media/filescollection/{key}/items

object

 

EXAMPLES

We initiate an import to a project with ID 1000. Use projects/list to find project IDs by project reference or other criteria.

GET /api/projects/1000/documents/offline/import/init

The method returns various properties:

{ "canXliff": true, "canOffice": true, "options": { "commit": false, "writeLocked": false }, "files": { "key": "5457027a-5c62-479a-aee1-f7dbbe3bfc28", "mandatory": true, "allowAnyFile": false, "maxFileSizeMB": 50, "maxFiles": 50, "parserProfileId": null, "parserDomains": null, "extensions": [ ".xlf", ".xlif", ".xliff", ".xlsx", ".docx" ], "pageCountEnabled": false, "pageCountExtensions": null, "files": [] } }

Use files.key to then upload your file or your files to the “files collection”. Once the uploads are done you proceed with the actual import method.

 

 

Copyright Wordbee - Buzzin' Outside the Box since 2008