grafana/pkg/api
Kat Yang 719af24235
Refactor: Add UID endpoint for dashboard versions and restore (#48364)
* Refactor: Add UID endpoint for dashboard versions and restore

* Fix: User dashID instead of dash.id

* 💩

* Move apiCmd error handling outside of dashUID check

* fix the panic in test

* Fix handler and update docs

Co-authored-by: Kat Yang <yangkb09@users.noreply.github.com>

* Docs: add deprecated warning to restore and version docs

* Fix hyperlink text

* Add swagger endpoints for restore and versions

* Add deprecated tag on swagger for both endpoints

* Fix: Update access control to be dashboards

* Return UID in response; Update docs to reflect this; Implement Ying suggestion

* Update docs/sources/http_api/dashboard_versions.md

Co-authored-by: Sofia Papagiannaki <1632407+papagian@users.noreply.github.com>

* Update pkg/models/dashboard_version.go

Co-authored-by: Sofia Papagiannaki <1632407+papagian@users.noreply.github.com>

* Update pkg/models/dashboard_version.go

Co-authored-by: Sofia Papagiannaki <1632407+papagian@users.noreply.github.com>

* Update query to refer to DashboardUID

Co-authored-by: Ying WANG <ying.wang@grafana.com>
Co-authored-by: Sofia Papagiannaki <sofia@grafana.com>
Co-authored-by: Kat Yang <yangkb09@users.noreply.github.com>
Co-authored-by: Sofia Papagiannaki <1632407+papagian@users.noreply.github.com>
2022-05-17 12:57:27 -04:00
..
apierrors Plugins: Refactor plugin dashboards (#44315) 2022-01-28 10:28:33 +01:00
avatar Dashboard: Mix initials and custom gravatars in recent viewers list (#47212) 2022-04-05 22:56:17 -04:00
datasource Check for empty URLs when creating/updating a data source (#42837) 2022-01-31 12:39:55 -03:00
docs Refactor: Add UID endpoint for dashboard versions and restore (#48364) 2022-05-17 12:57:27 -04:00
dtos Chore : Replace dashboardid with dashboardUID in annotation API (#48481) 2022-05-02 11:35:36 +02:00
frontendlogging Logger migration from log15 to gokit/log (#41636) 2022-01-06 22:28:05 +08:00
navlinks show admin nav link it the user only has permissions to view licensing and not other pages under admin node (#41948) 2021-11-19 11:02:13 +00:00
pluginproxy AccessControl: Create own interface and impl for each permission service (#48871) 2022-05-10 15:48:47 +02:00
response fix status code 200 (#47818) 2022-04-15 08:01:58 -04:00
routing Instrumentation: Fix HTTP request instrumentation of authentication failures (#44234) 2022-02-02 18:48:46 +01:00
static API: Extract OpenAPI specification from source code using go-swagger (#40528) 2022-02-08 13:38:43 +01:00
accesscontrol.go Access Control: Move dashboard actions and create scope provider (#48618) 2022-05-04 16:12:09 +02:00
admin_provisioning_test.go Chore: Add context to org (#40685) 2021-11-03 11:31:56 +01:00
admin_provisioning.go Chore: Remove Dispatch and AddHandler (#42603) 2021-12-02 18:08:59 +01:00
admin_test.go Chore: Remove bus from admin (#44920) 2022-02-04 17:53:58 +01:00
admin_users_test.go Chore: Remove bus.Bus field (#47695) 2022-04-13 15:24:13 +02:00
admin_users.go fix status code 200 (#47818) 2022-04-15 08:01:58 -04:00
admin.go fix status code 200 (#47818) 2022-04-15 08:01:58 -04:00
alerting_test.go Chore: Remove bus (#47511) 2022-04-08 16:15:06 +02:00
alerting.go fix status code 200 (#47818) 2022-04-15 08:01:58 -04:00
annotations_test.go AnnotationsApi: GET /api/annotations/:annotationId (#47739) 2022-05-16 17:16:36 +02:00
annotations.go AnnotationsApi: GET /api/annotations/:annotationId (#47739) 2022-05-16 17:16:36 +02:00
api.go Refactor: Add UID endpoint for dashboard versions and restore (#48364) 2022-05-17 12:57:27 -04:00
apikey.go Access control: Pass access control metadata for api keys (#48445) 2022-04-29 15:30:24 +02:00
app_routes.go Instrumentation: Proxy status code correction and various improvements (#47473) 2022-04-11 13:17:08 +02:00
basic_auth_test.go Macaron: remove custom Request type (#37874) 2021-09-01 11:18:30 +02:00
basic_auth.go Macaron: remove custom Request type (#37874) 2021-09-01 11:18:30 +02:00
comments.go fix status code 200 (#47818) 2022-04-15 08:01:58 -04:00
common_test.go remove validatedQueries feature toggle (#48381) 2022-05-16 13:17:05 -08:00
dashboard_permission_test.go AccessControl: Create own interface and impl for each permission service (#48871) 2022-05-10 15:48:47 +02:00
dashboard_permission.go AccessControl: Create own interface and impl for each permission service (#48871) 2022-05-10 15:48:47 +02:00
dashboard_snapshot_test.go Chore: Remove bus (#47511) 2022-04-08 16:15:06 +02:00
dashboard_snapshot.go fix status code 200 (#47818) 2022-04-15 08:01:58 -04:00
dashboard_test.go Refactor: Add UID endpoint for dashboard versions and restore (#48364) 2022-05-17 12:57:27 -04:00
dashboard.go Refactor: Add UID endpoint for dashboard versions and restore (#48364) 2022-05-17 12:57:27 -04:00
dataproxy.go Alerting: modify alertmanager endpoints for proxying using the datasource UID (#47978) 2022-04-29 10:25:22 +03:00
datasources_test.go Secrets: Implement basic unified secret store service (#45804) 2022-04-25 13:57:45 -03:00
datasources.go Plugins: Refactor plugin resource call with and without data source (#48754) 2022-05-06 10:58:02 +02:00
fakes.go Plugins: Plugin Store API returns DTO model (#41340) 2021-11-17 12:04:22 +01:00
folder_permission_test.go AccessControl: Create own interface and impl for each permission service (#48871) 2022-05-10 15:48:47 +02:00
folder_permission.go Access control: refactor RBAC checks (#48107) 2022-04-25 10:42:09 +02:00
folder_test.go Chore: Remove bus.Bus field (#47695) 2022-04-13 15:24:13 +02:00
folder.go fix argument ordering (#48124) 2022-04-25 15:26:46 +02:00
frontend_logging_test.go Security: Sync security changes on main (#45083) 2022-02-09 13:44:38 +01:00
frontend_logging.go Logger migration from log15 to gokit/log (#41636) 2022-01-06 22:28:05 +08:00
frontend_metrics.go Chore: Report frontend metrics for JS/CSS load time (#42421) 2021-12-02 09:34:39 +01:00
frontendsettings_test.go Chore: Remove bus.Bus field (#47695) 2022-04-13 15:24:13 +02:00
frontendsettings.go AccessControl: Enable RBAC by default (#48813) 2022-05-16 12:45:41 +02:00
grafana_com_proxy.go Instrumentation: Proxy status code correction and various improvements (#47473) 2022-04-11 13:17:08 +02:00
health_test.go Chore: Remove bus from health api (#44897) 2022-02-04 14:33:35 +01:00
health.go Chore: Remove bus from health api (#44897) 2022-02-04 14:33:35 +01:00
http_server_test.go Plugins: Make backend plugin metrics endpoints available with optional authentication (#46467) 2022-03-29 11:18:26 +02:00
http_server.go AccessControl: Create own interface and impl for each permission service (#48871) 2022-05-10 15:48:47 +02:00
index.go Navigation: Add create icons to expanded menu (#48768) 2022-05-06 09:14:00 +01:00
ldap_debug_test.go Tracing: Use common traceID context value for opentracing and opentelemetry (#46411) 2022-04-14 17:54:49 +02:00
ldap_debug.go LDAP: Fix debug view to display the actual computed mapping in ldap.go (#48103) 2022-04-22 15:45:54 +02:00
login_oauth_test.go Chore: Remove bus.Bus field (#47695) 2022-04-13 15:24:13 +02:00
login_oauth.go Chore: add setting to skip org assignment for external users (#34834) 2022-02-21 17:34:47 +01:00
login_test.go Logging: Unify logging fakes (#48822) 2022-05-06 17:44:22 +02:00
login.go fix status code 200 (#47818) 2022-04-15 08:01:58 -04:00
metrics_test.go remove validatedQueries feature toggle (#48381) 2022-05-16 13:17:05 -08:00
metrics.go remove validatedQueries feature toggle (#48381) 2022-05-16 13:17:05 -08:00
org_invite.go fix status code 200 (#47818) 2022-04-15 08:01:58 -04:00
org_test.go ValidatedQueries: start of validated queries API (#44731) 2022-03-07 09:33:01 -09:00
org_users_test.go ValidatedQueries: start of validated queries API (#44731) 2022-03-07 09:33:01 -09:00
org_users.go fix status code 200 (#47818) 2022-04-15 08:01:58 -04:00
org.go Chore: Remove final x from sqlstore (#48086) 2022-04-25 13:07:11 -04:00
password.go fix status code 200 (#47818) 2022-04-15 08:01:58 -04:00
playlist_play.go Chore: Remove bus from signup and playlist api (#44485) 2022-01-27 10:33:02 +01:00
playlist.go fix status code 200 (#47818) 2022-04-15 08:01:58 -04:00
plugin_dashboards_test.go Plugins: Refactor GetPluginDashboards/LoadPluginDashboard (#46316) 2022-03-10 18:38:04 +01:00
plugin_dashboards.go Plugins: Refactor GetPluginDashboards/LoadPluginDashboard (#46316) 2022-03-10 18:38:04 +01:00
plugin_metrics_test.go Plugins: Make backend plugin metrics endpoints available with optional authentication (#46467) 2022-03-29 11:18:26 +02:00
plugin_metrics.go Plugins: Make backend plugin metrics endpoints available with optional authentication (#46467) 2022-03-29 11:18:26 +02:00
plugin_resource.go Plugins: Refactor plugin resource call with and without data source (#48754) 2022-05-06 10:58:02 +02:00
plugins_test.go Logging: Unify logging fakes (#48822) 2022-05-06 17:44:22 +02:00
plugins.go Access control: Fix listing data sources for org admins (#48961) 2022-05-13 14:07:08 +02:00
preferences_test.go Chore: Modify patch and update of preference to take homedashboarduid than h… (#48281) 2022-04-29 14:37:33 +02:00
preferences.go Chore: Modify patch and update of preference to take homedashboarduid than h… (#48281) 2022-04-29 14:37:33 +02:00
quota_test.go ValidatedQueries: start of validated queries API (#44731) 2022-03-07 09:33:01 -09:00
quota.go fix status code 200 (#47818) 2022-04-15 08:01:58 -04:00
render.go Dash previews: populate crawler queue from SQL query (#44083) 2022-02-09 13:23:32 +04:00
search_test.go AccessControl: Add metadata to search result (#48879) 2022-05-17 15:51:44 +02:00
search.go AccessControl: Add metadata to search result (#48879) 2022-05-17 15:51:44 +02:00
short_url_test.go Chore: Remove bus (#47511) 2022-04-08 16:15:06 +02:00
short_url.go fix status code 200 (#47818) 2022-04-15 08:01:58 -04:00
signup.go fix status code 200 (#47818) 2022-04-15 08:01:58 -04:00
stars.go API: add stars HTTP endpoint (#48612) 2022-05-03 08:52:19 -07:00
swagger.go fix status code 200 (#47818) 2022-04-15 08:01:58 -04:00
team_members_test.go Rename FGAC to RBAC in the codebase (#48051) 2022-04-21 14:31:02 +02:00
team_members.go AccessControl: Create own interface and impl for each permission service (#48871) 2022-05-10 15:48:47 +02:00
team_test.go AccessControl: Create own interface and impl for each permission service (#48871) 2022-05-10 15:48:47 +02:00
team.go Access control: refactor RBAC checks (#48107) 2022-04-25 10:42:09 +02:00
user_test.go Chore: Remove bus.Bus field (#47695) 2022-04-13 15:24:13 +02:00
user_token_test.go Chore: Remove bus.Bus field (#47695) 2022-04-13 15:24:13 +02:00
user_token.go fix status code 200 (#47818) 2022-04-15 08:01:58 -04:00
user.go fix status code 200 (#47818) 2022-04-15 08:01:58 -04:00
utils.go Permissions: Validate against Team/User permission role update (#29101) 2020-11-18 15:36:41 +01:00