AlmondTill/G3N API

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.

One SearchJob by id. The record must belong to your organization group; an id from another group reads as not found.

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
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

graphql
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:

json
{
  "id": "01900000-0000-7000-8000-224c79000000"
}

Example response

json
{
  "data": {
    "searchJob": {
      "id": "01900000-0000-7000-8000-224c79000000",
      "sysId": "SJ-EXMP-0000-000F",
      "type": "SearchJob",
      "caption": "Blue jeans",
      "status": "queued",
      "parentId": "01900000-0000-7000-8000-eacdfcfd0000",
      "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",
      "userId": "01900000-0000-7000-8000-e0a63e120000",
      "sessionId": "01900000-0000-7000-8000-2048cc970000",
      "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