oncall-engine/engine
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
..
apps augment API response pagination attributes (#2471) 2023-07-14 11:19:40 -04:00
common augment API response pagination attributes (#2471) 2023-07-14 11:19:40 -04:00
config_integrations Unhide direct paging integration (#2483) 2023-07-13 13:41:31 +08:00
engine remove deprecated backend code (#2502) 2023-07-12 02:07:45 -04:00
settings Webhooks 2 Release (#1830) 2023-07-13 13:53:06 -06:00
static/images World, meet OnCall! 2022-06-03 08:09:47 -06:00
type_stubs/icalendar continue addressing mypy violations (#2170) 2023-06-27 10:23:08 +00:00
.dockerignore One startup command to rule them all (#760) 2022-11-07 16:34:43 +01:00
.gitignore modify push notification settings + use fcm-django library (#998) 2022-12-20 12:41:34 +01:00
celery_with_exporter.sh Add flag to debug logs (#912) 2022-11-29 11:16:42 +08:00
conftest.py remove SlackActionRecord model/table (#2201) 2023-06-13 10:56:06 +00:00
Dockerfile install requirements-dev.txt dependencies oncall docker image dev target (#2284) 2023-06-19 05:50:59 -04:00
manage.py World, meet OnCall! 2022-06-03 08:09:47 -06:00
pyproject.toml fix import mypy errors (#2407) 2023-07-14 06:00:02 -04:00
requirements-dev.txt re-enable mypy GitHub Actions CI job (#2390) 2023-06-29 14:01:52 +00:00
requirements.txt bump celery version to a version which supports Python 3.11 (#2519) 2023-07-13 07:16:36 -04:00
tox.ini Fix duplicate orders for user notification policies (#2278) 2023-06-21 11:13:56 +00:00
uwsgi.ini Run containers as a non-root user (#2053) 2023-06-08 07:12:00 +00:00
wait_for_test_mysql_start.sh Revert "Revert "speed up ci builds from 15 to <7 minutes"" (#1643) 2023-03-28 09:34:03 +02:00