> ## Documentation Index
> Fetch the complete documentation index at: https://docs.cachethq.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Filtering & Sorting

> Learn how to filter and sort data in the Cachet API.

## Filtering

Several endpoints support filtering to allow you to retrieve only the data you need.  For example, you can filter incidents by status:

```
GET /api/incidents?filter[status]=1
```

<Note>
  Each endpoint may support different fields for filtering. Check the documentation for the specific endpoint you are working with.
</Note>

## Sorting

You can sort the results of an endpoint by passing the `sort` parameter. The `sort` parameter should be a comma-separated list of fields to sort by. You can also specify the sort order by appending `asc` or `desc` to the field name.

```
GET /api/incidents?sort=id
```

To reverse the sort order, you can prefix the field name with a hyphen.

```
GET /api/incidents?sort=-id
```

<Note>
  Each endpoint may support different fields for sorting. Check the documentation for the specific endpoint you are working with.
</Note>
