Skip to content

API and workflow reference

Decentralization Manager serves an HTTP API on the same port as its web interface. This page lists the routes, the request conventions, the workflow model, and the API errors.

The peer and coordinator model is in Architecture overview. Product-wide compatibility and troubleshooting are in Compatibility, releases, and troubleshooting.

The HTTP API has two parts:

  • The operator API serves the web interface and operator scripts.
  • The tenant API, under /v0/tenant/*, serves wallets.

The peer protocol on the Noise port is not part of the HTTP API. The Canton Admin API, the Canton Ledger API, and the Daml choices are not part of it either. The repository binary is dec-party-manager.

You need:

  • A running Decentralization Manager node.
  • The base URL of the node, such as https://decman.example.com.
  • For the operator API, an access token from the configured Keycloak or Auth0 provider.
  • For admin-gated routes, the role in DECPM_ADMIN_ROLE, when that variable is set.
  • For routes that call the Ledger API, party credentials for the target Decentralized Party on this node.
  • For the tenant API, a tenant API key from the operator of the node.

Send the operator access token as a bearer token:

Terminal window
export DECMAN_URL="https://decman.example.com"
export DECMAN_TOKEN="<access-token>"
curl --fail-with-body \
-H "Authorization: Bearer ${DECMAN_TOKEN}" \
"${DECMAN_URL}/node-config"

Authentication has two layers:

  1. The node validates the caller’s token against the configured identity provider.
  2. Routes that call the Ledger API use the stored party credentials of the target Decentralized Party.

The route tables on this page use these access levels:

AccessMeaning
PublicNo token.
TokenA valid operator access token.
AdminA valid token with the role in DECPM_ADMIN_ROLE. When the variable is unset, every valid token passes.
Tenant keyA key from DECPM_TENANT_API_KEYS, sent as Authorization: Bearer <key>.

Authentication and operator roles has the full rules. It also covers the first-run bootstrap of PUT /party-config, which needs no token.

The node generates an OpenAPI document and a Swagger UI from its HTTP handlers. The node mounts both only in insecure mode:

  • Swagger UI: /swagger-ui/
  • OpenAPI JSON: /api-docs/openapi.json

A secure node serves neither route. Do not turn on insecure mode on a shared node to read the document. Read it from a local devnet node instead.

  • Send and expect JSON. A DAR upload sends each file as base64 inside the JSON body.
  • Canton identifiers are strings, for example party::1220... or participant::1220....
  • The node accepts request bodies up to 100 MB. The limit exists for DAR uploads.
  • Most list routes return arrays inside a response object, such as runs or invitations. GET /packages/vetted returns a bare array.
  • The API has no idempotency keys. Read the state before you repeat a write.
  • A workflow start returns an instance_name. Use it to watch or control that run.

Some read routes return their results in pages:

RoutePage parametersNext page
GET /governance/proposalslimit (default 50, maximum 200), cursorSend next_cursor from the previous response as cursor
GET /governance/auditlimit (default 50), offsetRaise offset by limit
GET /governance/chain-auditlimit, before_offsetSend next_before_offset from the previous response as before_offset

Most handlers return this error body:

{
"error": "Human-readable error message"
}

POST /onboarding returns HTTP 422 when the selected peers do not all list each other, or when the coordinator cannot query a selected peer. The body then has error and missing_edges. Each entry has from, to, and kind. The kind is mesh_hole or unreachable_from_coordinator.

CodeTypical cause
400A malformed request, or a value that fails validation.
401A missing or invalid token. The error text names the cause, such as missing bearer token, token issuer not trusted: <issuer>, or token is not active. A tenant route answers invalid tenant API key.
403missing required role: <role>. The token lacks the admin role.
404No credentials configured for party on a governance route, or an unknown run or invitation.
409A conflict, such as another run on the same party, an incompatible peer, or a run in the wrong state.
422The onboarding mesh check failed.

The API has no stable error codes, request IDs, or retryable flag. Do not parse the error text to decide a retry.

Before you repeat a write that can change state:

  1. Read the resource or the run state.
  2. Confirm whether the first request started a run or finished an operation.
  3. Use the retry route only for a failed run that is safe to repeat.
  4. Escalate when the result is unclear.
MethodRouteAccessPurpose
GET/healthzPublicLiveness probe. Returns {"status":"ok"} and does no I/O.
GET/auth-configPublicIdentity-provider settings for the login page.
GET/node-configTokenNode configuration, version, and build_version.
GET/node-healthTokenHealth of the Admin API, the Ledger API, the participant, and the synchronizers.
GET/participants-statusTokenConnection status, latency, and version of each peer.
GET/keys/statusTokenThe Noise public key of this node.
GET/network-infoTokenThe DSO party and the AmuletRules contract.
GET/operator-infoTokenThe Utility operator party.

Monitoring and logging describes the health responses and the metrics listener.

MethodRouteAccessPurpose
GET/network-configTokenThe stored peer records.
POST/network-configAdminReplaces the stored peer list.
MethodRouteAccessPurpose
GET/party-config/{dec_party_id}TokenThe party credentials of one party. Secrets are masked.
PUT/party-configAdminStores party credentials. The request accepts no unknown fields.
POST/party-config/discover-member-partyAdminFinds the member party of the user that the given credentials sign in as.
GET/auth/statusTokenThe authentication status of each configured party.
POST/auth/testTokenRequests a fresh token for each stored party credential.
POST/auth/grant-rightsAdminGrants Ledger API rights on the member party and the Decentralized Party.
MethodRouteAccessPurpose
GET/decentralized-partiesTokenLists Decentralized Parties. prefix filters by party ID prefix.
POST/onboardingAdminStarts a run that creates a Decentralized Party.
POST/add-partyAdminStarts a run that adds a participant node to a Decentralized Party.
POST/kickAdminStarts a run that removes a participant node from a Decentralized Party.
POST/change-thresholdAdminStarts a run that changes the threshold.
DELETE/acs-import-quarantineTokenLifts an ACS import quarantine. Takes party_id and participant_id. It repairs nothing.

Each start route also has a legacy status route and a legacy cancel route: GET /<kind>/status and POST /<kind>/cancel. The kinds are onboarding, add-party, kick, and change-threshold.

Membership and governance changes and Add a member to a Decentralized Party describe these procedures.

MethodRouteAccessPurpose
GET/workflowsTokenLists the runs that are not dismissed.
POST/workflows/{instance_name}/cancelAdminCancels an in-flight run that this node coordinates.
POST/workflows/{instance_name}/retryAdminRetries a failed run that this node coordinates.
POST/workflows/{instance_name}/dismissAdminHides a finished run from the list.
MethodRouteAccessPurpose
GET/invitationsTokenPending invitations.
GET/invitations/handledTokenAccepted and declined invitations, newest first.
GET/invitations/{id}/dars/{index}AdminDownloads one DAR of a pending DAR invitation from the coordinator. The node checks the DAR against the hash that the invitation pins.
POST/invitations/acceptAdminAccepts an invitation. Body: {"id": "<invitation-id>"}.
POST/invitations/declineAdminDeclines an invitation. Body: {"id": "<invitation-id>"}.
MethodRouteAccessPurpose
GET/packagesTokenThe package IDs that this node uses.
GET/packages/vettedTokenThe packages that this participant vets.
GET/packages/compare-peersTokenCompares the vetted packages of this node with each peer. participants takes a comma-separated list.
GET/packages/expected-versionsTokenThe Splice package versions that the DSO AmuletRules contract pins.
POST/dars/uploadAdminUploads DARs to this participant only.
POST/dars/distributeAdminStarts a run that sends DARs to the peers in peer_ids.
POST/dars/distribute-packageAdminStarts the same run for the DAR on this node that holds package_id.
GET/dars/distribute/statusTokenLegacy status of the DAR distribution run.
POST/dars/cancelAdminLegacy cancel of the DAR distribution run.
POST/contractsAdminStarts a run that deploys contracts for a Decentralized Party. It uploads no DARs.
GET/contracts/statusTokenLegacy status of the contracts run.
POST/contracts/cancelAdminLegacy cancel of the contracts run.

Package and contract operations describes these procedures.

The governance routes take a party_id, which is the Decentralized Party ID.

MethodRouteAccessPurpose
GET/governance/stateTokenThe GovernanceRules contract of the party.
GET/governance/confirmationsTokenOpen actions and their confirmations. Only an admin caller gets the full proposal payload.
GET/governance/proposalsTokenOne page of open proposals.
GET/governance/known-membersTokenThe member parties that each participant knows.
GET/governance/auditTokenThe governance audit trail of this node. Without party_id, the newest entries for every party.
GET/governance/chain-auditTokenLedger events of the party. scope=all reads every event live. refresh=true reads Canton again.
POST/governance/proposeAdminCreates a proposal. The node also creates its own confirmation.
POST/governance/confirmAdminConfirms an action.
POST/governance/executeAdminExecutes an action that has enough confirmations.
POST/governance/expireAdminExpires a stale confirmation.
POST/governance/cancelTokenRevokes a confirmation that this node made.
POST/governance/cancel-proposalAdminRetracts a proposal that this node created, together with its confirmation.
GET/coupon-reassignment-delegationTokenThe active reward delegation contracts of the party.

POST /governance/propose takes party_id, rules_contract_id, and a proposal object. The OpenAPI document describes each proposal type. Governance lifecycle explains the proposal, confirmation, and execution steps.

Retract a proposal and its confirmation:

Terminal window
curl --fail-with-body \
-X POST "${DECMAN_URL}/governance/cancel-proposal" \
-H "Authorization: Bearer ${DECMAN_TOKEN}" \
-H "Content-Type: application/json" \
-d '{
"party_id": "<decentralized-party-id>",
"proposal_cid": "<proposal-contract-id>",
"confirmation_cid": "<own-confirmation-contract-id>"
}'

confirmation_cid is optional. The node archives that confirmation in the same transaction.

The GET routes in this table take a party_id and query the Ledger API as that party.

MethodRouteAccessReturns
GET/contracts/queryTokenContract IDs by template or by interface. include_payload=true adds the decoded fields.
GET/services/provider, /services/user, /services/registrarTokenUtility service contracts.
GET/credential-offers, /credentialsTokenCredential contracts.
GET/registrar-service-requests, /provider-configurations, /instrumentsTokenRegistry contracts.
GET/holdings, /transfer-preapprovals, /transfer-factoriesTokenToken-standard contracts.
GET/governance/transfer-instructions, /governance/mint-requests, /governance/burn-requestsTokenPending token-standard requests.
POST/token-standard-contractsAdminForwards the request body to a fixed external token-standard service. It takes no party_id.

/contracts/query takes package_id, module_name, and entity_name. Set interface=true for an interface query.

MethodRouteAccessPurpose
GET/external-partiesTokenThe external parties that this participant hosts.
POST/v0/tenant/prepareTenant keyBuilds the onboarding topology of a new external party and returns the hashes to sign.
POST/v0/tenant/executeTenant keyChecks the signed onboarding topology, co-signs it, and submits it.
GET/v0/tenant/{party}/statusTenant keyReports whether this host hosts the party yet.
GET/v0/tenant/{party}/stateTenant keyThe current serial, threshold, and host count of the party.
POST/v0/tenant/add-hosts/prepareTenant keyBuilds the topology that adds hosts to an external party.
POST/v0/tenant/add-hosts/executeTenant keyChecks the signed add-hosts topology, co-signs it, and submits it.
POST/v0/tenant/add-hosts/authorizeTenant keyAdds hosts to a party whose namespace is the key of a participant.
GET/v0/tenant/{party}/acs/{target}Tenant keyServes one block of the ACS of the party for a joining host. seq selects the block.
POST/v0/tenant/add-hosts/importTenant keyImports one relayed ACS block on the joining host.
POST/v0/tenant/threshold/prepareTenant keyBuilds a change of the confirmation threshold.
POST/v0/tenant/threshold/executeTenant keySubmits the signed threshold change.
POST/v0/tenant/threshold/authorizeTenant keyChanges the threshold of a party whose namespace is the key of a participant.
POST/v0/tenant/local-party/adopt-key/prepareTenant keyBuilds the conversion that gives a local party an owner-held signing key.
POST/v0/tenant/local-party/adopt-key/executeTenant keyCo-signs and submits the signed conversion.

The tenant API does not use the operator token or the admin role. The node reads its tenant keys from DECPM_TENANT_API_KEYS. With no keys, the node answers every tenant call with HTTP 401.

Every wallet-signed tenant write takes two calls. The prepare call returns the hashes that the wallet signs. The execute call submits the signed topology. The private key of the party stays in the wallet. The node receives only public keys and signatures.

Releases up to v1.13.0 serve the four submit routes under …/onboard:

Current routeRoute in v1.13.0 and earlier
/v0/tenant/execute/v0/tenant/onboard
/v0/tenant/add-hosts/execute/v0/tenant/add-hosts/onboard
/v0/tenant/threshold/execute/v0/tenant/threshold/onboard
/v0/tenant/local-party/adopt-key/execute/v0/tenant/local-party/adopt-key/onboard

The decman-wallet crate is a Rust client for the tenant API. Its TenantClient calls one host, and its flow functions run the complete procedures. The function execute_co_validated was onboard_co_validated in v1.13.0.

The procedures are in Decentralize an external party and Decentralize an existing party.

The node stores six workflow kinds:

  • Onboarding
  • Kick
  • Contracts
  • Dars
  • AddParty
  • ChangeThreshold

A run has the role Coordinator or Peer. The coordinator starts and drives the run. A peer accepts an invitation and runs its local steps when the coordinator asks.

A node can run several workflow runs at the same time, also of the same kind. A node refuses to start a Kick, AddParty, ChangeThreshold, or Contracts run for a party that already has a run in progress on that node. The node counts its runs in either role. Runs for different parties can run at the same time. The guard is local to each node. Decentralization Manager does not stop two different nodes from coordinating conflicting runs on the same party.

The status values on the wire are:

ValueMeaningOperator action
idleNo run has started. Only the legacy per-kind status routes return it.Start the workflow when the prerequisites are met.
inprogressThe run is active or waits for peers.Read current_step, the peer progress, and the invitations. Do not send the same start request again.
completedThe run reached its success state.Verify the Canton topology, packages, or contracts.
failedThe run stopped with an error.Read error, correct the cause, and retry only when it is safe.
cancelledAn operator or the coordinator cancelled the run.Confirm the peer state before you start a replacement run.

The workflow status has no ready, executing, or expired values. The current_step value shows finer progress. Governance confirmation expiry is separate from the workflow status.

A successful start returns HTTP 202 with this body:

{
"status": "inprogress",
"message": "<human-readable message>",
"instance_name": "<workflow-instance>"
}

Store instance_name. The legacy per-kind status and cancel routes cannot choose between concurrent runs of the same kind.

GET /workflows returns a runs array. Each run has these fields:

  • instance_name, kind, role, and status.
  • current_step, step_index, and step_total.
  • expected_peers, completed_peers, and connected_peers.
  • error, when the run failed, or when a cancel gave a reason.
  • acs_progress, while an ACS transfer moves.
  • Context fields, such as dec_party_id, prefix, participants, previous_threshold, new_threshold, kicked_participant, added_participant, package_names, and dar_filenames.
  • coordinator_name on peer runs.
  • dismissed, created_at, and updated_at. The times are Unix seconds.

The API does not return the stored start configuration of a run.

  1. Validate the peer records, the authentication, the Canton access, and the inputs of the workflow.
  2. Send the start request to the coordinator.
  3. Store the returned instance_name.
  4. The other participants read and accept their invitations.
  5. Poll GET /workflows and find the run by instance_name.
  6. Wait for completed, failed, or cancelled.
  7. Verify the resulting Canton state or the deployed artifact.

The node stores the run progress in SQLite. At startup, it resumes every run that is inprogress. Recovery has workflow-specific limits. Read the operations guides before you rely on it.

Create a Decentralized Party with selected peers:

Terminal window
curl --fail-with-body \
-X POST "${DECMAN_URL}/onboarding" \
-H "Authorization: Bearer ${DECMAN_TOKEN}" \
-H "Content-Type: application/json" \
-d '{
"party_id_prefix": "example-party",
"peer_ids": [
"participant-2::1220...",
"participant-3::1220..."
]
}'

The optional threshold field sets the initial threshold. Without it, the coordinator uses half the owner count, rounded up, with a minimum of 1.

Example response:

{
"status": "inprogress",
"message": "Onboarding workflow started",
"instance_name": "<workflow-instance>"
}

Poll the run list and select the returned run:

Terminal window
curl --fail-with-body \
-H "Authorization: Bearer ${DECMAN_TOKEN}" \
"${DECMAN_URL}/workflows"

Do not treat the message text or the instance_name format as stable. Only the documented fields and the exact enum values can drive client logic.

Use the instance-scoped routes. They act on exactly one run:

  • POST /workflows/{instance_name}/cancel cancels an in-flight run that this node coordinates. Otherwise it returns 409.
  • POST /workflows/{instance_name}/retry restarts a failed coordinator run at the step that failed. Otherwise it returns 409.
  • POST /workflows/{instance_name}/dismiss hides a finished run. It returns 409 while the run is inprogress.

A peer cannot retry its own run. The peer run returns to inprogress when the coordinator retries.

Read the latest run state before a cancel or a retry. A coordinator action can also change the peer runs and the pending invitations. Never assume that a step is safe to repeat after a partial Canton submission.

Read the pending invitations:

Terminal window
curl --fail-with-body \
-H "Authorization: Bearer ${DECMAN_TOKEN}" \
"${DECMAN_URL}/invitations"

Accept an invitation by its id:

Terminal window
curl --fail-with-body \
-X POST "${DECMAN_URL}/invitations/accept" \
-H "Authorization: Bearer ${DECMAN_TOKEN}" \
-H "Content-Type: application/json" \
-d '{"id":"<invitation-id>"}'

A peer declines an invitation through POST /invitations/decline with the same body. A decline fails the matching coordinator run when the invitation carries the instance_name of the coordinator’s run.

  • Pin the client to a release, and read the OpenAPI document of that release.
  • Use bearer authentication and least-privilege roles.
  • Store the instance_name of each run.
  • Match exact enum values, not human-readable messages.
  • Read the state before you repeat a write.
  • Poll with backoff and a client-side deadline.
  • Keep tokens, client secrets, tenant keys, party credentials, and contract payloads out of logs.
  • Verify the Canton result after a completed run.
  • Test restart, cancellation, peer outage, and partial progress.
SymptomLikely causeNext action
401 with a token errorThe token is missing or expired, the issuer is not trusted, or the provider discovery failed.Check the Keycloak or Auth0 settings, the token expiry, and the reachability of the provider.
401 invalid tenant API keyThe key is not one of the keys of this host, or the host has no keys.Send the key of this host. Check DECPM_TENANT_API_KEYS on the host.
403 missing required role: <role>The token lacks the role in DECPM_ADMIN_ROLE.Grant the role, or fix the role claim. Do not remove the role gate as a workaround.
409 Party <id> already has a <kind> workflow in flight (run <run>)Another run on this node targets the same party.Wait for that run to end, or cancel it.
409 Cannot start the workflow: every invited peer must run dec-party-manager >= 0.1.9 …The named peers run a version below 0.1.9, or the coordinator could not read their version.Read the reason next to each peer. Upgrade the peer to the release of the other nodes, bring it online, or deselect it.
409 Retry must be initiated from the coordinator side. …The retry went to a peer run.Retry the run on the coordinator.
409 Cannot retry a workflow in status …; only Failed runs can be retriedThe run is not failed.Read the run state. Cancel or wait instead.
422 with missing_edgesThe selected peers do not all list each other, or the coordinator cannot query a peer.For mesh_hole, add to as a peer on the from node. For unreachable_from_coordinator, fix the coordinator’s record of to, or bring to online.
A run fails with <step> cannot complete: peer <id> has been unreachable for <n>sThe coordinator heard nothing from the peer for 10 minutes, and the run lost its quorum.Bring the peer back online. Then retry the run.
A run stays inprogressA peer has not accepted, connected, or finished the current step.Read current_step, expected_peers, connected_peers, /invitations, and /participants-status.
A retry can repeat workThe client lost the first response, or the run failed after a partial Canton operation.Read /workflows and verify the Canton state before you retry. Escalate if the result stays unclear.
The Swagger UI is missingThe node runs in secure mode.Read the OpenAPI document from a local devnet node in insecure mode.

Secure API access: Authentication and operator roles.