Presets

 This endpoint retrieves presets for datapoints and names of the presets.  It can also set preset values for datapoints.  

URI Definition

Method        

URI and Fields

GET




/iap/dp/{id}/if/{block}/{block_index}/{datapoint_name}/presets

Allows you to retrieve presets for datapoints using all available IAP Path Parameters.   

XIFname vs Instance Name

  • The block path element uses the block XIFname.
  • The datapoint_name path element uses the datapoint instance name.

Path Parameters

The optional path parameters for the id, block, block_index, and datapoint_name path elements are listed on the Path Parameters page.

Example

https://localhost/iap/dp/1/if/Lamp/1/nviValue/presets                                            

Response

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

Response  

[
    {
        "datapointQualifier": "17q2d8j/lon/1/Lamp/1/nviValue",
        "presets": [
            {
                "id": 735,
                "name": "ON",
                "value": {
                    "state": 1,
                    "value": 100
                }
            },
            {
                "id": 734,
                "name": "OFF",
                "value": {
                    "state": 0,
                    "value": 0
                }
            }
        ]
    }
]

/iap/dp/presets/names

Returns the presets names. 

Success response:

List of unique presets names.

Example

https://localhost/iap/dp/presets/name                                                                    

Response

    {
        "High"
        "Low"
    }

PUT/iap/dp/{id}/if/{block}/{block_index}/{datapoint_name}/presets/value

Sets preset value for datapoints using all available IAP Path Parameters by preset ID. 

XIFname vs Instance Name

  • The block path element uses the block XIFname.
  • The datapoint_name path element uses the datapoint instance name.

Path Parameters

The optional path parameters for the id, block, block_index, and datapoint_name path elements are listed on the Path Parameters page.

Return Codes

204         Success.                                                                                                                                                               

Queries

You can include queries with your IAP/REST request to specify a selection rule for your request.  As described in Queries and Parameters, you can specify a query as a query parameter appended to the end of your URI preceded with a "?" character, or as a path parameter within a path element of the path component.

The optional path parameters for the id, block, block_index, and datapoint_name path elements are listed on the Path Parameters page.