End Point: [TMEngine URL]/import
Default: http://localhost:8000/TMServer/
import
Send a 'POST
' request to the method end point with these parameters in a
JSON body:
id |
Yes |
ID of the memory to populate with TMX data |
file |
Yes |
Path to the TMX file being imported |
subject |
No |
Name or identifier of the subject associated with the TMX file |
client |
No |
Name or identifier of the client associated with the TMX file |
project |
No |
Name or identifier of the project associated with the TMX file |
Note
The TMEngine server must have access to the TMX file being imported. When importing
a
TMX file into a remote server, copy or upload the file to the server first and supply
the right path in the JSON body.
Example:
{
"id": "1568163112478",
"file": "/Volumes/Data/segments.tmx",
"project": "Main TM"
}
The server responds with a JSON object containing two fields.
On success, field 'status
' is set to 'OK
' and field
'process
' contains the ID of the background import process that was
initiated.
{
"process": "1568222345643",
"status": "OK"
}
On error, field 'status
' is set to 'failed
' and field
'reason
' contains the error cause.
{
"status": "failed",
"reason": "Unknown memory type"
}
After starting the import process, monitor its status using the
Get Process Status method. On successful completion, the result will
contain the number of segments imported.
Example:
{
"result": "Completed",
"data": {
"imported": "57678"
},
"status": "OK"
}