CAT files
CAT files represent CAT files associated with a job.
The CAT file object
Properties
fileIdsarray
The ids of the files in the CAT file.
idstring
The id of the CAT file.
namestring
The name of the CAT file.
File object
{
"fileIds": [1],
"id": "755d1895-8c42-4abc-a269-581cdd221c59",
"name": "Trados_demo.xml"
}
POST/v2/jobs/matches/cat-file/upload/:jobId?
Upload a file
This endpoint allows you to upload a CAT file. If an job id is specified, the file will be linked to the job.
Parameters
fileobject
A file to upload. Make sure that the specifications follow RFC 2388, which defines file transfers for the multipart/form-data protocol.
Request
POST
/v2/jobs/matches/cat-file/upload/:jobId?curl https://api.lsp.expert/v2/jobs/matches/cat-file/upload/ \
-u {key}: \
-F catFile="@/path/to/a/catFile.xml"
Response
{
"id": "6703c3db1efed1712305bc4e",
"catFiles": {
"fileIds": [1],
"id": "755d1895-8c42-4abc-a269-581cdd221c59",
"name": "catFile.xml"
}
//...
}
POST/v2/jobs/matches/cat-file/parse
Parse a file
This endpoint allows you to parse a CAT file that has been uploaded against a CAT configuration.
Parameters
catFileIdstring Required
The id of the CAT file.
clientstring
The id of the client.
configurationIdstring
The id of the CAT configuration.
Request
POST
/v2/jobs/matches/cat-file/parsecurl https://api.lsp.expert/v2/jobs/matches/cat-file/upload/ \
-u {key}: \
-d catFileId="0bbbd168-263a-4193-9072-1cdfc20c5f5b" \
-d client="568bdb3b96fd75ea201566de" \
-d configurationId="5978dab69d1b46279871a0a6"
Response
{
"catConfiguration": {
"id": "5978dab69d1b46279871a0a6",
"name": "General"
},
"files": [
{
"name": "sample.sdlxliff",
"quantityType": {
"name": "Mots",
"id": "568bdb5f96fd75ea201566e0"
},
"matches": [
{
"match": {
"id": "568e75be418470f87676070a",
"name": "100%"
},
"quantity": 690
},
{
"match": {
"id": "56c1d755957bab182e818453",
"name": "0%"
},
"quantity": 364
},
{
"match": {
"id": "568e760d418470f876760713",
"name": "71%-90%"
},
"quantity": 0
},
{
"match": {
"id": "568e7622418470f876760716",
"name": "91%-99%"
},
"quantity": 7
}
],
"total": 1061,
"id": 1
}
],
"quantityType": {
"id": "568bdb5f96fd75ea201566e0",
"name": "Words"
}
}