Read one treasury
/ treasuries/ {treasury_id}Return one named destination whole. It is the same object the list answers with.
A treasury belonging to another environment answers
404resource_missing, identical to an identifier that exists nowhere.A resetting sandbox.
While a sandbox's reset runs it answers
409environment_resetting.A secret key reads one treasury holding
treasury.read.It reads in its own environment and sends no
X-Stridge-Environment; a key withouttreasury.readanswers403permission_deniednaming it. Creating or rotating a treasury is a person's act, and no key reaches it.
Parameters
Path
- treasury_idstring <uuid>required
The treasury being addressed. A value that is not a UUID answers
422parameter_invalidnamingtreasury_id.
Headers
- X-Stridge-Environmentstring <uuid>optional
Which environment the request acts inside, on an operation a session and an API key both call. Learn more
Show full descriptionShow less
It is required under a person's session, exactly as
EnvironmentHeaderdescribes: a session request that omits it answers400withenvironment required, and one naming an environment the caller holds no membership of answers404.An API key names its own environment, so a request made with one omits this header. A key request that sends it answers
400withenvironment header not accepted, whatever it names, rather than having the header ignored: a header that is silently ignored hides the integration bug that sent it.
Responses
The treasury resolved.
- idstring <uuid>required
The treasury's own identifier, and the one its change log hangs off.
- objectstringrequired
The object's type, always
treasury. - environment_idstring <uuid>required
The environment this treasury belongs to. v1 keyed a treasury to a workspace, which made a sandbox's destinations and a live one's the same set and left no way to rehearse a rotation.
- livemodebooleanrequired
truewhenenvironment_idnames aliveenvironment andfalsein a sandbox. It is carried on the object itself, so a payload read on its own, a logged response or a webhook body, still says which side of the boundary it came from. - namestringrequired
What everything else refers to this destination by: lowercase, starting with a letter, three to sixty-four characters of letters, digits and underscores. It is unique inside the environment and immutable after creation, because it is a reference other objects hold.
- network_idinteger <int32>required
The chain the destination is on, as the chain's own numeric identifier. It is not a UUID and it addresses nothing in this API: a client resolves it against the network catalogue. v1 sent the same fact as a string.
Show 5 more fieldsShow fewer fields
- destination_addressstringrequired
The address money lands at, in the chain's own encoding.
- asset_symbolstringrequired
The asset the destination receives. It must be an asset the network catalogue carries as enabled on
network_id. - providerstring | nullrequired
The custody provider holding the address, or
nullwhen the environment holds it itself. v1 sent the empty string for both cases, which made "self-custodied" and "provider not recorded" the same value. - created_atstring <date-time>required
When the treasury was created. RFC3339 UTC,
Zsuffixed. The list is ordered on it, newest first. - updated_atstring <date-time>required
When it was last rotated. RFC3339 UTC,
Zsuffixed.
Errors
The error.code values this operation can return. Each one links to its entry in the error catalogue, which explains the cause and the fix.
- 400environment_requiredEnvironment required
- 400header_invalidInvalid header
- 400422parameter_invalidInvalid parameter
- 400parameter_unknownUnknown parameter
- 401api_key_not_acceptedAPI key not accepted
- 401authentication_requiredAuthentication required
- 401publishable_key_not_acceptedPublishable key not accepted
- 401token_invalidInvalid or expired token
- 403membership_suspendedMembership suspended
- 403permission_deniedPermission denied
- 404environment_not_foundEnvironment not found
- 404resource_missingNo such object
- 409environment_provisioningEnvironment provisioning
- 409environment_resettingEnvironment resetting
- 429rate_limitedToo many requests