# 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: 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://docs.stoobly.com/guides/how-to-update-requests/updating-with-openapi.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.
