# trainingSitting

query · in the family [Your own session](/reference/your-own-session/)

## What it does

Open one sitting whole — the attempt and its drawn questions in the order they were asked; the right answers and explanations appear once it is submitted, never while it is open.

Open ONE sitting whole: the attempt + its drawn questions in the STORED draw's order — a bounded batch by id, never a scan. YOUR OWN by id; another person's needs the org-wide list right (trainingAttempts) — refused AUTHZ/FORBIDDEN naming what it needs; a miss refuses NOT_FOUND/CONSTRUCT. correctIndex and explanation are null while the attempt is open and present once submitted, for EVERY caller; a NON-subject reader's answers and score follow training.score_visibility (2 whole · 1 the answers withheld · 0 the answers and the score withheld). SELF-classified — every principal keeps it.

## What happens

Read-only; your own sitting, or anyone’s with the training-manage right — another person’s answers and score follow the training.score_visibility policy.

## Who may call it

Capability area: **Your own session** — What every signed-in person may do for themselves — their session, their profile and their own work.

- Owner
- System Administrator
- Manager
- Associate Manager
- Warehouse Associate
- Sales Associate
- Cashier
- An API key whose scope allows `api:trainingSitting`

## Arguments

| Name | Type | Required | Notes |
| --- | --- | --- | --- |
| `id` | [ID](/types/#scalars) `ID!` | yes | The id of the record. |

## Returns

[TrainingSitting](/types/TrainingSitting/) `TrainingSitting!` — ONE sitting opened whole: the attempt + its drawn questions in the STORED draw's order (a since-retired question still answers — the draw is history; a row that cannot be read is skipped). A NON-subject reader's view obeys the training.score_visibility policy of their acting organization (2 whole · 1 the answers withheld · 0 the answers and the score withheld); the subject always sees all of their own.

## Example request

```graphql
query ExampleTrainingSitting($id: ID!) {
  trainingSitting(id: $id) {
    attempt {
      id
      sysId
      type
      caption
      status
      parentId
      rootId
      createdAt
      updatedAt
      revisionNum
      revision
      userId
      orgId
      courseKey
      questionIds
      answers
      score
      passed
      passMark
      startedAt
      submittedAt
      curriculumVersion
      certificateId
    }
  }
}
```

Variables:

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

## Example response

```json
{
  "data": {
    "trainingSitting": {
      "attempt": {
        "id": "01900000-0000-7000-8000-37386ae00000",
        "sysId": "TT-EXMP-0000-000F",
        "type": "TrainingAttempt",
        "caption": "Blue jeans",
        "status": "open",
        "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",
        "orgId": "01900000-0000-7000-8000-b0cf4f3c0000",
        "courseKey": "<course key>",
        "questionIds": [
          "01900000-0000-7000-8000-e1e983890000"
        ],
        "answers": [
          1
        ],
        "score": 1,
        "passed": true,
        "passMark": 1,
        "startedAt": "2027-01-31T00:00:00.000Z",
        "submittedAt": "2027-01-31T00:00:00.000Z",
        "curriculumVersion": "<curriculum version>",
        "certificateId": "01900000-0000-7000-8000-b335ac0d0000"
      }
    }
  },
  "extensions": {
    "at": {
      "callId": "01EXAMPLE-CALL-ID",
      "version": {
        "requested": null,
        "serviced": {
          "name": "genesis",
          "number": 0
        }
      }
    }
  }
}
```

## Errors this call can answer

- `VALIDATION/INVALID` — Something in the request is not valid. ([VALIDATION](/errors/VALIDATION/))
- `AUTHN/REQUIRED` — Sign in to do this. ([AUTHN](/errors/AUTHN/))
- `AUTHZ/FORBIDDEN` — Your role does not allow this action. ([AUTHZ](/errors/AUTHZ/))
- `RATE_LIMIT/THROTTLED` — Too many requests in a short time. ([RATE_LIMIT](/errors/RATE_LIMIT/))
- `NOT_FOUND/*` — That record could not be found. ([NOT_FOUND](/errors/NOT_FOUND/))
