oncall-engine/engine/apps/api
Joey Orlando f905ac5246
Updates to POST /direct_paging internal API endpoint to support Grafana Incident use-cases (#3232)
# What this PR does

- Add a new column, `grafana_incident_id`, to the `AlertGroup` model.
For now this is really just needed to determine if the Alert Group was
created, via a Direct Page, that originated from Grafana Incident.
- I understand that these IDs may be cluster specific. For now we will
not need to make OnCall backend -> Incident API calls. Should we need to
start doing this we will likely need to start syncing the Incident
plugin's provisioned API url into the `organization` in OnCall, such
that we make the API call to the right Incident backend.
- Add two new optional request body parameters to `POST /direct_paging`,
`source_url` and `grafana_incident_id`
- `source_url` - will easily allow Grafana Incident to specify the URL
to the Incident and have this populate the "Source" button
- `grafana_incident_id` - Grafana Incident can specify this such that we
have a link back to Incident (+ we know that the Alert Group was
generated from Incident)
- Hide the "Declare Incident" button in the UI if the Alert Group was
generated from Grafana Incident

## Checklist

- [ ] Unit, integration, and e2e (if applicable) tests updated
- [ ] Documentation added (or `pr:no public docs` PR label added if not
required)
- [ ] `CHANGELOG.md` updated (or `pr:no changelog` PR label added if not
required)
2023-11-01 17:19:44 -04:00
..
serializers Updates to POST /direct_paging internal API endpoint to support Grafana Incident use-cases (#3232) 2023-11-01 17:19:44 -04:00
tests Updates to POST /direct_paging internal API endpoint to support Grafana Incident use-cases (#3232) 2023-11-01 17:19:44 -04:00
throttlers Fix warnings when running backend tests (#2079) 2023-06-06 18:38:00 +00:00
views Updates to POST /direct_paging internal API endpoint to support Grafana Incident use-cases (#3232) 2023-11-01 17:19:44 -04:00
__init__.py World, meet OnCall! 2022-06-03 08:09:47 -06:00
errors.py Fix backend for resolution notes via mobile app (#2117) 2023-06-07 12:19:16 +00:00
permissions.py Permissions for labels (#3173) 2023-10-23 11:03:51 +00:00
urls.py Add labels implementation for integration (#3014) 2023-10-20 07:30:11 +00:00