# Runs

### Create a run

```graphql
mutation CreateRun($input: CreateRunInput!) {
    createRun(input: $input) {
        run {
            id title procedureId createdById
            dueDate assignedToId description
            partInventory {
                serialNumber
            }
        }
    }
}
```

> *Mutation to create run from a procedure. This will not work if "Autogenerate run title" box is checked. if you do have it checked, simply remove "title" from the mutation block above and "title": "run title" from the Query Variables below.*

Query variables:

```graphql
{
    "input": {
        "title": "run title",
        "procedureId": 1,
        "dueDate": "2021-09-28T16:57:37",
        "partInventoryId": 2
    }
}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://manual.firstresonance.io/api/examples/runs.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
