Skip to main content

Get mutations​

Get list of mutations that were applied to resources after a certain point in time.

Query Parameters
    mutationsSince float required

    The timestamp to get mutations since.

    resources string

    Comma-separated list of resources to filter mutations by (e.g. "BOOKMARK,COLLECTION,COLLECTION_BOOKMARK,NOTE"). If not provided, all accessible resources will be returned.

    metadataOnly boolean

    When true, returns only the lastMutationAt timestamp without fetching actual mutations. This is significantly faster (single DB query vs multiple joins) and ideal for: 1) Checking if new data exists before performing a full sync, 2) Implementing periodic background polling to detect changes, 3) Recovering the current lastMutationAt if the client missed the X-Mutation-At header from a previous successful mutation response. Response will only contain { lastMutationAt: number }.

    limit float

    Possible values: >= 1 and <= 1000

    Default value: 100

    Maximum number of mutations to return per page (1-1000).

    page float

    Possible values: >= 1

    Default value: 1

    Page number (1-based).

Responses

Request has been handled successfully.

Response Headers
  • X-Mutation-At string

    Unix timestamp (milliseconds) of the latest mutation for the user. Clients should store this value and include it in subsequent mutation requests for optimistic concurrency control.


Schema
    success boolean
    data object

    Response schema for get mutations endpoint

    mutations object[]

    Array of mutations that occurred after lastMutationAt. Will be omitted when metadataOnly is set to true.

  • Array [
  • type string required

    Possible values: [CREATE, UPDATE, DELETE]

    The type of the mutation

    resource string required

    Possible values: [BOOKMARK, COLLECTION, COLLECTION_BOOKMARK, NOTE]

    The resource the mutation was applied to.

    resourceId string

    The id of the resource the mutation was applied to. Will not be present for resources that use composite keys (e.g. COLLECTION_BOOKMARK uses data.collection and data.bookmark instead).

    data object

    The latest version of the data of the resource that was mutated. Will be empty when the mutation is a delete.

    timestamp float required

    Unix timestamp when the latest mutation of the resource occurred

  • ]
  • page float

    Current page number

    limit float

    Items per page

    total float

    Total number of mutations

    hasMore boolean

    Whether more pages exist

    lastMutationAt float required

    Timestamp of the latest mutation. This should be used for subsequent sync requests. If metadataOnly is true, this will be the only field returned.

Loading...