# draftTrainingQuestions

query · in the family [Training](/reference/training/)

## What it does

Ask the assistant for candidate questions grounded on one play’s own words — shown to you, saved only when you keep one.

Draft up to count (1..10) candidate questions for ONE course through the assistant, GROUNDED on the play's own words alone — its title, its line, its steps and the operations' guide summaries. Every candidate is parsed one by one through the strict TrainingQuestionDraft schema; the invalid are DROPPED AND COUNTED (dropped). NOTHING is stored — save each kept one through createTrainingQuestion with source drafted. A metered AI read (office.training_draft) on the USER plane; requires the training-manage right. courseKey must be a live play key (VALIDATION otherwise); the assistant unavailable (keyless, a provider fault, an unreadable answer) answers INTEGRATION/UNAVAILABLE — write the questions by hand.

## What happens

A drafting assist that spends kernels; nothing is stored, and a candidate that does not fit is dropped and counted.

## Who may call it

Capability area: **Training** — Courses, tests, certificates and the training rules of your team.

- Owner
- System Administrator
- Manager
- An API key whose scope allows `api:draftTrainingQuestions`

## Arguments

| Name | Type | Required | Notes |
| --- | --- | --- | --- |
| `courseKey` | [String](/types/#scalars) `String!` | yes | No further notes. |
| `count` | [Int](/types/#scalars) `Int!` | yes | No further notes. |

## Returns

[TrainingQuestionDrafts](/types/TrainingQuestionDrafts/) `TrainingQuestionDrafts!` — The draft call's answer: the course, the kept candidates (at most the count asked) and how many the strict schema DROPPED — loud, never silent.

## Example request

```graphql
query ExampleDraftTrainingQuestions($courseKey: String!, $count: Int!) {
  draftTrainingQuestions(courseKey: $courseKey, count: $count) {
    courseKey
    dropped
  }
}
```

Variables:

```json
{
  "courseKey": "<course key>",
  "count": 1
}
```

## Example response

```json
{
  "data": {
    "draftTrainingQuestions": {
      "courseKey": "<course key>",
      "dropped": 1
    }
  },
  "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/))
