POST /protocols/bacnet/local/objects/schedule/{objectInstance}/properties/exception-schedule
FROM API REVISION 6.0
This resource is used to initialize the Exception Schedule of a BACnet Schedule object.
The resource posted has to be a BacnetProperty
object.
The value
property of this object is an Array of SpecialEvent
.
There is four types of special event that can be created:
The example below contains a SpecialEvent
array with all the type above.
Used when you are operating a browser without access to the header parameter. This allows you to choose which encoding you want to use for the response:
All these resources can be used according what the resource allows.
If this parameter is not in the request, the Application/Json will be chosen by default.
There are multiple possible values (according the resource):
The first two are the most often used.
There are multiple possible values according the resource:
If this parameter is not present during the request, and error 415 Unsupported Media Type will be thrown.
This is the instance of a specific BACnet object type.
The Content-Length entity-header field indicates the size of the entity-body.
Object Name: BacnetProperty
Property Name | Type | Description | Method |
---|---|---|---|
Name | String | This property is the name of the BACnet property. | GET |
IsArray | Boolean | This property indicates if the BACnet property is an array or not. | GET |
Implementation | String | GET | |
AsnValue | String | This property is the ASN value of a BACnet property encoded in Base64. | GET |
Value required |
String | This property is the readable value of a BACnet property. According the BACnet property, it's possible the type of this property vary. (See the description of the resource for more details) |
GET POST |
Object Name: TimeValue
Property Name | Type | Description | Method |
---|---|---|---|
Value | Integer | This is the value of the TimeValue object.The type of this property will depend of the Type property value. If the type property is : - Enumerated or Numeric : The type will be Integer. - Boolean : The type will be Boolean. - Null : The type will be Null (empty in XML and null in JSON : See example). |
GET POST |
Type | String | Possible values : - Enumerated - Boolean - Numeric - Null |
GET POST |
Time | String | This is the time value. It can follow two formats: - 08:00 - 08:00:00.00 |
GET POST |
Object Name: SpecialEvent
Property Name | Type | Description | Method |
---|---|---|---|
Type | String | This property needs to contain the type of the object send with it. It can be : - SimpleDate - WeekAndDay - DateRange - Reference |
GET POST |
SimpleDate | Object | This object contains a Date, a DayOfWeek and the TimeValues (the last one is optional : It depends of the use case). | GET POST |
WeekAndDay | Object | GET POST |
|
DateRange | Object | GET POST |
|
Reference | Object | GET POST |
Object Name: SimpleDate
Property Name | Type | Description | Method |
---|---|---|---|
Date | String | This can be : - 2018-08-01 - 2018-08-* - 2018-*-* - *-*-* |
GET POST |
DayOfWeek | String | This is the day of the week: - Monday - Tuesday - Wednesday - Thursday - Friday - Saturday - Sunday - * (The number of star doesn’t matter) If a bad day is entered, the star(*) will be set. |
GET POST |
TimeValues | Array <TimeValue> |
An array of TimeValue object. | GET POST |
Object Name: WeekAndDay
Property Name | Type | Description | Method |
---|---|---|---|
DayOfWeek | String | This is the day of the week: - Monday - Tuesday - Wednesday - Thursday - Friday - Saturday - Sunday - * (The number of star doesn’t matter) If a bad day is entered, the star(*) will be set. |
GET POST |
TimeValues | Array <TimeValue> |
An array of TimeValue object. | GET POST |
Week | Integer | These are the numbers allowed: - 1 → days1to7 - 2 → days8to14 - 3 → days15to21 - 4 → days22to28 - 5 → days29to31 - 6 → last7days - 255 → any |
GET POST |
Month | String | This can be: - January - February - March - April - May - June - July - August - September - October - November - December - *(The number of star doesn’t matter) If a bad Month is entered, the star(*) will be set. |
GET POST |
Object Name: DateRange
Property Name | Type | Description | Method |
---|---|---|---|
TimeValues | Array <TimeValue> |
An array of TimeValue object. | GET POST |
StartDate | String | This can be : - 2018-08-01 - 2018-08-* - 2018-*-* - *-*-* |
GET POST |
EndDate | String | This can be : - 2018-08-01 - 2018-08-* - 2018-*-* - *-*-* |
GET POST |
Object Name: Reference
Property Name | Type | Description | Method |
---|---|---|---|
TimeValues | Array <TimeValue> |
An array of TimeValue object. | GET POST |
ObjectType | String | The name of the object. Usually a calendar. |
GET POST |
ObjectInstance | Integer | The number of the instance. | GET POST |
URL Example: https://0.0.0.0/api/rest/v1/protocols/bacnet/local/objects/schedule/1/properties/exception-schedule
{
"value": [
{
"type": "dateRange",
"dateRange": {
"timeValues": [
{
"value": 2,
"type": "enumerated",
"time": "09:00:00.00"
},
{
"value": null,
"type": "null",
"time": "13:00:00.00"
}
],
"startDate": "*-*-*",
"endDate": "*-*-*"
}
},
{
"type": "weekAndDay",
"weekAndDay": {
"timeValues": [
{
"value": 4,
"type": "enumerated",
"time": "12:00:00.00"
},
{
"value": null,
"type": "null",
"time": "14:00:00.00"
}
],
"month": "***",
"dayOfWeek": "***",
"week": 255
}
},
{
"type": "simpleDate",
"simpleDate": {
"timeValues": [
{
"value": 1,
"type": "enumerated",
"time": "07:00:00.00"
},
{
"value": null,
"type": "null",
"time": "10:00:00.00"
}
],
"date": "*-*-1",
"dayOfWeek": "***"
}
},
{
"type": "reference",
"reference": {
"timeValues": [
{
"value": 3,
"type": "enumerated",
"time": "08:00:00.00"
},
{
"value": null,
"type": "null",
"time": "16:00:00.00"
}
],
"objectInstance": 1,
"objectType": "calendar"
}
}
]
}
URL Example: https://0.0.0.0/api/rest/v1/protocols/bacnet/local/objects/schedule/1/properties/exception-schedule
<?xml version="1.0" encoding="utf-8"?>
<BacnetProperty>
<Value>
<SpecialEvent>
<Type>dateRange</Type>
<DateRange>
<StartDate>*-*-*</StartDate>
<EndDate>*-*-*</EndDate>
<TimeValues>
<TimeValue>
<Time>09:00:00.00</Time>
<Type>enumerated</Type>
<Value>2</Value>
</TimeValue>
<TimeValue>
<Time>13:00:00.00</Time>
<Type>null</Type>
<Value />
</TimeValue>
</TimeValues>
</DateRange>
</SpecialEvent>
<SpecialEvent>
<Type>weekAndDay</Type>
<WeekAndDay>
<DayOfWeek>***</DayOfWeek>
<Week>255</Week>
<Month>***</Month>
<TimeValues>
<TimeValue>
<Time>12:00:00.00</Time>
<Type>enumerated</Type>
<Value>4</Value>
</TimeValue>
<TimeValue>
<Time>14:00:00.00</Time>
<Type>null</Type>
<Value />
</TimeValue>
</TimeValues>
</WeekAndDay>
</SpecialEvent>
<SpecialEvent>
<Type>simpleDate</Type>
<SimpleDate>
<Date>*-*-1</Date>
<DayOfWeek>***</DayOfWeek>
<TimeValues>
<TimeValue>
<Time>07:00:00.00</Time>
<Type>enumerated</Type>
<Value>1</Value>
</TimeValue>
<TimeValue>
<Time>10:00:00.00</Time>
<Type>null</Type>
<Value />
</TimeValue>
</TimeValues>
</SimpleDate>
</SpecialEvent>
<SpecialEvent>
<Type>reference</Type>
<Reference>
<ObjectType>calendar</ObjectType>
<ObjectInstance>1</ObjectInstance>
<TimeValues>
<TimeValue>
<Time>08:00:00.00</Time>
<Type>enumerated</Type>
<Value>3</Value>
</TimeValue>
<TimeValue>
<Time>16:00:00.00</Time>
<Type>null</Type>
<Value />
</TimeValue>
</TimeValues>
</Reference>
</SpecialEvent>
</Value>
</BacnetProperty>