Trash items
Moves the items, and every item a cascading edge such as parent-of reaches from them, to the trash in one step, all of them or none of them. You can restore them until the retention window ends. Marfa then purges them.
bearerAuthAuthorizationBearer <token>Authenticate with an API key (marfa_k1_…) or an OAuth access token (marfa_at_…).
Idempotency-Key?stringA unique key that makes the request safe to retry. If you send the same request with the same key again, Marfa returns the first response and doesn't write again. A key belongs to the credential that sends it.
length <= 255X-Marfa-Instance-Id?stringThe ID of the instance you expect, as GET / returns it. If another instance answers at this address, Marfa returns 409 instance_changed and doesn't write. Leave it out to send the request to whichever instance answers.
^[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$application/json- body
ids*array<string>The IDs of the items to trash, at most 20.
1 <= items <= 20digest?stringThe digest from POST /items/trash-preview for the same ids. If what the trash would take has changed since, nothing is trashed. Leave it out to trash what the items take now.
^[0-9a-f]{64}$Returns { "ok": true }. An item that a cascading edge took into the trash has trashed_by_cascade, and trashed_with names the named item that took it if you can read its type.
application/json- response
Confirms that the request succeeded.
ok*trueAlways true.
truecurl -X POST 'http://localhost:8600/items/trash' \ -H 'Content-Type: application/json' \ -d '{ "ids": [ "string" ]}'{ "ok": true}