Request Conversion/Extraction/Display
API Request structure - Conversion/Extraction - Request
A call to the TMS REST Api will typically consist of the following structure, where the “|” notates that one of the options can be selected in the call.
{
"action": "conversion | data_extraction | svg_creation | pdf_creation | cadviewer_display" ,
"converter":"autodetect | AutoXchange 2023 | AutoXchange 2022 | LinkList 2022 | DwgMerge 2022 | ..",
"version":"latest | Vx.yy",
"contentType":"file | embedded | stream",
"contentLocation":"url to the location of the content file (can be http or absolute path on conversion server) | none (if contentType is embedded or stream)",
"contentStream":"url to the location of the content stream | none (if contentType is file or embedded)",
"embeddedContent":" base64 encoded file | none (if contentLocation is file or stream)",
"contentFormat":"DWG | DXF| DWF | DGN | PDF ",
"contentUsername":" username when TMS REST is calling content location/stream to pick up content",
"contentPassword":" password when TMS REST is calling location/stream to pick up content",
"userLabel":" optional label returned in the response",
"contentResponse":" file | embedded | stream",
"parameters": [
{
"paramName":" name of parameter",
"paramValue":"value of parameter"
},
{
"paramName":" name of parameter",
"paramValue":"value of parameter"
},
{
"paramName":" name of parameter",
"paramValue":"value of parameter"
},
....
]
}
API Response structure - Conversion/Extraction - Standard Files
In the case where the request “action” is of type “conversion” or “data_extraction”:
The structure of the response is:
{
"completedAction": "conversion | data_extraction" ,
"errorCode":" none | errorCode",
"converter":"AutoXchange 2023 | AutoXchange 2022 | LinkList 2022 | DwgMerge 2022 .... ",
"version":"latest | Vx.yy",
"userLabel":" optional label returned from the request",
"contentResponse":"file | embedded | stream",
"contentLocation":"none | url to the location of the resulting conversion or data extraction file",
"contentStream":"none | url to the location of stream to pick up data
(restful-api/xx.cgi?fileTag=yyy&Type=zzz)",
"embeddedContent":"none | the resulting conversion or data extraction file base64 encoded and embedded",
}
API Response structure - Conversion/Extraction - CADViewer SVG files
In the case where the request “action” is of type “svg_creation, pdf_creation or cadviewer_display”:
The structure of the response is:
{
"completedAction": "svg_creation | pdf_creation | cadviewer_display" ,
"errorCode":" none | errorCode",
"converter":"AutoXchange 2023 | AutoXchange 2022.... ",
"version":"latest | Vx.yy",
"userLabel":" optional label returned from the request",
"contentResponse":"file | embedded | stream",
"contentLocation":"none | url to the location of the resulting conversion or data extraction file",
"contentLocationData":"none | url to the location of the resulting conversion or data extraction file",
"contentStreamData":"none | url to the location of stream to pick up data (restful-api/xx.cgi?fileTag=yyy&Type=zzz)",
"embeddedContentData":"none | the resulting conversion or data extraction file base64 encoded and embedded",
}
NOTE: svg_creation and pdf_creation is used by CADViewer, it has the same effect as using conversion with a corresponding settings of conversion parameters.