Vens
List all vens. May filter results by venName as query param. May filter results by targetType and targetValues as query params. Use skip and pagination query params to limit response size.
Indicates ven objects w venName
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.
OK.
Bad Request.
Forbidden.
Internal Server Error.
GET /api/openadr/v1/vens 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": "VEN",
"venName": "VEN-999",
"attributes": [
{
"type": "PRICE",
"values": [
0.17
]
}
],
"targets": [
{
"type": "PRICE",
"values": [
0.17
]
}
],
"resources": [
{
"id": "object-999",
"createdDateTime": "2023-06-15T09:30:00Z",
"modificationDateTime": "2023-06-15T09:30:00Z",
"objectType": "RESOURCE",
"resourceName": "RESOURCE-999",
"venID": "object-999",
"attributes": [
{
"type": "PRICE",
"values": [
0.17
]
}
],
"targets": [
{
"type": "PRICE",
"values": [
0.17
]
}
]
}
]
}
]Create a new ven.
Ven represents a client with the ven role.
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.
User generated identifier, may be VEN identifier provisioned out-of-band. venName is expected to be unique within the scope of a VTN
VEN-999Created.
Bad Request.
Forbidden.
Conflict. Implementation dependent response if ven with same venIdentifier already exists.
Internal Server Error.
POST /api/openadr/v1/vens HTTP/1.1
Host: qa-vtn3.switchmarket.se
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 527
{
"id": "object-999",
"createdDateTime": "2023-06-15T09:30:00Z",
"modificationDateTime": "2023-06-15T09:30:00Z",
"objectType": "VEN",
"venName": "VEN-999",
"attributes": [
{
"type": "PRICE",
"values": [
0.17
]
}
],
"targets": [
{
"type": "PRICE",
"values": [
0.17
]
}
],
"resources": [
{
"id": "object-999",
"createdDateTime": "2023-06-15T09:30:00Z",
"modificationDateTime": "2023-06-15T09:30:00Z",
"objectType": "RESOURCE",
"resourceName": "RESOURCE-999",
"venID": "object-999",
"attributes": [
{
"type": "PRICE",
"values": [
0.17
]
}
],
"targets": [
{
"type": "PRICE",
"values": [
0.17
]
}
]
}
]
}{
"id": "object-999",
"createdDateTime": "2023-06-15T09:30:00Z",
"modificationDateTime": "2023-06-15T09:30:00Z",
"objectType": "VEN",
"venName": "VEN-999",
"attributes": [
{
"type": "PRICE",
"values": [
0.17
]
}
],
"targets": [
{
"type": "PRICE",
"values": [
0.17
]
}
],
"resources": [
{
"id": "object-999",
"createdDateTime": "2023-06-15T09:30:00Z",
"modificationDateTime": "2023-06-15T09:30:00Z",
"objectType": "RESOURCE",
"resourceName": "RESOURCE-999",
"venID": "object-999",
"attributes": [
{
"type": "PRICE",
"values": [
0.17
]
}
],
"targets": [
{
"type": "PRICE",
"values": [
0.17
]
}
]
}
]
}Return the ven specified by venID specified 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/vens/{venID} 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": "VEN",
"venName": "VEN-999",
"attributes": [
{
"type": "PRICE",
"values": [
0.17
]
}
],
"targets": [
{
"type": "PRICE",
"values": [
0.17
]
}
],
"resources": [
{
"id": "object-999",
"createdDateTime": "2023-06-15T09:30:00Z",
"modificationDateTime": "2023-06-15T09:30:00Z",
"objectType": "RESOURCE",
"resourceName": "RESOURCE-999",
"venID": "object-999",
"attributes": [
{
"type": "PRICE",
"values": [
0.17
]
}
],
"targets": [
{
"type": "PRICE",
"values": [
0.17
]
}
]
}
]
}Update the ven specified by venID specified in path.
URL safe VTN assigned object ID.
object-999Pattern: ^[a-zA-Z0-9_-]*$Ven represents a client with the ven role.
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.
User generated identifier, may be VEN identifier provisioned out-of-band. venName is expected to be unique within the scope of a VTN
VEN-999OK.
Bad Request.
Forbidden.
Not Found.
Conflict. Implementation dependent response if program with the same programName exists.
Internal Server Error.
PUT /api/openadr/v1/vens/{venID} HTTP/1.1
Host: qa-vtn3.switchmarket.se
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 527
{
"id": "object-999",
"createdDateTime": "2023-06-15T09:30:00Z",
"modificationDateTime": "2023-06-15T09:30:00Z",
"objectType": "VEN",
"venName": "VEN-999",
"attributes": [
{
"type": "PRICE",
"values": [
0.17
]
}
],
"targets": [
{
"type": "PRICE",
"values": [
0.17
]
}
],
"resources": [
{
"id": "object-999",
"createdDateTime": "2023-06-15T09:30:00Z",
"modificationDateTime": "2023-06-15T09:30:00Z",
"objectType": "RESOURCE",
"resourceName": "RESOURCE-999",
"venID": "object-999",
"attributes": [
{
"type": "PRICE",
"values": [
0.17
]
}
],
"targets": [
{
"type": "PRICE",
"values": [
0.17
]
}
]
}
]
}{
"id": "object-999",
"createdDateTime": "2023-06-15T09:30:00Z",
"modificationDateTime": "2023-06-15T09:30:00Z",
"objectType": "VEN",
"venName": "VEN-999",
"attributes": [
{
"type": "PRICE",
"values": [
0.17
]
}
],
"targets": [
{
"type": "PRICE",
"values": [
0.17
]
}
],
"resources": [
{
"id": "object-999",
"createdDateTime": "2023-06-15T09:30:00Z",
"modificationDateTime": "2023-06-15T09:30:00Z",
"objectType": "RESOURCE",
"resourceName": "RESOURCE-999",
"venID": "object-999",
"attributes": [
{
"type": "PRICE",
"values": [
0.17
]
}
],
"targets": [
{
"type": "PRICE",
"values": [
0.17
]
}
]
}
]
}Delete the ven specified by venID specified 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/vens/{venID} 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": "VEN",
"venName": "VEN-999",
"attributes": [
{
"type": "PRICE",
"values": [
0.17
]
}
],
"targets": [
{
"type": "PRICE",
"values": [
0.17
]
}
],
"resources": [
{
"id": "object-999",
"createdDateTime": "2023-06-15T09:30:00Z",
"modificationDateTime": "2023-06-15T09:30:00Z",
"objectType": "RESOURCE",
"resourceName": "RESOURCE-999",
"venID": "object-999",
"attributes": [
{
"type": "PRICE",
"values": [
0.17
]
}
],
"targets": [
{
"type": "PRICE",
"values": [
0.17
]
}
]
}
]
}List all ven resources associated with ven with specified venID. May filter results by resourceName as query params. 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 resource objects with resourceName
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.
OK.
Bad Request.
Forbidden.
Not Found.
Internal Server Error.
GET /api/openadr/v1/vens/{venID}/resources 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": "RESOURCE",
"resourceName": "RESOURCE-999",
"venID": "object-999",
"attributes": [
{
"type": "PRICE",
"values": [
0.17
]
}
],
"targets": [
{
"type": "PRICE",
"values": [
0.17
]
}
]
}
]Create a new resource.
URL safe VTN assigned object ID.
object-999Pattern: ^[a-zA-Z0-9_-]*$A resource is an energy device or system subject to control by a VEN.
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.
User generated identifier, resource may be configured with identifier out-of-band. resourceName is expected to be unique within the scope of the associated VEN.
RESOURCE-999URL safe VTN assigned object ID.
object-999Pattern: ^[a-zA-Z0-9_-]*$Created.
Bad Request.
Forbidden.
Not Found.
Conflict. Implementation dependent response if resource with same resourceIdentifier already exists.
Internal Server Error.
POST /api/openadr/v1/vens/{venID}/resources HTTP/1.1
Host: qa-vtn3.switchmarket.se
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 274
{
"id": "object-999",
"createdDateTime": "2023-06-15T09:30:00Z",
"modificationDateTime": "2023-06-15T09:30:00Z",
"objectType": "RESOURCE",
"resourceName": "RESOURCE-999",
"venID": "object-999",
"attributes": [
{
"type": "PRICE",
"values": [
0.17
]
}
],
"targets": [
{
"type": "PRICE",
"values": [
0.17
]
}
]
}{
"id": "object-999",
"createdDateTime": "2023-06-15T09:30:00Z",
"modificationDateTime": "2023-06-15T09:30:00Z",
"objectType": "RESOURCE",
"resourceName": "RESOURCE-999",
"venID": "object-999",
"attributes": [
{
"type": "PRICE",
"values": [
0.17
]
}
],
"targets": [
{
"type": "PRICE",
"values": [
0.17
]
}
]
}Return the ven resource specified by venID and resourceID specified in path.
URL safe VTN assigned object ID.
object-999Pattern: ^[a-zA-Z0-9_-]*$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/vens/{venID}/resources/{resourceID} 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": "RESOURCE",
"resourceName": "RESOURCE-999",
"venID": "object-999",
"attributes": [
{
"type": "PRICE",
"values": [
0.17
]
}
],
"targets": [
{
"type": "PRICE",
"values": [
0.17
]
}
]
}Update the ven resource specified by venID and resourceID specified in path.
URL safe VTN assigned object ID.
object-999Pattern: ^[a-zA-Z0-9_-]*$URL safe VTN assigned object ID.
object-999Pattern: ^[a-zA-Z0-9_-]*$A resource is an energy device or system subject to control by a VEN.
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.
User generated identifier, resource may be configured with identifier out-of-band. resourceName is expected to be unique within the scope of the associated VEN.
RESOURCE-999URL safe VTN assigned object ID.
object-999Pattern: ^[a-zA-Z0-9_-]*$OK.
Bad Request.
Forbidden.
Not Found.
Conflict. Implementation dependent response if program with the same programName exists.
Internal Server Error.
PUT /api/openadr/v1/vens/{venID}/resources/{resourceID} HTTP/1.1
Host: qa-vtn3.switchmarket.se
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 274
{
"id": "object-999",
"createdDateTime": "2023-06-15T09:30:00Z",
"modificationDateTime": "2023-06-15T09:30:00Z",
"objectType": "RESOURCE",
"resourceName": "RESOURCE-999",
"venID": "object-999",
"attributes": [
{
"type": "PRICE",
"values": [
0.17
]
}
],
"targets": [
{
"type": "PRICE",
"values": [
0.17
]
}
]
}{
"id": "object-999",
"createdDateTime": "2023-06-15T09:30:00Z",
"modificationDateTime": "2023-06-15T09:30:00Z",
"objectType": "RESOURCE",
"resourceName": "RESOURCE-999",
"venID": "object-999",
"attributes": [
{
"type": "PRICE",
"values": [
0.17
]
}
],
"targets": [
{
"type": "PRICE",
"values": [
0.17
]
}
]
}Delete the ven resource specified by venID and resourceID specified in path.
URL safe VTN assigned object ID.
object-999Pattern: ^[a-zA-Z0-9_-]*$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/vens/{venID}/resources/{resourceID} 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": "RESOURCE",
"resourceName": "RESOURCE-999",
"venID": "object-999",
"attributes": [
{
"type": "PRICE",
"values": [
0.17
]
}
],
"targets": [
{
"type": "PRICE",
"values": [
0.17
]
}
]
}Was this helpful?