grafana/pkg/tests/api/alerting
Sofia Papagiannaki d1dab5828d
Alerting: Update rule API to address folders by UID (#74600)
* Change ruler API to expect the folder UID as namespace

* Update example requests

* Fix tests

* Update swagger

* Modify FIle field in /api/prometheus/grafana/api/v1/rules

* Fix ruler export

* Modify folder in responses to be formatted as <parent UID>/<title>

* Add alerting test with nested folders

* Apply suggestion from code review

* Alerting: use folder UID instead of title in rule API (#77166)

Co-authored-by: Sonia Aguilar <soniaaguilarpeiron@gmail.com>

* Drop a few more latent uses of namespace_id

* move getNamespaceKey to models package

* switch GetAlertRulesForScheduling to use folder table

* update GetAlertRulesForScheduling to return folder titles in format `parent_uid/title`.

* fi tests

* add tests for GetAlertRulesForScheduling when parent uid

* fix integration tests after merge

* fix test after merge

* change format of the namespace to JSON array

this is needed for forward compatibility, when we migrate to full paths

* update EF code to decode nested folder

---------

Co-authored-by: Yuri Tseretyan <yuriy.tseretyan@grafana.com>
Co-authored-by: Virginia Cepeda <virginia.cepeda@grafana.com>
Co-authored-by: Sonia Aguilar <soniaaguilarpeiron@gmail.com>
Co-authored-by: Alex Weaver <weaver.alex.d@gmail.com>
Co-authored-by: Gilles De Mey <gilles.de.mey@gmail.com>
2024-01-17 11:07:39 +02:00
..
test-data Alerting: Update rule API to address folders by UID (#74600) 2024-01-17 11:07:39 +02:00
api_admin_configuration_test.go Chore: use any rather than interface{} (#74066) 2023-08-30 18:46:47 +03:00
api_alertmanager_configuration_test.go Chore: use any rather than interface{} (#74066) 2023-08-30 18:46:47 +03:00
api_alertmanager_test.go Alerting: Drop NamespaceID from responses on unstable ngalert API endpoints in favor of NamespaceUID (#79359) 2023-12-15 11:06:53 -06:00
api_available_channel_test.go Chore: All tests under pkg/tests should be integration tests (#59521) 2022-12-09 08:11:56 +01:00
api_backtesting_data.json Expressions: Fixes the issue showing expressions editor (#62510) 2023-01-31 18:50:10 +01:00
api_backtesting_test.go Alerting: Fix fine-grained rule access control to use 403 for authorization error (#79239) 2023-12-07 13:43:58 -05:00
api_notification_channel_test.go Update grafana/alerting to 0025eb4 (#73808) 2023-08-25 15:20:17 +03:00
api_prometheus_test.go Alerting: Add UID of rules to response that were affected by update group request (#75985) 2023-10-07 01:11:24 +03:00
api_provisioning_test.go Alerting: Fix MuteTiming Get API to return provenance status (#80494) 2024-01-13 00:16:54 +02:00
api_ruler_test.go Alerting: Update rule API to address folders by UID (#74600) 2024-01-17 11:07:39 +02:00
api_testing_test.go RBAC: Split non-empty scopes into kind, attribute and identifier fields for better search performance (#71933) 2023-07-21 15:23:01 +01:00
testing.go Alerting: Update rule API to address folders by UID (#74600) 2024-01-17 11:07:39 +02:00