younifyd
Menu

Get Transactions For Documents

Get the transactions for a list of documents

GET/data/history/{dataset}/transactions/{documentIds}

Use it in a workflow

  1. Add a step and choose the Sanity connector.
  2. Pick the Get Transactions For Documents action (under History).
  3. Fill in the fields below, then reference the result from later steps as {{getTransactionsForDocuments.response.data}}.

Request

Path parameters

datasetstringrequired
documentIdsstringrequired

A comma separated list of document ids. If omitted, the transactions for all documents will be returned. Use with `limit` is highly recommended if omitting document ids.

Query parameters

excludeContentbooleanrequired

Must be `true`. Transaction responses never include document contents. Requests without `excludeContent=true`, or with `excludeContent=false`, return a `403` permission error.

fromTimestring (date-time)

Only include transactions from this timestamp onwards.

toTimestring (date-time)

Only include transactions up to this timestamp.

fromTransactionstring

Only include transactions from this Transaction ID (or Revision ID) onwards.

toTransactionstring

Only include transactions up to this Transaction ID (or Revision ID).

authorsstring

Only include transactions by these authors.

reverseboolean

Return the transactions in reverse order.

Default false

limitinteger

Limit the number of transactions returned.

effectFormatstring

The format of the effect. Uses [mendoza](https://www.sanity.io/blog/mendoza), a super efficient format for expressing differences between JSON documents.

Default "mendoza"

includeIdentifiedDocumentsOnlyboolean

Only include the documents that are part of the document IDs list.

Default false

Response

Returns 200 with a string (binary). Read it in later steps with {{getTransactionsForDocuments.response.data.<field>}}.

Need more? See the Sanity guide for connection setup and behaviour shared by every action.

Was this page helpful?
Get Transactions For Documents — Sanity — Documentation