Archive API docs
    Jump to

    Narrow by kind with a prefix — q: queries, m: mutations, t: types, g: guides, f: fields and arguments.

    Jump to examples ↓
    Mutation

    addItemsToCollection

    Add up to 1,000 listed items, or every item a filter matches, to one Collection in the background; returns an operationId to poll with operation(id:).

    Arguments

    Object, input and enum types open in place — use + to reveal their fields. A type that is already open above the row stops at a ↻ circular marker, and anything nested past the depth limit links out to its own page instead.

    collectionId ID! required
    The Collection to add the items to, as returned by the collections query. A workspace whose Collections use the legacy format is refused with a userError on ["collectionId"].
    customAttributeConditions [CustomAttributeConditionInput!]
    Add every item matching these custom-attribute conditions (AND), as items(customAttributeConditions:) would list them. Combine with filter; omit itemIds.
    filter ItemFilterInput
    Add every item this filter matches, as items(filter:) would list them. Combine with customAttributeConditions; omit itemIds. More than 10000 matching items is a userError on ["filter"] and adds nothing.
    itemIds [ID!]
    Item ids to add, as returned by items. At least 1 and at most 1000. An id that does not resolve in this workspace is skipped and returned in skippedItemIds. Omit it to add by filter / customAttributeConditions instead.

    Returns

    acceptedCount Int!
    Number of distinct items scheduled.
    operationId ID
    The background operation; poll it with operation(id:) and its per-item outcomes with operationRecords. Null when scheduled is false.
    scheduled Boolean!
    True when an operation was scheduled. False when userErrors is non-empty or when no item resolved in this workspace.
    skippedItemIds [ID!]!
    Submitted item ids that do not resolve in this workspace and were not scheduled. Always empty for a filter.
    userErrors [UserError!]!
    Errors that refused the whole request: an empty or oversized id list, a filter matching too many items, an unknown or unwritable collection, a legacy-format workspace, or a workspace with no user to attribute the operation to. Empty on success.