POST /scheduled-calls
Use this resource to create or update a Scheduled Call.
To update a Scheduled Call, just post a new payload with the same id of an existing Scheduled Call.
Object Name: ScheduledCall
| Property Name | Type | Description | Method |
|---|---|---|---|
| Method (optional) |
String | Allowed values: POST, GET, PUT, DELETE Default value: POST |
GET POST |
| Path (required) |
String | The path of the request. Query Parameters are supported. | GET POST |
| Headers (optional) |
Object | This is the header in json format used for the request. | GET POST |
| Id required |
String | This property is used to uniquely identify the Scheduled Call. | GET POST |
| Trigger | Object | A trigger object to launch the execution of the call. | GET POST |
| Destinations | Array <Destination> | List of destinations where the response of the executed call is sent | GET POST |
| Status | Object | GET | |
| Body | String | For POST requests, it contains the payload in json string or xml string according to the Content-Type header. The strings need to be escaped. | GET POST |
\t\"headers\": {
\t\"accept\":\"application/xml\"
\t\"content-Type\":\"application/xml\"
\t}
Object Name: Trigger
| Property Name | Type | Description | Method |
|---|---|---|---|
| Type | String | Defined the type of the trigger. Supported values: - cronExpression - bacnetCov - networkValue |
GET POST |
| CronExpression | String | A CRON expression to schedule the execution of the call. Required when the type of the trigger is cronExpression | GET POST |
| BacnetObject | Object | This object is a BACnet object. A BACnet object is composed of an object type, an object instance. Required when the type of the trigger is bacnetCov | GET POST |
| Index | Integer | This is the unique identifier of the network value required when the type of the trigger is networkValue | GET POST |
Object Name: Destination
| Property Name | Type | Description | Method |
|---|---|---|---|
| Initiator (optional) |
String | Free text used to identify easily the initial call from its response. | GET POST |
| Type (required) |
String | Determines the type of the recipient for the response. List of supported types: - iotHub |
GET POST |
| Result | String | GET | |
| Message | String | GET |
Object Name: Destinations
| Property Name | Type | Description | Method |
|---|---|---|---|
| Destinations (required) |
Array <Destination> | List of destinations where the response of the executed call is sent | GET POST |
Object Name: BacnetObject
| Property Name | Type | Description | Method |
|---|---|---|---|
| ObjectType | String | This is the type name of the BACnet object. | GET |
| ObjectInstance | Integer | This property is the instance of the BACnet object. | GET |
URL Example: https://0.0.0.0/api/rest/v1/scheduled-calls
{
"id": "analog-values-rpm",
"trigger": {
"type": "bacnetCov",
"bacnetObject": {
"objectType": "binaryvalue",
"objectInstance": 1
}
},
"method": "post",
"path": "/protocols/bacnet/local/objects/read-property-multiple",
"headers": {
"content-Type": "application/json"
},
"body": "{\"encode\": \"text\",\"propertyReferences\": [{\"type\": \"analogValue\",\"instance\": 1,\"property\":\"objectName\"},{\"type\":\"analogValue\",\"instance\": 2,\"property\":\"presentValue\"}]}",
"destinations": [
{
"type": "iotHub",
"initiator": "CF"
}
]
}
URL Example: https://0.0.0.0/api/rest/v1/scheduled-calls
{
"id": "analog-values-rpm",
"trigger": {
"type": "bacnetCov",
"bacnetObject": {
"objectType": "binaryvalue",
"objectInstance": 1
}
},
"method": "post",
"path": "/protocols/bacnet/local/objects/read-property-multiple",
"headers": {
"content-Type": "application/json"
},
"body": "{\"encode\": \"text\",\"propertyReferences\": [{\"type\": \"analogValue\",\"instance\": 1,\"property\":\"objectName\"},{\"type\":\"analogValue\",\"instance\": 2,\"property\":\"presentValue\"}]}",
"destinations": [
{
"type": "iotHub",
"initiator": "CF"
}
]
}