> For the complete documentation index, see [llms.txt](https://docs.stoobly.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.stoobly.com/guides/how-to-update-requests/updating-with-openapi.md).

# Updating with OpenAPI

{% hint style="warning" %}
This feature is experimental
{% endhint %}

## Supported Versions and Formats

We currently support [OpenAPI v3.0](https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.3.md) and [OpenAPI v3.1](https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md).

Only the **json** and **yaml** versions of OpenAPI are currently supported.

## Updating Requests

1. Have your specification file ready on your local filesystem and make sure it is valid and compliant with your specification.
2. Go into a directory using the [Context](/core-concepts/context.md) you want to update the requests in.
3. Let's take a look at the relevant command:

```bash
$ stoobly-agent endpoint apply --help
Usage: stoobly-agent endpoint apply [OPTIONS] PATH

  Apply endpoint to requests

Options:
  --format [openapi]              File format  [required]
  --scenario-key TEXT             Which scenario requests to apply the endpoint to. If none then
                                  the endpoint will be applied to all requests.

  --lifecycle-hooks-script-path TEXT
                                  Path to lifecycle hooks script.
  -h, --help                      Show this message and exit.
```

By using the different flags and options, you can change what API format to use, which scenario if any to import into, as well as other features.

Here is an example command you can run after changing the PATH to your specification file:

```bash
$ stoobly-agent endpoint apply --format open-api ~/Downloads/your-spec-file.yaml
```

4. View your requests and you should see them updated.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://docs.stoobly.com/guides/how-to-update-requests/updating-with-openapi.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
