Create device

POST {{baseUrl}}/api/v2/devices

Create a new device. You obtain the authorization token needed to execute the request using POST /auth/login. You pass the authorization token in the request header. You provide the information used to create a device in the request body.

Request Params

KeyDatatypeRequiredDescription
fieldsnullComma-separated, top-level field whitelist that allows the client to selectively retrieve part of the response model. If specified, extra filtering is applied, and for top-level object (if root model is an array, each array element), only the listed fields are kept in the response. For example, "id,elements" keeps only the "id" field and whole "elements" array field, omitting all other fields in the top-level response model.

Request Body

{"name"=>"Test User selected printer", "description"=>"User can enter any printer", "deviceType"=>"printer", "transmitter"=>{"id"=>"BDD57F9A9C874542BA3074FA8DDB5446", "name"=>"Print"}, "deviceProperties"=>{"printer"=>{"printerLocation"=>{"userDefinedLocation"=>true}, "printerProperties"=>{"scale"=>100, "quality"=>"600", "paperSource"=>"automatic", "paperSize"=>"letter", "pdfSetting"=>{"postScriptLevel"=>2, "oddEvenPages"=>"all_pages", "reversePages"=>false, "applicationPriority"=>"other"}}, "connectionParameters"=>{"retriesCount"=>2, "secondsBetweenRetries"=>1, "deliveryTimeoutSeconds"=>10}, "backupPrinterProperties"=>{"printOnBackup"=>false}}}}

HEADERS

KeyDatatypeRequiredDescription
X-MSTR-AuthTokenstring(Required) Authorization token
Content-Typestring