AlmondTill/G3N API

trainingRequirement

query · in the family Training requirement

What it does

Look up one training rule — which kind of role must pass which course, the days of grace and the pass mark.

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

Read-only.

Arguments

NameTypeRequiredNotes
idID ID!yesThe id of the record.

Returns

TrainingRequirement — A TrainingRequirement: the owner's rule that people holding a role copied from the canned template roleTemplateKey must hold a valid TrainingCertificate for the course courseKey — a live play key of the Playbook registry. graceDays (0..365, default 14) = the days after the role grant before the requirement falls due; passMark (1..100, default 80) = the mark a sitting must reach — the strictest rule binding the person for the course wins at an attempt's start. The pair (roleTemplateKey, courseKey) is immutable after birth and unique among the org's non-doomed rules (a duplicate refuses CONFLICT/IDENTITY_TAKEN); at most 100 rules per org (CONFLICT/TRAINING_CAP past it). NOT searchable (no filter roster until the face).

Example request

graphql
query ExampleTrainingRequirement($id: ID!) {
  trainingRequirement(id: $id) {
    id
    sysId
    type
    caption
    status
    parentId
    rootId
    createdAt
    updatedAt
    revisionNum
    revision
    roleTemplateKey
    courseKey
    graceDays
    passMark
    note
  }
}

Variables:

json
{
  "id": "01900000-0000-7000-8000-a9a88e920000"
}

Example response

json
{
  "data": {
    "trainingRequirement": {
      "id": "01900000-0000-7000-8000-a9a88e920000",
      "sysId": "TE-EXMP-0000-000F",
      "type": "TrainingRequirement",
      "caption": "Blue jeans",
      "status": "active",
      "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",
      "roleTemplateKey": "<role template key>",
      "courseKey": "<course key>",
      "graceDays": 1,
      "passMark": 1,
      "note": "Restock before the weekend."
    }
  },
  "extensions": {
    "at": {
      "callId": "01EXAMPLE-CALL-ID",
      "version": {
        "requested": null,
        "serviced": {
          "name": "genesis",
          "number": 0
        }
      }
    }
  }
}

Errors this call can answer