AlmondTill/G3N API

On this page

searchJob

query · in the family Search job

What it does

Look up one background search — a search plan the platform is running, or has run, for you: its words, how far it got, how many records matched, and why it stopped if it stopped short.

A SearchJob by id, within the caller's OWN org-group family; requires authentication. A cross-tenant id reads as null (not-found) AND trips the rootId tripwire server-side.

What happens

Reads only — changes nothing.

Who may call it

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

Arguments

NameTypeRequiredNotes
idID ID!yesThe id of the record.

Returns

SearchJob — the budget rule: at most 50000 records examined (the estimate refuses a plan that cannot fit, with the numbers) · 300 s from the start (past it the job is expired WITH its partials) · 400 machine steps. ONE running job per signed-in session (the SEARCHLOCK marker — a second start refuses CONFLICT/SEARCH_JOB_ACTIVE naming the holder). Lifecycle queued → running → done | cancelled | expired | failed: cancel is the owner's (cancelSearchJob) or the session's end; done stays listed, the other terminals are doomed-class. The generic wire is READ-ONLY (the two reads) — the bespokes own the writes: startSearchJob (THE PLAN GATE, then the per-family list-op offer AS THE CALLER — a family you may not list stops the plan before any read) · cancelSearchJob · searchJobMatches (gated by the READER's own list right over the plan's terminal family).

Example request

query ExampleSearchJob($id: ID!) {
  searchJob(id: $id) {
    id
    sysId
    type
    caption
    status
    parentId
    rootId
    createdAt
    updatedAt
    revisionNum
    revision
    userId
    sessionId
    planJson
    words
    stepsDone
    examined
    matchCount
    startedAt
    finishedAt
    problem
    sfExecutionArn
    resultTtl
  }
}

Variables:

{
  "id": "01900000-0000-7000-8000-37386ae00000"
}

Example response

{
  "data": {
    "searchJob": {
      "id": "01900000-0000-7000-8000-37386ae00000",
      "sysId": "SJ-EXMP-0000-000F",
      "type": "SearchJob",
      "caption": "Blue jeans",
      "status": "queued",
      "parentId": "01900000-0000-7000-8000-065235280000",
      "rootId": "01900000-0000-7000-8000-a093dd800000",
      "createdAt": "2027-01-31T00:00:00.000Z",
      "updatedAt": "2027-01-31T00:00:00.000Z",
      "revisionNum": 1,
      "revision": "01900000-0000-7000-8000-b7960e180000",
      "userId": "01900000-0000-7000-8000-11f967df0000",
      "sessionId": "01900000-0000-7000-8000-be25a35a0000",
      "planJson": "<plan json>",
      "words": "<words>",
      "stepsDone": 1,
      "examined": 1,
      "matchCount": 1,
      "startedAt": "2027-01-31T00:00:00.000Z",
      "finishedAt": "2027-01-31T00:00:00.000Z",
      "problem": "<problem>",
      "sfExecutionArn": "<sf execution arn>",
      "resultTtl": 1
    }
  },
  "extensions": {
    "at": {
      "callId": "01EXAMPLE-CALL-ID",
      "version": {
        "requested": null,
        "serviced": {
          "name": "genesis",
          "number": 0
        }
      }
    }
  }
}

Errors this call can answer