Vens

search vens

get

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.

Authorizations
Query parameters
venNamestringOptional

Indicates ven objects w venName

targetTypestringOptional

Indicates targeting type, e.g. GROUP

targetValuesstring[]Optional

List of target values, e.g. group names

skipinteger · int32Optional

number of records to skip for pagination.

limitinteger · int32 · max: 50Optional

maximum number of records to return.

Responses
200
OK.
application/json
get
GET /api/openadr/v1/vens 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": "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 ven

post

Create a new ven.

Authorizations
Body

Ven represents a client with the ven role.

idstring · min: 1 · max: 128Optional

URL safe VTN assigned object ID.

Example: object-999Pattern: ^[a-zA-Z0-9_-]*$
createdDateTimestring · date-timeOptional

datetime in ISO 8601 format

Example: 2023-06-15T09:30:00Z
modificationDateTimestring · date-timeOptional

datetime in ISO 8601 format

Example: 2023-06-15T09:30:00Z
objectTypestring · enumOptional

Used as discriminator.

Possible values:
venNamestring · min: 1 · max: 128Required

User generated identifier, may be VEN identifier provisioned out-of-band. venName is expected to be unique within the scope of a VTN

Example: VEN-999
Responses
201
Created.
application/json
post
POST /api/openadr/v1/vens HTTP/1.1
Host: vtn3.switchmarket.se
Authorization: Bearer JWT
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
          ]
        }
      ]
    }
  ]
}

search vens by ID

get

Return the ven specified by venID specified in path.

Authorizations
Path parameters
venIDstring · min: 1 · max: 128Required

URL safe VTN assigned object ID.

Example: object-999Pattern: ^[a-zA-Z0-9_-]*$
Responses
200
OK.
application/json
get
GET /api/openadr/v1/vens/{venID} 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": "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 ven

put

Update the ven specified by venID specified in path.

Authorizations
Path parameters
venIDstring · min: 1 · max: 128Required

URL safe VTN assigned object ID.

Example: object-999Pattern: ^[a-zA-Z0-9_-]*$
Body

Ven represents a client with the ven role.

idstring · min: 1 · max: 128Optional

URL safe VTN assigned object ID.

Example: object-999Pattern: ^[a-zA-Z0-9_-]*$
createdDateTimestring · date-timeOptional

datetime in ISO 8601 format

Example: 2023-06-15T09:30:00Z
modificationDateTimestring · date-timeOptional

datetime in ISO 8601 format

Example: 2023-06-15T09:30:00Z
objectTypestring · enumOptional

Used as discriminator.

Possible values:
venNamestring · min: 1 · max: 128Required

User generated identifier, may be VEN identifier provisioned out-of-band. venName is expected to be unique within the scope of a VTN

Example: VEN-999
Responses
200
OK.
application/json
put
PUT /api/openadr/v1/vens/{venID} HTTP/1.1
Host: vtn3.switchmarket.se
Authorization: Bearer JWT
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 ven

delete

Delete the ven specified by venID specified in path.

Authorizations
Path parameters
venIDstring · min: 1 · max: 128Required

URL safe VTN assigned object ID.

Example: object-999Pattern: ^[a-zA-Z0-9_-]*$
Responses
200
OK.
application/json
delete
DELETE /api/openadr/v1/vens/{venID} 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": "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
          ]
        }
      ]
    }
  ]
}

search ven resources

get

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.

Authorizations
Path parameters
venIDstring · min: 1 · max: 128Required

URL safe VTN assigned object ID.

Example: object-999Pattern: ^[a-zA-Z0-9_-]*$
Query parameters
resourceNamestringOptional

Indicates resource objects with resourceName

targetTypestringOptional

Indicates targeting type, e.g. GROUP

targetValuesstring[]Optional

List of target values, e.g. group names

skipinteger · int32Optional

number of records to skip for pagination.

limitinteger · int32 · max: 50Optional

maximum number of records to return.

Responses
200
OK.
application/json
get
GET /api/openadr/v1/vens/{venID}/resources 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": "RESOURCE",
    "resourceName": "RESOURCE-999",
    "venID": "object-999",
    "attributes": [
      {
        "type": "PRICE",
        "values": [
          0.17
        ]
      }
    ],
    "targets": [
      {
        "type": "PRICE",
        "values": [
          0.17
        ]
      }
    ]
  }
]

create resource

post

Create a new resource.

Authorizations
Path parameters
venIDstring · min: 1 · max: 128Required

URL safe VTN assigned object ID.

Example: object-999Pattern: ^[a-zA-Z0-9_-]*$
Body

A resource is an energy device or system subject to control by a VEN.

idstring · min: 1 · max: 128Optional

URL safe VTN assigned object ID.

Example: object-999Pattern: ^[a-zA-Z0-9_-]*$
createdDateTimestring · date-timeOptional

datetime in ISO 8601 format

Example: 2023-06-15T09:30:00Z
modificationDateTimestring · date-timeOptional

datetime in ISO 8601 format

Example: 2023-06-15T09:30:00Z
objectTypestring · enumOptional

Used as discriminator.

Possible values:
resourceNamestring · min: 1 · max: 128Required

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.

Example: RESOURCE-999
venIDstring · min: 1 · max: 128Optional

URL safe VTN assigned object ID.

Example: object-999Pattern: ^[a-zA-Z0-9_-]*$
Responses
201
Created.
application/json
post
POST /api/openadr/v1/vens/{venID}/resources HTTP/1.1
Host: vtn3.switchmarket.se
Authorization: Bearer JWT
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
      ]
    }
  ]
}

search ven resources by ID

get

Return the ven resource specified by venID and resourceID specified in path.

Authorizations
Path parameters
venIDstring · min: 1 · max: 128Required

URL safe VTN assigned object ID.

Example: object-999Pattern: ^[a-zA-Z0-9_-]*$
resourceIDstring · min: 1 · max: 128Required

URL safe VTN assigned object ID.

Example: object-999Pattern: ^[a-zA-Z0-9_-]*$
Responses
200
OK.
application/json
get
GET /api/openadr/v1/vens/{venID}/resources/{resourceID} 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": "RESOURCE",
  "resourceName": "RESOURCE-999",
  "venID": "object-999",
  "attributes": [
    {
      "type": "PRICE",
      "values": [
        0.17
      ]
    }
  ],
  "targets": [
    {
      "type": "PRICE",
      "values": [
        0.17
      ]
    }
  ]
}

update ven resource

put

Update the ven resource specified by venID and resourceID specified in path.

Authorizations
Path parameters
venIDstring · min: 1 · max: 128Required

URL safe VTN assigned object ID.

Example: object-999Pattern: ^[a-zA-Z0-9_-]*$
resourceIDstring · min: 1 · max: 128Required

URL safe VTN assigned object ID.

Example: object-999Pattern: ^[a-zA-Z0-9_-]*$
Body

A resource is an energy device or system subject to control by a VEN.

idstring · min: 1 · max: 128Optional

URL safe VTN assigned object ID.

Example: object-999Pattern: ^[a-zA-Z0-9_-]*$
createdDateTimestring · date-timeOptional

datetime in ISO 8601 format

Example: 2023-06-15T09:30:00Z
modificationDateTimestring · date-timeOptional

datetime in ISO 8601 format

Example: 2023-06-15T09:30:00Z
objectTypestring · enumOptional

Used as discriminator.

Possible values:
resourceNamestring · min: 1 · max: 128Required

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.

Example: RESOURCE-999
venIDstring · min: 1 · max: 128Optional

URL safe VTN assigned object ID.

Example: object-999Pattern: ^[a-zA-Z0-9_-]*$
Responses
200
OK.
application/json
put
PUT /api/openadr/v1/vens/{venID}/resources/{resourceID} HTTP/1.1
Host: vtn3.switchmarket.se
Authorization: Bearer JWT
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 ven resource

delete

Delete the ven resource specified by venID and resourceID specified in path.

Authorizations
Path parameters
venIDstring · min: 1 · max: 128Required

URL safe VTN assigned object ID.

Example: object-999Pattern: ^[a-zA-Z0-9_-]*$
resourceIDstring · min: 1 · max: 128Required

URL safe VTN assigned object ID.

Example: object-999Pattern: ^[a-zA-Z0-9_-]*$
Responses
200
OK.
application/json
delete
DELETE /api/openadr/v1/vens/{venID}/resources/{resourceID} 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": "RESOURCE",
  "resourceName": "RESOURCE-999",
  "venID": "object-999",
  "attributes": [
    {
      "type": "PRICE",
      "values": [
        0.17
      ]
    }
  ],
  "targets": [
    {
      "type": "PRICE",
      "values": [
        0.17
      ]
    }
  ]
}

Last updated

Was this helpful?