# How to Use Fixtures

Background

{% content-ref url="/pages/GOo6YjREp8psDDjix3k1" %}
[Fixtures](/core-concepts/mock-api/fixtures.md)
{% endcontent-ref %}

## Supported Options

<details>

<summary>--response-fixtures-path</summary>

Path to a YAML file that contains fixture specifications. Path is relative to where the command is run.

</details>

<details>

<summary>--public-directory-path</summary>

Path to a folder that contains files or folders that contains files that match a request's path. Path is relative to where the command is run.

</details>

### Commands

The following commands can be configured to use either a response fixtures file and/or a public directory:

```bash
stoobly-agent run
```

```bash
stoobly-agent mock
```

```bash
stoobly-agent request test
```

```bash
stoobly-agent scenario test
```

## Supported Headers

When mocking a request, the following headers can be set:

<details>

<summary>X-Stoobly-Response-Fixtures-Path</summary>

Path to a YAML file that contains fixture specifications. Path is relative to where the `stoobly-agent run` command was run.

</details>

<details>

<summary>X-Stoobly-Public-Directory-Path</summary>

Path to a folder that contains files or folders that contains files that match a request's path. Path is relative to where the `stoobly-agent run` command was run.

</details>


---

# 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-mock-apis/how-to-use-fixtures.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.
