Reporting: Update filter and docs to get reports by dashboard (#104560)

This commit is contained in:
Ezequiel Victorero
2025-05-08 11:35:43 -03:00
committed by GitHub
parent eb57fb427d
commit 310b234fbc
4 changed files with 102 additions and 0 deletions
+1
View File
@@ -19,6 +19,7 @@ var sqlIDAcceptList = map[string]struct{}{
"\"user\".\"id\"": {}, // For Postgres
"`user`.`id`": {}, // For MySQL and SQLite
"dashboard.uid": {},
"report.id": {},
}
var (
+33
View File
@@ -1704,6 +1704,39 @@
}
}
},
"/reports/dashboards/{uid}": {
"get": {
"description": "Available to org admins only and with a valid or expired license.\n\nYou need to have a permission with action `reports:read` with scope `reports:*`.",
"tags": [
"reports",
"enterprise"
],
"summary": "List reports by dashboard uid.",
"operationId": "getReportsByDashboardUID",
"parameters": [
{
"type": "string",
"name": "uid",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"$ref": "#/responses/getReportsResponse"
},
"401": {
"$ref": "#/responses/unauthorisedError"
},
"403": {
"$ref": "#/responses/forbiddenError"
},
"500": {
"$ref": "#/responses/internalServerError"
}
}
}
},
"/reports/email": {
"post": {
"description": "Generate and send a report. This API waits for the report to be generated before returning. We recommend that you set the client’s timeout to at least 60 seconds. Available to org admins only and with a valid license.\n\nOnly available in Grafana Enterprise v7.0+.\nThis API endpoint is experimental and may be deprecated in a future release. On deprecation, a migration strategy will be provided and the endpoint will remain functional until the next major release of Grafana.\n\nYou need to have a permission with action `reports:send`.",
+33
View File
@@ -8086,6 +8086,39 @@
}
}
},
"/reports/dashboards/{uid}": {
"get": {
"description": "Available to org admins only and with a valid or expired license.\n\nYou need to have a permission with action `reports:read` with scope `reports:*`.",
"tags": [
"reports",
"enterprise"
],
"summary": "List reports by dashboard uid.",
"operationId": "getReportsByDashboardUID",
"parameters": [
{
"type": "string",
"name": "uid",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"$ref": "#/responses/getReportsResponse"
},
"401": {
"$ref": "#/responses/unauthorisedError"
},
"403": {
"$ref": "#/responses/forbiddenError"
},
"500": {
"$ref": "#/responses/internalServerError"
}
}
}
},
"/reports/email": {
"post": {
"description": "Generate and send a report. This API waits for the report to be generated before returning. We recommend that you set the client’s timeout to at least 60 seconds. Available to org admins only and with a valid license.\n\nOnly available in Grafana Enterprise v7.0+.\nThis API endpoint is experimental and may be deprecated in a future release. On deprecation, a migration strategy will be provided and the endpoint will remain functional until the next major release of Grafana.\n\nYou need to have a permission with action `reports:send`.",
+35
View File
@@ -22330,6 +22330,41 @@
]
}
},
"/reports/dashboards/{uid}": {
"get": {
"description": "Available to org admins only and with a valid or expired license.\n\nYou need to have a permission with action `reports:read` with scope `reports:*`.",
"operationId": "getReportsByDashboardUID",
"parameters": [
{
"in": "path",
"name": "uid",
"required": true,
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"$ref": "#/components/responses/getReportsResponse"
},
"401": {
"$ref": "#/components/responses/unauthorisedError"
},
"403": {
"$ref": "#/components/responses/forbiddenError"
},
"500": {
"$ref": "#/components/responses/internalServerError"
}
},
"summary": "List reports by dashboard uid.",
"tags": [
"reports",
"enterprise"
]
}
},
"/reports/email": {
"post": {
"description": "Generate and send a report. This API waits for the report to be generated before returning. We recommend that you set the client’s timeout to at least 60 seconds. Available to org admins only and with a valid license.\n\nOnly available in Grafana Enterprise v7.0+.\nThis API endpoint is experimental and may be deprecated in a future release. On deprecation, a migration strategy will be provided and the endpoint will remain functional until the next major release of Grafana.\n\nYou need to have a permission with action `reports:send`.",