Subscriptions
List all subscriptions. May filter results by programID and clientName as query params. May filter results by targetType and targetValues as query params. May filter results by objects as query param. See objectTypes schema. Use skip and pagination query params to limit response size.
URL safe VTN assigned object ID.
object-999
Pattern: ^[a-zA-Z0-9_-]*$
filter results to subscriptions with clientName.
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.
GET /api/openadr/v1/subscriptions HTTP/1.1
Host: vtn3.switchmarket.se
Authorization: Bearer JWT
Accept: */*
[
{
"id": "object-999",
"createdDateTime": "2023-06-15T09:30:00Z",
"modificationDateTime": "2023-06-15T09:30:00Z",
"objectType": "SUBSCRIPTION",
"clientName": "VEN-999",
"programID": "object-999",
"objectOperations": [
{
"objects": [
"EVENT"
],
"operations": [
"POST"
],
"callbackUrl": "https://myserver.com/send/callback/here",
"bearerToken": "NCEJGI9E8ER9802UT9HUG"
}
],
"targets": [
{
"type": "PRICE",
"values": [
0.17
]
}
]
}
]
Create a new subscription.
An object created by a client to receive notification of operations on objects. Clients may subscribe to be notified when a type of object is created, updated, or deleted.
URL safe VTN assigned object ID.
object-999
Pattern: ^[a-zA-Z0-9_-]*$
datetime in ISO 8601 format
2023-06-15T09:30:00Z
datetime in ISO 8601 format
2023-06-15T09:30:00Z
Used as discriminator.
User generated identifier, may be VEN identifier provisioned out-of-band.
VEN-999
URL safe VTN assigned object ID.
object-999
Pattern: ^[a-zA-Z0-9_-]*$
POST /api/openadr/v1/subscriptions HTTP/1.1
Host: vtn3.switchmarket.se
Authorization: Bearer JWT
Content-Type: application/json
Accept: */*
Content-Length: 386
{
"id": "object-999",
"createdDateTime": "2023-06-15T09:30:00Z",
"modificationDateTime": "2023-06-15T09:30:00Z",
"objectType": "SUBSCRIPTION",
"clientName": "VEN-999",
"programID": "object-999",
"objectOperations": [
{
"objects": [
"EVENT"
],
"operations": [
"POST"
],
"callbackUrl": "https://myserver.com/send/callback/here",
"bearerToken": "NCEJGI9E8ER9802UT9HUG"
}
],
"targets": [
{
"type": "PRICE",
"values": [
0.17
]
}
]
}
{
"id": "object-999",
"createdDateTime": "2023-06-15T09:30:00Z",
"modificationDateTime": "2023-06-15T09:30:00Z",
"objectType": "SUBSCRIPTION",
"clientName": "VEN-999",
"programID": "object-999",
"objectOperations": [
{
"objects": [
"EVENT"
],
"operations": [
"POST"
],
"callbackUrl": "https://myserver.com/send/callback/here",
"bearerToken": "NCEJGI9E8ER9802UT9HUG"
}
],
"targets": [
{
"type": "PRICE",
"values": [
0.17
]
}
]
}
Return the subscription specified by subscriptionID specified in path.
URL safe VTN assigned object ID.
object-999
Pattern: ^[a-zA-Z0-9_-]*$
GET /api/openadr/v1/subscriptions/{subscriptionID} HTTP/1.1
Host: vtn3.switchmarket.se
Authorization: Bearer JWT
Accept: */*
{
"id": "object-999",
"createdDateTime": "2023-06-15T09:30:00Z",
"modificationDateTime": "2023-06-15T09:30:00Z",
"objectType": "SUBSCRIPTION",
"clientName": "VEN-999",
"programID": "object-999",
"objectOperations": [
{
"objects": [
"EVENT"
],
"operations": [
"POST"
],
"callbackUrl": "https://myserver.com/send/callback/here",
"bearerToken": "NCEJGI9E8ER9802UT9HUG"
}
],
"targets": [
{
"type": "PRICE",
"values": [
0.17
]
}
]
}
Update the subscription specified by subscriptionID specified in path.
URL safe VTN assigned object ID.
object-999
Pattern: ^[a-zA-Z0-9_-]*$
An object created by a client to receive notification of operations on objects. Clients may subscribe to be notified when a type of object is created, updated, or deleted.
URL safe VTN assigned object ID.
object-999
Pattern: ^[a-zA-Z0-9_-]*$
datetime in ISO 8601 format
2023-06-15T09:30:00Z
datetime in ISO 8601 format
2023-06-15T09:30:00Z
Used as discriminator.
User generated identifier, may be VEN identifier provisioned out-of-band.
VEN-999
URL safe VTN assigned object ID.
object-999
Pattern: ^[a-zA-Z0-9_-]*$
PUT /api/openadr/v1/subscriptions/{subscriptionID} HTTP/1.1
Host: vtn3.switchmarket.se
Authorization: Bearer JWT
Content-Type: application/json
Accept: */*
Content-Length: 386
{
"id": "object-999",
"createdDateTime": "2023-06-15T09:30:00Z",
"modificationDateTime": "2023-06-15T09:30:00Z",
"objectType": "SUBSCRIPTION",
"clientName": "VEN-999",
"programID": "object-999",
"objectOperations": [
{
"objects": [
"EVENT"
],
"operations": [
"POST"
],
"callbackUrl": "https://myserver.com/send/callback/here",
"bearerToken": "NCEJGI9E8ER9802UT9HUG"
}
],
"targets": [
{
"type": "PRICE",
"values": [
0.17
]
}
]
}
{
"id": "object-999",
"createdDateTime": "2023-06-15T09:30:00Z",
"modificationDateTime": "2023-06-15T09:30:00Z",
"objectType": "SUBSCRIPTION",
"clientName": "VEN-999",
"programID": "object-999",
"objectOperations": [
{
"objects": [
"EVENT"
],
"operations": [
"POST"
],
"callbackUrl": "https://myserver.com/send/callback/here",
"bearerToken": "NCEJGI9E8ER9802UT9HUG"
}
],
"targets": [
{
"type": "PRICE",
"values": [
0.17
]
}
]
}
Delete the subscription specified by subscriptionID specified in path.
URL safe VTN assigned object ID.
object-999
Pattern: ^[a-zA-Z0-9_-]*$
DELETE /api/openadr/v1/subscriptions/{subscriptionID} HTTP/1.1
Host: vtn3.switchmarket.se
Authorization: Bearer JWT
Accept: */*
{
"id": "object-999",
"createdDateTime": "2023-06-15T09:30:00Z",
"modificationDateTime": "2023-06-15T09:30:00Z",
"objectType": "SUBSCRIPTION",
"clientName": "VEN-999",
"programID": "object-999",
"objectOperations": [
{
"objects": [
"EVENT"
],
"operations": [
"POST"
],
"callbackUrl": "https://myserver.com/send/callback/here",
"bearerToken": "NCEJGI9E8ER9802UT9HUG"
}
],
"targets": [
{
"type": "PRICE",
"values": [
0.17
]
}
]
}
Last updated
Was this helpful?