Request - Response
CADViewer REST API Request
A Request will contain the following Key-Value pairs section:
Request Key | Request Value |
---|---|
action | The action can be one of the following: conversion, data_extraction, svg_creation, pdf_creation and cadviewer_display. |
converter | Either “autodetect” or the name of the converter, AutoXchange 2023, LinkList 2022, DwgMerge 2022, etc. |
version | Version of converter if not “autodetect” |
contentType | The content type can be one of the following: “file”, “embedded”, “stream” . “file” is a physical url, “embedded” is for a base64 encoded file embedded in the call, “stream” is a stream end-point included in the call |
Depended on the setting of the contentType key, then one of the below Key-Value pairs.
Request Key | Request Value |
---|---|
contentLocation | location of “file” object |
contentSteam | location of “stream” end-point |
embeddedContent | base64 encoded “embedded” content |
Additionally , the request must contain the following Key-Value pairs section:
Request Key | Request Value |
---|---|
contentFormat | Can be any of the supported input formats: DWG, DXF, DWF, PDF, DGN, PCF |
contentUsername | Username when TMS REST server is calling the content location/stream to pick up content |
contentPassword | Password when TMS REST server is calling location/stream to pick up content |
userLabel | optional label returned in the response |
contentResponse | the setting on how to pick up the converted content, as “file”, as a “stream” end-point or “embedded” in the response |
parameters | This is an object with the conversion parameters used in the conversion or data-extraction, please refer to the command line interface documentation for the Tailor Made Software converters |
For application control of the converter endpoint, this Key-Value pair is provided, see Business Extenstions to Handlers.
Request Key | Request Value |
---|---|
customConversionEndpointExtension | Default is “false” , set to “true” and application programmer gets a hook to control conversions on the server. |
CADViewer REST API Response
A Response will contain the following Key-Value pairs section:
Request Key | Request Value |
---|---|
completedAction | The completed action can be one of the following: conversion, data_extraction, svg_creation, pdf_creation and cadviewer_display. |
errorCode | Either “none” or the Error Code |
converter | Name of converter used |
version | Version of converter used |
userLabel | optional label returned in the response, matching the userLabel in the Request call |
contentResponse | The content response type can be one of the following: “file”, “embedded”, “stream” . “file” is a physical url, “embedded” is for a base64 encoded file embedded in the call, “stream” is a stream end-point included in the call |
Depended on the setting of the contentResponse key, then one of the below Key-Value pair.
Request Key | Request Value |
---|---|
contentLocation | location of “file” object |
contentSteam | location of “stream” end-point |
embeddedContent | base64 encoded “embedded” content |