AlmondTill/G3N API

scratchpads

query · in the family Scratchpad

What it does

The scratchpad list — each entry is a scratchpad — a plan of records to create, reviewed and approved before anything is born.

The Scratchpads your organization group holds today. Doomed records leave the listing but stay readable by id. Paged: limit clamps to 1–200, default 100; nextToken is the previous page's cursor, passed back exactly as received (a malformed or foreign token is refused as VALIDATION/INVALID). Walk until nextToken is null; a page may hold fewer than limit, and doomed records leave the listing.

Before you call

A bearer session from an API key (see Authentication and key hygiene) or a signed-in user.

Capability area: Reading your records — Looking up and listing the records of your organization.

Roles that may call it:

What happens

Reads only — changes nothing.

Arguments

NameTypeRequiredNotes
limitIntnoHow many records to answer at most; a page may hold fewer.
nextTokenStringnoThe cursor from the previous page, passed back exactly as received.

Returns

ScratchpadPage ScratchpadPage! — One page of the scratchpads listing — the records + the opaque resume cursor.

This is a page: items holds the records and nextToken the cursor for the next page — pass it back verbatim until it is null. limit clamps to 1–200, default 100; nextToken continues the page. See paging.

Example request

graphql
query ExampleScratchpads($limit: Int) {
  scratchpads(limit: $limit) {
    items {
      id
      sysId
      type
      caption
      status
      parentId
      rootId
      createdAt
      updatedAt
      revisionNum
      revision
      origin
      intent
      planRevision
      approvedPlanRevision
      inFlightSeq
      realizationFault
      originConsultationId
      originTurnSeq
      originSuggestionId
    }
    nextToken
  }
}

Variables:

json
{
  "limit": 1
}

Example response

json
{
  "data": {
    "scratchpads": {
      "items": [
        {
          "id": "01900000-0000-7000-8000-47cc509a0000",
          "sysId": "SD-EXMP-0000-000F",
          "type": "Scratchpad",
          "caption": "Blue jeans",
          "status": "draft",
          "parentId": "01900000-0000-7000-8000-e0a63e120000",
          "rootId": "01900000-0000-7000-8000-a1295a650000",
          "createdAt": "2027-01-31T00:00:00.000Z",
          "updatedAt": "2027-01-31T00:00:00.000Z",
          "revisionNum": 1,
          "revision": "01900000-0000-7000-8000-53c6eea90000",
          "origin": "<origin>",
          "intent": "<intent>",
          "planRevision": 1,
          "approvedPlanRevision": 1,
          "inFlightSeq": 1,
          "realizationFault": "<realization fault>",
          "originConsultationId": "01900000-0000-7000-8000-51a0c8de0000",
          "originTurnSeq": 1,
          "originSuggestionId": "01900000-0000-7000-8000-9c0840af0000"
        }
      ],
      "nextToken": "<the cursor from the previous page>"
    }
  },
  "extensions": {
    "at": {
      "callId": "01EXAMPLE-CALL-ID",
      "version": {
        "requested": null,
        "serviced": {
          "name": "genesis",
          "number": 0
        }
      }
    }
  }
}

Errors this call can answer