Commit graph

4 commits

Author SHA1 Message Date
Vadim Stepanov
f38eff9fcf
Public API docs: add note on pagination (#4795)
Fixes https://github.com/grafana/oncall-private/issues/2852
2024-08-09 14:24:24 +00:00
Joey Orlando
c5b76a5869
fix right-hand navigation in API docs (#4546)
# What this PR does

The right-hand side navigation in the OnCall API public docs
([example](https://grafana.com/docs/oncall/latest/oncall-api-reference/alertgroups/))
doesn’t render as expected vs. what we see in the Grafana API public
docs
([example](https://grafana.com/docs/grafana/latest/developers/http_api/folder/);
2nd screenshot). This PR fixes that ([convo on
Slack](https://raintank-corp.slack.com/archives/C045CTY1QEP/p1718388424649359)).


![Screenshot 2024-06-14 at 14 05
03](https://github.com/grafana/oncall/assets/9406895/0636d9d7-2f58-4c82-91b5-5b4af0dd3524)

![Screenshot 2024-06-14 at 14 06 36
(1)](https://github.com/grafana/oncall/assets/9406895/7a5bc2c8-ccb2-4b53-b982-d7d7596f90e2)
2024-06-17 11:31:35 -04:00
Joey Orlando
767c5352fa
augment API response pagination attributes (#2471)
# What this PR does

This PR:
- adds a few attributes to paginated API responses
- removes channel filter "send demo alert" internal API endpoint + tests
(this endpoint was marked as deprecated + not consumed by the web UI)

With the new paginated API response schema, the web UI will no longer
need to:
- hardcode `ITEMS_PER_PAGE` for each table
- manually calculate total number of pages

(these two things ☝️ will be done in
https://github.com/grafana/oncall/issues/2476)

For `GET /api/internal/v1/alertgroups` the response will now look like
this:
```diff
{
    "next": <url> | None,
    "previous": <url> | None,
    "results": [],
++  "page_size": <int>
}
```

For all other paginated API responses, the response will now look like:
```diff
{
    "count": <int>,
    "next": <url> | None,
    "previous": <url> | None,
    "results": [],
++  "page_size": <int>,
++  "current_page_number": <int>,
++  "total_pages": <int>
}
```

## TODO
- [x] update public API docs to include these new attributes

## Checklist

- [x] Unit, integration, and e2e (if applicable) tests updated
- [x] Documentation added (or `pr:no public docs` PR label added if not
required)
- [x] `CHANGELOG.md` updated (or `pr:no changelog` PR label added if not
required)
2023-07-14 11:19:40 -04:00
Yulya Artyukhina
04047c6ebe
Resolution notes endpoint docs (#2404)
# What this PR does
- Add docs for `/resolution_notes` public api endpoint
- Fix resolution notes order to show notes for the newest alert group on
top

## Which issue(s) this PR fixes
https://github.com/grafana/oncall/issues/222

## Checklist

- [x] Unit, integration, and e2e (if applicable) tests updated
- [x] Documentation added (or `pr:no public docs` PR label added if not
required)
- [x] `CHANGELOG.md` updated (or `pr:no changelog` PR label added if not
required)
2023-06-29 14:08:21 +00:00
Renamed from docs/sources/oncall-api-reference/postmortem_messages.md (Browse further)