Skip to content
On this page

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.

14 min read Edit this page
Central services
ACS implementationACS DirectorySee how the AMRC Connectivity Stack implements this.View on GitHub

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.

ServiceDirectory
af4a1d66-e6f7-43c4-8a67-0fa3be2b1cf9
The service function UUID of the Directory.

What 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.

FieldMeaning
uuidThe device UUID.
group_id, node_id, device_idThe Sparkplug address of the device’s most recent birth. device_id is the empty string when the device is an Edge Node.
onlineTrue from the device’s birth until its death.
last_changeWhen the device last came online or went offline.
top_schemaThe Schema_UUID at the top level of the most recent birth, or null if there was none.
schemasEvery 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.

  1. If the payload’s top-level uuid is the Factory+ UUID 11ad7b32-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.
  2. The device UUID is the value of the top-level Instance_UUID metric. If a birth has no top-level Instance_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.
  3. If the top-level Instance_UUID is not a well-formed UUID, the Directory does not record the birth.
  4. If the birth has a top-level Schema_UUID metric, its value becomes the device’s top_schema.
  5. Every metric whose final name segment is Schema_UUID, at any depth, adds its value to the device’s schemas. A device built from nested schemas, such as an axis inside a machine, is therefore found under each of those schemas.
  6. 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 Active metric changes in DATA, and the Directory follows these updates to keep each alert’s active state 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/device lists 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/search returns 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}/history is 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.

RequestReturns
GET /v1/addressaddress 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/schema lists every schema UUID the Directory has seen in any birth.
  • GET /v1/schema/{uuid}/devices lists 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/service lists the service UUIDs that have a URL.
  • GET /v1/service/{uuid} returns a JSON array with at most one entry. The entry has url, the service URL, and device, the UUID of the service’s Sparkplug device or null. 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.

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_UUID and whose Schema_UUID is the Alert schema 8853aa15-2228-4309-b98e-e086cefbc72c. The Instance_UUID is the alert’s UUID. The Type metric gives its alert type, and the Active metric gives its state. The Directory follows Active in DATA messages and records when it last changed.
  • A link is any branch that has an Instance_UUID and whose Schema_UUID is the Link schema b3c4b273-9528-45de-8842-9f77c9ef272a. The Relation metric gives the link relation UUID, and the Target metric gives the UUID the link points to. The link’s source is the Instance_UUID of the nearest enclosing branch that has both a Schema_UUID and an Instance_UUID. A link inside an alert’s Links folder 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

RequestReturns
GET /v1/alertEvery current alert the caller may read, active or not.
GET /v1/alert/activeThe 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}/activeThe 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/linkThe 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}.

MetricTypePublished when
Last_Changed/Device_UUIDUUIDA 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_AddressStringAn address gets a different device, comes online, or goes offline. The value is the address with its levels joined by /.
Last_Changed/Schema_UsageUUIDA 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/ServiceUUIDA service URL is registered or changed. The value is the service UUID.
Last_Changed/Alert_TypeUUIDAn alert is recorded or changes. The value is the alert type.
Last_Changed/Link_RelationUUIDA 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_UUID gets 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 own Instance_UUID to 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

SchemaService
05688a03-730e-4cda-9932-172e2c62e45c
The top-level schema of a service's Sparkplug birth, including the Directory's own.
SchemaAlert
8853aa15-2228-4309-b98e-e086cefbc72c
Branches with this schema are indexed as alerts.
SchemaLink
b3c4b273-9528-45de-8842-9f77c9ef272a
Branches with this schema are indexed as links.

Permissions

Permission GroupDirectory permission
58b5da47-d098-44f7-8c1d-6e4bd800e718
The group of permissions the Directory recognises. The Directory reads its callers' grants for this group.
PermissionRead alerts of type
7b096c2f-9f0e-4da4-a644-5bd647a530f6
Read alerts whose type is the target.
PermissionRead alerts from device
7e25ba20-f118-41da-a438-a7205f33b232
Read alerts published by the target device.
PermissionRead Links by relation
5a8defab-635f-46fa-8d1a-fbecaa1c2428
Read links whose relation is the target.
PermissionRead Links from device
b3dbdd15-f049-4a24-8ed3-9204537b8a22
Read links published by the target device.
PermissionPublish alerts of type
8bceb6c8-d330-4130-a732-8db4993234b1
Defined to control which principals may publish alerts of the target type. The Directory does not check it.
PermissionAdvertise service
4db4c39a-f18d-4e83-aeb0-5af2c14ddc2b
Register a URL for the target service. An implementation that lets services register their own URLs MAY use it.
PermissionManage service advert for ownerDeprecated
97dcf2a1-7f4b-476c-b561-e40fc42440ee
Register a service URL on behalf of the target principal. Deprecated because the Directory API has no endpoint that uses it.
PermissionOverride service advert permissionsDeprecated
3bda2ab2-4128-463d-83c9-16b976a8d83e
Register a URL for the target service on behalf of a principal that lacks Advertise service. Deprecated because the Directory API has no endpoint that uses it.

HTTP API

OpenAPI specificationView the full OpenAPI specification for the DirectoryView specification
get/ping
Check the service is reachable and the credentials are valid.

Returns the standard Factory+ ping response. Any authenticated principal may call it. A request with no valid credentials gets 401.

Authentication: Any one of: HTTP Basic, Negotiate (Kerberos), Bearer token
Responses
200

The ping response.

application/jsonping
  • servicerequiredstring (uuid)

    The service function UUID this URL provides.

  • versionrequiredstring

    The version of the service specification this service implements.

  • devicestring (uuid)

    The UUID of the service's Sparkplug device, when it has one.

  • softwareobject

    Information about the software providing the service.

    Fields
    • vendorstring
    • applicationstring
    • revisionstring
401

No credentials were supplied, or the service refused them. The response carries a WWW-Authenticate header.

503

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.

post/token
Get a bearer token for this service.

Issues an opaque bearer token for the authenticated caller. The token is valid only on this service, until the expiry time it is returned with.

Authentication: Any one of: HTTP Basic, Negotiate (Kerberos), Bearer token
Responses
200

A new token.

application/jsontoken
  • tokenrequiredstring

    The value to send in the header Authorization: Bearer <token>.

  • expiryrequiredinteger

    When the token stops being valid, in milliseconds since the Unix epoch.

401

No credentials were supplied, or the service refused them. The response carries a WWW-Authenticate header.

503

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.

get/v1/search
List the records of every known device.

Returns 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.

Authentication: Any one of: HTTP Basic, Negotiate (Kerberos), Bearer token
Responses
200

The device records, in no particular order.

application/jsondevice-list
  • uuidrequiredstring (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_idrequiredstring

    The Sparkplug Group ID of the device's current or last address.

  • node_idrequiredstring

    The Sparkplug Edge Node ID of the device's current or last address.

  • device_idrequiredstring

    The 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.

  • onlinerequiredboolean

    True between the device's birth and its death.

  • last_changerequiredstring (date-time)

    When the device last came online or went offline.

  • schemasrequireduuid-list

    Every 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.

401

No credentials were supplied, or the service refused them. The response carries a WWW-Authenticate header.

get/v1/address
List the Sparkplug Group IDs that have been seen.
Authentication: Any one of: HTTP Basic, Negotiate (Kerberos), Bearer token
Responses
200

An address record for the root of the namespace. address is the empty string and children lists every Group ID.

application/jsonaddress-info
  • addressrequiredstring

    The 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 string

    The 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.

401

No credentials were supplied, or the service refused them. The response carries a WWW-Authenticate header.

get/v1/address/{group}
List the Edge Nodes seen in a Sparkplug group.
Authentication: Any one of: HTTP Basic, Negotiate (Kerberos), Bearer token
Parameters
NameInRequiredTypeDescription
grouppathYesstring

A Sparkplug Group ID.

Responses
200

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-info
  • addressrequiredstring

    The 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 string

    The 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.

401

No credentials were supplied, or the service refused them. The response carries a WWW-Authenticate header.

404

No Edge Node has been seen in this group.

get/v1/address/{group}/{node}
Look up an Edge Node by its Sparkplug address.
Authentication: Any one of: HTTP Basic, Negotiate (Kerberos), Bearer token
Parameters
NameInRequiredTypeDescription
grouppathYesstring

A Sparkplug Group ID.

nodepathYesstring

A Sparkplug Edge Node ID.

Responses
200

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-info
  • addressrequiredstring

    The 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 string

    The 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.

401

No credentials were supplied, or the service refused them. The response carries a WWW-Authenticate header.

404

No node birth has been seen on this address.

get/v1/address/{group}/{node}/{device}
Look up a Sparkplug Device by its address.
Authentication: Any one of: HTTP Basic, Negotiate (Kerberos), Bearer token
Parameters
NameInRequiredTypeDescription
grouppathYesstring

A Sparkplug Group ID.

nodepathYesstring

A Sparkplug Edge Node ID.

devicepathYesstring

A Sparkplug Device ID.

Responses
200

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-info
  • addressrequiredstring

    The 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 string

    The 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.

401

No credentials were supplied, or the service refused them. The response carries a WWW-Authenticate header.

404

No device birth has been seen on this address.

get/v1/device
List the UUIDs of every known device.
Authentication: Any one of: HTTP Basic, Negotiate (Kerberos), Bearer token
Responses
200

Device UUIDs, in no particular order.

application/jsonuuid-list
401

No credentials were supplied, or the service refused them. The response carries a WWW-Authenticate header.

get/v1/device/{device}
Get the current record for a device.
Authentication: Any one of: HTTP Basic, Negotiate (Kerberos), Bearer token
Parameters
NameInRequiredTypeDescription
devicepathYesstring (uuid)

The UUID of a device (its top-level Instance_UUID).

Responses
200

The device record.

application/jsondevice
  • uuidrequiredstring (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_idrequiredstring

    The Sparkplug Group ID of the device's current or last address.

  • node_idrequiredstring

    The Sparkplug Edge Node ID of the device's current or last address.

  • device_idrequiredstring

    The 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.

  • onlinerequiredboolean

    True between the device's birth and its death.

  • last_changerequiredstring (date-time)

    When the device last came online or went offline.

  • schemasrequireduuid-list

    Every 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.

401

No credentials were supplied, or the service refused them. The response carries a WWW-Authenticate header.

404

The Directory has no record of this device.

410

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.

get/v1/device/{device}/history
Get the online and offline history of a device (not implemented).

Reserved 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.

Authentication: Any one of: HTTP Basic, Negotiate (Kerberos), Bearer token
Parameters
NameInRequiredTypeDescription
devicepathYesstring (uuid)

The UUID of a device (its top-level Instance_UUID).

startqueryNostring (date-time)

Include sessions that ended on or after this time.

finishqueryNostring (date-time)

Include sessions that started on or before this time.

Responses
200

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 session
  • group_idrequiredstring
  • node_idrequiredstring
  • device_idstring
  • startrequiredstring (date-time)
  • finishstring (date-time)
  • schemasrequireduuid-list

    A list of UUIDs.

401

No credentials were supplied, or the service refused them. The response carries a WWW-Authenticate header.

404

No history is held for this device.

410

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.

get/v1/schema
List every schema UUID the Directory has seen.
Authentication: Any one of: HTTP Basic, Negotiate (Kerberos), Bearer token
Responses
200

Schema UUIDs seen in any birth certificate, in no particular order.

application/jsonuuid-list
401

No credentials were supplied, or the service refused them. The response carries a WWW-Authenticate header.

get/v1/schema/{schema}/devices
List the devices whose current birth uses a schema.

Returns 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.

Authentication: Any one of: HTTP Basic, Negotiate (Kerberos), Bearer token
Parameters
NameInRequiredTypeDescription
schemapathYesstring (uuid)

The UUID of a schema.

Responses
200

Device UUIDs.

application/jsonuuid-list
401

No credentials were supplied, or the service refused them. The response carries a WWW-Authenticate header.

410

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.

get/v1/service
List the service UUIDs that have a registered URL.
Authentication: Any one of: HTTP Basic, Negotiate (Kerberos), Bearer token
Responses
200

Service UUIDs, sorted.

application/jsonuuid-list
401

No credentials were supplied, or the service refused them. The response carries a WWW-Authenticate header.

get/v1/service/{service}
Find where a service can be reached.

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".

Authentication: Any one of: HTTP Basic, Negotiate (Kerberos), Bearer token
Parameters
NameInRequiredTypeDescription
servicepathYesstring (uuid)

The UUID of a service function.

Responses
200

The provider records.

application/jsonservice-provider-list
  • devicerequiredstring (uuid) | null (uuid)

    The UUID of the service's Sparkplug device, or null if none was registered with the URL.

  • urlrequiredstring

    The service URL. For an HTTP service this is the base URL that API paths are resolved against.

401

No credentials were supplied, or the service refused them. The response carries a WWW-Authenticate header.

410

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.

get/v1/alert
List the alerts the caller may read.

Returns every current alert, active or not, that the caller may read. Alerts the caller may not read are left out of the list.

Authentication: Any one of: HTTP Basic, Negotiate (Kerberos), Bearer token
Responses
200

The alerts the caller may read, in no particular order.

application/jsonarray of alert
  • uuidrequiredstring (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 Type metric. Alert types should be registered in the Configuration Store with a human-readable name.

  • metricrequiredstring

    The full name of the alert's Active metric in the device's metric tree. Do not attach meaning to the name. Identify alerts by their type and their links.

  • activerequiredboolean

    Whether the alert is raised.

  • last_changerequiredstring (date-time)

    When the alert last changed state.

  • linksrequireduuid-list

    The UUIDs of the links whose source is this alert.

401

No credentials were supplied, or the service refused them. The response carries a WWW-Authenticate header.

503

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.

get/v1/alert/active
List the active alerts the caller may read.
Authentication: Any one of: HTTP Basic, Negotiate (Kerberos), Bearer token
Responses
200

The alerts the caller may read, in no particular order.

application/jsonarray of alert
  • uuidrequiredstring (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 Type metric. Alert types should be registered in the Configuration Store with a human-readable name.

  • metricrequiredstring

    The full name of the alert's Active metric in the device's metric tree. Do not attach meaning to the name. Identify alerts by their type and their links.

  • activerequiredboolean

    Whether the alert is raised.

  • last_changerequiredstring (date-time)

    When the alert last changed state.

  • linksrequireduuid-list

    The UUIDs of the links whose source is this alert.

401

No credentials were supplied, or the service refused them. The response carries a WWW-Authenticate header.

503

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.

get/v1/alert/type/{type}
List the alerts of one type that the caller may read.
Authentication: Any one of: HTTP Basic, Negotiate (Kerberos), Bearer token
Parameters
NameInRequiredTypeDescription
typepathYesstring (uuid)

The UUID of an alert type.

Responses
200

The alerts the caller may read, in no particular order.

application/jsonarray of alert
  • uuidrequiredstring (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 Type metric. Alert types should be registered in the Configuration Store with a human-readable name.

  • metricrequiredstring

    The full name of the alert's Active metric in the device's metric tree. Do not attach meaning to the name. Identify alerts by their type and their links.

  • activerequiredboolean

    Whether the alert is raised.

  • last_changerequiredstring (date-time)

    When the alert last changed state.

  • linksrequireduuid-list

    The UUIDs of the links whose source is this alert.

401

No credentials were supplied, or the service refused them. The response carries a WWW-Authenticate header.

410

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.

503

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.

get/v1/alert/type/{type}/active
List the active alerts of one type that the caller may read.
Authentication: Any one of: HTTP Basic, Negotiate (Kerberos), Bearer token
Parameters
NameInRequiredTypeDescription
typepathYesstring (uuid)

The UUID of an alert type.

Responses
200

The alerts the caller may read, in no particular order.

application/jsonarray of alert
  • uuidrequiredstring (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 Type metric. Alert types should be registered in the Configuration Store with a human-readable name.

  • metricrequiredstring

    The full name of the alert's Active metric in the device's metric tree. Do not attach meaning to the name. Identify alerts by their type and their links.

  • activerequiredboolean

    Whether the alert is raised.

  • last_changerequiredstring (date-time)

    When the alert last changed state.

  • linksrequireduuid-list

    The UUIDs of the links whose source is this alert.

401

No credentials were supplied, or the service refused them. The response carries a WWW-Authenticate header.

410

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.

503

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.

get/v1/alert/{alert}
Get one alert.
Authentication: Any one of: HTTP Basic, Negotiate (Kerberos), Bearer token
Parameters
NameInRequiredTypeDescription
alertpathYesstring (uuid)

The UUID of an individual alert (its Instance_UUID).

Responses
200

The alert.

application/jsonalert
  • uuidrequiredstring (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 Type metric. Alert types should be registered in the Configuration Store with a human-readable name.

  • metricrequiredstring

    The full name of the alert's Active metric in the device's metric tree. Do not attach meaning to the name. Identify alerts by their type and their links.

  • activerequiredboolean

    Whether the alert is raised.

  • last_changerequiredstring (date-time)

    When the alert last changed state.

  • linksrequireduuid-list

    The UUIDs of the links whose source is this alert.

401

No credentials were supplied, or the service refused them. The response carries a WWW-Authenticate header.

404

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.

410

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.

get/v1/link
List the links the caller may read.
Authentication: Any one of: HTTP Basic, Negotiate (Kerberos), Bearer token
Responses
200

The UUIDs of the links the caller may read, in no particular order.

application/jsonuuid-list
401

No credentials were supplied, or the service refused them. The response carries a WWW-Authenticate header.

503

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.

get/v1/link/device/{device}
List the links published by one device.
Authentication: Any one of: HTTP Basic, Negotiate (Kerberos), Bearer token
Parameters
NameInRequiredTypeDescription
devicepathYesstring (uuid)

The UUID of a device (its top-level Instance_UUID).

Responses
200

The UUIDs of the links the caller may read, in no particular order.

application/jsonuuid-list
401

No credentials were supplied, or the service refused them. The response carries a WWW-Authenticate header.

410

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.

503

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.

get/v1/link/source/{source}
List the links that start from one object.
Authentication: Any one of: HTTP Basic, Negotiate (Kerberos), Bearer token
Parameters
NameInRequiredTypeDescription
sourcepathYesstring (uuid)

The UUID of the object the links start from.

Responses
200

The UUIDs of the links the caller may read, in no particular order.

application/jsonuuid-list
401

No credentials were supplied, or the service refused them. The response carries a WWW-Authenticate header.

410

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.

503

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.

get/v1/link/relation/{relation}
List the links that use one relation.
Authentication: Any one of: HTTP Basic, Negotiate (Kerberos), Bearer token
Parameters
NameInRequiredTypeDescription
relationpathYesstring (uuid)

The UUID of a link relation.

Responses
200

The UUIDs of the links the caller may read, in no particular order.

application/jsonuuid-list
401

No credentials were supplied, or the service refused them. The response carries a WWW-Authenticate header.

410

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.

503

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.

get/v1/link/target/{target}
List the links that point to one object.
Authentication: Any one of: HTTP Basic, Negotiate (Kerberos), Bearer token
Parameters
NameInRequiredTypeDescription
targetpathYesstring (uuid)

The UUID of the object the links point to.

Responses
200

The UUIDs of the links the caller may read, in no particular order.

application/jsonuuid-list
401

No credentials were supplied, or the service refused them. The response carries a WWW-Authenticate header.

410

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.

503

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.

get/v1/link/{link}
Get one link.
Authentication: Any one of: HTTP Basic, Negotiate (Kerberos), Bearer token
Parameters
NameInRequiredTypeDescription
linkpathYesstring (uuid)

The UUID of a link.

Responses
200

The link.

application/jsonlink
  • uuidrequiredstring (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.

401

No credentials were supplied, or the service refused them. The response carries a WWW-Authenticate header.

404

The link does not exist, or the caller may not read it. The two cases give the same response.

410

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.

Esc