Drivers

Drivers

The Drivers end point allows you to retrieve the name and IDs of drivers, update drivers, create drivers, and delete drivers.   This endpoint performs the same function as the Protocols endpoint.

URI Definition

Method        

URI and Fields

GET

 

 

 

/iap/drivers

Returns a set of drivers that match the search criteria.  

Body Parameters

Parameter                   

Description                         

systemName 

Specifies the driver.

userName

Specifies the name of the driver.

id

ID of the driver.

Query Parameters

You can specify a query parameter appended to the end of your URI, preceded with a "?" character. 

Parameter        

Type           

Description                                              

sortOrder

String

Specifies the sort order.  Either ascending or descending (asc or desc).

Default is asc.

sortBy

String

Specifies the name of a parameter.  Either:  typeName, type, protocol, or xifName.

Default is typeName.

pg

Integer

Specifies the page number (1-0x7fffffff).
Default is null.

sz

Integer

Specifies the page size (1-0x7fffffff).

Default is null.

Syntax Example

/iap/drivers?sortOrder={asc/desc}&sortBy={field_name}&pg={page_number}&sz={page_size}      

Example

https://localhost/iap/drivers                                                                                                     

Response

[
    {
        "id": 48,
        "systemName": "bacnet",
        "userName": "BACnet"
    },
    {
        "id": 49,
        "systemName": "iap",
        "userName": "IAP"
    },
    {
        "id": 46,
        "systemName": "iox",
        "userName": "IOX"
    },
    {
        "id": 45,
        "systemName": "lon",
        "userName": "LON"
    },
    {
        "id": 47,
        "systemName": "modbus",
        "userName": "Modbus"
    }
]

/iap/drivers/{name}

Returns information about the named driver.

Parameters

Parameter                   

Description                       

name 

The name of the driver to be returned.

Example

https://localhost/iap/drivers/modbus                                                                                      

Response

    {
        "id": 47,
        "systemName": "modbus",
        "userName": "Modbus"
    }

/iap/drivers/predefined

Returns a set of predefined drivers

Query Parameters

You can specify a query parameter appended to the end of your URI, preceded with a "?" character. 

Parameter        

Type           

Description                                                  

sortOrder

String

Specifies the sort order.  Either ascending or descending (asc or desc).

Default is asc.

sortBy

String

Specifies the name of a parameter.  Either:  typeName, type, protocol, or xifName.

Default is typeName.

pg

Integer

Specifies the page number (1-0x7fffffff).

Default is null.

sz

Integer

Specifies the page size (1-0x7fffffff).

Default is null.

Example

https://localhost/iap/drivers/predefined                                                                                 

Response

[
    {
        "id": 48,
        "systemName": "bacnet",
        "userName": "BACnet"
    },
    {
        "id": 49,
        "systemName": "iap",
        "userName": "IAP"
    },
    {
        "id": 46,
        "systemName": "iox",
        "userName": "IOX"
    },
    {
        "id": 45,
        "systemName": "lon",
        "userName": "LON"
    },
    {
        "id": 47,
        "systemName": "modbus",
        "userName": "Modbus"
    }
]

POST

 

/iap/drivers

Creates a new protocol in the CMS.  

Body Parameters

Parameter                   

Description                      

systemName 

Specifies the driver.

userName

Specifies the name of the driver.

Example

https://localhost/iap/drivers                                                                                                      

Request Body

    {
        "systemName": "test",
        "userName": "TestProtocol"
    }

Response

    {
        "id": 514,
        "systemName": "test",
        "userName": "TestProtocol"
    }

PUT

 

 

/iap/drivers/{id}

Updates the driver specified by the ID.

Parameters

Parameter                   

Description                      

systemName 

Specifies the driver.

userName

Specifies the name of the driver.

id

ID of the driver.

Example

https://localhost/iap/drivers/514                                                                                                      

Request Body

    {
        "systemName": "test1",
        "userName": "Updated TestProtocol"
    }

Response

    {
        "id": 514,
        "systemName": "test1",
        "userName": "Updated TestProtocol"
    }

DELETE

/iap/drivers/{id}

Deletes the driver specified with the ID.

Parameter

Parameter        

Type           

Description                                                  

id

DeviceType

Specifies the device type ID to be updated. 

Possible value: 1-0x7fffffffffffffff

Example

https://localhost/iap/drivers/514                                                                                                      

Return Codes

200         

Success.                                                                                                                                           

 

 

 

 

Looking for labels? They can now be found in the details panel on the floating action bar.

Related content