Skip to main content

Signing & Trust

TUF trust-root and signing-key management for update integrity (advanced).

Endpoints

MethodPathDescription
GET/api/orgs/{org_id}/trust/statusGet fleet trust posture
POST/api/orgs/{org_id}/trust/rootUpload a signed root.json
GET/api/orgs/{org_id}/runtimes/{runtime_id}/delegationsList runtime delegations
POST/api/orgs/{org_id}/runtimes/{runtime_id}/delegationsUpload runtime delegated targets
DELETE/api/orgs/{org_id}/runtimes/{runtime_id}/delegations/{id}Delete a runtime delegation
POST/api/orgs/{org_id}/trust/promote-root/proposePropose root promotion
POST/api/orgs/{org_id}/trust/promote-root/commitCommit root promotion
DELETE/api/orgs/{org_id}/trust/promote-root/pendingCancel a pending root promotion
POST/api/orgs/{org_id}/trust/rotate-server-keyRotate the server signing key
POST/api/orgs/{org_id}/trust/rotate-server-key/proposePropose server-key rotation (Level 2)
POST/api/orgs/{org_id}/trust/rotate-server-key/commitCommit server-key rotation (Level 2)
GET/api/orgs/{org_id}/signing/server-keyGet the org server signing key
GET/api/orgs/{org_id}/signing/statusGet signing configuration status
GET/api/orgs/{org_id}/signing/keysList delegate keys
POST/api/orgs/{org_id}/signing/keysRegister a delegate key
POST/api/orgs/{org_id}/signing/keys/approveApprove a staged delegate key
DELETE/api/orgs/{org_id}/signing/keys/stagedDiscard a staged delegate key
POST/api/orgs/{org_id}/signing/sign-for-deploySign targets for a local deploy

Get fleet trust posture

GET /api/orgs/{org_id}/trust/status

Returns the org's TUF root version, security level, and device root-version distribution.

Path parameters:

NameTypeDescription
org_idstring (uuid)Organization UUID.

Responses:

StatusBodyDescription
200TrustStatusTrust status.

Example request:

curl "https://connect.peridio.com/api/orgs/{org_id}/trust/status" \
-H "Authorization: Bearer $AVOCADO_TOKEN"

Example response (200):

{
"current_root_version": 0,
"setup_complete": true,
"root_rotated": true,
"security_level": 0,
"has_pending_promotion": true,
"root_version_distribution": {},
"total_tracked_devices": 0,
"stale_device_count": 0
}

Upload a signed root.json

POST /api/orgs/{org_id}/trust/root

Admin only. Uploads the org's user-signed TUF root metadata (signed offline).

Path parameters:

NameTypeDescription
org_idstring (uuid)Organization UUID.

Request body:

FieldTypeRequiredDescription
root_jsonobjectYesThe signed root metadata document.

Responses:

StatusBodyDescription
200data: objectUploaded.
422ValidationErrorRequest body failed validation.

Example request:

curl -X POST "https://connect.peridio.com/api/orgs/{org_id}/trust/root" \
-H "Authorization: Bearer $AVOCADO_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"root_json": {}
}'

Example response (200):

{
"data": {
"version": 0,
"setup_complete": true
}
}

List runtime delegations

GET /api/orgs/{org_id}/runtimes/{runtime_id}/delegations

Path parameters:

NameTypeDescription
org_idstring (uuid)Organization UUID.
runtime_idstring

Query parameters:

NameTypeRequiredDescription
cursorstringNoOpaque pagination cursor from a prior response's meta.after/meta.before.
limitintegerNoMax items per page (clamped 1–100). Defaults to 20. Range 1–100.
directionstringNoPage direction relative to the cursor. One of: after, before. Defaults to "after".

Responses:

StatusBodyDescription
200data: array of RuntimeDelegation, meta: PaginationMetaDelegations.

Example request:

curl "https://connect.peridio.com/api/orgs/{org_id}/runtimes/{runtime_id}/delegations" \
-H "Authorization: Bearer $AVOCADO_TOKEN"

Example response (200):

{
"data": [
{
"id": "0198a2e6-6f24-7cc3-b456-663cd21c4b12",
"runtime_id": "0198a2e6-6f24-7cc3-b456-663cd21c4b12",
"user_id": "0198a2e6-6f24-7cc3-b456-663cd21c4b12",
"username": "string",
"role_name": "string",
"inserted_at": "2026-08-14T12:00:00Z"
}
],
"meta": {
"after": "string",
"before": "string",
"has_next": true,
"has_previous": true,
"total": 0
}
}

Upload runtime delegated targets

POST /api/orgs/{org_id}/runtimes/{runtime_id}/delegations

Admin only. Uploads user-signed delegated targets JSON for a runtime.

Path parameters:

NameTypeDescription
org_idstring (uuid)Organization UUID.
runtime_idstring

Request body:

FieldTypeRequiredDescription
targets_jsonobjectYesThe signed delegated targets document.

Responses:

StatusBodyDescription
200data: objectUploaded.
422ValidationErrorRequest body failed validation.

Example request:

curl -X POST "https://connect.peridio.com/api/orgs/{org_id}/runtimes/{runtime_id}/delegations" \
-H "Authorization: Bearer $AVOCADO_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"targets_json": {}
}'

Example response (200):

{
"data": {
"id": "0198a2e6-6f24-7cc3-b456-663cd21c4b12",
"runtime_id": "0198a2e6-6f24-7cc3-b456-663cd21c4b12",
"user_id": "0198a2e6-6f24-7cc3-b456-663cd21c4b12",
"role_name": "string"
}
}

Delete a runtime delegation

DELETE /api/orgs/{org_id}/runtimes/{runtime_id}/delegations/{id}

Admin only.

Path parameters:

NameTypeDescription
org_idstring (uuid)Organization UUID.
runtime_idstring
idstring

Responses:

StatusBodyDescription
204Deleted.
404ErrorResource not found.

Example request:

curl -X DELETE "https://connect.peridio.com/api/orgs/{org_id}/runtimes/{runtime_id}/delegations/{id}" \
-H "Authorization: Bearer $AVOCADO_TOKEN"

Propose root promotion

POST /api/orgs/{org_id}/trust/promote-root/propose

Admin only. Proposes promoting the TUF root (Level 1 → 2). Returns the pending root JSON for the CLI to sign.

Path parameters:

NameTypeDescription
org_idstring (uuid)Organization UUID.

Responses:

StatusBodyDescription
200data: objectProposed.

Example request:

curl -X POST "https://connect.peridio.com/api/orgs/{org_id}/trust/promote-root/propose" \
-H "Authorization: Bearer $AVOCADO_TOKEN"

Example response (200):

{
"data": {
"pending_root_json": {},
"version": 0
}
}

Commit root promotion

POST /api/orgs/{org_id}/trust/promote-root/commit

Admin only. Commits the proposed root promotion with the user's co-signature.

Path parameters:

NameTypeDescription
org_idstring (uuid)Organization UUID.

Request body:

FieldTypeRequiredDescription
signaturestringYes

Responses:

StatusBodyDescription
200data: objectCommitted.

Example request:

curl -X POST "https://connect.peridio.com/api/orgs/{org_id}/trust/promote-root/commit" \
-H "Authorization: Bearer $AVOCADO_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"signature": "string"
}'

Example response (200):

{
"data": {
"version": 0,
"security_level": 0
}
}

Cancel a pending root promotion

DELETE /api/orgs/{org_id}/trust/promote-root/pending

Admin only.

Path parameters:

NameTypeDescription
org_idstring (uuid)Organization UUID.

Responses:

StatusBodyDescription
204Cancelled.

Example request:

curl -X DELETE "https://connect.peridio.com/api/orgs/{org_id}/trust/promote-root/pending" \
-H "Authorization: Bearer $AVOCADO_TOKEN"

Rotate the server signing key

POST /api/orgs/{org_id}/trust/rotate-server-key

Admin only. Rotates the server signing key at trust Level 0/1 (no user action needed).

Path parameters:

NameTypeDescription
org_idstring (uuid)Organization UUID.

Responses:

StatusBodyDescription
200data: objectRotated.

Example request:

curl -X POST "https://connect.peridio.com/api/orgs/{org_id}/trust/rotate-server-key" \
-H "Authorization: Bearer $AVOCADO_TOKEN"

Example response (200):

{
"data": {
"version": 0
}
}

Propose server-key rotation (Level 2)

POST /api/orgs/{org_id}/trust/rotate-server-key/propose

Admin only. Returns the pending root JSON for the CLI to co-sign.

Path parameters:

NameTypeDescription
org_idstring (uuid)Organization UUID.

Responses:

StatusBodyDescription
200data: objectProposed.

Example request:

curl -X POST "https://connect.peridio.com/api/orgs/{org_id}/trust/rotate-server-key/propose" \
-H "Authorization: Bearer $AVOCADO_TOKEN"

Example response (200):

{
"data": {
"pending_root_json": {},
"version": 0
}
}

Commit server-key rotation (Level 2)

POST /api/orgs/{org_id}/trust/rotate-server-key/commit

Admin only. Commits with the user's co-signature.

Path parameters:

NameTypeDescription
org_idstring (uuid)Organization UUID.

Request body:

FieldTypeRequiredDescription
signaturestringYes

Responses:

StatusBodyDescription
200data: objectCommitted.

Example request:

curl -X POST "https://connect.peridio.com/api/orgs/{org_id}/trust/rotate-server-key/commit" \
-H "Authorization: Bearer $AVOCADO_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"signature": "string"
}'

Example response (200):

{
"data": {
"version": 0,
"security_level": 0
}
}

Get the org server signing key

GET /api/orgs/{org_id}/signing/server-key

Returns the org server signing key (public hex + key ID). Creates the key if none exists.

Path parameters:

NameTypeDescription
org_idstring (uuid)Organization UUID.

Responses:

StatusBodyDescription
200data: objectServer key.

Example request:

curl "https://connect.peridio.com/api/orgs/{org_id}/signing/server-key" \
-H "Authorization: Bearer $AVOCADO_TOKEN"

Example response (200):

{
"data": {
"public_key_hex": "string",
"keyid": "string",
"root_key": {}
}
}

Get signing configuration status

GET /api/orgs/{org_id}/signing/status

Path parameters:

NameTypeDescription
org_idstring (uuid)Organization UUID.

Responses:

StatusBodyDescription
200data: SigningStatusSigning status.

Example request:

curl "https://connect.peridio.com/api/orgs/{org_id}/signing/status" \
-H "Authorization: Bearer $AVOCADO_TOKEN"

Example response (200):

{
"data": {
"setup_complete": true,
"root_rotated": true,
"root_json_version": 0,
"timestamp_ttl_days": 0,
"server_key_hex": "string",
"server_keyid": "string",
"root_key": {}
}
}

List delegate keys

GET /api/orgs/{org_id}/signing/keys

Lists active and staged delegate signing keys for the org.

Path parameters:

NameTypeDescription
org_idstring (uuid)Organization UUID.

Query parameters:

NameTypeRequiredDescription
key_typestringNoOne of: content, targets.
cursorstringNoOpaque pagination cursor from a prior response's meta.after/meta.before.
limitintegerNoMax items per page (clamped 1–100). Defaults to 20. Range 1–100.
directionstringNoPage direction relative to the cursor. One of: after, before. Defaults to "after".

Responses:

StatusBodyDescription
200data: array of DelegateKey, meta: PaginationMetaKeys.

Example request:

curl "https://connect.peridio.com/api/orgs/{org_id}/signing/keys" \
-H "Authorization: Bearer $AVOCADO_TOKEN"

Example response (200):

{
"data": [
{
"id": "0198a2e6-6f24-7cc3-b456-663cd21c4b12",
"user_id": "0198a2e6-6f24-7cc3-b456-663cd21c4b12",
"username": "string",
"keyid": "string",
"public_key_hex": "string",
"status": "string",
"key_type": "content",
"role_name": "string",
"paths": ["string"],
"staged_at": "2026-08-14T12:00:00Z",
"activated_at": "2026-08-14T12:00:00Z",
"activated_by_user_id": "0198a2e6-6f24-7cc3-b456-663cd21c4b12"
}
],
"meta": {
"after": "string",
"before": "string",
"has_next": true,
"has_previous": true,
"total": 0
}
}

Register a delegate key

POST /api/orgs/{org_id}/signing/keys

Registers (stages) a delegate signing key for the current user. Approval by an admin activates it.

Path parameters:

NameTypeDescription
org_idstring (uuid)Organization UUID.

Request body:

FieldTypeRequiredDescription
public_key_hexstringYes
key_typestringNoOne of: content, targets. Defaults to "content".

Responses:

StatusBodyDescription
200data: DelegateKeyRegistered (staged).
422ValidationErrorRequest body failed validation.

Example request:

curl -X POST "https://connect.peridio.com/api/orgs/{org_id}/signing/keys" \
-H "Authorization: Bearer $AVOCADO_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"public_key_hex": "string",
"key_type": "content"
}'

Example response (200):

{
"data": {
"id": "0198a2e6-6f24-7cc3-b456-663cd21c4b12",
"user_id": "0198a2e6-6f24-7cc3-b456-663cd21c4b12",
"username": "string",
"keyid": "string",
"public_key_hex": "string",
"status": "string",
"key_type": "content",
"role_name": "string",
"paths": ["string"],
"staged_at": "2026-08-14T12:00:00Z",
"activated_at": "2026-08-14T12:00:00Z",
"activated_by_user_id": "0198a2e6-6f24-7cc3-b456-663cd21c4b12"
}
}

Approve a staged delegate key

POST /api/orgs/{org_id}/signing/keys/approve

Admin only. Approves (activates) a staged delegate key. Identify the key by keyid, or by key_type to approve that role's staged key.

Path parameters:

NameTypeDescription
org_idstring (uuid)Organization UUID.

Request body: (optional)

FieldTypeRequiredDescription
keyidstringNo
key_typestringNoOne of: content, targets.

Responses:

StatusBodyDescription
200data: DelegateKeyApproved.
422ValidationErrorRequest body failed validation.

Example request:

curl -X POST "https://connect.peridio.com/api/orgs/{org_id}/signing/keys/approve" \
-H "Authorization: Bearer $AVOCADO_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"keyid": "string",
"key_type": "content"
}'

Example response (200):

{
"data": {
"id": "0198a2e6-6f24-7cc3-b456-663cd21c4b12",
"user_id": "0198a2e6-6f24-7cc3-b456-663cd21c4b12",
"username": "string",
"keyid": "string",
"public_key_hex": "string",
"status": "string",
"key_type": "content",
"role_name": "string",
"paths": ["string"],
"staged_at": "2026-08-14T12:00:00Z",
"activated_at": "2026-08-14T12:00:00Z",
"activated_by_user_id": "0198a2e6-6f24-7cc3-b456-663cd21c4b12"
}
}

Discard a staged delegate key

DELETE /api/orgs/{org_id}/signing/keys/staged

Admin only. Discards a staged (unapproved) delegate key. Identify by keyid or key_type.

Path parameters:

NameTypeDescription
org_idstring (uuid)Organization UUID.

Query parameters:

NameTypeRequiredDescription
keyidstringNo
key_typestringNoOne of: content, targets.

Responses:

StatusBodyDescription
204Discarded.
404ErrorResource not found.

Example request:

curl -X DELETE "https://connect.peridio.com/api/orgs/{org_id}/signing/keys/staged" \
-H "Authorization: Bearer $AVOCADO_TOKEN"

Sign targets for a local deploy

POST /api/orgs/{org_id}/signing/sign-for-deploy

Signs a caller-supplied TUF targets list with the org server key, in the per-runtime delegated format avocado deploy --connect-sign expects. Returns the signed targets_json, snapshot_json, timestamp_json, and delegated_targets_json (all at version 1).

Path parameters:

NameTypeDescription
org_idstring (uuid)Organization UUID.

Request body:

FieldTypeRequiredDescription
targetsobjectYesTUF target list to sign.
runtime_uuidstringYes

Responses:

StatusBodyDescription
200data: objectSigned metadata.
422ValidationErrorRequest body failed validation.

Example request:

curl -X POST "https://connect.peridio.com/api/orgs/{org_id}/signing/sign-for-deploy" \
-H "Authorization: Bearer $AVOCADO_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"targets": {},
"runtime_uuid": "string"
}'

Example response (200):

{
"data": {
"targets_json": {},
"snapshot_json": {},
"timestamp_json": {},
"delegated_targets_json": {}
}
}

Object reference

TrustStatus

FieldTypeDescription
current_root_versioninteger
setup_completeboolean
root_rotatedboolean
security_levelintegerTUF trust level (0/1/2).
has_pending_promotionboolean
root_version_distributionobjectMap of root version → device count.
total_tracked_devicesinteger
stale_device_countinteger

ValidationError

Changeset validation error. Keys are field names; values are lists of messages.

FieldTypeDescription
errorsobject

RuntimeDelegation

FieldTypeDescription
idstring
runtime_idstring
user_idstring
usernamestringNullable.
role_namestringTUF delegated role name, e.g. runtime-<uuid>.
inserted_atstring (date-time)

PaginationMeta

Cursor pagination metadata. Present only when the request supplied a pagination param (cursor, limit, or direction); otherwise the full list is returned unpaginated with no meta.

FieldTypeDescription
afterstringOpaque cursor for the next page. Pass back as ?cursor=. Nullable.
beforestringOpaque cursor for the previous page. Nullable.
has_nextboolean
has_previousboolean
totalintegerNullable.

Error

Standard error envelope.

FieldTypeDescription
errorstringMachine-readable error code.
messagestringHuman-readable explanation.

SigningStatus

FieldTypeDescription
setup_completeboolean
root_rotatedboolean
root_json_versioninteger
timestamp_ttl_daysinteger
server_key_hexstring
server_keyidstring
root_keyobjectPresent once a root key exists.

DelegateKey

FieldTypeDescription
idstring
user_idstring
usernamestringNullable.
keyidstring
public_key_hexstring
statusstringe.g. staged, active.
key_typestringDelegate key role. One of: content, targets.
role_namestring
pathsstring[]TUF delegation paths (create response).
staged_atstring (date-time)Nullable.
activated_atstring (date-time)Nullable.
activated_by_user_idstringNullable.