oncall-engine/engine/common
Ildar Iskhakov fc16d3849b
Add route_template to preview_template endpoint (#1873)
# What this PR does

Add payload field to
api/internal/v1/alert_receive_channels/***/preview_template/ POST
endpoint
```
curl 'http://localhost:3000/api/plugin-proxy/grafana-oncall-app/api/internal/v1/alert_receive_channels/***/preview_template/' \
  -H 'Content-Type: application/json' \
  --data-raw '{"template_name":"route_template","template_body":"{{ payload.foo }}", "payload": {"foo": "bar"}}' \
  --compressed
```
## Which issue(s) this PR fixes

## 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-05-04 13:40:48 +08:00
..
api_helpers Add route_template to preview_template endpoint (#1873) 2023-05-04 13:40:48 +08:00
constants add several new database columns + emit two new Django signals (#1522) 2023-04-14 09:15:57 +02:00
custom_celery_tasks World, meet OnCall! 2022-06-03 08:09:47 -06:00
exceptions Send demo alert with dynamic payload and get demo payload example on private api (#1700) 2023-04-18 02:48:11 +00:00
insight_log Insight logs format fixes (#1763) 2023-04-17 10:10:47 +00:00
jinja_templater Added preview and migration API endpoints for route migration from regex into jinja2 (#1715) 2023-04-18 02:53:53 +00:00
oncall_gateway Slack team connector v2 (#1581) 2023-03-28 03:27:45 +00:00
recaptcha Add validation of hostname for recapctha (#1445) 2023-03-06 08:59:48 +00:00
tests Added preview and migration API endpoints for route migration from regex into jinja2 (#1715) 2023-04-18 02:53:53 +00:00
__init__.py World, meet OnCall! 2022-06-03 08:09:47 -06:00
admin.py World, meet OnCall! 2022-06-03 08:09:47 -06:00
database.py Fix Grafana teams sync (#1652) 2023-03-28 18:26:24 +00:00
public_primary_keys.py Insight logs (#348) 2022-08-24 12:04:44 +05:00
timezones.py centralize timezone validation + add serializer validation for on call shifts and schedules (#924) 2022-12-01 14:13:39 +01:00
utils.py Fix bugs in web title and message templates rendering and visual representation (#1747) 2023-05-02 16:57:52 +08:00