Skip to main content

BeaconTower.Onboarding (v1)

Download OpenAPI specification:Download

IoT device onboarding service: enrollment groups, device provisioning, shared key rotation, EST renewal, and provider integration.

Devices

Top-level device lifecycle API — register, list, read, patch, delete, and restore.

Register device

Registers a single device, minting credentials according to the attestation type. The secret field in the response is the device's enrollment secret, returned only in this response. It cannot be retrieved afterward. Store it immediately; if lost, the device must be re-registered.

Request Body schema: application/json

Registration request body.

deviceId
required
string

Provider-scoped device identifier.

attestationType
null or string

"sharedKey" (default), "secret", or "birthCertificate".

enrollmentGroupId
null or string <uuid>

Enrollment group the device joins (required for sharedKey).

metadata
null or object

Free-form JSON metadata. For birthCertificate attestation it must contain birth_certificate_fingerprint (lowercase hex SHA-256) and may contain birth_certificate_issuer.

Responses

Request samples

Content type
application/json
Example
{
  • "deviceId": "device-0001",
  • "attestationType": "sharedKey",
  • "enrollmentGroupId": "9f8b7c6d-5e4f-4a3b-2c1d-0e9f8a7b6c5d",
  • "metadata": {
    }
}

Response samples

Content type
application/json
{
  • "deviceId": "string",
  • "attestationType": "string",
  • "enrollmentGroupId": null,
  • "secret": null,
  • "sharedKeyReference": null,
  • "certificate": null,
  • "privateKey": null
}

Register devices (bulk)

Registers devices from a newline-delimited JSON stream, one object per line. Per-line failures appear as error entries in the response; only batch-level failures (empty body, oversized batch) yield 400. Each successfully created device's secret is its enrollment secret, returned only in this response and cannot be retrieved afterward. Store all secrets immediately. This response is therefore highly sensitive and must be treated accordingly.

Request Body schema: application/x-ndjson
required
string

Responses

Request samples

Content type
application/x-ndjson
"{\"deviceId\":\"device-0001\",\"attestationType\":\"sharedKey\",\"enrollmentGroupId\":\"9f8b7c6d-5e4f-4a3b-2c1d-0e9f8a7b6c5d\"}\n{\"deviceId\":\"device-0002\",\"attestationType\":\"sharedKey\",\"enrollmentGroupId\":\"9f8b7c6d-5e4f-4a3b-2c1d-0e9f8a7b6c5d\"}\n{\"deviceId\":\"device-0003\",\"attestationType\":\"secret\"}"

Response samples

Content type
application/json
{
  • "requestId": "d385ab22-0f51-4b97-9ecd-b8ff3fd4fcb6",
  • "summary": {
    },
  • "results": [
    ]
}

List devices

Lists devices with pagination and filtering, plus metadata-key matching. Query parameters of the form metadata.{key}={value} match devices whose metadata contains the given top-level string field with that value.

query Parameters
limit
integer <int32>

Page size, 1..1000 (default 50).

cursor
string

Opaque continuation token from a prior page.

Search
string

Search across device ID field using ILIKE.

Provisioned
boolean

Filter by the cached provisioned verdict (true/false).

Configured
boolean

Filter by whether the device has completed get_settings (true/false).

AttestationType
string

Filter by attestation type (exact match): secret | shared_key | certificate | birth_certificate.

EnrollmentGroupId
string

Filter by enrollment group ID (exact match).

SortBy
string

Sort by allowed columns. Format: "column_name" or "column_name:desc".

Deleted
string

Soft-delete visibility: "exclude" (default), "include", or "only".

Responses

Response samples

Content type
application/json
{
  • "items": [
    ],
  • "continuationToken": null
}

Refresh devices

Re-checks against core-management whether a provider-client exists for each listed device and updates the cached provisioned verdict that device listings serve (cachedProvisioned, lastRefreshedAt). Devices without an enrollment group are answered locally as not provisioned. Individual failures appear as per-device error entries (not_found, core_unavailable); the call returns 503 only when core-management is unreachable for every device, and then no cache entry is touched.

Request Body schema: application/json

Device ids to refresh (at most 1000).

deviceIds
required
Array of strings [ 1 .. 1000 ] items

Device ids to re-check against core-management (at most 1000 — typically the page currently shown).

Responses

Request samples

Content type
application/json
{
  • "deviceIds": [
    ]
}

Response samples

Content type
application/json
{
  • "items": [
    ]
}

Get device

path Parameters
deviceId
required
string

Provider-scoped device identifier.

Responses

Response samples

Content type
application/json
{
  • "deviceId": "string",
  • "providerClientId": null,
  • "provisioned": null,
  • "attestationType": "string",
  • "enrollmentGroupId": null,
  • "metadata": null,
  • "createdAt": "2019-08-24T14:15:22Z",
  • "updatedAt": "2019-08-24T14:15:22Z",
  • "provisionedAt": null,
  • "configuredAt": null,
  • "lastSeenAt": null,
  • "lastRefreshedAt": null,
  • "deletedAt": null,
  • "lastActivationFailure": {
    },
  • "connectivity": {
    },
  • "clientId": null,
  • "assetId": null
}

Patch device

Merge-patch semantics (RFC 7396): an explicit null clears a field; an omitted field is left unchanged. Patchable fields: enrollmentGroupId and metadata only — all other device fields are read-only here. Note metadata is replaced as a whole, not recursively merged.

path Parameters
deviceId
required
string

Provider-scoped device identifier.

Request Body schema:

Merge-patch document (must be a JSON object).

enrollmentGroupId
null or string <uuid>

Move the device to this enrollment group; null removes it from its group. Reassigning a provisioned device is rejected with 409.

metadata
null or object

Replaces the device metadata as a whole (send the full object, not a delta); null clears it.

Responses

Request samples

Content type
{
  • "enrollmentGroupId": "9f8b7c6d-5e4f-4a3b-2c1d-0e9f8a7b6c5d",
  • "metadata": {
    }
}

Response samples

Content type
application/json
{
  • "deviceId": "string",
  • "providerClientId": null,
  • "provisioned": null,
  • "attestationType": "string",
  • "enrollmentGroupId": null,
  • "metadata": null,
  • "createdAt": "2019-08-24T14:15:22Z",
  • "updatedAt": "2019-08-24T14:15:22Z",
  • "provisionedAt": null,
  • "configuredAt": null,
  • "lastSeenAt": null,
  • "lastRefreshedAt": null,
  • "deletedAt": null,
  • "lastActivationFailure": {
    },
  • "connectivity": {
    },
  • "clientId": null,
  • "assetId": null
}

Delete device

Soft-deletes the device; it can be undone with restore.

path Parameters
deviceId
required
string

Provider-scoped device identifier.

Responses

Response samples

Content type
application/json
{
  • "error": "not_found"
}

Restore device

Restores a device that was previously soft-deleted.

path Parameters
deviceId
required
string

Provider-scoped device identifier.

Responses

Response samples

Content type
application/json
{
  • "deviceId": "string",
  • "providerClientId": null,
  • "provisioned": null,
  • "attestationType": "string",
  • "enrollmentGroupId": null,
  • "metadata": null,
  • "createdAt": "2019-08-24T14:15:22Z",
  • "updatedAt": "2019-08-24T14:15:22Z",
  • "provisionedAt": null,
  • "configuredAt": null,
  • "lastSeenAt": null,
  • "lastRefreshedAt": null,
  • "deletedAt": null,
  • "lastActivationFailure": {
    },
  • "connectivity": {
    },
  • "clientId": null,
  • "assetId": null
}

Reset device state

Break-glass repair for a device whose onboarding state has drifted from reality, so operators stop reaching for psql. Reset only ever rewinds; it never fabricates forward state, so configured is not a target — the device earns that itself via get-settings (Tier 1) or EST (Tier 2/3).

provisioned clears the configured/enrolled layer only (configured/enrolled timestamps, certificate fields, any pending re-enrollment approval) and keeps the identity triple, so a swapped or re-flashed dongle can re-enroll without rebuilding the asset and provider client.

registered also releases the identity claim — client id, asset id, provider client id, provisioning timestamp and the cached provider keys — so the next activation resolves identities from fresh input instead of adopting the old ones. It is rejected while core still reports a provider client: deactivate the device first.

Writes only onboarding's own record. It never contacts core to delete anything; an asset left unreferenced is returned as orphanedAssetId for the operator to deal with. Device id, enrollment group, metadata, last-seen and all attestation material are never touched.

path Parameters
deviceId
required
string

Provider-scoped device identifier.

Request Body schema: application/json

Reset target.

to
required
string

provisioned clears the configured/enrolled layer only; registered also releases the identity triple and the cached provider keys.

Responses

Request samples

Content type
application/json
Example
{
  • "to": "registered"
}

Response samples

Content type
application/json
{
  • "device": {
    },
  • "orphanedAssetId": "asset-abc123"
}

Mark device configured

Final lifecycle transition for a device; requires authorization.

path Parameters
deviceId
required
string

Provider-scoped device identifier.

Responses

Response samples

Content type
application/json
{
  • "deviceId": "string",
  • "providerClientId": null,
  • "provisioned": null,
  • "attestationType": "string",
  • "enrollmentGroupId": null,
  • "metadata": null,
  • "createdAt": "2019-08-24T14:15:22Z",
  • "updatedAt": "2019-08-24T14:15:22Z",
  • "provisionedAt": null,
  • "configuredAt": null,
  • "lastSeenAt": null,
  • "lastRefreshedAt": null,
  • "deletedAt": null,
  • "lastActivationFailure": {
    },
  • "connectivity": {
    },
  • "clientId": null,
  • "assetId": null
}

Delete devices (bulk)

Soft-deletes each device in the id list; per-id outcomes are reported independently.

Request Body schema: application/json

Device id list.

deviceIds
required
Array of strings

Device ids to operate on.

Responses

Request samples

Content type
application/json
{
  • "deviceIds": [
    ]
}

Response samples

Content type
application/json
{
  • "requestId": "d385ab22-0f51-4b97-9ecd-b8ff3fd4fcb6",
  • "summary": {
    },
  • "results": [
    ]
}

Restore devices (bulk)

Restores each soft-deleted device in the id list; per-id outcomes are reported independently.

Request Body schema: application/json

Device id list.

deviceIds
required
Array of strings

Device ids to operate on.

Responses

Request samples

Content type
application/json
{
  • "deviceIds": [
    ]
}

Response samples

Content type
application/json
{
  • "requestId": "d385ab22-0f51-4b97-9ecd-b8ff3fd4fcb6",
  • "summary": {
    },
  • "results": [
    ]
}

Enrollment Groups

Enrollment groups — collections of devices that share an auth method, attestation type, routing target, and response template.

Create enrollment group

Request Body schema: application/json

Enrollment group definition.

name
required
string <= 128 characters

Human-readable name (must be unique).

routingTargetId
required
string <uuid>

Routing target whose provider receives provisioning calls.

organizationId
required
string

Required owning organization id. Missing or empty values are rejected with 400.

modelId
null or string

Optional asset model id. Required when a workflow in the set includes asset creation; groups whose workflows do not create assets may omit it. An empty string is treated as null.

workflows
required
Array of strings non-empty

Required non-empty runnable workflow set: the slugs consumers may list, describe, and run against the group (e.g. ["device-activation"]). A registered workflow's UUID is also accepted and stored as its slug. Absent, empty, or unresolvable entries are rejected with 400.

providerTemplateId
null or string

Provider template id, resolved against core-management to compose the provider-side request. Optional on the group, but required by activation: a workflow run scoped to a group without one is rejected.

responseTemplate
required
any

Response template applied when devices fetch settings via GET /get_settings.

attestationType
null or string

Attestation type for devices in this group: shared_key (default), secret, or birth_certificate.

operationalCredential
null or string

Device operational credential type: symmetric_key (default) or certificate.

certificateTtlDays
null or integer <int32> [ 90 .. 7300 ]

Certificate validity period in days for certificate-credential groups; defaults to a service-configured value.

renewalPolicy
null or string

Re-enrollment policy applied when a device requests new credentials. One of Allow (default), Deny, or Prompt (requires admin approval).

certificateFormat
null or string

Optional EST client profile override: rfc7030 (PKCS#7) or metermate (PEM). When omitted the service-wide default applies.

null or object

Optional group-level values for the workflow inputs bag (string keys → string values). Merged beneath per-request inputs (request wins).

Responses

Request samples

Content type
application/json
{
  • "name": "string",
  • "routingTargetId": "74593f3d-b13c-4bc2-b095-3c2bee1acf85",
  • "organizationId": "string",
  • "modelId": null,
  • "workflows": [
    ],
  • "providerTemplateId": null,
  • "responseTemplate": null,
  • "attestationType": null,
  • "operationalCredential": null,
  • "certificateTtlDays": null,
  • "renewalPolicy": null,
  • "certificateFormat": null,
  • "workflowInputs": null
}

Response samples

Content type
application/json
{
  • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  • "name": "string",
  • "attestationType": "string",
  • "operationalCredential": "string",
  • "certificateTtlDays": 0,
  • "routingTargetId": "74593f3d-b13c-4bc2-b095-3c2bee1acf85",
  • "organizationId": null,
  • "modelId": null,
  • "workflows": [
    ],
  • "providerTemplateId": null,
  • "status": "string",
  • "deviceCount": 0,
  • "createdAt": "2019-08-24T14:15:22Z",
  • "renewalPolicy": "string",
  • "sharedKeys": {
    },
  • "certificateFormat": null,
  • "workflowInputs": null,
  • "responseTemplate": null
}

List enrollment groups

Supports pagination and filtering.

query Parameters
limit
integer <int32>

Page size, 1..1000 (default 50).

cursor
string

Opaque continuation token from a prior page.

Search
string

Search across name field using ILIKE.

Status
string

Filter by status (exact match).

SortBy
string

Sort by allowed columns. Format: "column_name" or "column_name:desc". Allowed: created_at, updated_at, name

Responses

Response samples

Content type
application/json
{
  • "items": [
    ],
  • "continuationToken": null
}

Get enrollment group

path Parameters
id
required
string <uuid>

Enrollment group id.

Responses

Response samples

Content type
application/json
{
  • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  • "name": "string",
  • "attestationType": "string",
  • "operationalCredential": "string",
  • "certificateTtlDays": 0,
  • "routingTargetId": "74593f3d-b13c-4bc2-b095-3c2bee1acf85",
  • "organizationId": null,
  • "modelId": null,
  • "workflows": [
    ],
  • "providerTemplateId": null,
  • "status": "string",
  • "deviceCount": 0,
  • "createdAt": "2019-08-24T14:15:22Z",
  • "renewalPolicy": "string",
  • "sharedKeys": {
    },
  • "certificateFormat": null,
  • "workflowInputs": null,
  • "responseTemplate": null
}

Update enrollment group

RFC 7396 JSON Merge Patch. An omitted field is unchanged; an explicit null removes the field, which most fields here refuse — only modelId clears and certificateTtlDays reverts to its default. responseTemplate and workflowInputs are opaque and replaced wholesale, never merged key by key.

path Parameters
id
required
string <uuid>

Enrollment group id.

Request Body schema:

Merge-patch document (must be a JSON object).

responseTemplate
null or object

Replacement response template.

status
null or string

Replacement status ("enabled" / "disabled").

certificateTtlDays
null or integer <int32> [ 90 .. 7300 ]

Replacement certificate TTL for x509 groups.

renewalPolicy
null or string

Replacement renewal policy ("Allow" / "Deny" / "Prompt").

organizationId
null or string non-empty

Replacement owning organization id. Omit to leave unchanged; an explicit empty value is rejected with 400 (the field is required and cannot be blanked).

modelId
null or string

Replacement asset model id (optional field). Omit to leave unchanged; an explicit empty value clears it to null.

certificateFormat
null or string

Replacement EST client profile (rfc7030 or metermate). Omit to leave unchanged.

null or object

Replacement group-level workflow inputs map. Omit to leave unchanged; an empty object clears all group inputs; a non-empty object replaces them wholesale.

workflows
Array of strings or null

Replacement runnable workflow set of slugs (UUIDs also accepted, stored as slugs). Omit to leave unchanged; a non-empty array replaces the set wholesale; an empty array is rejected with 400 (the set cannot be cleared).

Responses

Request samples

Content type
{
  • "responseTemplate": null,
  • "status": null,
  • "certificateTtlDays": null,
  • "renewalPolicy": null,
  • "organizationId": null,
  • "modelId": null,
  • "certificateFormat": null,
  • "workflowInputs": null,
  • "workflows": null
}

Response samples

Content type
application/json
{
  • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  • "name": "string",
  • "attestationType": "string",
  • "operationalCredential": "string",
  • "certificateTtlDays": 0,
  • "routingTargetId": "74593f3d-b13c-4bc2-b095-3c2bee1acf85",
  • "organizationId": null,
  • "modelId": null,
  • "workflows": [
    ],
  • "providerTemplateId": null,
  • "status": "string",
  • "deviceCount": 0,
  • "createdAt": "2019-08-24T14:15:22Z",
  • "renewalPolicy": "string",
  • "sharedKeys": {
    },
  • "certificateFormat": null,
  • "workflowInputs": null,
  • "responseTemplate": null
}

Delete enrollment group

path Parameters
id
required
string <uuid>

Enrollment group id.

Responses

Response samples

Content type
application/json
{
  • "error": "not_found"
}

Generate shared key

Generates the primary shared key, or fills whichever slot is empty. Idempotent if the primary slot is empty; conflicts when both slots are already populated.

path Parameters
enrollmentGroupId
required
string <uuid>

Enrollment group id.

Responses

Response samples

Content type
application/json
{
  • "primaryKey": null,
  • "secondaryKey": null
}

Rotate shared keys

Promotes the secondary key to primary and clears the secondary slot.

path Parameters
enrollmentGroupId
required
string <uuid>

Enrollment group id.

Responses

Response samples

Content type
application/json
{
  • "primaryKey": null,
  • "secondaryKey": null
}

Get shared keys

path Parameters
enrollmentGroupId
required
string <uuid>

Enrollment group id.

Responses

Response samples

Content type
application/json
{
  • "primaryKey": null,
  • "secondaryKey": null
}

Enrollment Group Devices

Enrollment-group device sub-resource — list and remove devices on a specific enrollment group.

Place devices in group

Sets each device's enrollment group to this one, moving it from any current group. A group route manipulates membership only — registration lives on POST /api/devices/register and deletion on DELETE /api/devices/{deviceId}.

Only registered devices can move. Provisioned and configured devices are a per-device state_conflict: the verdict comes from a live probe of core-management, which holds the authoritative provisioned state, not from this service's stored row. A device already in this group is reported placed without change, so a retried batch converges.

path Parameters
enrollmentGroupId
required
string <uuid>

Enrollment group id.

Request Body schema: application/json

Device ids to place.

deviceIds
required
Array of strings [ 1 .. 1000 ] items

Devices to place. A device already in this group is reported placed without change.

Responses

Request samples

Content type
application/json
{
  • "deviceIds": [
    ]
}

Response samples

Content type
application/json
{
  • "results": [
    ]
}

List enrollment group devices

Supports pagination and filtering.

path Parameters
enrollmentGroupId
required
string <uuid>

Enrollment group id.

query Parameters
limit
integer <int32>

Page size, 1..1000 (default 50).

cursor
string

Opaque continuation token from a prior page.

Search
string

Search across device ID field using ILIKE.

Provisioned
boolean

Filter by the cached provisioned verdict (true/false).

Configured
boolean

Filter by whether the device has completed get_settings (true/false).

AttestationType
string

Filter by attestation type (exact match): secret | shared_key | certificate | birth_certificate.

EnrollmentGroupId
string

Filter by enrollment group ID (exact match).

SortBy
string

Sort by allowed columns. Format: "column_name" or "column_name:desc".

Deleted
string

Soft-delete visibility: "exclude" (default), "include", or "only".

Responses

Response samples

Content type
application/json
{
  • "items": [
    ],
  • "continuationToken": null
}

Remove device from group

Clears the device's enrollment-group assignment. The device itself survives and remains registered — deletion lives on DELETE /api/devices/{deviceId}.

Only registered devices can be removed. Provisioned and configured devices return 409: the verdict comes from a live probe of core-management, which holds the authoritative provisioned state, not from this service's stored row.

path Parameters
enrollmentGroupId
required
string <uuid>

Enrollment group id.

deviceId
required
string

Provider-scoped device identifier.

Responses

Response samples

Content type
application/json
{
  • "error": "device_not_found"
}

Routing Targets

Routing targets — broker/provider destinations devices are routed to once provisioned.

Create routing target

Request Body schema: application/json

Routing target definition.

name
required
string <= 128 characters

Human-readable name for the routing target.

required
Array of objects (DeviceEndpointDto) non-empty

Where the device connects (broker / sftp / http / historian …).

config
null or object

Free-form provider-specific configuration.

providerId
required
null or string^[a-zA-Z0-9\-_]+$

Provider id — the NATS subject segment core addresses the provider on.

Responses

Request samples

Content type
application/json
{
  • "name": "string",
  • "deviceEndpoints": [
    ],
  • "config": null,
  • "providerId": null
}

Response samples

Content type
application/json
{
  • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  • "name": "string",
  • "deviceEndpoints": [
    ],
  • "config": null,
  • "providerId": null,
  • "createdAt": "2019-08-24T14:15:22Z"
}

List routing targets

Supports pagination and filtering.

query Parameters
limit
integer <int32>

Page size, 1..1000 (default 50).

cursor
string

Opaque continuation token from a prior page.

Search
string

Search across name field using ILIKE.

SortBy
string

Sort by allowed columns. Format: "column_name" or "column_name:desc". Allowed: created_at, updated_at, name

Responses

Response samples

Content type
application/json
{
  • "items": [
    ],
  • "continuationToken": null
}

Get routing target

path Parameters
id
required
string <uuid>

Routing target id.

Responses

Response samples

Content type
application/json
{
  • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  • "name": "string",
  • "deviceEndpoints": [
    ],
  • "config": null,
  • "providerId": null,
  • "createdAt": "2019-08-24T14:15:22Z"
}

Update routing target

RFC 7396 JSON Merge Patch. An omitted field is unchanged. An explicit null is rejected on every field: a routing target exists to resolve a provider address, and none of these can be absent for it to do that. config is opaque and replaced wholesale, never merged key by key.

path Parameters
id
required
string <uuid>

Routing target id.

Request Body schema:

Merge-patch document (must be a JSON object).

name
null or string [ 1 .. 128 ] characters

Replacement name.

Array of objects or null (DeviceEndpointDto) non-empty

Replacement device-endpoint list.

config
null or object

Replacement free-form config.

providerId
null or string non-empty ^[a-zA-Z0-9\-_]+$

Replacement provider id.

Responses

Request samples

Content type
{
  • "name": null,
  • "deviceEndpoints": null,
  • "config": null,
  • "providerId": null
}

Response samples

Content type
application/json
{
  • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  • "name": "string",
  • "deviceEndpoints": [
    ],
  • "config": null,
  • "providerId": null,
  • "createdAt": "2019-08-24T14:15:22Z"
}

Delete routing target

path Parameters
id
required
string <uuid>

Routing target id.

Responses

Response samples

Content type
application/json
{
  • "error": "not_found"
}

Trust Anchors

Trust anchors — CA certificates the service trusts when validating device client certificates during EST renewal and mTLS-authenticated bootstrap.

Create trust anchor

Creates a trust anchor from a PEM-encoded CA certificate.

Request Body schema: application/json

Trust anchor definition.

name
required
string <= 128 characters

Human-readable name (must be unique).

certificatePem
required
string

PEM-encoded X.509 root or intermediate CA certificate.

description
null or string <= 512 characters

Optional free-form description.

Responses

Request samples

Content type
application/json
{
  • "name": "string",
  • "certificatePem": "string",
  • "description": null
}

Response samples

Content type
application/json
{
  • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  • "name": "string",
  • "description": null,
  • "certificatePem": "string",
  • "subjectDn": "string",
  • "fingerprintSha256": "string",
  • "validFrom": "2019-08-24T14:15:22Z",
  • "validUntil": "2019-08-24T14:15:22Z",
  • "createdAt": "2019-08-24T14:15:22Z",
  • "updatedAt": "2019-08-24T14:15:22Z"
}

List trust anchors

Supports pagination and filtering.

query Parameters
limit
integer <int32>

Page size, 1..1000 (default 50).

cursor
string

Opaque continuation token from a prior page.

Search
string

Search across the name field using ILIKE.

SortBy
string

Sort by an allowed column. Format: "column_name" or "column_name:desc". Allowed: created_at, updated_at, name.

Responses

Response samples

Content type
application/json
{
  • "items": [
    ],
  • "continuationToken": null
}

Get trust anchor

path Parameters
id
required
string <uuid>

Trust anchor id.

Responses

Response samples

Content type
application/json
{
  • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  • "name": "string",
  • "description": null,
  • "certificatePem": "string",
  • "subjectDn": "string",
  • "fingerprintSha256": "string",
  • "validFrom": "2019-08-24T14:15:22Z",
  • "validUntil": "2019-08-24T14:15:22Z",
  • "createdAt": "2019-08-24T14:15:22Z",
  • "updatedAt": "2019-08-24T14:15:22Z"
}

Delete trust anchor

path Parameters
id
required
string <uuid>

Trust anchor id.

Responses

Response samples

Content type
application/json
{
  • "error": "not_found"
}

Pending Reenrollment

Admin endpoints for managing pending re-enrollment requests. When a device's re-enrollment is parked awaiting approval, an admin can approve or reject the request here. The device's next re-enrollment attempt will then succeed or be denied based on the recorded decision.

Get pending re-enrollment

path Parameters
deviceRecordId
required
string <uuid>

Device record id (UUID).

Responses

Response samples

Content type
application/json
{
  • "deviceId": "string",
  • "enrollmentGroupId": "3d0beb4b-f44d-4a03-867b-8b60021cfa4f",
  • "requestedAt": "2019-08-24T14:15:22Z",
  • "sourceIp": null,
  • "status": "string",
  • "decidedAt": null,
  • "decidedBy": null,
  • "reason": null
}

Approve re-enrollment

The device's next /serverkeygen attempt mints the certificate. Succeeds even if the request is currently Rejected (flip).

path Parameters
deviceRecordId
required
string <uuid>

Device record id (UUID).

Responses

Response samples

Content type
application/json
{
  • "deviceId": "string",
  • "enrollmentGroupId": "3d0beb4b-f44d-4a03-867b-8b60021cfa4f",
  • "requestedAt": "2019-08-24T14:15:22Z",
  • "sourceIp": null,
  • "status": "string",
  • "decidedAt": null,
  • "decidedBy": null,
  • "reason": null
}

Reject re-enrollment

The device's next /serverkeygen attempt returns 403 reenrollment_denied until an admin changes the decision. Succeeds even if the request is currently Approved (flip).

path Parameters
deviceRecordId
required
string <uuid>

Device record id (UUID).

Request Body schema: application/json

Optional rejection reason.

reason
null or string

Free-form admin-supplied rejection reason; recorded on the audit row.

Responses

Request samples

Content type
application/json
{
  • "reason": null
}

Response samples

Content type
application/json
{
  • "deviceId": "string",
  • "enrollmentGroupId": "3d0beb4b-f44d-4a03-867b-8b60021cfa4f",
  • "requestedAt": "2019-08-24T14:15:22Z",
  • "sourceIp": null,
  • "status": "string",
  • "decidedAt": null,
  • "decidedBy": null,
  • "reason": null
}

Enrollment Group Workflows

The consumer-facing, enrollment-group-scoped workflow surface (Path 2): a consumer lists the workflows a group can run, asks what inputs one needs, and runs it — all scoped to the group's Workflows set. {wf} resolves by UUID OR slug/name and MUST be a member of that set. Running dispatches to the same generic engine and the same run-result mapping as the generic POST /api/workflows/{id}/run primitive, with the group's configured inputs merged beneath the caller's params.

List an enrollment group's runnable workflows

path Parameters
egid
required
string <uuid>

Enrollment group id.

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Describe one EG-scoped workflow (its required inputs)

path Parameters
egid
required
string <uuid>

Enrollment group id.

wf
required
string

Workflow UUID or slug/name; MUST be in the group's runnable set.

Responses

Response samples

Content type
application/json
{
  • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  • "name": "string",
  • "displayName": "string",
  • "kind": "string",
  • "subjectKey": "string",
  • "callerRequiredInputs": [
    ],
  • "callerOptionalInputs": [
    ],
  • "groupSuppliedInputs": [
    ],
  • "openInputPrefixes": [
    ],
  • "steps": [
    ]
}

Run one EG-scoped workflow

Runs the workflow identified by wf (UUID or slug/name, resolved within the group's runnable set) for the subject in params[subjectKey], in the group's context. The workflow's kind is carried by this group's workflow summary and detail responses, so a caller knows which success shape a run returns before issuing it. Returns the engine run result with the same kind-shaped mapping the generic run route uses (ActivationResponse / DeactivationResponse / WorkflowQueryResponse / WorkflowRunResponse).

path Parameters
egid
required
string <uuid>

Enrollment group id (the run context).

wf
required
string

Workflow UUID or slug/name; MUST be in the group's runnable set.

Request Body schema: application/json

The params bag (flat string→string).

null or object

Caller-supplied inputs; must include the workflow's declared requiredInputs (subject value keyed on the workflow's subjectKey).

property name*
additional property
string

Responses

Request samples

Content type
application/json
{
  • "params": null
}

Response samples

Content type
application/json
Example
{
  • "deviceId": "string",
  • "created": true,
  • "outputs": null
}

Onboarding Ca

Beacon Tower Onboarding CA — the root every tenant device endpoint chains to.

Download the onboarding CA root

Served over publicly trusted TLS so a client that does not yet hold the root can fetch it.

query Parameters
format
string

Encoding to return: pem (default) or der.

Responses

Onboarding CA root identity

Subject, SHA-256 fingerprint and validity window, for verifying a downloaded root out of band.

Responses

Response samples

Content type
application/json
{
  • "subject": "string",
  • "fingerprintSha256": "string",
  • "notBefore": "2019-08-24T14:15:22Z",
  • "notAfter": "2019-08-24T14:15:22Z"
}

Workflow Runs

Admin/support surface over engine run records (design.md D13): list what ran, isolate failed executions, and resolve a support-quoted run id to its detail.

List workflow runs

Newest-first, paged. Filter by subjectId, outcome (succeeded / failed / already_running), and kind (activation / deactivation / erasure) to isolate a subject's history or failed runs. Read-only query workflows write no run record, so they never appear here.

query Parameters
subjectId
string

Only runs whose subject is this value.

deviceId
string
Deprecated

Deprecated: use subjectId. Honoured for one release.

outcome
string

Only runs with this outcome.

kind
string

Only runs of this kind.

limit
integer <int32>

Max runs per page.

cursor
string

Opaque continuation token from a prior page.

Responses

Response samples

Content type
application/json
{
  • "items": [
    ],
  • "continuationToken": null
}

Get a workflow run

Full single-run detail (per-step outcomes, failing step, error code, message) — the support lookup for a run id quoted by a failure body.

path Parameters
runId
required
string

The run id to resolve.

Responses

Response samples

Content type
application/json
{
  • "runId": "string",
  • "subjectKey": "string",
  • "subjectId": "string",
  • "deviceId": "string",
  • "workflowId": "string",
  • "kind": "string",
  • "outcome": "string",
  • "failedStep": null,
  • "errorCode": null,
  • "message": null,
  • "retryable": null,
  • "startedAt": "2019-08-24T14:15:22Z",
  • "finishedAt": "2019-08-24T14:15:22Z",
  • "steps": [
    ],
  • "resolvedInputs": {
    },
  • "invokedBy": null,
  • "retryOfRunId": null
}

Retry a failed workflow run

Resumes the run at the first step that did not succeed, armed with the inputs recorded on that run and the outputs its succeeded steps produced, under a new run id that references it. Steps that already succeeded are not executed again. Takes no caller-supplied input beyond runId: a request body or query override is ignored, not merged. The success body is kind-shaped exactly as the run routes: ActivationResponse, DeactivationResponse, or the generic WorkflowRunResponse, selected by the recorded run's workflow kind. Read-only query runs are never retried, so WorkflowQueryResponse is not among them.

path Parameters
runId
required
string

The failed run to re-drive.

Responses

Response samples

Content type
application/json
Example
{
  • "deviceId": "string",
  • "created": true,
  • "outputs": null
}

Workflows

The single generic workflow surface (generic-workflow-execution): a read-only catalog (GET /api/workflows, GET /api/workflows/{id}) and one execution endpoint (POST /api/workflows/{id}/run). The route validates only workflow-agnostic concerns (exists, required inputs present, subject present) and dispatches every kind to the generic BeaconTower.Onboarding.Infrastructure.Provisioning.WorkflowRunner (device-flows-as-steps D4). It carries no flow-specific logic.

List workflows

Lists the registered workflow catalog. Order matches registration sequence.

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Get a workflow

Returns one catalog entry by its UUID.

path Parameters
id
required
string <uuid>

The workflow UUID.

Responses

Response samples

Content type
application/json
{
  • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  • "displayName": "string",
  • "kind": "string",
  • "subjectKey": "string",
  • "requiredInputs": [
    ],
  • "optionalInputs": [
    ],
  • "openInputPrefixes": [
    ],
  • "steps": [
    ]
}

Run a workflow

Executes the workflow identified by id against the supplied params bag. The route validates the workflow exists, its required inputs are present, and (for mutating kinds) the subject value is present, then dispatches every kind through the one generic engine. The success body is kind-shaped: activation runs return ActivationResponse, deactivation runs DeactivationResponse, read-only query runs WorkflowQueryResponse (outputs only), and other mutating kinds (e.g. erasure) the generic WorkflowRunResponse with the subject, the recorded run id, and any run-level outputs. The workflow's kind is carried by the catalog (GET /api/workflows), so a caller knows which shape a run returns before issuing it — the union needs no discriminator in the body.

path Parameters
id
required
string <uuid>

The workflow UUID from the catalog.

Request Body schema: application/json

The params bag (flat string→string).

null or object

Caller-supplied inputs; must include the workflow's declared requiredInputs (subject value keyed on the workflow's subjectKey).

property name*
additional property
string

Responses

Request samples

Content type
application/json
{
  • "params": null
}

Response samples

Content type
application/json
Example
{
  • "deviceId": "string",
  • "created": true,
  • "outputs": null
}