Services
Directory
The Directory indexes Sparkplug births so clients can find devices by UUID, address or schema. It also holds every service URL and indexes the alerts and links devices publish.
The Directory is the Factory+ service that tells clients where devices and services are.
A Sparkplug namespace on a busy site carries thousands of devices. A device’s Sparkplug address, made of its group, node and device IDs, can change when equipment is moved or reconfigured. Clients therefore identify a device by its UUID, and they need somewhere to turn that UUID into the device’s current address. The Directory watches every Sparkplug birth and death on the MQTT namespace and records from them which device is on which address, whether the device is online and which schemas it uses. It also holds the URL of every Factory+ service, and is therefore the starting point for service discovery.
af4a1d66-e6f7-43c4-8a67-0fa3be2b1cf9What the Directory records
The Directory keeps a record for each device. A device is anything that publishes a Sparkplug birth certificate, whether a Sparkplug Edge Node or a Sparkplug Device. It is identified by its device UUID, the Instance_UUID at the top level of its birth, as defined in the Sparkplug conventions. Each device record holds these fields.
| Field | Meaning |
|---|---|
uuid | The device UUID. |
group_id, node_id, device_id | The Sparkplug address of the device’s most recent birth. device_id is the empty string when the device is an Edge Node. |
online | True from the device’s birth until its death. |
last_change | When the device last came online or went offline. |
top_schema | The Schema_UUID at the top level of the most recent birth, or null if there was none. |
schemas | Every schema UUID that appears anywhere in the most recent birth. |
The Directory also records which device most recently used each Sparkplug address, holds the URL of each service for service discovery, and indexes the alerts and links that devices publish in their births.
A device keeps its UUID when it changes between being an Edge Node and being a Sparkplug Device, and when it moves from one address to another. The Directory follows the device in both cases, because each record is keyed by the UUID and not by the address.
Reading Sparkplug
A Directory subscribes to spBv1.0/#, the whole Sparkplug namespace. It reads birth, death and data messages from every group, and therefore needs MQTT read access to the whole namespace.
Births
Each NBIRTH or DBIRTH starts a new session for the device on that address. The new session ends any earlier session for the same device or the same address. The Directory reads each birth as follows.
- If the payload’s top-level
uuidis the Factory+ UUID11ad7b32-1d32-4c4a-b0c9-fa049208939a, the birth follows the Factory+ conventions and the Directory reads its metrics. Otherwise the Directory MUST ignore all the metrics in it, because their names carry no defined meaning. - The device UUID is the value of the top-level
Instance_UUIDmetric. If a birth has no top-levelInstance_UUID, the Directory allocates a UUID to the Sparkplug address and uses it as the device UUID. Every non-Factory+ birth is handled this way. The Directory MUST give the same address the same allocated UUID every time. A device without its own UUID then keeps a stable identity for as long as it stays on the same address. - If the top-level
Instance_UUIDis not a well-formed UUID, the Directory does not record the birth. - If the birth has a top-level
Schema_UUIDmetric, its value becomes the device’stop_schema. - Every metric whose final name segment is
Schema_UUID, at any depth, adds its value to the device’sschemas. A device built from nested schemas, such as an axis inside a machine, is therefore found under each of those schemas. - Branches that follow the Alert or Link schema are indexed as alerts and links.
The schemas, alerts and links recorded for a device always come from its most recent birth. A schema used in an earlier birth but not in the latest one no longer counts for that device.
Deaths
An NDEATH ends the session of the Edge Node and of every Sparkplug Device under it, and all of them are marked offline. A DDEATH ends the session of that one Sparkplug Device.
Data
A Directory does not need DATA messages to keep its records, but it reads them for two reasons.
- An alert’s
Activemetric changes in DATA, and the Directory follows these updates to keep each alert’sactivestate current. It matches the metric by name or by Sparkplug alias. - A DATA message from an address with no recorded birth means the Directory missed that birth, for example because it was not running. A Directory SHOULD then ask the Edge Node to rebirth so that it can read the birth. A Directory SHOULD rate-limit its rebirth requests to the same node, because the device may be broken or another host application may already be asking. The request goes through Command Escalation, and Command Escalation checks that the Directory has permission to rebirth that node.
When a Directory starts, it cannot know which deaths it missed while it was stopped. It SHOULD therefore treat every device as offline until it sees a new birth, rather than report devices online that may have gone.
Lookups
All lookups use GET under /v1 on the Directory’s service URL. Device, address, schema and service lookups are open to any authenticated principal. Alert and link lookups are filtered by permission.
A path parameter that must be a UUID but is not a well-formed one gets 410 because no resource can ever exist at that path, as the service specification requires.
The HTTP API section at the end specifies every endpoint in full.
Devices
GET /v1/devicelists the UUID of every device the Directory has a record for, online or offline.GET /v1/device/{uuid}returns the record for one device, or 404 if there is none.GET /v1/searchreturns the full record of every device. Query parameters are reserved for filtering in a later version. A client MUST NOT rely on them to narrow the result.GET /v1/device/{uuid}/historyis reserved for the device’s session history. It is not implemented, and a Directory that keeps no history returns 404 for every device.
To publish to or subscribe to a device, a client looks it up by UUID. The client then builds the Sparkplug topic from group_id, node_id and device_id. If device_id is the empty string, the device is an Edge Node and uses the NBIRTH, NDATA, NCMD and NDEATH topics. Otherwise it is a Sparkplug Device and uses the DBIRTH, DDATA, DCMD and DDEATH topics.
Addresses
The address lookups walk the Sparkplug namespace from the top. Each returns an object with up to three properties. address is the address with its levels joined by /. uuid is the device that most recently published a birth there, and appears for Edge Node and Device addresses only. children lists the names of the next level down.
| Request | Returns |
|---|---|
GET /v1/address | address is the empty string and children lists every Group ID seen. |
GET /v1/address/{group} | children lists the Node IDs of every Edge Node that has published an NBIRTH in the group. 404 if there are none. |
GET /v1/address/{group}/{node} | uuid is the device that most recently published an NBIRTH on this address. children lists the Device IDs seen under the node, and is left out when there are none. 404 if no NBIRTH has been seen. |
GET /v1/address/{group}/{node}/{device} | uuid is the device that most recently published a DBIRTH on this address. 404 if none has been seen. |
For example, GET /v1/address/Plant1/Cell4 might return:
{
"address": "Plant1/Cell4",
"uuid": "5f1c7a2e-3b9d-4e8a-a6c4-2d7e9b0f1a3c",
"children": ["Spindle", "Coolant"]
}
Schemas
GET /v1/schemalists every schema UUID the Directory has seen in any birth.GET /v1/schema/{uuid}/deviceslists the devices whose most recent birth contains the schema at any depth. Offline devices are included. An unknown schema gives an empty list.
With these lookups a client can find, for example, every device that reports a particular kind of power meter, wherever it sits on the namespace.
Service discovery
The Directory holds one URL for each service function, keyed by the service UUID, and answers the lookups that every Factory+ client uses to find a service.
GET /v1/servicelists the service UUIDs that have a URL.GET /v1/service/{uuid}returns a JSON array with at most one entry. The entry hasurl, the service URL, anddevice, the UUID of the service’s Sparkplug device ornull. An empty array means the service is not registered.
[
{
"device": null,
"url": "https://files.example.com/"
}
]
A Directory SHOULD also hold a record for itself. GET /v1/service/af4a1d66-e6f7-43c4-8a67-0fa3be2b1cf9 then returns the Directory’s own URL and device UUID.
How URLs get into the Directory is implementation-defined. An implementation MAY load them from its deployment configuration. It MAY offer an administrative interface for registering them. It MAY accept the legacy Service_URL metric from a service’s Sparkplug birth. Whatever the method, a Directory MUST hold no more than one URL per service. A new registration for a service replaces the old one.
A Directory MAY rewrite the URLs it returns so that they work from the network the request came from. For example, it can replace an internal hostname with the public one when the request arrived through a reverse proxy.
Alerts and links
Devices can publish alerts and links as branches of their birth certificates. An alert is a condition a device can raise, such as a fault or a warning. Each kind of alert is identified by an alert type UUID. A link is a typed relationship from one object to another, such as from an alert to the device that caused it. The branches are defined in Alerts and links. The Directory indexes them so that a client can find every active alert on the site, or every link to an object, without subscribing to every device.
How the Directory reads them
- An alert is any branch of a Factory+ birth that has an
Instance_UUIDand whoseSchema_UUIDis the Alert schema8853aa15-2228-4309-b98e-e086cefbc72c. TheInstance_UUIDis the alert’s UUID. TheTypemetric gives its alert type, and theActivemetric gives its state. The Directory followsActivein DATA messages and records when it last changed. - A link is any branch that has an
Instance_UUIDand whoseSchema_UUIDis the Link schemab3c4b273-9528-45de-8842-9f77c9ef272a. TheRelationmetric gives the link relation UUID, and theTargetmetric gives the UUID the link points to. The link’s source is theInstance_UUIDof the nearest enclosing branch that has both aSchema_UUIDand anInstance_UUID. A link inside an alert’sLinksfolder therefore starts from that alert. - If a device rebirths without an alert or link it published before, the Directory stops returning that alert or link.
Lookups
| Request | Returns |
|---|---|
GET /v1/alert | Every current alert the caller may read, active or not. |
GET /v1/alert/active | The active alerts the caller may read. |
GET /v1/alert/type/{type} | The alerts of one type that the caller may read. |
GET /v1/alert/type/{type}/active | The active alerts of one type that the caller may read. |
GET /v1/alert/{uuid} | One alert, with uuid, device, type, metric, active, last_change and links. links holds the UUIDs of the links whose source is the alert. |
GET /v1/link | The UUIDs of every link the caller may read. |
GET /v1/link/device/{device} | The links published by one device. |
GET /v1/link/source/{uuid} | The links that start from one object. |
GET /v1/link/relation/{relation} | The links that use one relation. |
GET /v1/link/target/{uuid} | The links that point to one object. |
GET /v1/link/{uuid} | One link, with uuid, device, source, relation and target. |
The alert lists return full alert records. The link lists return link UUIDs, and the client reads each link one at a time.
Permissions
Because alerts and links can reveal what is happening on equipment, the Directory returns only those the caller is allowed to read. It decides this from the caller’s grants of the permissions below. A grant whose target is the wildcard covers every type, relation or device.
- A caller may read an alert if it holds either Read alerts of type on the alert’s type or Read alerts from device on the device that published it.
- A caller may read a link if it holds either Read Links by relation on the link’s relation or Read Links from device on the device that published it.
- The list lookups MUST leave out every alert and link the caller may not read.
- A single-item lookup for an alert or link the caller may not read MUST return 404, the same response as for one that does not exist. Otherwise a caller could learn which alerts and links exist.
- If the Directory cannot get the caller’s permissions, the list lookups return 503. This happens, for example, when the Auth service is unreachable.
Change notification
The Directory announces changes through Last_Changed metrics on its own Sparkplug Node. This mechanism is change-notify version 0 and is deprecated for new services. The Directory still uses it because it has no notify/v2 interface. A client that needs to follow the Directory subscribes to these metrics and then reads the detail from the HTTP API.
The Directory publishes a service birth. The birth carries the Service schema, the Directory’s own Instance_UUID, the Directory Service_UUID and the Last_Changed folder. The Directory has no fixed Sparkplug address. To find it, a client looks up the Directory’s own service record and takes the device UUID. The client then looks up that UUID with GET /v1/device/{uuid}.
| Metric | Type | Published when |
|---|---|---|
Last_Changed/Device_UUID | UUID | A device comes online after being offline or unknown, moves to a new address, or goes offline. The value is the device UUID. |
Last_Changed/Device_Address | String | An address gets a different device, comes online, or goes offline. The value is the address with its levels joined by /. |
Last_Changed/Schema_Usage | UUID | A device’s birth adds or drops a schema compared with its previous birth. One value is published for each schema whose device list changed. |
Last_Changed/Service | UUID | A service URL is registered or changed. The value is the service UUID. |
Last_Changed/Alert_Type | UUID | An alert is recorded or changes. The value is the alert type. |
Last_Changed/Link_Relation | UUID | A link is recorded or changes. The value is the link relation. |
A Directory SHOULD publish a notice only when something a client can read from the HTTP API has changed. A routine rebirth of a device that was already online at the same address changes nothing and SHOULD NOT produce a notice. This matters because a rebirth request makes every device under a node rebirth at once, and those rebirths would otherwise flood MQTT with notices nobody needs.
Limits of the design
- No reliable online state. Sparkplug host applications normally use STATE messages to know when they may have missed messages. The Directory does not use them, and while it is disconnected its view of the namespace drifts from the truth. A missed death is not noticed until the device publishes again. For this reason the Directory treats every device as offline when it starts and asks unknown devices to rebirth.
- Address collisions. If two devices publish on the same Sparkplug address at the same time, the Directory records whichever birth it saw last, and the records for that address are then unreliable. Because the Directory cannot detect or prevent this, each site needs to make sure its addresses are unique.
- Identity without an Instance_UUID. A device that publishes no
Instance_UUIDgets a UUID tied to its address. If the device moves to another address, it gets a different UUID. If another device takes over the address, that device inherits the UUID. Devices SHOULD publish their ownInstance_UUIDto avoid this. - No history. The Directory holds each device’s current state, not a history of its sessions.
- No access control on the namespace. Any authenticated principal can list every device, address, schema and service. A site cannot use the Directory to hide the existence of devices from some principals.
Well-known UUIDs
05688a03-730e-4cda-9932-172e2c62e45c8853aa15-2228-4309-b98e-e086cefbc72cb3c4b273-9528-45de-8842-9f77c9ef272aPermissions
58b5da47-d098-44f7-8c1d-6e4bd800e7187b096c2f-9f0e-4da4-a644-5bd647a530f67e25ba20-f118-41da-a438-a7205f33b2325a8defab-635f-46fa-8d1a-fbecaa1c2428b3dbdd15-f049-4a24-8ed3-9204537b8a228bceb6c8-d330-4130-a732-8db4993234b14db4c39a-f18d-4e83-aeb0-5af2c14ddc2b97dcf2a1-7f4b-476c-b561-e40fc42440ee3bda2ab2-4128-463d-83c9-16b976a8d83eHTTP API
/pingReturns the standard Factory+ ping response. Any authenticated principal may call it. A request with no valid credentials gets 401.
The ping response.
application/jsonpingservicerequiredstring (uuid)The service function UUID this URL provides.
versionrequiredstringThe version of the service specification this service implements.
devicestring (uuid)The UUID of the service's Sparkplug device, when it has one.
softwareobjectInformation about the software providing the service.
Fields
vendorstringapplicationstringrevisionstring
No credentials were supplied, or the service refused them. The response carries a WWW-Authenticate header.
The service could not check the caller's credentials or permissions, for example because the Auth service could not be reached. The caller's credentials may still be good, so a client should retry rather than discard them.
/tokenIssues an opaque bearer token for the authenticated caller. The token is valid only on this service, until the expiry time it is returned with.
A new token.
application/jsontokentokenrequiredstringThe value to send in the header
Authorization: Bearer <token>.expiryrequiredintegerWhen the token stops being valid, in milliseconds since the Unix epoch.
No credentials were supplied, or the service refused them. The response carries a WWW-Authenticate header.
The service could not check the caller's credentials or permissions, for example because the Auth service could not be reached. The caller's credentials may still be good, so a client should retry rather than discard them.
/v1/searchReturns the full record of every device the Directory knows, online or offline. Query parameters are reserved for filtering, which is not yet defined, so a client must not rely on them to narrow the result.
The device records, in no particular order.
application/jsondevice-listuuidrequiredstring (uuid)The device UUID. This is the top-level Instance_UUID from the device's birth, or a UUID the Directory allocated to the address if the birth had none.
group_idrequiredstringThe Sparkplug Group ID of the device's current or last address.
node_idrequiredstringThe Sparkplug Edge Node ID of the device's current or last address.
device_idrequiredstringThe Sparkplug Device ID of the device's current or last address. It is the empty string when the device is an Edge Node, which publishes on the NBIRTH, NDATA and NDEATH topics.
onlinerequiredbooleanTrue between the device's birth and its death.
last_changerequiredstring (date-time)When the device last came online or went offline.
schemasrequireduuid-listEvery schema UUID found in the device's most recent birth, at any depth.
top_schemarequiredstring (uuid) | null (uuid)The Schema_UUID at the top level of the device's most recent birth, or null if there was none.
No credentials were supplied, or the service refused them. The response carries a WWW-Authenticate header.
/v1/addressAn address record for the root of the namespace. address is the empty string and children lists every Group ID.
application/jsonaddress-infoaddressrequiredstringThe address this record describes, with levels joined by
/. It is the empty string for the root.uuidstring (uuid)The UUID of the device that most recently published a birth on this address. Present for Edge Node and Device addresses only.
childrenarray of stringThe names of the next level down. For the root these are Group IDs, for a group they are Node IDs, and for an Edge Node they are Device IDs.
No credentials were supplied, or the service refused them. The response carries a WWW-Authenticate header.
/v1/address/{group}| Name | In | Required | Type | Description |
|---|---|---|---|---|
group | path | Yes | string | A Sparkplug Group ID. |
An address record for the group. children lists the Node IDs of every Edge Node that has published a node birth in the group.
application/jsonaddress-infoaddressrequiredstringThe address this record describes, with levels joined by
/. It is the empty string for the root.uuidstring (uuid)The UUID of the device that most recently published a birth on this address. Present for Edge Node and Device addresses only.
childrenarray of stringThe names of the next level down. For the root these are Group IDs, for a group they are Node IDs, and for an Edge Node they are Device IDs.
No credentials were supplied, or the service refused them. The response carries a WWW-Authenticate header.
No Edge Node has been seen in this group.
/v1/address/{group}/{node}| Name | In | Required | Type | Description |
|---|---|---|---|---|
group | path | Yes | string | A Sparkplug Group ID. |
node | path | Yes | string | A Sparkplug Edge Node ID. |
An address record for the Edge Node. uuid is the UUID of the device that most recently published a node birth on this address. children lists the Device IDs seen under the node, and is left out when there are none.
application/jsonaddress-infoaddressrequiredstringThe address this record describes, with levels joined by
/. It is the empty string for the root.uuidstring (uuid)The UUID of the device that most recently published a birth on this address. Present for Edge Node and Device addresses only.
childrenarray of stringThe names of the next level down. For the root these are Group IDs, for a group they are Node IDs, and for an Edge Node they are Device IDs.
No credentials were supplied, or the service refused them. The response carries a WWW-Authenticate header.
No node birth has been seen on this address.
/v1/address/{group}/{node}/{device}| Name | In | Required | Type | Description |
|---|---|---|---|---|
group | path | Yes | string | A Sparkplug Group ID. |
node | path | Yes | string | A Sparkplug Edge Node ID. |
device | path | Yes | string | A Sparkplug Device ID. |
An address record for the Device. uuid is the UUID of the device that most recently published a device birth on this address. There is no children key.
application/jsonaddress-infoaddressrequiredstringThe address this record describes, with levels joined by
/. It is the empty string for the root.uuidstring (uuid)The UUID of the device that most recently published a birth on this address. Present for Edge Node and Device addresses only.
childrenarray of stringThe names of the next level down. For the root these are Group IDs, for a group they are Node IDs, and for an Edge Node they are Device IDs.
No credentials were supplied, or the service refused them. The response carries a WWW-Authenticate header.
No device birth has been seen on this address.
/v1/deviceDevice UUIDs, in no particular order.
application/jsonuuid-listNo credentials were supplied, or the service refused them. The response carries a WWW-Authenticate header.
/v1/device/{device}| Name | In | Required | Type | Description |
|---|---|---|---|---|
device | path | Yes | string (uuid) | The UUID of a device (its top-level Instance_UUID). |
The device record.
application/jsondeviceuuidrequiredstring (uuid)The device UUID. This is the top-level Instance_UUID from the device's birth, or a UUID the Directory allocated to the address if the birth had none.
group_idrequiredstringThe Sparkplug Group ID of the device's current or last address.
node_idrequiredstringThe Sparkplug Edge Node ID of the device's current or last address.
device_idrequiredstringThe Sparkplug Device ID of the device's current or last address. It is the empty string when the device is an Edge Node, which publishes on the NBIRTH, NDATA and NDEATH topics.
onlinerequiredbooleanTrue between the device's birth and its death.
last_changerequiredstring (date-time)When the device last came online or went offline.
schemasrequireduuid-listEvery schema UUID found in the device's most recent birth, at any depth.
top_schemarequiredstring (uuid) | null (uuid)The Schema_UUID at the top level of the device's most recent birth, or null if there was none.
No credentials were supplied, or the service refused them. The response carries a WWW-Authenticate header.
The Directory has no record of this device.
A path parameter that must be a UUID is not a well-formed UUID. No resource can ever exist at that path, so the answer is 410 rather than 404.
/v1/device/{device}/historyReserved for the history of a device's Sparkplug sessions. This endpoint is not implemented. A Directory that does not keep session history returns 404 for every device.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
device | path | Yes | string (uuid) | The UUID of a device (its top-level Instance_UUID). |
start | query | No | string (date-time) | Include sessions that ended on or after this time. |
finish | query | No | string (date-time) | Include sessions that started on or before this time. |
The device's sessions, newest first. Sessions that overlap in time show a problem on the network and are reported as seen.
application/jsonarray of sessiongroup_idrequiredstringnode_idrequiredstringdevice_idstringstartrequiredstring (date-time)finishstring (date-time)schemasrequireduuid-listA list of UUIDs.
No credentials were supplied, or the service refused them. The response carries a WWW-Authenticate header.
No history is held for this device.
A path parameter that must be a UUID is not a well-formed UUID. No resource can ever exist at that path, so the answer is 410 rather than 404.
/v1/schemaSchema UUIDs seen in any birth certificate, in no particular order.
application/jsonuuid-listNo credentials were supplied, or the service refused them. The response carries a WWW-Authenticate header.
/v1/schema/{schema}/devicesReturns the UUIDs of the devices whose most recent birth certificate contains this schema UUID anywhere in its metric tree. Offline devices are included. Devices that used the schema in an earlier birth but not in their most recent one are not. An unknown schema UUID gives an empty list.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
schema | path | Yes | string (uuid) | The UUID of a schema. |
Device UUIDs.
application/jsonuuid-listNo credentials were supplied, or the service refused them. The response carries a WWW-Authenticate header.
A path parameter that must be a UUID is not a well-formed UUID. No resource can ever exist at that path, so the answer is 410 rather than 404.
/v1/serviceService UUIDs, sorted.
application/jsonuuid-listNo credentials were supplied, or the service refused them. The response carries a WWW-Authenticate header.
/v1/service/{service}Returns the provider records for a service UUID. A Directory holds at most one URL per service, so the array has zero or one entries. An empty array means no URL is registered for the service. A client should also treat a 404 as "not registered".
| Name | In | Required | Type | Description |
|---|---|---|---|---|
service | path | Yes | string (uuid) | The UUID of a service function. |
The provider records.
application/jsonservice-provider-listdevicerequiredstring (uuid) | null (uuid)The UUID of the service's Sparkplug device, or null if none was registered with the URL.
urlrequiredstringThe service URL. For an HTTP service this is the base URL that API paths are resolved against.
No credentials were supplied, or the service refused them. The response carries a WWW-Authenticate header.
A path parameter that must be a UUID is not a well-formed UUID. No resource can ever exist at that path, so the answer is 410 rather than 404.
/v1/alertReturns every current alert, active or not, that the caller may read. Alerts the caller may not read are left out of the list.
The alerts the caller may read, in no particular order.
application/jsonarray of alertuuidrequiredstring (uuid)The alert's Instance_UUID.
devicerequiredstring (uuid)The UUID of the device that published the alert.
typerequiredstring (uuid)The alert type, from the alert's
Typemetric. Alert types should be registered in the Configuration Store with a human-readable name.metricrequiredstringThe full name of the alert's
Activemetric in the device's metric tree. Do not attach meaning to the name. Identify alerts by their type and their links.activerequiredbooleanWhether the alert is raised.
last_changerequiredstring (date-time)When the alert last changed state.
linksrequireduuid-listThe UUIDs of the links whose source is this alert.
No credentials were supplied, or the service refused them. The response carries a WWW-Authenticate header.
The service could not check the caller's credentials or permissions, for example because the Auth service could not be reached. The caller's credentials may still be good, so a client should retry rather than discard them.
/v1/alert/activeThe alerts the caller may read, in no particular order.
application/jsonarray of alertuuidrequiredstring (uuid)The alert's Instance_UUID.
devicerequiredstring (uuid)The UUID of the device that published the alert.
typerequiredstring (uuid)The alert type, from the alert's
Typemetric. Alert types should be registered in the Configuration Store with a human-readable name.metricrequiredstringThe full name of the alert's
Activemetric in the device's metric tree. Do not attach meaning to the name. Identify alerts by their type and their links.activerequiredbooleanWhether the alert is raised.
last_changerequiredstring (date-time)When the alert last changed state.
linksrequireduuid-listThe UUIDs of the links whose source is this alert.
No credentials were supplied, or the service refused them. The response carries a WWW-Authenticate header.
The service could not check the caller's credentials or permissions, for example because the Auth service could not be reached. The caller's credentials may still be good, so a client should retry rather than discard them.
/v1/alert/type/{type}| Name | In | Required | Type | Description |
|---|---|---|---|---|
type | path | Yes | string (uuid) | The UUID of an alert type. |
The alerts the caller may read, in no particular order.
application/jsonarray of alertuuidrequiredstring (uuid)The alert's Instance_UUID.
devicerequiredstring (uuid)The UUID of the device that published the alert.
typerequiredstring (uuid)The alert type, from the alert's
Typemetric. Alert types should be registered in the Configuration Store with a human-readable name.metricrequiredstringThe full name of the alert's
Activemetric in the device's metric tree. Do not attach meaning to the name. Identify alerts by their type and their links.activerequiredbooleanWhether the alert is raised.
last_changerequiredstring (date-time)When the alert last changed state.
linksrequireduuid-listThe UUIDs of the links whose source is this alert.
No credentials were supplied, or the service refused them. The response carries a WWW-Authenticate header.
A path parameter that must be a UUID is not a well-formed UUID. No resource can ever exist at that path, so the answer is 410 rather than 404.
The service could not check the caller's credentials or permissions, for example because the Auth service could not be reached. The caller's credentials may still be good, so a client should retry rather than discard them.
/v1/alert/type/{type}/active| Name | In | Required | Type | Description |
|---|---|---|---|---|
type | path | Yes | string (uuid) | The UUID of an alert type. |
The alerts the caller may read, in no particular order.
application/jsonarray of alertuuidrequiredstring (uuid)The alert's Instance_UUID.
devicerequiredstring (uuid)The UUID of the device that published the alert.
typerequiredstring (uuid)The alert type, from the alert's
Typemetric. Alert types should be registered in the Configuration Store with a human-readable name.metricrequiredstringThe full name of the alert's
Activemetric in the device's metric tree. Do not attach meaning to the name. Identify alerts by their type and their links.activerequiredbooleanWhether the alert is raised.
last_changerequiredstring (date-time)When the alert last changed state.
linksrequireduuid-listThe UUIDs of the links whose source is this alert.
No credentials were supplied, or the service refused them. The response carries a WWW-Authenticate header.
A path parameter that must be a UUID is not a well-formed UUID. No resource can ever exist at that path, so the answer is 410 rather than 404.
The service could not check the caller's credentials or permissions, for example because the Auth service could not be reached. The caller's credentials may still be good, so a client should retry rather than discard them.
/v1/alert/{alert}| Name | In | Required | Type | Description |
|---|---|---|---|---|
alert | path | Yes | string (uuid) | The UUID of an individual alert (its Instance_UUID). |
The alert.
application/jsonalertuuidrequiredstring (uuid)The alert's Instance_UUID.
devicerequiredstring (uuid)The UUID of the device that published the alert.
typerequiredstring (uuid)The alert type, from the alert's
Typemetric. Alert types should be registered in the Configuration Store with a human-readable name.metricrequiredstringThe full name of the alert's
Activemetric in the device's metric tree. Do not attach meaning to the name. Identify alerts by their type and their links.activerequiredbooleanWhether the alert is raised.
last_changerequiredstring (date-time)When the alert last changed state.
linksrequireduuid-listThe UUIDs of the links whose source is this alert.
No credentials were supplied, or the service refused them. The response carries a WWW-Authenticate header.
The alert does not exist, or the caller may not read it. The two cases give the same response so a caller cannot learn which alerts exist.
A path parameter that must be a UUID is not a well-formed UUID. No resource can ever exist at that path, so the answer is 410 rather than 404.
/v1/linkThe UUIDs of the links the caller may read, in no particular order.
application/jsonuuid-listNo credentials were supplied, or the service refused them. The response carries a WWW-Authenticate header.
The service could not check the caller's credentials or permissions, for example because the Auth service could not be reached. The caller's credentials may still be good, so a client should retry rather than discard them.
/v1/link/device/{device}| Name | In | Required | Type | Description |
|---|---|---|---|---|
device | path | Yes | string (uuid) | The UUID of a device (its top-level Instance_UUID). |
The UUIDs of the links the caller may read, in no particular order.
application/jsonuuid-listNo credentials were supplied, or the service refused them. The response carries a WWW-Authenticate header.
A path parameter that must be a UUID is not a well-formed UUID. No resource can ever exist at that path, so the answer is 410 rather than 404.
The service could not check the caller's credentials or permissions, for example because the Auth service could not be reached. The caller's credentials may still be good, so a client should retry rather than discard them.
/v1/link/source/{source}| Name | In | Required | Type | Description |
|---|---|---|---|---|
source | path | Yes | string (uuid) | The UUID of the object the links start from. |
The UUIDs of the links the caller may read, in no particular order.
application/jsonuuid-listNo credentials were supplied, or the service refused them. The response carries a WWW-Authenticate header.
A path parameter that must be a UUID is not a well-formed UUID. No resource can ever exist at that path, so the answer is 410 rather than 404.
The service could not check the caller's credentials or permissions, for example because the Auth service could not be reached. The caller's credentials may still be good, so a client should retry rather than discard them.
/v1/link/relation/{relation}| Name | In | Required | Type | Description |
|---|---|---|---|---|
relation | path | Yes | string (uuid) | The UUID of a link relation. |
The UUIDs of the links the caller may read, in no particular order.
application/jsonuuid-listNo credentials were supplied, or the service refused them. The response carries a WWW-Authenticate header.
A path parameter that must be a UUID is not a well-formed UUID. No resource can ever exist at that path, so the answer is 410 rather than 404.
The service could not check the caller's credentials or permissions, for example because the Auth service could not be reached. The caller's credentials may still be good, so a client should retry rather than discard them.
/v1/link/target/{target}| Name | In | Required | Type | Description |
|---|---|---|---|---|
target | path | Yes | string (uuid) | The UUID of the object the links point to. |
The UUIDs of the links the caller may read, in no particular order.
application/jsonuuid-listNo credentials were supplied, or the service refused them. The response carries a WWW-Authenticate header.
A path parameter that must be a UUID is not a well-formed UUID. No resource can ever exist at that path, so the answer is 410 rather than 404.
The service could not check the caller's credentials or permissions, for example because the Auth service could not be reached. The caller's credentials may still be good, so a client should retry rather than discard them.
/v1/link/{link}| Name | In | Required | Type | Description |
|---|---|---|---|---|
link | path | Yes | string (uuid) | The UUID of a link. |
The link.
application/jsonlinkuuidrequiredstring (uuid)The link's Instance_UUID.
devicerequiredstring (uuid)The UUID of the device that published the link.
sourcerequiredstring (uuid)The Instance_UUID of the nearest enclosing object in the birth, which the link starts from.
relationrequiredstring (uuid)The UUID of the link relation, which says what the link means.
targetrequiredstring (uuid)The UUID of the object the link points to.
No credentials were supplied, or the service refused them. The response carries a WWW-Authenticate header.
The link does not exist, or the caller may not read it. The two cases give the same response.
A path parameter that must be a UUID is not a well-formed UUID. No resource can ever exist at that path, so the answer is 410 rather than 404.