Reports
List all reports known to the server. May filter results by programID, eventID, and clientName as query param. Use skip and pagination query params to limit response size.
URL safe VTN assigned object ID.
object-999Pattern: ^[a-zA-Z0-9_-]*$URL safe VTN assigned object ID.
object-999Pattern: ^[a-zA-Z0-9_-]*$filter results to reports with clientName.
999number of records to skip for pagination.
maximum number of records to return.
start of timeperiod for which to return reports (extension - not part of the OpenADR specification)
end of timeperiod for which to return reports (extension - not part of the OpenADR specification)
OK.
Bad Request.
Forbidden.
Internal Server Error.
GET /api/openadr/v1/reports 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": "REPORT",
"programID": "object-999",
"eventID": "object-999",
"clientName": "VEN-999",
"reportName": "Battery_usage_04112023",
"payloadDescriptors": [
{
"objectType": "REPORT_PAYLOAD_DESCRIPTOR",
"payloadType": "USAGE",
"readingType": "DIRECT_READ",
"units": "KWH",
"accuracy": 0,
"confidence": 100
}
],
"resources": [
{
"resourceName": "RESOURCE-999",
"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 report in the server.
report object.
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_-]*$URL safe VTN assigned object ID.
object-999Pattern: ^[a-zA-Z0-9_-]*$User generated identifier; may be VEN ID provisioned out-of-band.
VEN-999User defined string for use in debugging or User Interface.
nullExample: Battery_usage_04112023Created.
Bad Request.
Forbidden.
Conflict. Implementation dependent response if identical report exists.
Internal Server Error.
POST /api/openadr/v1/reports HTTP/1.1
Host: qa-vtn3.switchmarket.se
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 696
{
"id": "object-999",
"createdDateTime": "2023-06-15T09:30:00Z",
"modificationDateTime": "2023-06-15T09:30:00Z",
"objectType": "REPORT",
"programID": "object-999",
"eventID": "object-999",
"clientName": "VEN-999",
"reportName": "Battery_usage_04112023",
"payloadDescriptors": [
{
"objectType": "REPORT_PAYLOAD_DESCRIPTOR",
"payloadType": "USAGE",
"readingType": "DIRECT_READ",
"units": "KWH",
"accuracy": 0,
"confidence": 100
}
],
"resources": [
{
"resourceName": "RESOURCE-999",
"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": "REPORT",
"programID": "object-999",
"eventID": "object-999",
"clientName": "VEN-999",
"reportName": "Battery_usage_04112023",
"payloadDescriptors": [
{
"objectType": "REPORT_PAYLOAD_DESCRIPTOR",
"payloadType": "USAGE",
"readingType": "DIRECT_READ",
"units": "KWH",
"accuracy": 0,
"confidence": 100
}
],
"resources": [
{
"resourceName": "RESOURCE-999",
"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 the report specified by the reportID 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/reports/{reportID} 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": "REPORT",
"programID": "object-999",
"eventID": "object-999",
"clientName": "VEN-999",
"reportName": "Battery_usage_04112023",
"payloadDescriptors": [
{
"objectType": "REPORT_PAYLOAD_DESCRIPTOR",
"payloadType": "USAGE",
"readingType": "DIRECT_READ",
"units": "KWH",
"accuracy": 0,
"confidence": 100
}
],
"resources": [
{
"resourceName": "RESOURCE-999",
"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 report specified by the reportID in path.
URL safe VTN assigned object ID.
object-999Pattern: ^[a-zA-Z0-9_-]*$report object.
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_-]*$URL safe VTN assigned object ID.
object-999Pattern: ^[a-zA-Z0-9_-]*$User generated identifier; may be VEN ID provisioned out-of-band.
VEN-999User defined string for use in debugging or User Interface.
nullExample: Battery_usage_04112023OK.
Bad Request.
Forbidden.
Not Found.
Conflict. Implementation dependent response if program with the same programName exists.
Internal Server Error.
PUT /api/openadr/v1/reports/{reportID} HTTP/1.1
Host: qa-vtn3.switchmarket.se
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 696
{
"id": "object-999",
"createdDateTime": "2023-06-15T09:30:00Z",
"modificationDateTime": "2023-06-15T09:30:00Z",
"objectType": "REPORT",
"programID": "object-999",
"eventID": "object-999",
"clientName": "VEN-999",
"reportName": "Battery_usage_04112023",
"payloadDescriptors": [
{
"objectType": "REPORT_PAYLOAD_DESCRIPTOR",
"payloadType": "USAGE",
"readingType": "DIRECT_READ",
"units": "KWH",
"accuracy": 0,
"confidence": 100
}
],
"resources": [
{
"resourceName": "RESOURCE-999",
"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": "REPORT",
"programID": "object-999",
"eventID": "object-999",
"clientName": "VEN-999",
"reportName": "Battery_usage_04112023",
"payloadDescriptors": [
{
"objectType": "REPORT_PAYLOAD_DESCRIPTOR",
"payloadType": "USAGE",
"readingType": "DIRECT_READ",
"units": "KWH",
"accuracy": 0,
"confidence": 100
}
],
"resources": [
{
"resourceName": "RESOURCE-999",
"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 report specified by the reportID 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/reports/{reportID} 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": "REPORT",
"programID": "object-999",
"eventID": "object-999",
"clientName": "VEN-999",
"reportName": "Battery_usage_04112023",
"payloadDescriptors": [
{
"objectType": "REPORT_PAYLOAD_DESCRIPTOR",
"payloadType": "USAGE",
"readingType": "DIRECT_READ",
"units": "KWH",
"accuracy": 0,
"confidence": 100
}
],
"resources": [
{
"resourceName": "RESOURCE-999",
"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?