Datapoint Default Values

A default value can be specified for any input datapoint.  The default value is sent to the datapoint on initial start-up, and whenever an override value is not active.  The default value must conform to the type specification for the datapoint.

URI Definition

Method

URI and Fields

GET

/iap/devs/{id}/if/{block}/{block_index}/{datapoint_name}/default

Returns the default value for the specified datapoints.  

XIFname vs Instance Name

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

Parameters

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

Success Response

Collections of datapoints defaults.

Example

https://localhost/iap/devs/*/if/device/0/*+name=+^nvoS.{3,}/default

Response:

[
    {
        "id": 334,
        "local": "2019-01-11 23:27:46.045 UTC",
        "utc": "2019-01-11 23:27:46.045 UTC",
        "deviceId": "2",
        "deviceName": "lon.0",
        "blockName": "device",
        "blockIndex": "0",
        "datapointName": "nvoSMaxxl",
        "deviceState": "provisioned",
        "deviceHealth": "normal",
        "default": null
    },
    {
        "id": 441,
        "local": "2019-01-11 23:27:46.045 UTC",
        "utc": "2019-01-11 23:27:46.045 UTC",
        "deviceId": "2",
        "deviceName": "lon.0",
        "blockName": "device",
        "blockIndex": "0",
        "datapointName": "nvoSMaxxl_LM",
        "deviceState": "provisioned",
        "deviceHealth": "normal",
        "default": null
    }
]

PUT

/iap/devs/{id}/if/{block}/{block_index}/{datapoint_name}/default

Sets the default value for the specified datapoints.  The response code is 200 in case of success, or some error code otherwise.

XIFname vs Instance Name

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

Parameters

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

Success Response

Response code 200 in case of success or some error code otherwise.

Example

https://localhost/iap/devs/*/if/device/0/*+name=+^nvoS.{3,}/default

Request body:

{
  "point":[0,0,0,0,0,0,0],
  "interp_pts_0_to_1": 0,
  "interp_pts_1_to_2": 0,
  "interp_pts_2_to_3": 0,
  "interp_pts_3_to_4": 0,
  "interp_pts_4_to_5": 0,
  "interp_pts_5_to_6": 0,
  "interp_pts_6_to_0": 0
}

 


https://localhost/iap/devs/*/if/device/0/*+name=+^nviPa/default

Request body:

100 

Response:

Response code 200

DELETE

/iap/devs/{id}/if/{block}/{block_index}/{datapoint_name}/default

Deletes the default value for the specified datapoints. To delete a default value, the CMS sets the default to null. The response code is 200 in case of success, or some error code otherwise.

XIFname vs Instance Name

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

Parameters

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

Success Response

Response code 200 in case of success or some error code otherwise.

Example

https://localhost/iap/devs/*/if/device/0/*+name=+^nvoP.{2}/default

 Response:

Response code 200

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.