Download OpenAPI specification:
This is OpenAPI specification for Cozify ONE platform.
If you are new to Cozify Services, there are some terms you might not be familiar with.
Cozify.Sites, which supplies the
structural management of site (aka. Buildings) resource. Cozify.Devices is
another common resource provider.In addition to the REST endpoints described here, there is also SignalR hub for streaming device events and managing event subscriptions at /hub/v1 endpoint.
See the following page for more information about SignalR streams and how to use them with a .NET/JavaScript/Java client: https://learn.microsoft.com/en-us/aspnet/core/signalr/streaming
DeviceEventsStreamDeviceEvent is defined in this OpenApi documentDeviceEventsSubscribeAll(string deviceRegisterId)DeviceEventsUnsubscribeAll(string deviceRegisterId)DeviceEventsSubscribe(SubscribeDeviceEvents subscribeRequest)SubscribeDeviceEvents type is defined in this OpenApi document.DeviceEventsUnsubscribe(UnsubscribeDeviceEvents unsubscribeRequest)UnsubscribeDeviceEvents type is defined in this OpenApi document.DeviceEventsUnsubscribeAll instead in this caseCozify will only support Transport Layer Security (TLS) 1.2 or later.
Set the currently active tenant for logged in principal. When changing the currently active tenant you must retrieve new access token and use it in order to access resources of that tenant.
| tenantId required | string [ 1 .. 50 ] characters |
{- "tenantId": "abcdefgh-1234-5678-9834-73661824c1bc"
}{- "id": "/Tenant/2c269807-b266-4b5e-af95-c807d7aca12c",
- "tenantId": "2c269807-b266-4b5e-af95-c807d7aca12c",
- "displayName": "My Company Ab"
}Gets the tenants for your account.
| pageSize | integer <int32> Example: pageSize=50 Maximum size of the page. Value must be between 1-2000. |
| next | string Example: next=ZbXBsZS1kZXZpY2UtMQ Cursor to get next page of results if there are any. |
| prev | string Example: prev=ASDsZS1kZXZpY2Us Cursor to get previous page of results if there are any. |
{- "data": [
- {
- "id": "/Tenant/2c269807-b266-4b5e-af95-c807d7aca12c",
- "tenantId": "2c269807-b266-4b5e-af95-c807d7aca12c",
- "displayName": "My Company Ab"
}
], - "links": {
- "next": null,
- "prev": null
}
}Create tenant details for your account.
This is only used internally.
| displayName required | string (DisplayName) [ 1 .. 50 ] characters |
{- "displayName": "West wing"
}{- "id": "/Tenant/2c269807-b266-4b5e-af95-c807d7aca12c",
- "tenantId": "2c269807-b266-4b5e-af95-c807d7aca12c",
- "displayName": "My Company Ab"
}Gets an tenant by given id.
| tenantId required | string Example: 2c269807-b266-4b5e-af95-c807d7aca12c An tenant id |
{- "id": "/Tenant/2c269807-b266-4b5e-af95-c807d7aca12c",
- "tenantId": "2c269807-b266-4b5e-af95-c807d7aca12c",
- "displayName": "My Company Ab"
}Get all available templates of given type for tenant.
| tenantId required | string |
| templateType required | string (TemplateTypes) Enum: "device" "dashboard" "schema" |
[- {
- "type": "COZIFY_HUB",
- "defaultTemplateId": "",
- "templates": [
- {
- "id": "my-unique-template-id",
- "name": "ZEN",
- "content": {
- "ENABLED": false
}
}
]
}
]This will add template for the tenant. Template will be available for all resources owned by the tenant.
| tenantId required | string |
| templateType required | string (TemplateTypes) Enum: "device" "dashboard" "schema" |
| id | string [ 1 .. 100 ] ^([a-z0-9-_])+$ |
| displayName | string [ 1 .. 100 ] |
| content | object Template content. Expects a JSON object. |
| setAsDefault | boolean Default: false Set the template as default for the template type. |
{- "id": "my-unique-template-id",
- "displayName": "My template",
- "content": { },
- "setAsDefault": false
}{- "id": "my-unique-template-id",
- "name": "ZEN",
- "content": {
- "ENABLED": false
}
}| tenantId required | string |
| templateId required | string |
| templateType required | string (TemplateTypes) Enum: "device" "dashboard" "schema" |
| displayName | string [ 1 .. 100 ] |
| content | object Template content. Expects a JSON object. |
| setAsDefault | boolean Set the template as default for the template type. |
{- "displayName": "Renamed template",
- "content": { },
- "setAsDefault": true
}{- "id": "my-unique-template-id",
- "name": "ZEN",
- "content": {
- "ENABLED": false
}
}| tenantId required | string |
| templateType required | string (TemplateTypes) Enum: "device" "dashboard" "schema" |
| templateId required | string |
{- "title": "Example error happened.",
- "status": 400,
- "detail": "Example error happened for request.",
- "instance": "/some/Resource"
}Add device configuration template for device type for tenant. This will add device configuration for the tenant. Template will be available on all device registers owned by the tenant.
| tenantId required | string |
| deviceType required | string |
| id | string [ 1 .. 100 ] ^([a-z0-9-_])+$ |
| displayName | string [ 1 .. 100 ] |
| content | object Template content. Expects a JSON object. |
| setAsDefault | boolean Default: false Set the template as default for the template type. |
{- "id": "my-unique-template-id",
- "displayName": "My template",
- "content": { },
- "setAsDefault": false
}{- "id": "my-unique-template-id",
- "name": "ZEN",
- "content": {
- "ENABLED": false
}
}Update device configuration template for tenant. This will fully replace the given template.
| tenantId required | string |
| deviceType required | string |
| templateId required | string |
| displayName | string [ 1 .. 100 ] |
| content | object Template content. Expects a JSON object. |
| setAsDefault | boolean Set the template as default for the template type. |
{- "displayName": "Renamed template",
- "content": { },
- "setAsDefault": true
}{- "id": "my-unique-template-id",
- "name": "ZEN",
- "content": {
- "ENABLED": false
}
}Gets the subscriptions for your account.
| pageSize | integer <int32> Example: pageSize=50 Maximum size of the page. Value must be between 1-2000. |
| next | string Example: next=ZbXBsZS1kZXZpY2UtMQ Cursor to get next page of results if there are any. |
| prev | string Example: prev=ASDsZS1kZXZpY2Us Cursor to get previous page of results if there are any. |
{- "data": [
- {
- "id": "/Subscriptions/ae3fc088-3446-4d93-b105-d18700a2dac3",
- "subscriptionId": "ae3fc088-3446-4d93-b105-d18700a2dac3",
- "displayName": "West wing",
- "tags": {
- "env": "dev"
}
}
], - "links": {
- "next": null,
- "prev": null
}
}Create subscription for your account active tenant.
| displayName required | string (DisplayName) [ 1 .. 50 ] characters |
object (Tags) The collection of tags |
{- "displayName": "West wing",
- "tags": {
- "env": "dev"
}
}{- "id": "/Subscriptions/ae3fc088-3446-4d93-b105-d18700a2dac3",
- "subscriptionId": "ae3fc088-3446-4d93-b105-d18700a2dac3",
- "displayName": "West wing",
- "tags": {
- "env": "dev"
}
}Gets an subscription by given id.
| subscriptionId required | string Example: ae3fc088-3446-4d93-b105-d18700a2dac3 An subscription id |
{- "id": "/Subscriptions/ae3fc088-3446-4d93-b105-d18700a2dac3",
- "subscriptionId": "ae3fc088-3446-4d93-b105-d18700a2dac3",
- "displayName": "West wing",
- "tags": {
- "env": "dev"
}
}Delete an subscription by given id.
| subscriptionId required | string Example: ae3fc088-3446-4d93-b105-d18700a2dac3 An subscription id |
{- "title": "Example error happened.",
- "status": 400,
- "detail": "Example error happened for request.",
- "instance": "/some/Resource"
}Gets resource groups in the subscription.
| subscriptionId required | string |
| pageSize | integer <int32> Example: pageSize=50 Maximum size of the page. Value must be between 1-2000. |
| next | string Example: next=ZbXBsZS1kZXZpY2UtMQ Cursor to get next page of results if there are any. |
| prev | string Example: prev=ASDsZS1kZXZpY2Us Cursor to get previous page of results if there are any. |
{- "data": [
- {
- "id": "/Subscriptions/ae3fc088-3446-4d93-b105-d18700a2dac3/ResourceGroups/west-resources-rg",
- "name": "west-resources-rg",
- "location": "eu-north-1",
- "tags": {
- "env": "dev"
}
}
], - "links": {
- "next": null,
- "prev": null
}
}Create resource group in the subscription.
| subscriptionId required | string |
| name required | string [ 3 .. 50 ] characters |
| location required | string |
object (Tags) The collection of tags |
{- "name": "west-resources-rg",
- "location": "eu-north-1",
- "tags": {
- "env": "dev"
}
}{- "id": "/Subscriptions/ae3fc088-3446-4d93-b105-d18700a2dac3/ResourceGroups/west-resources-rg",
- "name": "west-resources-rg",
- "location": "eu-north-1",
- "tags": {
- "env": "dev"
}
}Gets an resource group in given subscription.
| subscriptionId required | string Example: ae3fc088-3446-4d93-b105-d18700a2dac3 An subscription id |
| resourceGroupName required | string Example: west-resources-rg An resource group name |
{- "id": "/Subscriptions/ae3fc088-3446-4d93-b105-d18700a2dac3/ResourceGroups/west-resources-rg",
- "name": "west-resources-rg",
- "location": "eu-north-1",
- "tags": {
- "env": "dev"
}
}Delete an resource group in given subscription.
| subscriptionId required | string Example: ae3fc088-3446-4d93-b105-d18700a2dac3 An subscription id |
| resourceGroupName required | string Example: west-resources-rg An resource group name |
{- "title": "Example error happened.",
- "status": 400,
- "detail": "Example error happened for request.",
- "instance": "/some/Resource"
}Create resource in given resource group.
| subscriptionId required | string Example: ae3fc088-3446-4d93-b105-d18700a2dac3 An subscription id |
| resourceGroupName required | string Example: west-resources-rg An resource group name |
required | object (CreateSite) |
| name required | string [ 3 .. 50 ] characters |
object (Tags) The collection of tags |
{- "init": {
- "displayName": "string",
- "properties": {
- "siteType": { },
- "timeZone": "Europe/Helsinki",
- "features": {
- "consumptionHistory": {
- "enabled": false
}, - "conditionsHistory": {
- "enabled": false
}, - "compareWater": {
- "enabled": false
}, - "compareElectricity": {
- "enabled": false
}, - "deviceRegister": {
- "enabled": false,
- "registerId": "string",
- "generateDeviceName": false,
- "generateGatewayChildDevicesEnabled": false,
- "forceGenerateChildDevicesAtRoot": false
}, - "siteEvents": {
- "enabled": false
}
}
}, - "definition": {
- "attributes": [
- {
- "name": "displayName",
- "type": "string",
- "isRequired": false
}
], - "entities": [
- {
- "type": "stair",
- "scopes": [
- "/building/+"
], - "attributes": [
- {
- "name": "displayName",
- "type": "string",
- "isRequired": false
}
]
}
]
}, - "attributes": null
}, - "name": "device-register",
- "tags": {
- "env": "dev"
}, - "provider": "Cozify.Sites"
}{- "id": "/Subscriptions/ae3fc088-3446-4d93-b105-d18700a2dac3/ResourceGroups/west-resources-rg/Providers/Cozify.DeviceRegister/my-device-register",
- "name": "my-device-register",
- "type": "Cozify.DeviceRegister",
- "location": "eu-north-1",
- "displayName": "My devices",
- "tags": {
- "env": "dev"
}
}Delete resource with given name in resource group.
| subscriptionId required | string Example: ae3fc088-3446-4d93-b105-d18700a2dac3 An subscription id |
| resourceGroupName required | string Example: west-resources-rg An resource group name |
| resourceProvider required | string Example: west-resources-rg An resource group name |
| resourceName required | string Example: my-device-register An resource name |
{- "title": "Example error happened.",
- "status": 400,
- "detail": "Example error happened for request.",
- "instance": "/some/Resource"
}Gets resource in the resource group.
| subscriptionId required | string |
| resourceGroupName required | string |
| pageSize | integer <int32> Example: pageSize=50 Maximum size of the page. Value must be between 1-2000. |
| next | string Example: next=ZbXBsZS1kZXZpY2UtMQ Cursor to get next page of results if there are any. |
| prev | string Example: prev=ASDsZS1kZXZpY2Us Cursor to get previous page of results if there are any. |
{- "data": [
- {
- "id": "/Subscriptions/ae3fc088-3446-4d93-b105-d18700a2dac3/ResourceGroups/west-resources-rg/Providers/Cozify.DeviceRegister/my-device-register",
- "name": "my-device-register",
- "type": "Cozify.DeviceRegister",
- "location": "eu-north-1",
- "displayName": "My devices",
- "tags": {
- "env": "dev"
}
}
], - "links": {
- "next": null,
- "prev": null
}
}Gets an resource in given resource group.
| subscriptionId required | string Example: ae3fc088-3446-4d93-b105-d18700a2dac3 An subscription id |
| resourceGroupName required | string Example: west-resources-rg An resource group name |
| resourceName required | string Example: my-device-register An resource name |
{- "id": "/Subscriptions/ae3fc088-3446-4d93-b105-d18700a2dac3/ResourceGroups/west-resources-rg/Providers/Cozify.DeviceRegister/my-device-register",
- "name": "my-device-register",
- "type": "Cozify.DeviceRegister",
- "location": "eu-north-1",
- "displayName": "My devices",
- "tags": {
- "env": "dev"
}
}Paging
The returned results are paged. Default page size is 50 devices.
This means that to get list all devices it is necessary to retrieve the subsequent result pages.
This can be done using the next cursor that is in links property when there are more results available.
The cursor link contains the endpoint and necessary query parameters.
Ordering
By default the devices are ordered by id. Use the orderBy query parameter to change the ordering. Valid values include:
To have devices ordered in descending order, add descending query parameter with value true.
Search
To perform a search/filtering, set value to search query parameter.
Filter
It is also possible to filter the list by specifying value which specific field should contain, in same manner as the search query parameter.
When multiple filters and/or search are specified, the device needs to match ALL of them in order to be returned.
Possible query parameters include:
&tags=one&tags=two)&capabilities=one&capabilities=two)| registerId required | string |
| pageSize | integer <int32> Example: pageSize=50 Maximum size of the page. Value must be between 1-2000. |
| next | string or null Default: null Example: next=ZbXBsZS1kZXZpY2UtMQ Cursor to get next page of results if there are any. |
| prev | string or null Default: null Example: prev=AS1kZXZpY2s Cursor to get previous page of results if there are any. |
| orderBy | string Example: orderBy=id Name of the field to order devices by. |
| descending | boolean Set to true to order results in descending order. |
| search | string Search string that can be used to filter the results. Searches from every field except timestamps. When set, must be at least 3 characters and at most 100. |
{- "data": [
- {
- "id": "ec83e906-2ea7-4bd8-8d61-75196761c3eb",
- "isActive": true,
- "name": "Device 12345",
- "type": "COZIFY_HUB",
- "capabilities": [
- "string"
], - "createdAt": 1600255801000,
- "modifiedAt": 1663327801000,
- "routing": {
- "hubId": null,
- "deviceId": null
}, - "nativeId": "EXAMPLE_2_1_00035536",
- "serialNumber": "",
- "model": "",
- "manufacturer": "",
- "tags": {
- "env": "dev"
}
}
], - "links": {
- "next": null,
- "prev": null
}
}| registerId required | string |
| id required | string [ 3 .. 50 ] characters ^([a-z0-9-_])+$ Device id. |
| name required | string <= 100 characters Device name |
| type | string Type of the device for display purpose. |
| capabilities | Array of strings An list of capabilities of the device. |
DeviceRoutingInfo (object) | |
| nativeId | string <= 100 characters Default: "" Native ID of the device |
| serialNumber | string <= 100 characters Default: "" Serial number of the device |
| model | string <= 100 characters Default: "" Model of the device |
| manufacturer | string <= 100 characters Default: "" Manufacturer of the device |
object (Tags) The collection of tags |
{- "id": "ec83e906-2ea7-4bd8-8d61-75196761c3eb",
- "name": "Device 12345",
- "type": "COZIFY_HUB",
- "capabilities": [
- "COZIFY_HUB"
], - "routing": {
- "hubId": null,
- "deviceId": null
}, - "nativeId": "EXAMPLE_2_1_00035536",
- "serialNumber": "",
- "model": "",
- "manufacturer": "",
- "tags": {
- "env": "dev"
}
}{- "id": "ec83e906-2ea7-4bd8-8d61-75196761c3eb",
- "isActive": true,
- "name": "Device 12345",
- "type": "COZIFY_HUB",
- "capabilities": [
- "string"
], - "createdAt": 1600255801000,
- "modifiedAt": 1663327801000,
- "routing": {
- "hubId": null,
- "deviceId": null
}, - "nativeId": "EXAMPLE_2_1_00035536",
- "serialNumber": "",
- "model": "",
- "manufacturer": "",
- "tags": {
- "env": "dev"
}
}| registerId required | string |
| deviceId required | string |
{- "id": "ec83e906-2ea7-4bd8-8d61-75196761c3eb",
- "isActive": true,
- "name": "Device 12345",
- "type": "COZIFY_HUB",
- "capabilities": [
- "string"
], - "createdAt": 1600255801000,
- "modifiedAt": 1663327801000,
- "routing": {
- "hubId": null,
- "deviceId": null
}, - "nativeId": "EXAMPLE_2_1_00035536",
- "serialNumber": "",
- "model": "",
- "manufacturer": "",
- "tags": {
- "env": "dev"
}
}Update device metadata. This will replace existing information.
| registerId required | string |
| deviceId required | string |
| name required | string <= 100 characters Device name |
| capabilities | Array of strings An list of capabilities of the device. |
(DeviceRoutingInfo (object or null)) Routing information for commands | |
| nativeId | string <= 100 characters Default: "" Native ID of the device |
| serialNumber | string <= 100 characters Default: "" Serial number of the device |
| model | string <= 100 characters Default: "" Model of the device |
| manufacturer | string <= 100 characters Default: "" Manufacturer of the device |
object (Tags) The collection of tags |
{- "name": "Device 12345",
- "capabilities": [
- "COZIFY_HUB"
], - "routing": {
- "hubId": null,
- "deviceId": null
}, - "nativeId": "EXAMPLE_2_1_00035536",
- "serialNumber": "",
- "model": "",
- "manufacturer": "",
- "tags": {
- "env": "dev"
}
}{- "id": "ec83e906-2ea7-4bd8-8d61-75196761c3eb",
- "isActive": true,
- "name": "Device 12345",
- "type": "COZIFY_HUB",
- "capabilities": [
- "string"
], - "createdAt": 1600255801000,
- "modifiedAt": 1663327801000,
- "routing": {
- "hubId": null,
- "deviceId": null
}, - "nativeId": "EXAMPLE_2_1_00035536",
- "serialNumber": "",
- "model": "",
- "manufacturer": "",
- "tags": {
- "env": "dev"
}
}| registerId required | string |
| serialNumber required | string [ 2 .. 100 ] characters Serial number of the Hub device |
| name | string [ 3 .. 100 ] characters Device name |
| model | string <= 100 characters Default: "" Model of the device |
| manufacturer | string <= 100 characters Default: "" Manufacturer of the device |
object (Tags) The collection of tags |
{- "serialNumber": "20021212-X-0202",
- "name": "Hub 0202",
- "model": "",
- "manufacturer": "",
- "tags": {
- "env": "dev"
}
}{- "id": "ec83e906-2ea7-4bd8-8d61-75196761c3eb",
- "isActive": true,
- "name": "Device 12345",
- "type": "COZIFY_HUB",
- "capabilities": [
- "string"
], - "createdAt": 1600255801000,
- "modifiedAt": 1663327801000,
- "routing": {
- "hubId": null,
- "deviceId": null
}, - "nativeId": "EXAMPLE_2_1_00035536",
- "serialNumber": "",
- "model": "",
- "manufacturer": "",
- "tags": {
- "env": "dev"
}
}| registerId required | string |
| deviceId required | string |
string <= 256 characters Email address | |
| role | string <= 64 characters One of the known values: OWNER, ADMIN, USER, REMOTEGUEST, GUEST, ANONYMOUS |
{- "email": "mail@example.com",
- "role": "ADMIN"
}{- "userId": "fbb836df-b52d-4e77-a89d-1a36a403b2e4",
- "email": "mail@example.com",
- "role": "ADMIN"
}value field to null.| siteId required | string |
| displayName | string <= 50 characters |
required | Array of StringAttributeValue (object) or LongAttributeValue (object) or IntAttributeValue (object) or DoubleAttributeValue (object) or BooleanAttributeValue (object) or JsonAttributeValue (object) or null (SiteAttributes) Default: null Any of the attribute values inheriting from AttributeValue |
{- "displayName": "My Site",
- "attributes": null
}{- "displayName": "My Site",
- "createdAt": 1600255801000,
- "modifiedAt": 1663327801000,
- "attributes": null
}TIPS:
globPattern parameter to entity path.building/1 (get building 1)glob to be a glob.++/area (get all areas)*NOTE: The results are paged.
To get next page of results use the next cursor in the response when it is not null.
| siteId required | string |
| globPattern required | string Example: building/1/floor/a |
| pageSize | integer <int32> Example: pageSize=50 Maximum size of the page. Value must be between 1-2000. |
| next | string or null Default: null Example: next=ZXBsZS1kZXZpY2UtMQ Cursor to get next page of results if there are any. |
| prev | string or null Default: null Example: prev=ZS1kZXZpY2 Cursor to get previous page of results if there are any. |
{- "data": [
- {
- "siteEntityId": "ec83e906-2ea7-4bd8-8d61-75196761c3eb",
- "path": "/building/1/floor/a",
- "type": "area",
- "name": "a",
- "displayName": "My Beautiful Entity",
- "createdAt": 1600255801000,
- "modifiedAt": 1663327801000,
- "attributes": null
}
], - "links": {
- "next": null,
- "prev": null
}
}| siteId required | string |
| globPattern required | string Example: building/1 |
| type | string [ 1 .. 50 ] characters ^([a-z0-9-_])+$ |
| name | string [ 1 .. 50 ] characters ^([a-z0-9-_])+$ |
| displayName | string <= 50 characters |
Array of StringAttributeValue (object) or LongAttributeValue (object) or IntAttributeValue (object) or DoubleAttributeValue (object) or BooleanAttributeValue (object) or JsonAttributeValue (object) or null (SiteAttributes) Default: null Any of the attribute values inheriting from AttributeValue |
Add new entity
{- "type": "building",
- "name": "1"
}{- "displayName": "My Site",
- "createdAt": 1600255801000,
- "modifiedAt": 1663327801000,
- "attributes": null
}value field to null.| siteId required | string |
| globPattern required | string Example: building/1/floor/a/area/2 |
| displayName | string <= 50 characters |
Array of StringAttributeValue (object) or LongAttributeValue (object) or IntAttributeValue (object) or DoubleAttributeValue (object) or BooleanAttributeValue (object) or JsonAttributeValue (object) or null (SiteAttributes) Default: null Any of the attribute values inheriting from AttributeValue | |
| changeParentPath | string or null Default: null Move the entity under this parent path. The parent must exist. Only set this value if you intend to move the entity in the site. |
{- "displayName": "My Beautiful Entity",
- "attributes": null,
- "changeParentPath": null
}{- "displayName": "My Site",
- "createdAt": 1600255801000,
- "modifiedAt": 1663327801000,
- "attributes": null
}{- "siteType": { },
- "timeZone": "Europe/Helsinki",
- "features": {
- "consumptionHistory": {
- "enabled": false
}, - "conditionsHistory": {
- "enabled": false
}, - "compareWater": {
- "enabled": false
}, - "compareElectricity": {
- "enabled": false
}, - "deviceRegister": {
- "enabled": false,
- "registerId": "string",
- "generateDeviceName": false,
- "generateGatewayChildDevicesEnabled": false,
- "forceGenerateChildDevicesAtRoot": false
}, - "siteEvents": {
- "enabled": false
}
}
}| siteId required | string |
object (SiteType) Base type for site types | |
| timeZone | string Time zone of the site in TZ format. |
object (SiteFeatures) Features enabled for the site. |
{- "siteType": { },
- "timeZone": "Europe/Helsinki",
- "features": {
- "consumptionHistory": {
- "enabled": false
}, - "conditionsHistory": {
- "enabled": false
}, - "compareWater": {
- "enabled": false
}, - "compareElectricity": {
- "enabled": false
}, - "deviceRegister": {
- "enabled": false,
- "registerId": "string",
- "generateDeviceName": false,
- "generateGatewayChildDevicesEnabled": false,
- "forceGenerateChildDevicesAtRoot": false
}, - "siteEvents": {
- "enabled": false
}
}
}{- "siteType": { },
- "timeZone": "Europe/Helsinki",
- "features": {
- "consumptionHistory": {
- "enabled": false
}, - "conditionsHistory": {
- "enabled": false
}, - "compareWater": {
- "enabled": false
}, - "compareElectricity": {
- "enabled": false
}, - "deviceRegister": {
- "enabled": false,
- "registerId": "string",
- "generateDeviceName": false,
- "generateGatewayChildDevicesEnabled": false,
- "forceGenerateChildDevicesAtRoot": false
}, - "siteEvents": {
- "enabled": false
}
}
}| siteId required | string |
{- "attributes": [
- {
- "name": "displayName",
- "type": "string",
- "isRequired": false
}
], - "entities": [
- {
- "type": "stair",
- "scopes": [
- "/building/+"
], - "attributes": [
- {
- "name": "displayName",
- "type": "string",
- "isRequired": false
}
]
}
]
}typeSchemaName set, the schemas must contain the JSON schema used to validate the attribute.| siteId required | string |
Array of objects (AttributeDefinition) Attributes the site can or must have. When empty no attributes are allowed. To allow arbitrary attributes define wildcard attributes with asterisk. | |
Array of objects (EntityDefinition) Entities which can be added to the site. |
{- "attributes": [
- {
- "name": "displayName",
- "type": "string",
- "isRequired": false
}
], - "entities": [
- {
- "type": "stair",
- "scopes": [
- "/building/+"
], - "attributes": [
- {
- "name": "displayName",
- "type": "string",
- "isRequired": false
}
]
}
]
}{- "attributes": [
- {
- "name": "displayName",
- "type": "string",
- "isRequired": false
}
], - "entities": [
- {
- "type": "stair",
- "scopes": [
- "/building/+"
], - "attributes": [
- {
- "name": "displayName",
- "type": "string",
- "isRequired": false
}
]
}
]
}| siteId required | string |
| next | string or null Default: null Example: next=ZbXBsZS1kZXZpY2UtMQ Cursor to get next page of results if there are any. |
| prev | string or null Default: null Example: prev=AssZS1kZXZpY2s Cursor to get previous page of results if there are any. |
{- "data": [
- {
- "$type": "rest",
- "id": "monitor",
- "isEnabled": true,
- "fetchMaxEvents": 10,
- "fetchWaitMaxMs": 10
}
], - "links": {
- "next": null,
- "prev": null
}
}This endpoint accepts any egress target as long as the type discriminator is used.
| siteId required | string |
| url required | string The URL of the REST endpoint to which event batches will be sent. |
| method required | string Default: "POST" Enum: "POST" "PUT" The HTTP method (POST or PUT) used to send the event batch to the target URL. |
object A collection of HTTP headers to be included in each request to the target URL. | |
| serverScript | string or null Default: null JavaScript code to be executed on the server for filtering or manipulating events before they are sent in the request. |
| requestTimeoutSeconds | number or null <double> [ 1 .. 60 ] Default: null The timeout for the HTTP request in seconds. Must be between 1 and 60 seconds. |
| $type required | string A discriminator to identify the type of egress target. |
| id required | string [ 3 .. 50 ] characters ^[a-zA-Z0-9]+$ A unique identifier for this specific egress configuration at the site. The identifier must be between 3 and 50 characters in length and consist only of alphanumeric characters (no special characters or spaces). |
| isEnabled | boolean Default: true Indicates whether the egress target is enabled. If false, events will not be sent to the target. |
| fetchMaxEvents | integer [ 1 .. 10000 ] Default: 10 The maximum number of events to include in each batch sent to the target URL. Must be between 1 and 10000. |
| fetchWaitMaxMs | integer [ 2 .. 60000 ] Default: 10 The maximum amount of time in milliseconds to wait before sending a batch of events, even if the batch size has not been reached. Must be between 2 ms and 60000 ms. |
{- "url": "string",
- "method": "POST",
- "headers": {
- "property1": "string",
- "property2": "string"
}, - "serverScript": null,
- "requestTimeoutSeconds": null,
- "$type": "rest",
- "id": "monitor",
- "isEnabled": true,
- "fetchMaxEvents": 10,
- "fetchWaitMaxMs": 10
}{- "url": "string",
- "method": "POST",
- "headers": {
- "property1": "string",
- "property2": "string"
}, - "serverScript": null,
- "requestTimeoutSeconds": null,
- "$type": "rest",
- "id": "monitor",
- "isEnabled": true,
- "fetchMaxEvents": 10,
- "fetchWaitMaxMs": 10
}This endpoint accepts any egress target as long as the type discriminator is used and matches the existing target.
| siteId required | string |
| url required | string The URL of the REST endpoint to which event batches will be sent. |
| method required | string Default: "POST" Enum: "POST" "PUT" The HTTP method (POST or PUT) used to send the event batch to the target URL. |
object A collection of HTTP headers to be included in each request to the target URL. | |
| serverScript | string or null Default: null JavaScript code to be executed on the server for filtering or manipulating events before they are sent in the request. |
| requestTimeoutSeconds | number or null <double> [ 1 .. 60 ] Default: null The timeout for the HTTP request in seconds. Must be between 1 and 60 seconds. |
| $type required | string A discriminator to identify the type of egress target. |
| id required | string [ 3 .. 50 ] characters ^[a-zA-Z0-9]+$ A unique identifier for this specific egress configuration at the site. The identifier must be between 3 and 50 characters in length and consist only of alphanumeric characters (no special characters or spaces). |
| isEnabled | boolean Default: true Indicates whether the egress target is enabled. If false, events will not be sent to the target. |
| fetchMaxEvents | integer [ 1 .. 10000 ] Default: 10 The maximum number of events to include in each batch sent to the target URL. Must be between 1 and 10000. |
| fetchWaitMaxMs | integer [ 2 .. 60000 ] Default: 10 The maximum amount of time in milliseconds to wait before sending a batch of events, even if the batch size has not been reached. Must be between 2 ms and 60000 ms. |
{- "$type": "rest",
- "id": "monitor",
- "isEnabled": true,
- "fetchMaxEvents": 10,
- "fetchWaitMaxMs": 10
}{- "url": "string",
- "method": "POST",
- "headers": {
- "property1": "string",
- "property2": "string"
}, - "serverScript": null,
- "requestTimeoutSeconds": null,
- "$type": "rest",
- "id": "monitor",
- "isEnabled": true,
- "fetchMaxEvents": 10,
- "fetchWaitMaxMs": 10
}| siteId required | string Example: customer-site-1 |
| targetId required | string Example: monitor |
{- "url": "string",
- "method": "POST",
- "headers": {
- "property1": "string",
- "property2": "string"
}, - "serverScript": null,
- "requestTimeoutSeconds": null,
- "$type": "rest",
- "id": "monitor",
- "isEnabled": true,
- "fetchMaxEvents": 10,
- "fetchWaitMaxMs": 10
}| siteId required | string |
| templateType required | string (TemplateTypes) Enum: "device" "dashboard" "schema" Only 'schema' and 'dashboard' are valid options for site. |
[- {
- "type": "COZIFY_HUB",
- "defaultTemplateId": "",
- "templates": [
- {
- "id": "my-unique-template-id",
- "name": "ZEN",
- "content": {
- "ENABLED": false
}
}
]
}
]| siteId required | string |
| templateType required | string (TemplateTypes) Enum: "device" "dashboard" "schema" Only 'schema' and 'dashboard' are valid options for site. |
| templateId required | string |
{- "id": "my-unique-template-id",
- "name": "ZEN",
- "content": {
- "ENABLED": false
}
}| registerId required | string |
[- {
- "type": "COZIFY_HUB",
- "defaultTemplateId": "",
- "templates": [
- {
- "id": "my-unique-template-id",
- "name": "ZEN",
- "content": {
- "ENABLED": false
}
}
]
}
]| registerId required | string |
| deviceType required | string |
{- "type": "COZIFY_HUB",
- "defaultTemplateId": "",
- "templates": [
- {
- "id": "my-unique-template-id",
- "name": "ZEN",
- "content": {
- "ENABLED": false
}
}
]
}