refactor(Dashboard): Native filters form update endpoint (#30609)

This commit is contained in:
Geido
2024-10-21 14:11:22 +03:00
committed by GitHub
parent 47c5334502
commit d9a1db044a
25 changed files with 1017 additions and 228 deletions

View File

@@ -3008,6 +3008,33 @@
},
"type": "object"
},
"DashboardNativeFiltersConfigUpdateSchema": {
"properties": {
"deleted": {
"description": "List of filter ids to delete",
"items": {
"type": "integer"
},
"type": "array"
},
"modified": {
"description": "List of filter objects to update",
"items": {
"type": "object"
},
"type": "array"
},
"reordered": {
"description": "List of filter ids in the new order",
"items": {
"type": "integer"
},
"type": "array"
}
},
"required": ["deleted", "modified", "reordered"],
"type": "object"
},
"DashboardCopySchema": {
"properties": {
"css": {
@@ -13495,6 +13522,72 @@
"tags": ["Dashboards"]
}
},
"/api/v1/dashboard/{id_or_slug}/filters/": {
"put": {
"description": "Update the filters for a given dashboard",
"parameters": [
{
"in": "path",
"name": "id_or_slug",
"required": true,
"schema": {
"type": "string"
}
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/DashboardNativeFiltersConfigUpdateSchema"
}
}
},
"required": true
},
"responses": {
"200": {
"content": {
"application/json": {
"schema": {
"properties": {
"result": {
"type": "array",
"items": {
"type": "object"
}
}
},
"type": "object"
}
}
},
"description": "Successfully updated the filters"
},
"400": {
"$ref": "#/components/responses/400"
},
"401": {
"$ref": "#/components/responses/401"
},
"403": {
"$ref": "#/components/responses/403"
},
"404": {
"$ref": "#/components/responses/404"
},
"500": {
"$ref": "#/components/responses/500"
}
},
"security": [
{
"jwt": []
}
],
"tags": ["Dashboards"]
}
},
"/api/v1/dashboard/{id_or_slug}/copy/": {
"post": {
"parameters": [