Download OpenAPI specification:
The OpenAPI specification for the Cozify ONE platform.
Cozify Graph is the primary, unified API surface. Instead of per-resource REST
endpoints, a single pair of endpoints dispatches a polymorphic set of typed messages,
each selected by its type discriminator:
PUT /graph/command — change state.POST /graph/query — read state.Commands that start long-running work return an operation you can track to completion, and server-side changes are delivered live as push messages over the SignalR hub stream. The classic per-provider REST endpoints (Hub, Hubs, DeviceRegister) are deprecated in favor of Graph.
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 (a.k.a. building) resources. Cozify.Site is accepted as a
compatibility alias for clients that model the provider namespace separately from the
plural resource type. Cozify.DeviceRegister is another common resource provider.In addition to the REST endpoints described here, the API is available over a persistent
SignalR connection at the /hub/v1 endpoint. See Microsoft's guide to
SignalR streaming for
how to consume it from a .NET / JavaScript / Java client.
The Graph command/query API is exposed as hub methods that carry the same envelopes as the REST endpoints:
Command(CommandRequest) returns CommandResponse — the equivalent of PUT /graph/command.Query(QueryRequest) returns QueryResponse — the equivalent of POST /graph/query.DeviceEventsStream stream; its
messages are delivered over SignalR and are not part of this OpenAPI document.DeviceEventsSubscribeAll(deviceRegisterId) — subscribe to events from all
devices in the register.DeviceEventsUnsubscribeAll(deviceRegisterId) — unsubscribe from all device
events from the register.DeviceEventsSubscribe(request) — subscribe to events from specific devices in the
register. Warning: if you previously subscribed to all events from the same
register, this changes nothing — you will still receive events from every device.DeviceEventsUnsubscribe(request) — unsubscribe from specific devices in the
register. Warning: if you previously subscribed to all events from the same
register, this changes nothing — use DeviceEventsUnsubscribeAll instead.Note: Cozify supports Transport Layer Security (TLS) 1.2 or later only.
Operations for managing device registers, such as executing commands on device registers and querying device register states.
Deprecated. Use /graph/command with migrated device register Graph commands instead.
| deviceRegisterId required | string (DeviceRegisterId) [ 3 .. 61 ] characters ^([a-z0-9\-_])+$ Example: default-devices Globally unique device register identifier. |
Request object for command.
required | object (DeviceRegisterCommand) Base type for all device register commands. |
{- "command": {
- "type": "string"
}
}{- "result": {
- "type": "string",
- "error": {
- "code": "E_UNKNOWN",
- "message": "string",
- "details": {
- "property1": "string",
- "property2": "string"
}, - "errors": [
- { }
]
}
}
}Deprecated. Use /graph/query with migrated device register Graph queries instead.
| deviceRegisterId required | string (DeviceRegisterId) [ 3 .. 61 ] characters ^([a-z0-9\-_])+$ Example: default-devices Globally unique device register identifier. |
Request object for query.
required | object (DeviceRegisterQuery) Base type for all device register queries. |
{- "query": {
- "type": "string"
}
}{- "result": {
- "type": "string",
- "error": {
- "code": "E_UNKNOWN",
- "message": "string",
- "details": {
- "property1": "string",
- "property2": "string"
}, - "errors": [
- { }
]
}
}
}Cozify Graph is the unified gateway to data and actions in Cozify One. In place of per-resource REST endpoints, a single pair of endpoints - PUT /graph/command to change state and POST /graph/query to read it - dispatches a polymorphic set of typed commands and queries, each selected by its type discriminator. Commands that start long-running work return an operation you can track to completion, and server-side changes are delivered live as push messages over stream.
Allows the execution of a specific query.
Request object for query.
required | object (Query) Base type for queries. Abstract base; never instantiated directly. Use a concrete subtype. |
| correlationId | string (CorrelationId) [ 1 .. 128 ] characters Client-chosen opaque identifier for an operation. Supplied on the request and echoed back on the response, and attached to server logs and traces so the caller can correlate their request with server-side activity. |
| traceparent | string (Traceparent) ^[0-9a-f]{2}-[0-9a-f]{32}-[0-9a-f]{16}-[0-9a-... W3C Trace Context traceparent ("00- |
{- "query": {
- "type": "string"
}, - "correlationId": "string",
- "traceparent": "string"
}{- "result": {
- "type": "string",
- "error": {
- "code": "E_UNKNOWN",
- "message": "string",
- "details": {
- "property1": "string",
- "property2": "string"
}, - "errors": [
- { }
]
}
}, - "correlationId": "string",
- "traceparent": "string"
}Allows the execution of a specific command.
Request object for command.
required | object (Command) Base type commands. Abstract base; never instantiated directly. Use a concrete subtype. |
| correlationId | string (CorrelationId) [ 1 .. 128 ] characters Client-chosen opaque identifier for an operation. Supplied on the request and echoed back on the response, and attached to server logs and traces so the caller can correlate their request with server-side activity. |
| traceparent | string (Traceparent) ^[0-9a-f]{2}-[0-9a-f]{32}-[0-9a-f]{16}-[0-9a-... W3C Trace Context traceparent ("00- |
{- "command": {
- "type": "string"
}, - "correlationId": "string",
- "traceparent": "string"
}{- "result": {
- "type": "string",
- "error": {
- "code": "E_UNKNOWN",
- "message": "string",
- "details": {
- "property1": "string",
- "property2": "string"
}, - "errors": [
- { }
]
}
}, - "correlationId": "string",
- "traceparent": "string"
}Marker endpoint for the SignalR Push streaming method. Server-to-client push messages are delivered over the SignalR hub Push stream, not over HTTP - calling this HTTP endpoint always returns 400. It exists to publish the PushMessage shape delivered over the stream. SignalR method: Push.
Schema marker only. Documents the shape of the PushMessage delivered over the SignalR Push stream; this HTTP endpoint does not consume a request body and always returns 400.
required | object (Push) Base type for server-to-client push messages delivered over the Graph hub stream. Abstract base; never instantiated directly. Use a concrete subtype. |
{- "push": {
- "type": "string"
}
}{- "title": "string",
- "status": 400,
- "detail": "string",
- "instance": "string"
}Operations related to the Cozify Hub, including command execution and querying the state of the hub and its connected devices.
Deprecated. Use /graph/command with migrated hub Graph commands instead.
| hubId required | string <uuid> (HubIdProperty) Deprecated Example: 3ee5d62c-fa38-42a0-a5ac-0c4b315d75fb The identifier of the Cozify Hub. |
Request object for command.
required | object (HubCommand) Deprecated Deprecated. Use base Graph hub commands through /graph/command. |
{- "command": {
- "type": "string"
}
}{- "result": {
- "type": "string",
- "error": {
- "code": "E_UNKNOWN",
- "message": "string",
- "details": {
- "property1": "string",
- "property2": "string"
}, - "errors": [
- { }
]
}
}
}Deprecated. Use /graph/query with migrated hub Graph queries instead.
| hubId required | string <uuid> (HubIdProperty) Deprecated Example: 3ee5d62c-fa38-42a0-a5ac-0c4b315d75fb The identifier of the Cozify Hub. |
Request object for query.
required | object (HubQuery) Deprecated Deprecated. Use base Graph hub queries through /graph/query. |
{- "query": {
- "type": "string"
}
}{- "result": {
- "type": "string",
- "error": {
- "code": "E_UNKNOWN",
- "message": "string",
- "details": {
- "property1": "string",
- "property2": "string"
}, - "errors": [
- { }
]
}
}
}Operations related to the Cozify Hubs services, including command execution and querying the state of the fleet.
Deprecated. Use /graph/query with migrated hubs Graph queries instead.
Request object for query.
required | object (HubsQuery) Deprecated Base type for all hubs queries. |
{- "query": {
- "type": "string"
}
}{- "result": {
- "type": "string",
- "error": {
- "code": "E_UNKNOWN",
- "message": "string",
- "details": {
- "property1": "string",
- "property2": "string"
}, - "errors": [
- { }
]
}
}
}