const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
schemaVersion: 'bitgo-repo-demo.v1',
actionId: '<string>',
expectedRevision: '<string>',
idempotencyKey: '<string>'
})
};
fetch('https://api-staging.keystoneos.xyz/v1/demo/repos/{repo_id}/commands', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api-staging.keystoneos.xyz/v1/demo/repos/{repo_id}/commands"
payload = {
"schemaVersion": "bitgo-repo-demo.v1",
"actionId": "<string>",
"expectedRevision": "<string>",
"idempotencyKey": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)curl --request POST \
--url https://api-staging.keystoneos.xyz/v1/demo/repos/{repo_id}/commands \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"schemaVersion": "bitgo-repo-demo.v1",
"actionId": "<string>",
"expectedRevision": "<string>",
"idempotencyKey": "<string>"
}
'{
"detail": "<string>",
"code": "INVALID_TOKEN",
"docs_url": "https://docs.keystoneos.xyz/guides/error-codes#http-error"
}{
"detail": "<string>",
"code": "INVALID_TOKEN",
"docs_url": "https://docs.keystoneos.xyz/guides/error-codes#http-error"
}{
"detail": "<string>",
"code": "INVALID_TOKEN",
"docs_url": "https://docs.keystoneos.xyz/guides/error-codes#http-error"
}Command demo repo
Requires the settlements:write scope (as an M2M scope or a user permission).
Take an action a snapshot offered, at the revision the caller read. In this release no action is offered and no command is accepted: once the credential, the actor and the repo are verified, every command answers 503 HTTP_ERROR Repo execution is not qualified and nothing is written. A 503 is not an accepted command.
const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
schemaVersion: 'bitgo-repo-demo.v1',
actionId: '<string>',
expectedRevision: '<string>',
idempotencyKey: '<string>'
})
};
fetch('https://api-staging.keystoneos.xyz/v1/demo/repos/{repo_id}/commands', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api-staging.keystoneos.xyz/v1/demo/repos/{repo_id}/commands"
payload = {
"schemaVersion": "bitgo-repo-demo.v1",
"actionId": "<string>",
"expectedRevision": "<string>",
"idempotencyKey": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)curl --request POST \
--url https://api-staging.keystoneos.xyz/v1/demo/repos/{repo_id}/commands \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"schemaVersion": "bitgo-repo-demo.v1",
"actionId": "<string>",
"expectedRevision": "<string>",
"idempotencyKey": "<string>"
}
'{
"detail": "<string>",
"code": "INVALID_TOKEN",
"docs_url": "https://docs.keystoneos.xyz/guides/error-codes#http-error"
}{
"detail": "<string>",
"code": "INVALID_TOKEN",
"docs_url": "https://docs.keystoneos.xyz/guides/error-codes#http-error"
}{
"detail": "<string>",
"code": "INVALID_TOKEN",
"docs_url": "https://docs.keystoneos.xyz/guides/error-codes#http-error"
}Authorizations
Auth0 JWT access token. See Authentication for details.
Path Parameters
Body
A request to take one of the actions a snapshot offered, at the revision the caller read. The action is named by the identifier the snapshot offered it under; a caller can name no state of its own.
"bitgo-repo-demo.v1"^[\x21-\x7E]{1,255}$20^(0|[1-9][0-9]*)$Your key for safe retries, unique within the environment. A retry with the same key and the same request body returns the existing resource with Idempotency-Replayed: true; the same key with a different body answers 409 IDEMPOTENCY_CONFLICT, and a key whose resource recorded no request digest answers 409 IDEMPOTENCY_REPLAY_UNVERIFIABLE. Keys starting with 'match-' are reserved for keys KeyStone derives and are refused.
1 - 255Response
INSUFFICIENT_SCOPES: the credential lacks the scope, or its identity is not bound to a demo repo actor in its active environment, or the requested view is not granted. SESSION_WRITE_DENIED: a session token on a write. NO_ENVIRONMENT_CONTEXT: a user token without the X-Keystone-Environment header.
A refused request: the rule in words, the machine-readable code and the documentation anchor for it.
The rule that refused the request, naming no submitted value.
The machine-readable error code to branch on.
INVALID_TOKEN, TOKEN_EXPIRED, MISSING_TOKEN, INSUFFICIENT_SCOPES, NO_PLATFORM_CONTEXT, NO_ENVIRONMENT_CONTEXT, IP_NOT_ALLOWED, AUTH_CONTEXT_NOT_RESOLVED, PRINCIPAL_CONFLICT, USER_TOKEN_REQUIRED, MISSING_CALLBACK_SIGNATURE, INVALID_CALLBACK_SIGNATURE, CALLBACK_AUTH_NOT_CONFIGURED, SETTLEMENT_NOT_FOUND, TEMPLATE_NOT_FOUND, PLATFORM_NOT_FOUND, ENVIRONMENT_NOT_FOUND, INSTRUCTION_NOT_FOUND, WEBHOOK_ENDPOINT_NOT_FOUND, IP_RANGE_NOT_FOUND, MEMBER_NOT_FOUND, PROVIDER_NOT_FOUND, SESSION_NOT_FOUND, LEG_NOT_FOUND, NOT_REPO_SETTLEMENT, PRINCIPAL_NOT_FOUND, COMPLIANCE_CHECK_NOT_FOUND, SESSION_TOKEN_EXPIRED, SESSION_ESCALATION_DENIED, SESSION_SETTLEMENT_SCOPE_DENIED, SESSION_WRITE_DENIED, DEPOSIT_SECRET_NOT_AVAILABLE, DEPOSITOR_WALLET_NOT_AVAILABLE, NO_ESCROW_FOR_CHAIN, LEG_NOT_DEPOSITABLE, OFFCHAIN_LEG, FUNDING_WINDOW_CLOSED, FUNDING_DEADLINE_PASSED, LEG_ALREADY_DEPOSITED, ESCROW_REGISTRATION_MISMATCH, DUPLICATE_RESOURCE, IDEMPOTENCY_CONFLICT, IDEMPOTENCY_REPLAY_UNVERIFIABLE, SETTLEMENT_STATE_CONFLICT, NO_VALID_TRANSITION, SETTLEMENT_BUSY, INSTRUCTION_NOT_CANCELLABLE, NOT_REPO_OPEN, SETTLEMENT_NOT_FINALIZED, CLOSING_ALREADY_EXISTS, CLOSING_CREATION_FAILED, ENVIRONMENT_DEACTIVATED, PRINCIPAL_NO_LSEG_CASE, LSEG_TOOLKIT_STALE, MEMBER_CHANGE_IN_PROGRESS, VALIDATION_ERROR, NO_FIELDS_PROVIDED, INVALID_PARTY_CONFIGURATION, UNSUPPORTED_CHAIN_COMBINATION, UNSUPPORTED_SETTLEMENT_CHAIN, NON_INTEGRAL_QUANTITY, TEMPLATE_INACTIVE, UNSUPPORTED_SETTLEMENT_MACHINE, UNSUPPORTED_SETTLEMENT_MECHANISM, NO_AUTH0_ORGANIZATION, SELF_ACTION_FORBIDDEN, LAST_MEMBER_MANAGER, INVALID_TARGET_STATE, CANNOT_RESOLVE_TARGET_STATE, UNRECOGNIZED_CLIENT, INVALID_API_VERSION, RATE_LIMIT_EXCEEDED, RATE_LIMIT_UNATTRIBUTED, RATE_LIMIT_CREDENTIAL_ISSUANCE, AUTH0_ERROR, EXTERNAL_SERVICE_ERROR, SCREENING_AUDIT_WRITE_FAILED, CUSTODY_EXECUTION_UNREADABLE, HTTP_ERROR The documentation anchor for the code.
"https://docs.keystoneos.xyz/guides/error-codes#http-error"