# Resources

Add a new resource to the API definition, you can then concatenate more methods to the same resource: *methods(),description(),header(),parameter(),placeholder(),schema(),sample()*

## Arguments

| Argument | Type | Required | Default | Description                                  |
| -------- | ---- | -------- | ------- | -------------------------------------------- |
| pattern  | any  | Yes      | ---     | The SES pattern to register for the resource |
| handler  | any  | No       | ---     | The description of the parameter             |
| action   | any  | No       | ---     | Is the parameter required or not             |

## Default Format

Define a default return format for a resource

### Arguments

| Argument | Type | Required | Default | Description                         |
| -------- | ---- | -------- | ------- | ----------------------------------- |
| format   | any  | Yes      | ---     | The format that will be the default |

## Description

Add a description to a resource

### Arguments

| Argument    | Type | Required | Default | Description     |
| ----------- | ---- | -------- | ------- | --------------- |
| description | any  | Yes      | ---     | The description |

## Methods

Add methods to a resource

### Arguments

| Argument | Type | Required | Default | Description               |
| -------- | ---- | -------- | ------- | ------------------------- |
| methods  | any  | Yes      | ---     | The methods list to allow |

## Default Method

Define a default HTTP method for a resource

## Arguments

| Argument | Type | Required | Default | Description                              |
| -------- | ---- | -------- | ------- | ---------------------------------------- |
| method   | any  | Yes      | ---     | The HTTP method that will be the default |


---

# 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://coldbox-relax.ortusbooks.com/relax-documentation-formats/index/resources.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.
