Upgrading From Classic API#

Earlier versions of CCF exposed an alternative governance API, now known as the “classic API”. The bulk of the endpoints from the classic API have a direct replacement in the new API, as laid out below. Note that the response format may not match exactly. For instance response fields in JSON objects will be camelCase rather than snake_case, and list responses may now be paged. See the API schema for the new version for a precise description of the response format of each request.

Note that all new APIs require the api-version query parameter to be set, and will return an error if called without this parameter, or when its value does not match a known API version.

Proposals#

Purpose

Create a new proposal

Classic

POST /gov/proposals

Replacement

POST /gov/members/proposals:create

Purpose

Get single proposal

Classic

GET /gov/proposals/{proposal_id}

Replacement

GET /gov/members/proposals/{proposalId}

Purpose

Get all proposals

Classic

GET /gov/proposals

Replacement

GET /gov/members/proposals

Ballots#

Member Activation#

Note

The payload casing has changed, state_digest has become stateDigest.

Purpose

Get a fresh state-digest to ACK

Classic

POST /gov/ack/update_state_digest

Replacement

POST /gov/members/state-digests/{memberId}:update

Notes

Can also retrieve without refreshing, with GET /gov/members/state-digests/{memberId}

Purpose

Submit signed ACK

Classic

POST /gov/ack

Replacement

POST /gov/members/state-digests/{memberId}:ack

Transaction Status#

Purpose

Get status of single transaction

Classic

GET /gov/tx

Replacement

GET /gov/service/transactions/{transactionId}

Notes

Transaction ID has moved from query parameter to path parameter.

Purpose

Get latest committed transaction

Classic

GET /gov/commit

Replacement

GET /gov/service/transactions/commit

Note

/node/tx and /node/commit remain available in the old style, for existing operator code.

Recovery#

Purpose

Get encrypted recovery share for a member

Classic

GET /gov/recovery_share

Replacement

GET /gov/recovery/encrypted-shares/{memberId}

Notes

The new endpoint is unauthenticated and takes the target member ID as a path parameter, where the Classic API required authentication as a member.
Since shares are encrypted, they can be safely read by anyone, without authentication.

Purpose

Submit signed recovery share to advance recovery

Classic

POST /gov/recovery_share

Replacement

POST /gov/recovery/members/{memberId}:recover

Service State#

Purpose

Read details of currently service identity and recovery status

Classic

GET /gov/kv/service/info

Replacement

GET /gov/service/info

Purpose

Read current constitution

Classic

GET /gov/kv/constitution

Replacement

GET /gov/service/constitution

Notes

The new endpoint returns a Content-Type: text/javascript response containing the raw constitution, rather than encoding it within a JSON value.

Purpose

Read list of current members

Classic

Replacement

GET /gov/service/members

Notes

Single endpoint replaces multiple previous endpoints.
Entry for single member is also available at GET /gov/service/members/{memberId}.

Purpose

Read list of current nodes

Classic

Replacement

GET /gov/service/nodes

Notes

Single endpoint replaces multiple previous endpoints.
Entry for single node is also available at GET /gov/service/nodes/{nodeId}.

Purpose

Establish what attestations are required for a new node to join the service

Classic

Replacement

GET /gov/service/join-policy

Notes

Single endpoint replaces multiple previous endpoints.

Purpose

Read details of currently deployed JavaScript app

Classic

GET /gov/kv/modules

Replacement

GET /gov/service/javascript-app

Purpose

Read details of accepted JWKs and their issuers

Classic

Replacement

GET /gov/service/jwk

Notes

Single endpoint replaces multiple previous endpoints.