Events
List all events known to the server. May filter results by programID query param. May filter results by targetType and targetValues as query params. Use skip and pagination query params to limit response size.
URL safe VTN assigned object ID.
object-999Pattern: ^[a-zA-Z0-9_-]*$Indicates targeting type, e.g. GROUP
List of target values, e.g. group names
number of records to skip for pagination.
maximum number of records to return.
start of timeperiod for which to return events (extension - not part of the OpenADR specification)
end of timeperiod for which to return events (extension - not part of the OpenADR specification)
OK.
Bad Request.
Forbidden.
Internal Server Error.
GET /api/openadr/v1/events HTTP/1.1
Host: qa-vtn3.switchmarket.se
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
[
{
"id": "object-999",
"createdDateTime": "2023-06-15T09:30:00Z",
"modificationDateTime": "2023-06-15T09:30:00Z",
"objectType": "EVENT",
"programID": "object-999",
"eventName": "price event 11-18-2022",
"priority": 0,
"targets": [
{
"type": "PRICE",
"values": [
0.17
]
}
],
"reportDescriptors": [
{
"payloadType": "USAGE",
"readingType": "DIRECT_READ",
"units": "KWH",
"targets": [
{
"type": "PRICE",
"values": [
0.17
]
}
],
"aggregate": false,
"startInterval": -1,
"numIntervals": -1,
"historical": true,
"frequency": -1,
"repeat": 1
}
],
"payloadDescriptors": [
{
"objectType": "EVENT_PAYLOAD_DESCRIPTOR",
"payloadType": "PRICE",
"units": "KWH",
"currency": "USD"
}
],
"intervalPeriod": {
"start": "2023-06-15T09:30:00Z",
"duration": "PT1H",
"randomizeStart": "PT1H"
},
"intervals": [
{
"id": 0,
"intervalPeriod": {
"start": "2023-06-15T09:30:00Z",
"duration": "PT1H",
"randomizeStart": "PT1H"
},
"payloads": [
{
"type": "PRICE",
"values": [
0.17
]
}
]
}
]
}
]Create a new event in the server.
Event object to communicate a Demand Response request to VEN. If intervalPeriod is present, sets default start time and duration of intervals.
URL safe VTN assigned object ID.
object-999Pattern: ^[a-zA-Z0-9_-]*$datetime in ISO 8601 format
2023-06-15T09:30:00Zdatetime in ISO 8601 format
2023-06-15T09:30:00ZUsed as discriminator
URL safe VTN assigned object ID.
object-999Pattern: ^[a-zA-Z0-9_-]*$User defined string for use in debugging or User Interface.
nullExample: price event 11-18-2022Relative priority of event. A lower number is a higher priority.
nullExample: 0Created.
Bad Request.
Forbidden.
Conflict. Implementation dependent response if event with same name already exists.
Internal Server Error.
POST /api/openadr/v1/events HTTP/1.1
Host: qa-vtn3.switchmarket.se
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 850
{
"id": "object-999",
"createdDateTime": "2023-06-15T09:30:00Z",
"modificationDateTime": "2023-06-15T09:30:00Z",
"objectType": "EVENT",
"programID": "object-999",
"eventName": "price event 11-18-2022",
"priority": 0,
"targets": [
{
"type": "PRICE",
"values": [
0.17
]
}
],
"reportDescriptors": [
{
"payloadType": "USAGE",
"readingType": "DIRECT_READ",
"units": "KWH",
"targets": [
{
"type": "PRICE",
"values": [
0.17
]
}
],
"aggregate": false,
"startInterval": -1,
"numIntervals": -1,
"historical": true,
"frequency": -1,
"repeat": 1
}
],
"payloadDescriptors": [
{
"objectType": "EVENT_PAYLOAD_DESCRIPTOR",
"payloadType": "PRICE",
"units": "KWH",
"currency": "USD"
}
],
"intervalPeriod": {
"start": "2023-06-15T09:30:00Z",
"duration": "PT1H",
"randomizeStart": "PT1H"
},
"intervals": [
{
"id": 0,
"intervalPeriod": {
"start": "2023-06-15T09:30:00Z",
"duration": "PT1H",
"randomizeStart": "PT1H"
},
"payloads": [
{
"type": "PRICE",
"values": [
0.17
]
}
]
}
]
}{
"id": "object-999",
"createdDateTime": "2023-06-15T09:30:00Z",
"modificationDateTime": "2023-06-15T09:30:00Z",
"objectType": "EVENT",
"programID": "object-999",
"eventName": "price event 11-18-2022",
"priority": 0,
"targets": [
{
"type": "PRICE",
"values": [
0.17
]
}
],
"reportDescriptors": [
{
"payloadType": "USAGE",
"readingType": "DIRECT_READ",
"units": "KWH",
"targets": [
{
"type": "PRICE",
"values": [
0.17
]
}
],
"aggregate": false,
"startInterval": -1,
"numIntervals": -1,
"historical": true,
"frequency": -1,
"repeat": 1
}
],
"payloadDescriptors": [
{
"objectType": "EVENT_PAYLOAD_DESCRIPTOR",
"payloadType": "PRICE",
"units": "KWH",
"currency": "USD"
}
],
"intervalPeriod": {
"start": "2023-06-15T09:30:00Z",
"duration": "PT1H",
"randomizeStart": "PT1H"
},
"intervals": [
{
"id": 0,
"intervalPeriod": {
"start": "2023-06-15T09:30:00Z",
"duration": "PT1H",
"randomizeStart": "PT1H"
},
"payloads": [
{
"type": "PRICE",
"values": [
0.17
]
}
]
}
]
}Fetch event associated with the eventID in path.
URL safe VTN assigned object ID.
object-999Pattern: ^[a-zA-Z0-9_-]*$OK.
Bad Request.
Forbidden.
Not Found.
Internal Server Error.
GET /api/openadr/v1/events/{eventID} HTTP/1.1
Host: qa-vtn3.switchmarket.se
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
"id": "object-999",
"createdDateTime": "2023-06-15T09:30:00Z",
"modificationDateTime": "2023-06-15T09:30:00Z",
"objectType": "EVENT",
"programID": "object-999",
"eventName": "price event 11-18-2022",
"priority": 0,
"targets": [
{
"type": "PRICE",
"values": [
0.17
]
}
],
"reportDescriptors": [
{
"payloadType": "USAGE",
"readingType": "DIRECT_READ",
"units": "KWH",
"targets": [
{
"type": "PRICE",
"values": [
0.17
]
}
],
"aggregate": false,
"startInterval": -1,
"numIntervals": -1,
"historical": true,
"frequency": -1,
"repeat": 1
}
],
"payloadDescriptors": [
{
"objectType": "EVENT_PAYLOAD_DESCRIPTOR",
"payloadType": "PRICE",
"units": "KWH",
"currency": "USD"
}
],
"intervalPeriod": {
"start": "2023-06-15T09:30:00Z",
"duration": "PT1H",
"randomizeStart": "PT1H"
},
"intervals": [
{
"id": 0,
"intervalPeriod": {
"start": "2023-06-15T09:30:00Z",
"duration": "PT1H",
"randomizeStart": "PT1H"
},
"payloads": [
{
"type": "PRICE",
"values": [
0.17
]
}
]
}
]
}Update the event specified by the eventID in path.
URL safe VTN assigned object ID.
object-999Pattern: ^[a-zA-Z0-9_-]*$Event object to communicate a Demand Response request to VEN. If intervalPeriod is present, sets default start time and duration of intervals.
URL safe VTN assigned object ID.
object-999Pattern: ^[a-zA-Z0-9_-]*$datetime in ISO 8601 format
2023-06-15T09:30:00Zdatetime in ISO 8601 format
2023-06-15T09:30:00ZUsed as discriminator
URL safe VTN assigned object ID.
object-999Pattern: ^[a-zA-Z0-9_-]*$User defined string for use in debugging or User Interface.
nullExample: price event 11-18-2022Relative priority of event. A lower number is a higher priority.
nullExample: 0OK.
Bad Request.
Forbidden.
Not Found.
Conflict. Implementation dependent response if program with the same programName exists.
Internal Server Error.
PUT /api/openadr/v1/events/{eventID} HTTP/1.1
Host: qa-vtn3.switchmarket.se
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 850
{
"id": "object-999",
"createdDateTime": "2023-06-15T09:30:00Z",
"modificationDateTime": "2023-06-15T09:30:00Z",
"objectType": "EVENT",
"programID": "object-999",
"eventName": "price event 11-18-2022",
"priority": 0,
"targets": [
{
"type": "PRICE",
"values": [
0.17
]
}
],
"reportDescriptors": [
{
"payloadType": "USAGE",
"readingType": "DIRECT_READ",
"units": "KWH",
"targets": [
{
"type": "PRICE",
"values": [
0.17
]
}
],
"aggregate": false,
"startInterval": -1,
"numIntervals": -1,
"historical": true,
"frequency": -1,
"repeat": 1
}
],
"payloadDescriptors": [
{
"objectType": "EVENT_PAYLOAD_DESCRIPTOR",
"payloadType": "PRICE",
"units": "KWH",
"currency": "USD"
}
],
"intervalPeriod": {
"start": "2023-06-15T09:30:00Z",
"duration": "PT1H",
"randomizeStart": "PT1H"
},
"intervals": [
{
"id": 0,
"intervalPeriod": {
"start": "2023-06-15T09:30:00Z",
"duration": "PT1H",
"randomizeStart": "PT1H"
},
"payloads": [
{
"type": "PRICE",
"values": [
0.17
]
}
]
}
]
}{
"id": "object-999",
"createdDateTime": "2023-06-15T09:30:00Z",
"modificationDateTime": "2023-06-15T09:30:00Z",
"objectType": "EVENT",
"programID": "object-999",
"eventName": "price event 11-18-2022",
"priority": 0,
"targets": [
{
"type": "PRICE",
"values": [
0.17
]
}
],
"reportDescriptors": [
{
"payloadType": "USAGE",
"readingType": "DIRECT_READ",
"units": "KWH",
"targets": [
{
"type": "PRICE",
"values": [
0.17
]
}
],
"aggregate": false,
"startInterval": -1,
"numIntervals": -1,
"historical": true,
"frequency": -1,
"repeat": 1
}
],
"payloadDescriptors": [
{
"objectType": "EVENT_PAYLOAD_DESCRIPTOR",
"payloadType": "PRICE",
"units": "KWH",
"currency": "USD"
}
],
"intervalPeriod": {
"start": "2023-06-15T09:30:00Z",
"duration": "PT1H",
"randomizeStart": "PT1H"
},
"intervals": [
{
"id": 0,
"intervalPeriod": {
"start": "2023-06-15T09:30:00Z",
"duration": "PT1H",
"randomizeStart": "PT1H"
},
"payloads": [
{
"type": "PRICE",
"values": [
0.17
]
}
]
}
]
}Delete the event specified by the eventID in path.
URL safe VTN assigned object ID.
object-999Pattern: ^[a-zA-Z0-9_-]*$OK.
Bad Request.
Forbidden.
Not Found.
Internal Server Error.
DELETE /api/openadr/v1/events/{eventID} HTTP/1.1
Host: qa-vtn3.switchmarket.se
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
"id": "object-999",
"createdDateTime": "2023-06-15T09:30:00Z",
"modificationDateTime": "2023-06-15T09:30:00Z",
"objectType": "EVENT",
"programID": "object-999",
"eventName": "price event 11-18-2022",
"priority": 0,
"targets": [
{
"type": "PRICE",
"values": [
0.17
]
}
],
"reportDescriptors": [
{
"payloadType": "USAGE",
"readingType": "DIRECT_READ",
"units": "KWH",
"targets": [
{
"type": "PRICE",
"values": [
0.17
]
}
],
"aggregate": false,
"startInterval": -1,
"numIntervals": -1,
"historical": true,
"frequency": -1,
"repeat": 1
}
],
"payloadDescriptors": [
{
"objectType": "EVENT_PAYLOAD_DESCRIPTOR",
"payloadType": "PRICE",
"units": "KWH",
"currency": "USD"
}
],
"intervalPeriod": {
"start": "2023-06-15T09:30:00Z",
"duration": "PT1H",
"randomizeStart": "PT1H"
},
"intervals": [
{
"id": 0,
"intervalPeriod": {
"start": "2023-06-15T09:30:00Z",
"duration": "PT1H",
"randomizeStart": "PT1H"
},
"payloads": [
{
"type": "PRICE",
"values": [
0.17
]
}
]
}
]
}Was this helpful?