Skip to content

Commit 3fce336

Browse files
committed
Updates
1 parent fd44be8 commit 3fce336

12 files changed

+455
-451
lines changed

api-reference/filtering.mdx

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
---
2+
title: 'Filtering & Sorting'
3+
description: 'Learn how to filter and sort data in the Cachet API.'
4+
---
5+
6+
## Filtering
7+
8+
Several endpoints support filtering to allow you to retrieve only the data you need. For example, you can filter incidents by status:
9+
10+
```
11+
GET /api/incidents?filter[status]=1
12+
```
13+
14+
## Sorting
15+
16+
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.
17+
18+
```
19+
GET /api/incidents?sort=id
20+
```
21+
22+
To reverse the sort order, you can prefix the field name with a hyphen.
23+
24+
```
25+
GET /api/incidents?sort=-id
26+
```

api-reference/introduction.mdx

Lines changed: 0 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -89,45 +89,3 @@ Cachet provides a RESTful JSON API that allows you to interact with the status p
8989
}
9090
}
9191
```
92-
93-
## Filtering
94-
95-
Several endpoints support filtering to allow you to retrieve only the data you need. For example, you can filter incidents by status:
96-
97-
```
98-
GET /api/incidents?filter[status]=1
99-
```
100-
101-
## Sorting
102-
103-
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.
104-
105-
```
106-
GET /api/incidents?sort=id
107-
```
108-
109-
To reverse the sort order, you can prefix the field name with a hyphen.
110-
111-
```
112-
GET /api/incidents?sort=-id
113-
```
114-
115-
## Pagination
116-
117-
All API endpoints that return multiple items support pagination. By default, 15 items are returned per page.
118-
You can specify the number of items to return per page by passing the `per_page` parameter.
119-
To navigate between pages, use the `page` parameter.
120-
121-
```
122-
GET /api/incidents?page=2&per_page=10
123-
```
124-
125-
## Rate Limiting
126-
127-
The Cachet API is rate-limited to prevent abuse. The rate limit is set to 300 requests per minute per IP address.
128-
129-
Cachet will return the `X-RateLimit-Limit`, `X-RateLimit-Remaining`, and `X-RateLimit-Reset` headers in the response to provide information about the rate limit.
130-
131-
<Tip>
132-
You can override the default rate limit by setting the `CACHET_API_RATE_LIMIT` environment variable.
133-
</Tip>

api-reference/openapi.yaml

Lines changed: 393 additions & 384 deletions
Large diffs are not rendered by default.

api-reference/pagination.mdx

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,10 @@ title: Pagination
33
description: 'Learn how to paginate through the results of a query.'
44
---
55

6-
When you query the Cachet API, you may receive a large number of results. To make it easier to work with these results, the API supports pagination.
6+
All API endpoints that return multiple items support pagination. By default, 15 items are returned per page.
7+
You can specify the number of items to return per page by passing the `per_page` parameter.
8+
To navigate between pages, use the `page` parameter.
79

8-
## Pagination Parameters
9-
10-
The following parameters are used to control pagination:
11-
12-
- `page`: The page number to retrieve. The first page is 1.
13-
- `per_page`: The number of items to return per page. The default is 15.
10+
```
11+
GET /api/incidents?page=2&per_page=10
12+
```

api-reference/rate-limiting.mdx

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
---
2+
title: 'Rate Limiting'
3+
description: 'Learn how rate limits work in the Cachet API.'
4+
---
5+
6+
The Cachet API is rate-limited to prevent abuse. The rate limit is set to 300 requests per minute per IP address.
7+
8+
Cachet will return the `X-RateLimit-Limit`, `X-RateLimit-Remaining`, and `X-RateLimit-Reset` headers in the response to provide information about the rate limit.
9+
10+
<Tip>
11+
You can override the default rate limit by setting the `CACHET_API_RATE_LIMIT` environment variable.
12+
</Tip>

client-libraries.mdx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
1-
# Client Libraries
1+
---
2+
title: 'Client Libraries'
3+
description: 'A list of third party libraries for the Cachet API.'
4+
---
25

36
There are various third party libraries for the Cachet API.
47

component-statuses.mdx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
---
22
title: 'Component Statuses'
33
description: 'Learn about the different component statuses in Cachet.'
4-
icon: 'traffic-light'
54
---
65

76
Unlike Incidents, Cachet indexes component statuses starting at `1`. When creating or updating a component, you'll need to specify a status for it.

faq.mdx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
---
22
title: 'Frequently Asked Questions'
33
description: 'Common questions and answers about Cachet.'
4-
icon: 'question'
54
---
65

76
## Do you provide installations?

incident-statuses.mdx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
---
22
title: 'Incident Statuses'
33
description: 'Learn about the different incident statuses in Cachet.'
4-
icon: 'traffic-cone'
54
---
65

76
Cachet uses a zero-based numbering scheme to identify incident statuses. When creating or updating an incident, it's important that you specify the `status` of the incident.

integrations.mdx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
---
22
title: 'Third-Party Integrations'
33
description: 'Discover third-party integrations with Cachet.'
4-
icon: 'plug'
54
---
65

76
<Warning>

introduction.mdx

Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,8 @@
11
---
22
title: Introduction
33
description: 'Cachet is a beautiful and powerful open source status page system.'
4-
icon: 'hand-wave'
54
---
65

7-
🚦 The open-source status page system.
8-
96
<Info>
107
We're in the process of upgrading these docs for v3.x of Cachet.
118

@@ -14,14 +11,16 @@ icon: 'hand-wave'
1411

1512
## Key Features
1613

17-
### JSON API
18-
19-
Sometimes it's simply not possible to manually update your status page with incidents and component status changes. That's why Cachet is bundled with a simple, but powerful, JSON API.
20-
21-
### Scheduled Maintenance
14+
<AccordionGroup>
15+
<Accordion title="JSON API" icon="code">
16+
Sometimes it's simply not possible to manually update your status page with incidents and component status changes. That's why Cachet is bundled with a simple, but powerful, JSON API.
17+
</Accordion>
2218

23-
It can't be avoided, sometimes you just need to perform maintenance. With Cachet, you can schedule events ahead of time. Once the maintenance time has passed, the incident drops into the timeline for posterity.
19+
<Accordion title="Scheduled Maintenance" icon="clock">
20+
It can't be avoided, sometimes you just need to perform maintenance. With Cachet, you can schedule events ahead of time. Once the maintenance time has passed, the incident drops into the timeline for posterity.
21+
</Accordion>
2422

25-
### Metrics
26-
27-
Within the dashboard you're able to set up metrics - a way to measure something, whether it's uptime, error rates or something completely random like "cups of coffee drank today".
23+
<Accordion title="Metrics" icon="chart-line">
24+
Within the dashboard you're able to set up metrics - a way to measure something, whether it's uptime, error rates or something completely random like "cups of coffee drank today".
25+
</Accordion>
26+
</AccordionGroup>

mint.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,9 @@
7474
"pages": [
7575
"api-reference/introduction",
7676
"api-reference/authentication",
77-
"api-reference/pagination"
77+
"api-reference/pagination",
78+
"api-reference/filtering",
79+
"api-reference/rate-limiting"
7880
]
7981
}
8082
],

0 commit comments

Comments
 (0)