Atlassian uses cookies to improve your browsing experience, perform analytics and research, and conduct advertising. Accept all cookies to indicate that you agree to our use of cookies on your device. Atlassian cookies and tracking notice, (opens new window)
Returns a set of existing device types (DeviceTypeDTO).
Path Parameters
The following list describes thepath parameters for the device_type path element.
Parameter
Description
typeName
This is the default parameter, used if query *+... is not specified.
type
For ProgramID
programId
the same Program ID value
protocol
Specifies the protocol/driver. Possible values are:
all (*) – for all types
bacnet – for BACnet
enocean – for local EnOcean mode, available with SmartServer 4.0 and higher
iap – for IAP
iotc – for remote EnOcean mode with IoTC, available with SmartServer 4.3 Update 1 and higher; and for remote EnOcean mode with SmartStudio, available for SmartServer 4.5 Update 1 and higher
lon – for LON
lorawan – for LoRaWAN, available with SmartServer 4.0 and higher
modbus – for Modbus
xifName
Name of the XIF file.
filename
name of the file associated with device type
isDefault
specifies whether device type is the default one
scId
segment controller id
scName
segment controller name
Query Parameters
You can specify a query parameter appended to the end of your URI, preceded with a "?" character.
Parameter
Description
customerId
query parameter representing Id of customer, that owns the Device Type
sortOrder
Specifies the sort order. Either ascending or descending (asc or desc). Default is asc.
sortBy
Specifies the name of a parameter. Either: typeName, type, protocol, or xifName. Default is typeName.
short
if false, number of devices that use device type and xif file names will be provided in output, true by default
pg
Specifies the page number (1-0x7fffffff). Default is null.
sz
Specifies the page size (1-0x7fffffff).
Default is null.
Return Codes
200
Success.
422
Error. Includes an error message if the device_type path element is incorrectly formatted.
Success response
Collection of devices types corresponding requested filter.
(Optional) A value to be used for filtering. Used for XIF and image files only.
Possible values:
bacnet – for BACnet
enocean – for local EnOcean mode, available with SmartServer 4.0 and higher
iap – for IAP
iotc – for remote EnOcean mode with IoTC, available with SmartServer 4.3 Update 1 and higher; and for remote EnOcean mode with SmartStudio, available for SmartServer 4.5 Update 1 and higher
lon – for LON
lorawan – for LoRaWAN, available with SmartServer 4.0 and higher
modbus – for Modbus
Default: null
programId
String
(Optional) A value to be used for filtering. Used for XIF files only.
Valid values: a hexidecimal string
No default value.
sortOrder
String
(Optional) Specifies the sort order. Either ascending or descending (asc or desc).
Default: asc
sortBy
String
(Optional) Specifies the name of a parameter to be sorted on.
Possible values: typeName, type, protocol, or xifName.
Default: typeName
pg
Integer
(Optional) Specifies the page number.
Possible values: 1 - 0x7fffffff
Default: null
sz
Integer
(Optional) Specifies the page size.
Possible values: 1 - 0x7fffffff
Default: null
Return Codes
200
Success.
/iap/devTypes/count
Gets number of Device Types for specified customer.
Query Parameters
CustomerId – query parameter representing Id of customer, that owns the Device Type.
Deletes either all device types, or, when device types are specified in the Body, it deletes the specified device types. Before any device types are deleted, delete performs the following checks:
If device types are specified in the the body, delete checks whether any specified device types are being used by any device. If a specified device type is being used, then no device types are deleted, and an error is returned. The delete is only performed when none of the specified device types are being used by any device.
If no device types are specified in the the body, delete checks whether any device types are being used by any device. If any device type is being used, then no device types are deleted, and an error is returned. The delete is only performed when no device types are being used by any device.
Parameter
Include in request body a collection of Device Type IDs to be deleted.
Return Codes
204
Success.
422
Error. Includes an error message if any device types, or selected device types, are being used and cannot be deleted.
Success Response
Response code 200 in case of success or some error code otherwise.
Examples
https://localhost/iap/devTypes/delete
Request Body
[473]
Response
Response code 200
/iap/devTypes/export
Exports specified device types with all related resources. Device types are specified in the REST body.
export builds DTD files containing all information about the specified device types, and DTP archive containing DTD and all related resources (XIF, icon, application and system image files) if requested.
If packaged format is specified (in the query parameter), then one DTD file is built for all specified device types, all related resource files are found, packed with the DTD file into one DTP archive, and sent in response.
If packaged format is not specified (in the query parameter), then one DTD file is built for each specified device type, all related resource files are found, links to download all the DTD files, and resources are collected and sent in response.
Query Parameters
You can specify a query parameter appended to the end of your URI, preceded with a "?" character.
Parameter
Type
Description
packaged
Boolean
(Optional) Specifies export format.
Possible values: True/False.
Default is True.
Return Codes
200
Success.
Request Body Parameters
Include in request body a collection of Device Type IDs to be exported.
Success Response
Collection of device type resources that can be exported.
Exports all device types with all related resource files in a single DTP archive. This archive contains one DTD file containing all device types and all related resource files.
export builds DTD files containing all information about the specified device types, and DTP archive containing DTD and all related resources (XIF, icon, application and system image files) if requested.
If packaged format is specified (in the query parameter), then one DTD file is built for all specified device types, all related resource files are found, packed with the DTD file into one DTP archive, and sent in response.
If packaged format is not specified (in the query parameter), then one DTD file is built for each specified device type, all related resource files are found, links to download all the DTD files, and resources are collected and sent in response.
If no Device Type IDs specified, all DTDs and all related resource files will be packaged to resulting DTP file.
Parameters
Include in request body a collection of Device Type IDs to be exported.
Return Codes
200
Success.
Success Response
DTP package
Examples
Request Body
[125,126]
Response
DTP package with specified device types
/iap/metafile/{file_type}
Imports specific files to the CMS.
Path Parameters
The following list describes the possible values for file_type. file_type is optional.
Parameter
Description
app
Files to import are Neuron application image files (.apb, .ndl, .nxe).
icon
Files to import are device icon files.
sys
Files to import are Neuron system image files (.ndl, .nx).
You can specify a query parameter appended to the end of your URI, preceded with a "?" character.
For example: /iap/metafile/app?customerId={customerId}&protocol={protocol}
Parameter
Type
Description
protocol
String
(Optional) Specifies the protocol that the file is associated with.
Possible values:
bacnet – for BACnet
enocean – for local EnOcean mode, available with SmartServer 4.0 and higher
iap – for IAP
iotc – for remote EnOcean mode with IoTC, available with SmartServer 4.3 Update 1 and higher; and for remote EnOcean mode with SmartStudio, available for SmartServer 4.5 Update 1 and higher
lon – for LON
lorawan – for LoRaWAN, available with SmartServer 4.0 and higher
modbus – for Modbus
customerID
String
(Required) Specifies the customer that has access to the file.
Example: Importing a XIF file (same process can be used for importing dtp, zip, bac, mod, btm, device.csv, and other file types).
/iap/metafile?customerId={customerId}
HTTPS header must use Content-Type of multipart/form-data. Adding the boundary string is optional.
File: 6kEvbMultiSensor.XIF generated by LONNCC32 Version 6.39.02, XIF Version 4.501 Copyright (c) Echelon Corporation 1989-2018 All Rights Reserved. Run on Fri Aug 24 18:36:06 2018 : : : NVVAL \x01 \x00 \x28 \x0D \xAC \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x68 \x00 \x02 \x00 \x02 \xFF \xFE \x00 \x00 -----------------------------11130049656327408512700814640--
Return Codes
204
Success. This only means the request was correctly formatted. It doesn't mean that the payload is correct or that that the SmartServer can process the data.
415
Content-Type header needs to be multipart/form-data.
428
For zip files with multiple files, means that the zip file or included files may have been already downloaded.
You need to send another POST request with the confirmation Id, which is included in HTTP 428 response, to import this zip file