List a treasury's changes
/ treasuries/ {treasury_id}/ changesReturn one treasury's append-only history as a list, {object, data, has_more, url}, newest first by changed_at.
It is a page, not a bare array, so the one collection on the surface most likely to grow without bound is paged like every other.
The filter is named.
actionnarrows the history to one kind of change, and each page lists under the filter its own request sends, so a later page sends it again besidestarting_afterorending_before.session_idis reported rather than filtered on: narrowing a treasury's history by who changed it is a question about sessions rather than about treasuries. Any other query parameter answers400parameter_unknownnaming it, and a value outside its schema, a badlimitor astarting_afterorending_beforenaming no object of this list answers422parameter_invalidnaming it.
Show 3 more detailsShow fewer details
A treasury belonging to another environment answers
404resource_missing, told apart from a treasury that exists and has no history, which answers an empty page. The treasury is resolved inside the scope first, so a caller cannot learn that another environment's identifier exists.A resetting sandbox.
While a sandbox's reset runs it answers
409environment_resetting.A secret key reads a treasury's history 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 whose history is being read. A value that is not a UUID answers
422parameter_invalidnamingtreasury_id.
Query
- limitinteger <int32>optionaldefault 20
The page size. A value that is not an integer from 1 to the maximum answers
422parameter_invalidnaminglimit; it is never clamped. - starting_afterstringoptional
A cursor: the id of an object of this list, usually the last one of the page just read. The page answered holds the objects that come right after it in the list's order. The object need not match this request's filters; its place in the order is what counts.
Show full descriptionShow less
An id that names no object of this list in this environment answers
422parameter_invalidnamingstarting_after. It cannot be sent withending_before. - ending_beforestringoptional
A cursor: the id of an object of this list, usually the first one of the page just read. The page answered holds the objects that come right before it, still in the list's order, and
has_moresays whether there are more before them.Show full descriptionShow less
An id that names no object of this list in this environment answers
422parameter_invalidnamingending_before, as does sending it together withstarting_after. - actionstringoptionalenum created · updated · deleted
Only the changes of this kind.
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 page of changes.
- objectstringrequiredenum list
The object's type, always
list. - idstring <uuid>required
The change's own identifier.
- objectstringrequired
The object's type, always
treasury_change. - environment_idstring <uuid>required
The environment the treasury this change belongs to lives in.
- 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. - treasury_idstring <uuid>required
The treasury the change was made to.
- actionstringrequiredenum created · updated · deleted
What happened. A
createdchange carries nobefore_stateand adeletedone carries noafter_state, so the pair reads as a transition either way. - before_stateobject | nullrequired
The treasury as it stood before the change, or
nullfor a creation.Show full descriptionShow less
It is a snapshot keyed differently from
Treasury:id,tenant_id(the environment's id),name,network_id(the chain's id as a string),destination_address,asset_symbol,provider(the empty string when none) andat, when the treasury was last changed. - after_stateobject | nullrequired
The treasury as it stood after the change, or
nullfor a deletion, in the same snapshot shape asbefore_state. - session_idstring | null <uuid>required
The sign-in that made the change, or
nullwhen Stridge made it rather than a person.Show full descriptionShow less
It is reported and not filterable. Narrowing a treasury's history by who changed it is a question about sessions rather than about treasuries, and this collection is small enough that a client holding the page can answer it without the server growing a filter for it.
- changed_atstring <date-time>required
When the change was made. RFC3339 UTC,
Zsuffixed. The history is ordered on it, newest first, because a history is read from its most recent end.
- idstring <uuid>required
- has_morebooleanrequired
Whether the list holds more objects past this page in the direction it was read: after its last object, or before its first for a page read with
ending_before. - urlstringrequired
The path the list is read at.
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