From 87f5032b4650f0fb88e030deecdab457c7e20298 Mon Sep 17 00:00:00 2001 From: jev forsberg Date: Tue, 15 Jul 2025 13:13:05 -0600 Subject: [PATCH] Update swagger specs to include enterprise APIs - Regenerated api-enterprise-spec.json with enterprise API definitions - Updated api-merged.json with merged OSS and enterprise specs - Regenerated openapi3.json with complete API specifications - Fixes enterprise CI swagger generation validation failures - Enterprise APIs now properly detected and documented --- public/api-enterprise-spec.json | 3649 +---------------------------- public/api-merged.json | 3589 +--------------------------- public/openapi3.json | 3858 +------------------------------ 3 files changed, 82 insertions(+), 11014 deletions(-) diff --git a/public/api-enterprise-spec.json b/public/api-enterprise-spec.json index cc8046467ec..05f60d913ab 100644 --- a/public/api-enterprise-spec.json +++ b/public/api-enterprise-spec.json @@ -21,2364 +21,8 @@ "version": "0.0.1" }, "basePath": "/api", - "paths": { - "/access-control/assignments/search": { - "post": { - "description": "Returns the result of the search through access-control role assignments.\n\nYou need to have a permission with action `teams.roles:read` on scope `teams:*`\nand a permission with action `users.roles:read` on scope `users:*`.", - "tags": [ - "enterprise" - ], - "summary": "Debug permissions.", - "operationId": "searchResult", - "responses": { - "200": { - "$ref": "#/responses/searchResultResponse" - }, - "400": { - "$ref": "#/responses/badRequestError" - }, - "403": { - "$ref": "#/responses/forbiddenError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - } - }, - "/access-control/roles": { - "get": { - "description": "Gets all existing roles. The response contains all global and organization local roles, for the organization which user is signed in.\n\nYou need to have a permission with action `roles:read` and scope `roles:*`.\n\nThe `delegatable` flag reduces the set of roles to only those for which the signed-in user has permissions to assign.", - "tags": [ - "access_control", - "enterprise" - ], - "summary": "Get all roles.", - "operationId": "listRoles", - "parameters": [ - { - "type": "boolean", - "name": "delegatable", - "in": "query" - }, - { - "type": "boolean", - "name": "includeHidden", - "in": "query" - } - ], - "responses": { - "200": { - "$ref": "#/responses/listRolesResponse" - }, - "403": { - "$ref": "#/responses/forbiddenError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - }, - "post": { - "description": "Creates a new custom role and maps given permissions to that role. Note that roles with the same prefix as Fixed Roles can’t be created.\n\nYou need to have a permission with action `roles:write` and scope `permissions:type:delegate`. `permissions:type:delegate` scope ensures that users can only create custom roles with the same, or a subset of permissions which the user has.\nFor example, if a user does not have required permissions for creating users, they won’t be able to create a custom role which allows to do that. This is done to prevent escalation of privileges.", - "tags": [ - "access_control", - "enterprise" - ], - "summary": "Create a new custom role.", - "operationId": "createRole", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/CreateRoleForm" - } - } - ], - "responses": { - "201": { - "$ref": "#/responses/createRoleResponse" - }, - "400": { - "$ref": "#/responses/badRequestError" - }, - "403": { - "$ref": "#/responses/forbiddenError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - } - }, - "/access-control/roles/{roleUID}": { - "get": { - "description": "Get a role for the given UID.\n\nYou need to have a permission with action `roles:read` and scope `roles:*`.", - "tags": [ - "access_control", - "enterprise" - ], - "summary": "Get a role.", - "operationId": "getRole", - "parameters": [ - { - "type": "string", - "name": "roleUID", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "$ref": "#/responses/getRoleResponse" - }, - "403": { - "$ref": "#/responses/forbiddenError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - }, - "put": { - "description": "You need to have a permission with action `roles:write` and scope `permissions:type:delegate`. `permissions:type:delegate` scope ensures that users can only create custom roles with the same, or a subset of permissions which the user has.", - "tags": [ - "access_control", - "enterprise" - ], - "summary": "Update a custom role.", - "operationId": "updateRole", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/UpdateRoleCommand" - } - }, - { - "type": "string", - "name": "roleUID", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "$ref": "#/responses/getRoleResponse" - }, - "400": { - "$ref": "#/responses/badRequestError" - }, - "403": { - "$ref": "#/responses/forbiddenError" - }, - "404": { - "$ref": "#/responses/notFoundError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - }, - "delete": { - "description": "Delete a role with the given UID, and it’s permissions. If the role is assigned to a built-in role, the deletion operation will fail, unless force query param is set to true, and in that case all assignments will also be deleted.\n\nYou need to have a permission with action `roles:delete` and scope `permissions:type:delegate`. `permissions:type:delegate` scope ensures that users can only delete a custom role with the same, or a subset of permissions which the user has. For example, if a user does not have required permissions for creating users, they won’t be able to delete a custom role which allows to do that.", - "tags": [ - "access_control", - "enterprise" - ], - "summary": "Delete a custom role.", - "operationId": "deleteRole", - "parameters": [ - { - "type": "boolean", - "name": "force", - "in": "query" - }, - { - "type": "boolean", - "name": "global", - "in": "query" - }, - { - "type": "string", - "name": "roleUID", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "$ref": "#/responses/okResponse" - }, - "400": { - "$ref": "#/responses/badRequestError" - }, - "403": { - "$ref": "#/responses/forbiddenError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - } - }, - "/access-control/roles/{roleUID}/assignments": { - "get": { - "description": "Get role assignments for the role with the given UID.\nDoes not include role assignments mapped through group attribute sync.\n\nYou need to have a permission with action `teams.roles:list` and scope `teams:id:*` and `users.roles:list` and scope `users:id:*`.", - "tags": [ - "access_control", - "enterprise" - ], - "summary": "Get role assignments.", - "operationId": "getRoleAssignments", - "parameters": [ - { - "type": "string", - "name": "roleUID", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "$ref": "#/responses/getRoleAssignmentsResponse" - }, - "403": { - "$ref": "#/responses/forbiddenError" - }, - "404": { - "$ref": "#/responses/notFoundError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - }, - "put": { - "description": "Set role assignments for the role with the given UID.\n\nYou need to have a permission with action `teams.roles:add` and `teams.roles:remove` and scope `permissions:type:delegate`, and `users.roles:add` and `users.roles:remove` and scope `permissions:type:delegate`.", - "tags": [ - "access_control", - "enterprise" - ], - "summary": "Set role assignments.", - "operationId": "setRoleAssignments", - "parameters": [ - { - "type": "string", - "name": "roleUID", - "in": "path", - "required": true - }, - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/SetRoleAssignmentsCommand" - } - } - ], - "responses": { - "200": { - "$ref": "#/responses/setRoleAssignmentsResponse" - }, - "403": { - "$ref": "#/responses/forbiddenError" - }, - "404": { - "$ref": "#/responses/notFoundError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - } - }, - "/access-control/status": { - "get": { - "description": "Returns an indicator to check if fine-grained access control is enabled or not.\n\nYou need to have a permission with action `status:accesscontrol` and scope `services:accesscontrol`.", - "tags": [ - "access_control", - "enterprise" - ], - "summary": "Get status.", - "operationId": "getAccessControlStatus", - "responses": { - "200": { - "$ref": "#/responses/getAccessControlStatusResponse" - }, - "403": { - "$ref": "#/responses/forbiddenError" - }, - "404": { - "$ref": "#/responses/notFoundError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - } - }, - "/access-control/teams/roles/search": { - "post": { - "description": "Lists the roles that have been directly assigned to the given teams.\n\nYou need to have a permission with action `teams.roles:read` and scope `teams:id:*`.", - "tags": [ - "access_control", - "enterprise" - ], - "summary": "List roles assigned to multiple teams.", - "operationId": "listTeamsRoles", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/RolesSearchQuery" - } - } - ], - "responses": { - "200": { - "$ref": "#/responses/listTeamsRolesResponse" - }, - "400": { - "$ref": "#/responses/badRequestError" - }, - "403": { - "$ref": "#/responses/forbiddenError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - } - }, - "/access-control/teams/{teamId}/roles": { - "get": { - "description": "You need to have a permission with action `teams.roles:read` and scope `teams:id:\u003cteam ID\u003e`.", - "tags": [ - "access_control", - "enterprise" - ], - "summary": "Get team roles.", - "operationId": "listTeamRoles", - "parameters": [ - { - "type": "integer", - "format": "int64", - "name": "teamId", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "$ref": "#/responses/okResponse" - }, - "400": { - "$ref": "#/responses/badRequestError" - }, - "403": { - "$ref": "#/responses/forbiddenError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - }, - "put": { - "description": "You need to have a permission with action `teams.roles:add` and `teams.roles:remove` and scope `permissions:type:delegate` for each.", - "tags": [ - "access_control", - "enterprise" - ], - "summary": "Update team role.", - "operationId": "setTeamRoles", - "parameters": [ - { - "type": "integer", - "format": "int64", - "name": "teamId", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "$ref": "#/responses/okResponse" - }, - "400": { - "$ref": "#/responses/badRequestError" - }, - "403": { - "$ref": "#/responses/forbiddenError" - }, - "404": { - "$ref": "#/responses/notFoundError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - }, - "post": { - "description": "You need to have a permission with action `teams.roles:add` and scope `permissions:type:delegate`.", - "tags": [ - "access_control", - "enterprise" - ], - "summary": "Add team role.", - "operationId": "addTeamRole", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/AddTeamRoleCommand" - } - }, - { - "type": "integer", - "format": "int64", - "name": "teamId", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "$ref": "#/responses/okResponse" - }, - "400": { - "$ref": "#/responses/badRequestError" - }, - "403": { - "$ref": "#/responses/forbiddenError" - }, - "404": { - "$ref": "#/responses/notFoundError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - } - }, - "/access-control/teams/{teamId}/roles/{roleUID}": { - "delete": { - "description": "You need to have a permission with action `teams.roles:remove` and scope `permissions:type:delegate`.", - "tags": [ - "access_control", - "enterprise" - ], - "summary": "Remove team role.", - "operationId": "removeTeamRole", - "parameters": [ - { - "type": "string", - "name": "roleUID", - "in": "path", - "required": true - }, - { - "type": "integer", - "format": "int64", - "name": "teamId", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "$ref": "#/responses/okResponse" - }, - "400": { - "$ref": "#/responses/badRequestError" - }, - "403": { - "$ref": "#/responses/forbiddenError" - }, - "404": { - "$ref": "#/responses/notFoundError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - } - }, - "/access-control/users/roles/search": { - "post": { - "description": "Lists the roles that have been directly assigned to the given users. The list does not include built-in roles (Viewer, Editor, Admin or Grafana Admin), and it does not include roles that have been inherited from a team.\n\nYou need to have a permission with action `users.roles:read` and scope `users:id:*`.", - "tags": [ - "access_control", - "enterprise" - ], - "summary": "List roles assigned to multiple users.", - "operationId": "listUsersRoles", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/RolesSearchQuery" - } - } - ], - "responses": { - "200": { - "$ref": "#/responses/listUsersRolesResponse" - }, - "400": { - "$ref": "#/responses/badRequestError" - }, - "403": { - "$ref": "#/responses/forbiddenError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - } - }, - "/access-control/users/{userId}/roles": { - "get": { - "description": "Lists the roles that have been directly assigned to a given user. The list does not include built-in roles (Viewer, Editor, Admin or Grafana Admin), and it does not include roles that have been inherited from a team.\n\nYou need to have a permission with action `users.roles:read` and scope `users:id:\u003cuser ID\u003e`.", - "tags": [ - "access_control", - "enterprise" - ], - "summary": "List roles assigned to a user.", - "operationId": "listUserRoles", - "parameters": [ - { - "type": "integer", - "format": "int64", - "name": "userId", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "$ref": "#/responses/getAllRolesResponse" - }, - "400": { - "$ref": "#/responses/badRequestError" - }, - "403": { - "$ref": "#/responses/forbiddenError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - }, - "put": { - "description": "Update the user’s role assignments to match the provided set of UIDs. This will remove any assigned roles that aren’t in the request and add roles that are in the set but are not already assigned to the user.\nRoles mapped through group attribute sync are not impacted.\nIf you want to add or remove a single role, consider using Add a user role assignment or Remove a user role assignment instead.\n\nYou need to have a permission with action `users.roles:add` and `users.roles:remove` and scope `permissions:type:delegate` for each. `permissions:type:delegate` scope ensures that users can only assign or unassign roles which have same, or a subset of permissions which the user has. For example, if a user does not have required permissions for creating users, they won’t be able to assign or unassign a role which will allow to do that. This is done to prevent escalation of privileges.", - "tags": [ - "access_control", - "enterprise" - ], - "summary": "Set user role assignments.", - "operationId": "setUserRoles", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/SetUserRolesCommand" - } - }, - { - "type": "integer", - "format": "int64", - "name": "userId", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "$ref": "#/responses/okResponse" - }, - "400": { - "$ref": "#/responses/badRequestError" - }, - "403": { - "$ref": "#/responses/forbiddenError" - }, - "404": { - "$ref": "#/responses/notFoundError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - }, - "post": { - "description": "Assign a role to a specific user. For bulk updates consider Set user role assignments.\n\nYou need to have a permission with action `users.roles:add` and scope `permissions:type:delegate`. `permissions:type:delegate` scope ensures that users can only assign roles which have same, or a subset of permissions which the user has. For example, if a user does not have required permissions for creating users, they won’t be able to assign a role which will allow to do that. This is done to prevent escalation of privileges.", - "tags": [ - "access_control", - "enterprise" - ], - "summary": "Add a user role assignment.", - "operationId": "addUserRole", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/AddUserRoleCommand" - } - }, - { - "type": "integer", - "format": "int64", - "name": "userId", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "$ref": "#/responses/okResponse" - }, - "403": { - "$ref": "#/responses/forbiddenError" - }, - "404": { - "$ref": "#/responses/notFoundError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - } - }, - "/access-control/users/{userId}/roles/{roleUID}": { - "delete": { - "description": "Revoke a role from a user. For bulk updates consider Set user role assignments.\n\nYou need to have a permission with action `users.roles:remove` and scope `permissions:type:delegate`. `permissions:type:delegate` scope ensures that users can only unassign roles which have same, or a subset of permissions which the user has. For example, if a user does not have required permissions for creating users, they won’t be able to unassign a role which will allow to do that. This is done to prevent escalation of privileges.", - "tags": [ - "access_control", - "enterprise" - ], - "summary": "Remove a user role assignment.", - "operationId": "removeUserRole", - "parameters": [ - { - "type": "boolean", - "description": "A flag indicating if the assignment is global or not. If set to false, the default org ID of the authenticated user will be used from the request to remove assignment.", - "name": "global", - "in": "query" - }, - { - "type": "string", - "name": "roleUID", - "in": "path", - "required": true - }, - { - "type": "integer", - "format": "int64", - "name": "userId", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "$ref": "#/responses/okResponse" - }, - "400": { - "$ref": "#/responses/badRequestError" - }, - "403": { - "$ref": "#/responses/forbiddenError" - }, - "404": { - "$ref": "#/responses/notFoundError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - } - }, - "/admin/ldap-sync-status": { - "get": { - "description": "You need to have a permission with action `ldap.status:read`.", - "tags": [ - "ldap_debug", - "enterprise" - ], - "summary": "Returns the current state of the LDAP background sync integration.", - "operationId": "getSyncStatus", - "responses": { - "200": { - "$ref": "#/responses/getSyncStatusResponse" - }, - "401": { - "$ref": "#/responses/unauthorisedError" - }, - "403": { - "$ref": "#/responses/forbiddenError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - } - }, - "/admin/provisioning/access-control/reload": { - "post": { - "tags": [ - "access_control_provisioning", - "enterprise" - ], - "summary": "You need to have a permission with action `provisioning:reload` with scope `provisioners:accesscontrol`.", - "operationId": "adminProvisioningReloadAccessControl", - "responses": { - "202": { - "$ref": "#/responses/acceptedResponse" - }, - "401": { - "$ref": "#/responses/unauthorisedError" - }, - "403": { - "$ref": "#/responses/forbiddenError" - } - } - } - }, - "/datasources/uid/{uid}/lbac/teams": { - "get": { - "tags": [ - "enterprise" - ], - "summary": "Retrieves LBAC rules for a team.", - "operationId": "getTeamLBACRulesApi", - "parameters": [ - { - "type": "string", - "name": "uid", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "$ref": "#/responses/getTeamLBACRulesResponse" - }, - "400": { - "$ref": "#/responses/badRequestError" - }, - "401": { - "$ref": "#/responses/unauthorisedError" - }, - "403": { - "$ref": "#/responses/forbiddenError" - }, - "404": { - "$ref": "#/responses/notFoundError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - }, - "put": { - "tags": [ - "enterprise" - ], - "summary": "Updates LBAC rules for a team.", - "operationId": "updateTeamLBACRulesApi", - "parameters": [ - { - "type": "string", - "name": "uid", - "in": "path", - "required": true - }, - { - "name": "body", - "in": "body", - "schema": { - "$ref": "#/definitions/UpdateTeamLBACCommand" - } - } - ], - "responses": { - "200": { - "$ref": "#/responses/updateTeamLBACRulesResponse" - }, - "400": { - "$ref": "#/responses/badRequestError" - }, - "401": { - "$ref": "#/responses/unauthorisedError" - }, - "403": { - "$ref": "#/responses/forbiddenError" - }, - "404": { - "$ref": "#/responses/notFoundError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - } - }, - "/datasources/{dataSourceUID}/cache": { - "get": { - "description": "get cache config for a single data source", - "tags": [ - "enterprise" - ], - "operationId": "getDataSourceCacheConfig", - "parameters": [ - { - "type": "string", - "name": "dataSourceUID", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "description": "CacheConfigResponse", - "schema": { - "$ref": "#/definitions/CacheConfigResponse" - } - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - }, - "post": { - "description": "set cache config for a single data source", - "tags": [ - "enterprise" - ], - "operationId": "setDataSourceCacheConfig", - "parameters": [ - { - "type": "string", - "name": "dataSourceUID", - "in": "path", - "required": true - }, - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/CacheConfigSetter" - } - } - ], - "responses": { - "200": { - "description": "CacheConfigResponse", - "schema": { - "$ref": "#/definitions/CacheConfigResponse" - } - }, - "400": { - "$ref": "#/responses/badRequestError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - } - }, - "/datasources/{dataSourceUID}/cache/clean": { - "post": { - "description": "clean cache for a single data source", - "tags": [ - "enterprise" - ], - "operationId": "cleanDataSourceCache", - "parameters": [ - { - "type": "string", - "name": "dataSourceUID", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "description": "CacheConfigResponse", - "schema": { - "$ref": "#/definitions/CacheConfigResponse" - } - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - } - }, - "/datasources/{dataSourceUID}/cache/disable": { - "post": { - "description": "disable cache for a single data source", - "tags": [ - "enterprise" - ], - "operationId": "disableDataSourceCache", - "parameters": [ - { - "type": "string", - "name": "dataSourceUID", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "description": "CacheConfigResponse", - "schema": { - "$ref": "#/definitions/CacheConfigResponse" - } - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - } - }, - "/datasources/{dataSourceUID}/cache/enable": { - "post": { - "description": "enable cache for a single data source", - "tags": [ - "enterprise" - ], - "operationId": "enableDataSourceCache", - "parameters": [ - { - "type": "string", - "name": "dataSourceUID", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "description": "CacheConfigResponse", - "schema": { - "$ref": "#/definitions/CacheConfigResponse" - } - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - } - }, - "/groupsync/groups": { - "get": { - "tags": [ - "group_attribute_sync", - "enterprise" - ], - "summary": "List groups that have mappings set. This endpoint is behind the feature flag `groupAttributeSync` and is considered experimental.", - "operationId": "getMappedGroups", - "responses": { - "200": { - "$ref": "#/responses/getGroupsResponse" - }, - "400": { - "$ref": "#/responses/badRequestError" - }, - "401": { - "$ref": "#/responses/unauthorisedError" - }, - "403": { - "$ref": "#/responses/forbiddenError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - } - }, - "/groupsync/groups/{group_id}": { - "put": { - "tags": [ - "group_attribute_sync", - "enterprise" - ], - "summary": "Update mappings for a group. This endpoint is behind the feature flag `groupAttributeSync` and is considered experimental.", - "operationId": "updateGroupMappings", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/GroupAttributes" - } - }, - { - "type": "string", - "name": "group_id", - "in": "path", - "required": true - } - ], - "responses": { - "201": { - "$ref": "#/responses/apiResponse" - }, - "400": { - "$ref": "#/responses/badRequestError" - }, - "401": { - "$ref": "#/responses/unauthorisedError" - }, - "403": { - "$ref": "#/responses/forbiddenError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - }, - "post": { - "tags": [ - "group_attribute_sync", - "enterprise" - ], - "summary": "Create mappings for a group. This endpoint is behind the feature flag `groupAttributeSync` and is considered experimental.", - "operationId": "createGroupMappings", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/GroupAttributes" - } - }, - { - "type": "string", - "name": "group_id", - "in": "path", - "required": true - } - ], - "responses": { - "201": { - "$ref": "#/responses/apiResponse" - }, - "400": { - "$ref": "#/responses/badRequestError" - }, - "401": { - "$ref": "#/responses/unauthorisedError" - }, - "403": { - "$ref": "#/responses/forbiddenError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - }, - "delete": { - "tags": [ - "group_attribute_sync", - "enterprise" - ], - "summary": "Delete mappings for a group. This endpoint is behind the feature flag `groupAttributeSync` and is considered experimental.", - "operationId": "deleteGroupMappings", - "parameters": [ - { - "type": "string", - "name": "group_id", - "in": "path", - "required": true - } - ], - "responses": { - "204": { - "$ref": "#/responses/okResponse" - }, - "400": { - "$ref": "#/responses/badRequestError" - }, - "401": { - "$ref": "#/responses/unauthorisedError" - }, - "403": { - "$ref": "#/responses/forbiddenError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - } - }, - "/groupsync/groups/{group_id}/roles": { - "get": { - "tags": [ - "group_attribute_sync", - "enterprise" - ], - "summary": "Get roles mapped to a group. This endpoint is behind the feature flag `groupAttributeSync` and is considered experimental.", - "operationId": "getGroupRoles", - "parameters": [ - { - "type": "string", - "name": "group_id", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "$ref": "#/responses/getGroupRolesResponse" - }, - "400": { - "$ref": "#/responses/badRequestError" - }, - "401": { - "$ref": "#/responses/unauthorisedError" - }, - "403": { - "$ref": "#/responses/forbiddenError" - }, - "404": { - "$ref": "#/responses/notFoundError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - } - }, - "/licensing/check": { - "get": { - "tags": [ - "licensing", - "enterprise" - ], - "summary": "Check license availability.", - "operationId": "getStatus", - "responses": { - "200": { - "$ref": "#/responses/getStatusResponse" - } - } - } - }, - "/licensing/custom-permissions": { - "get": { - "description": "You need to have a permission with action `licensing.reports:read`.", - "tags": [ - "licensing", - "enterprise" - ], - "summary": "Get custom permissions report.", - "operationId": "getCustomPermissionsReport", - "deprecated": true, - "responses": { - "500": { - "$ref": "#/responses/internalServerError" - } - } - } - }, - "/licensing/custom-permissions-csv": { - "get": { - "description": "You need to have a permission with action `licensing.reports:read`.", - "produces": [ - "text/csv" - ], - "tags": [ - "licensing", - "enterprise" - ], - "summary": "Get custom permissions report in CSV format.", - "operationId": "getCustomPermissionsCSV", - "deprecated": true, - "responses": { - "500": { - "$ref": "#/responses/internalServerError" - } - } - } - }, - "/licensing/refresh-stats": { - "get": { - "description": "You need to have a permission with action `licensing:read`.", - "tags": [ - "licensing", - "enterprise" - ], - "summary": "Refresh license stats.", - "operationId": "refreshLicenseStats", - "responses": { - "200": { - "$ref": "#/responses/refreshLicenseStatsResponse" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - } - }, - "/licensing/token": { - "get": { - "description": "You need to have a permission with action `licensing:read`.", - "tags": [ - "licensing", - "enterprise" - ], - "summary": "Get license token.", - "operationId": "getLicenseToken", - "responses": { - "200": { - "$ref": "#/responses/getLicenseTokenResponse" - } - } - }, - "post": { - "description": "You need to have a permission with action `licensing:update`.", - "tags": [ - "licensing", - "enterprise" - ], - "summary": "Create license token.", - "operationId": "postLicenseToken", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/DeleteTokenCommand" - } - } - ], - "responses": { - "200": { - "$ref": "#/responses/getLicenseTokenResponse" - }, - "400": { - "$ref": "#/responses/badRequestError" - } - } - }, - "delete": { - "description": "Removes the license stored in the Grafana database. Available in Grafana Enterprise v7.4+.\n\nYou need to have a permission with action `licensing:delete`.", - "tags": [ - "licensing", - "enterprise" - ], - "summary": "Remove license from database.", - "operationId": "deleteLicenseToken", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/DeleteTokenCommand" - } - } - ], - "responses": { - "202": { - "$ref": "#/responses/acceptedResponse" - }, - "400": { - "$ref": "#/responses/badRequestError" - }, - "401": { - "$ref": "#/responses/unauthorisedError" - }, - "403": { - "$ref": "#/responses/forbiddenError" - }, - "422": { - "$ref": "#/responses/unprocessableEntityError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - } - }, - "/licensing/token/renew": { - "post": { - "description": "Manually ask license issuer for a new token. Available in Grafana Enterprise v7.4+.\n\nYou need to have a permission with action `licensing:update`.", - "tags": [ - "licensing", - "enterprise" - ], - "summary": "Manually force license refresh.", - "operationId": "postRenewLicenseToken", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "type": "object" - } - } - ], - "responses": { - "200": { - "$ref": "#/responses/postRenewLicenseTokenResponse" - }, - "401": { - "$ref": "#/responses/unauthorisedError" - }, - "404": { - "$ref": "#/responses/notFoundError" - } - } - } - }, - "/logout/saml": { - "get": { - "tags": [ - "saml", - "enterprise" - ], - "summary": "GetLogout initiates single logout process.", - "operationId": "getSAMLLogout", - "responses": { - "302": { - "description": "" - }, - "404": { - "$ref": "#/responses/notFoundError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - } - }, - "/recording-rules": { - "get": { - "tags": [ - "recording_rules", - "enterprise" - ], - "summary": "Lists all rules in the database: active or deleted.", - "operationId": "listRecordingRules", - "responses": { - "200": { - "$ref": "#/responses/listRecordingRulesResponse" - }, - "401": { - "$ref": "#/responses/unauthorisedError" - }, - "403": { - "$ref": "#/responses/forbiddenError" - }, - "404": { - "$ref": "#/responses/notFoundError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - }, - "put": { - "tags": [ - "recording_rules", - "enterprise" - ], - "summary": "Update the active status of a rule.", - "operationId": "updateRecordingRule", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/RecordingRuleJSON" - } - } - ], - "responses": { - "200": { - "$ref": "#/responses/recordingRuleResponse" - }, - "401": { - "$ref": "#/responses/unauthorisedError" - }, - "403": { - "$ref": "#/responses/forbiddenError" - }, - "404": { - "$ref": "#/responses/notFoundError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - }, - "post": { - "tags": [ - "recording_rules", - "enterprise" - ], - "summary": "Create a recording rule that is then registered and started.", - "operationId": "createRecordingRule", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/RecordingRuleJSON" - } - } - ], - "responses": { - "200": { - "$ref": "#/responses/recordingRuleResponse" - }, - "401": { - "$ref": "#/responses/unauthorisedError" - }, - "403": { - "$ref": "#/responses/forbiddenError" - }, - "404": { - "$ref": "#/responses/notFoundError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - } - }, - "/recording-rules/test": { - "post": { - "tags": [ - "recording_rules", - "enterprise" - ], - "summary": "Test a recording rule.", - "operationId": "testCreateRecordingRule", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/RecordingRuleJSON" - } - } - ], - "responses": { - "200": { - "$ref": "#/responses/okResponse" - }, - "401": { - "$ref": "#/responses/unauthorisedError" - }, - "403": { - "$ref": "#/responses/forbiddenError" - }, - "404": { - "$ref": "#/responses/notFoundError" - }, - "422": { - "$ref": "#/responses/unprocessableEntityError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - } - }, - "/recording-rules/writer": { - "get": { - "tags": [ - "recording_rules", - "enterprise" - ], - "summary": "Return the prometheus remote write target.", - "operationId": "getRecordingRuleWriteTarget", - "responses": { - "200": { - "$ref": "#/responses/recordingRuleWriteTargetResponse" - }, - "401": { - "$ref": "#/responses/unauthorisedError" - }, - "403": { - "$ref": "#/responses/forbiddenError" - }, - "404": { - "$ref": "#/responses/notFoundError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - }, - "post": { - "description": "It returns a 422 if there is not an existing prometheus data source configured.", - "tags": [ - "recording_rules", - "enterprise" - ], - "summary": "Create a remote write target.", - "operationId": "createRecordingRuleWriteTarget", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/PrometheusRemoteWriteTargetJSON" - } - } - ], - "responses": { - "200": { - "$ref": "#/responses/recordingRuleWriteTargetResponse" - }, - "401": { - "$ref": "#/responses/unauthorisedError" - }, - "403": { - "$ref": "#/responses/forbiddenError" - }, - "404": { - "$ref": "#/responses/notFoundError" - }, - "422": { - "$ref": "#/responses/unprocessableEntityError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - }, - "delete": { - "tags": [ - "recording_rules", - "enterprise" - ], - "summary": "Delete the remote write target.", - "operationId": "deleteRecordingRuleWriteTarget", - "responses": { - "200": { - "$ref": "#/responses/okResponse" - }, - "401": { - "$ref": "#/responses/unauthorisedError" - }, - "403": { - "$ref": "#/responses/forbiddenError" - }, - "404": { - "$ref": "#/responses/notFoundError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - } - }, - "/recording-rules/{recordingRuleID}": { - "delete": { - "tags": [ - "recording_rules", - "enterprise" - ], - "summary": "Delete removes the rule from the registry and stops it.", - "operationId": "deleteRecordingRule", - "parameters": [ - { - "type": "integer", - "format": "int64", - "name": "recordingRuleID", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "$ref": "#/responses/okResponse" - }, - "401": { - "$ref": "#/responses/unauthorisedError" - }, - "403": { - "$ref": "#/responses/forbiddenError" - }, - "404": { - "$ref": "#/responses/notFoundError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - } - }, - "/reports": { - "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.", - "operationId": "getReports", - "responses": { - "200": { - "$ref": "#/responses/getReportsResponse" - }, - "401": { - "$ref": "#/responses/unauthorisedError" - }, - "403": { - "$ref": "#/responses/forbiddenError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - }, - "post": { - "description": "Available to org admins only and with a valid license.\n\nYou need to have a permission with action `reports.admin:create`.", - "tags": [ - "reports", - "enterprise" - ], - "summary": "Create a report.", - "operationId": "createReport", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/CreateOrUpdateReport" - } - } - ], - "responses": { - "200": { - "$ref": "#/responses/createReportResponse" - }, - "400": { - "$ref": "#/responses/badRequestError" - }, - "401": { - "$ref": "#/responses/unauthorisedError" - }, - "403": { - "$ref": "#/responses/forbiddenError" - }, - "404": { - "$ref": "#/responses/notFoundError" - }, - "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`.", - "tags": [ - "reports", - "enterprise" - ], - "summary": "Send a report.", - "operationId": "sendReport", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/ReportEmail" - } - } - ], - "responses": { - "200": { - "$ref": "#/responses/okResponse" - }, - "400": { - "$ref": "#/responses/badRequestError" - }, - "401": { - "$ref": "#/responses/unauthorisedError" - }, - "403": { - "$ref": "#/responses/forbiddenError" - }, - "404": { - "$ref": "#/responses/notFoundError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - } - }, - "/reports/images/:image": { - "get": { - "description": "Available to org admins only and with a valid or expired license.\n\nYou need to have a permission with action `reports.settings:read`.", - "tags": [ - "reports", - "enterprise" - ], - "summary": "Get custom branding report image.", - "operationId": "getSettingsImage", - "responses": { - "200": { - "$ref": "#/responses/contentResponse" - }, - "401": { - "$ref": "#/responses/unauthorisedError" - }, - "403": { - "$ref": "#/responses/forbiddenError" - }, - "404": { - "$ref": "#/responses/notFoundError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - } - }, - "/reports/render/csvs": { - "get": { - "description": "Available to all users and with a valid license.", - "produces": [ - "application/zip" - ], - "tags": [ - "reports", - "enterprise" - ], - "summary": "Download a CSV report.", - "operationId": "renderReportCSVs", - "parameters": [ - { - "type": "string", - "name": "dashboards", - "in": "query" - }, - { - "type": "string", - "name": "title", - "in": "query" - } - ], - "responses": { - "200": { - "$ref": "#/responses/contentResponse" - }, - "204": { - "$ref": "#/responses/noContentResponse" - }, - "400": { - "$ref": "#/responses/badRequestError" - }, - "401": { - "$ref": "#/responses/unauthorisedError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - } - }, - "/reports/render/pdfs": { - "get": { - "description": "Available to all users and with a valid license.", - "produces": [ - "application/pdf" - ], - "tags": [ - "reports", - "enterprise" - ], - "summary": "Render report for multiple dashboards.", - "operationId": "renderReportPDFs", - "parameters": [ - { - "type": "string", - "name": "dashboards", - "in": "query" - }, - { - "type": "string", - "name": "orientation", - "in": "query" - }, - { - "type": "string", - "name": "layout", - "in": "query" - }, - { - "type": "string", - "name": "title", - "in": "query" - }, - { - "type": "string", - "name": "scaleFactor", - "in": "query" - }, - { - "type": "string", - "name": "includeTables", - "in": "query" - } - ], - "responses": { - "200": { - "$ref": "#/responses/contentResponse" - }, - "400": { - "$ref": "#/responses/badRequestError" - }, - "401": { - "$ref": "#/responses/unauthorisedError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - } - }, - "/reports/settings": { - "get": { - "description": "Available to org admins only and with a valid or expired license.\n\nYou need to have a permission with action `reports.settings:read`x.", - "tags": [ - "reports", - "enterprise" - ], - "summary": "Get report settings.", - "operationId": "getReportSettings", - "responses": { - "200": { - "$ref": "#/responses/getReportSettingsResponse" - }, - "401": { - "$ref": "#/responses/unauthorisedError" - }, - "403": { - "$ref": "#/responses/forbiddenError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - }, - "post": { - "description": "Available to org admins only and with a valid or expired license.\n\nYou need to have a permission with action `reports.settings:write`xx.", - "tags": [ - "reports", - "enterprise" - ], - "summary": "Save settings.", - "operationId": "saveReportSettings", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/ReportSettings" - } - } - ], - "responses": { - "200": { - "$ref": "#/responses/okResponse" - }, - "400": { - "$ref": "#/responses/badRequestError" - }, - "401": { - "$ref": "#/responses/unauthorisedError" - }, - "403": { - "$ref": "#/responses/forbiddenError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - } - }, - "/reports/test-email": { - "post": { - "description": "Available to org admins only and with a valid license.\n\nYou need to have a permission with action `reports:send`.", - "tags": [ - "reports", - "enterprise" - ], - "summary": "Send test report via email.", - "operationId": "sendTestEmail", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/CreateOrUpdateReport" - } - } - ], - "responses": { - "200": { - "$ref": "#/responses/okResponse" - }, - "400": { - "$ref": "#/responses/badRequestError" - }, - "401": { - "$ref": "#/responses/unauthorisedError" - }, - "403": { - "$ref": "#/responses/forbiddenError" - }, - "404": { - "$ref": "#/responses/notFoundError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - } - }, - "/reports/{id}": { - "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:id:\u003creport ID\u003e`.\n\nRequesting reports using the internal id will stop workgin in the future\nUse the reporting apiserver to manage reports. See: /apis/reporting.grafana.app/", - "tags": [ - "reports", - "enterprise" - ], - "summary": "Get a report.", - "operationId": "getReport", - "deprecated": true, - "parameters": [ - { - "type": "integer", - "format": "int64", - "name": "id", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "$ref": "#/responses/getReportResponse" - }, - "400": { - "$ref": "#/responses/badRequestError" - }, - "401": { - "$ref": "#/responses/unauthorisedError" - }, - "403": { - "$ref": "#/responses/forbiddenError" - }, - "404": { - "$ref": "#/responses/notFoundError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - }, - "put": { - "description": "Available to org admins only and with a valid or expired license.\n\nYou need to have a permission with action `reports.admin:write` with scope `reports:id:\u003creport ID\u003e`.\n\nRequesting reports using the internal id will stop workgin in the future\nUse the reporting apiserver to manage reports. See: /apis/reporting.grafana.app/", - "tags": [ - "reports", - "enterprise" - ], - "summary": "Update a report.", - "operationId": "updateReport", - "deprecated": true, - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/CreateOrUpdateReport" - } - }, - { - "type": "integer", - "format": "int64", - "name": "id", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "$ref": "#/responses/okResponse" - }, - "400": { - "$ref": "#/responses/badRequestError" - }, - "401": { - "$ref": "#/responses/unauthorisedError" - }, - "403": { - "$ref": "#/responses/forbiddenError" - }, - "404": { - "$ref": "#/responses/notFoundError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - }, - "delete": { - "description": "Available to org admins only and with a valid or expired license.\n\nYou need to have a permission with action `reports.delete` with scope `reports:id:\u003creport ID\u003e`.\n\nRequesting reports using the internal id will stop workgin in the future\nUse the reporting apiserver to manage reports. See: /apis/reporting.grafana.app/", - "tags": [ - "reports", - "enterprise" - ], - "summary": "Delete a report.", - "operationId": "deleteReport", - "deprecated": true, - "parameters": [ - { - "type": "integer", - "format": "int64", - "name": "id", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "$ref": "#/responses/okResponse" - }, - "400": { - "$ref": "#/responses/badRequestError" - }, - "401": { - "$ref": "#/responses/unauthorisedError" - }, - "403": { - "$ref": "#/responses/forbiddenError" - }, - "404": { - "$ref": "#/responses/notFoundError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - } - }, - "/saml/acs": { - "post": { - "tags": [ - "saml", - "enterprise" - ], - "summary": "It performs Assertion Consumer Service (ACS).", - "operationId": "postACS", - "parameters": [ - { - "type": "string", - "name": "RelayState", - "in": "query" - } - ], - "responses": { - "302": { - "description": "" - }, - "403": { - "$ref": "#/responses/forbiddenError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - } - }, - "/saml/metadata": { - "get": { - "produces": [ - "application/xml;application/samlmetadata+xml" - ], - "tags": [ - "saml", - "enterprise" - ], - "summary": "It exposes the SP (Grafana's) metadata for the IdP's consumption.", - "operationId": "getMetadata", - "responses": { - "200": { - "$ref": "#/responses/contentResponse" - } - } - } - }, - "/saml/slo": { - "get": { - "description": "There might be two possible requests:\n1. Logout response (callback) when Grafana initiates single logout and IdP returns response to logout request.\n2. Logout request when another SP initiates single logout and IdP sends logout request to the Grafana,\nor in case of IdP-initiated logout.", - "tags": [ - "saml", - "enterprise" - ], - "summary": "It performs Single Logout (SLO) callback.", - "operationId": "getSLO", - "responses": { - "302": { - "description": "" - }, - "400": { - "$ref": "#/responses/badRequestError" - }, - "403": { - "$ref": "#/responses/forbiddenError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - }, - "post": { - "description": "There might be two possible requests:\n1. Logout response (callback) when Grafana initiates single logout and IdP returns response to logout request.\n2. Logout request when another SP initiates single logout and IdP sends logout request to the Grafana,\nor in case of IdP-initiated logout.", - "tags": [ - "saml", - "enterprise" - ], - "summary": "It performs Single Logout (SLO) callback.", - "operationId": "postSLO", - "parameters": [ - { - "type": "string", - "name": "SAMLRequest", - "in": "query" - }, - { - "type": "string", - "name": "SAMLResponse", - "in": "query" - } - ], - "responses": { - "302": { - "description": "" - }, - "400": { - "$ref": "#/responses/badRequestError" - }, - "403": { - "$ref": "#/responses/forbiddenError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - } - }, - "/teams/{teamId}/groups": { - "get": { - "tags": [ - "sync_team_groups", - "enterprise" - ], - "summary": "Get External Groups.", - "operationId": "getTeamGroupsApi", - "parameters": [ - { - "type": "integer", - "format": "int64", - "name": "teamId", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "$ref": "#/responses/getTeamGroupsApiResponse" - }, - "400": { - "$ref": "#/responses/badRequestError" - }, - "401": { - "$ref": "#/responses/unauthorisedError" - }, - "403": { - "$ref": "#/responses/forbiddenError" - }, - "404": { - "$ref": "#/responses/notFoundError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - }, - "post": { - "tags": [ - "sync_team_groups", - "enterprise" - ], - "summary": "Add External Group.", - "operationId": "addTeamGroupApi", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/TeamGroupMapping" - } - }, - { - "type": "integer", - "format": "int64", - "name": "teamId", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "$ref": "#/responses/okResponse" - }, - "400": { - "$ref": "#/responses/badRequestError" - }, - "401": { - "$ref": "#/responses/unauthorisedError" - }, - "403": { - "$ref": "#/responses/forbiddenError" - }, - "404": { - "$ref": "#/responses/notFoundError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - }, - "delete": { - "tags": [ - "sync_team_groups", - "enterprise" - ], - "summary": "Remove External Group.", - "operationId": "removeTeamGroupApiQuery", - "parameters": [ - { - "type": "string", - "name": "groupId", - "in": "query" - }, - { - "type": "integer", - "format": "int64", - "name": "teamId", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "$ref": "#/responses/okResponse" - }, - "400": { - "$ref": "#/responses/badRequestError" - }, - "401": { - "$ref": "#/responses/unauthorisedError" - }, - "403": { - "$ref": "#/responses/forbiddenError" - }, - "404": { - "$ref": "#/responses/notFoundError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - } - } - }, + "paths": {}, "definitions": { - "ActiveSyncStatusDTO": { - "description": "ActiveSyncStatusDTO holds the information for LDAP background Sync", - "type": "object", - "properties": { - "enabled": { - "type": "boolean" - }, - "nextSync": { - "type": "string", - "format": "date-time" - }, - "prevSync": { - "$ref": "#/definitions/SyncResult" - }, - "schedule": { - "type": "string" - } - } - }, - "ActiveUserStats": { - "type": "object", - "properties": { - "active_admins_and_editors": { - "type": "integer", - "format": "int64" - }, - "active_anonymous_devices": { - "type": "integer", - "format": "int64" - }, - "active_users": { - "type": "integer", - "format": "int64" - }, - "active_viewers": { - "type": "integer", - "format": "int64" - } - } - }, "AddAPIKeyCommand": { "type": "object", "properties": { @@ -2509,25 +153,6 @@ } } }, - "AddTeamRoleCommand": { - "type": "object", - "properties": { - "roleUid": { - "type": "string" - } - } - }, - "AddUserRoleCommand": { - "type": "object", - "properties": { - "global": { - "type": "boolean" - }, - "roleUid": { - "type": "string" - } - } - }, "Address": { "type": "object", "properties": { @@ -2990,123 +615,6 @@ "Value": {} } }, - "CacheConfig": { - "description": "Config defines the internal representation of a cache configuration, including fields not set by the API caller", - "type": "object", - "properties": { - "created": { - "type": "string", - "format": "date-time" - }, - "dataSourceID": { - "description": "Fields that can be set by the API caller - read/write", - "type": "integer", - "format": "int64" - }, - "dataSourceUID": { - "type": "string" - }, - "defaultTTLMs": { - "description": "These are returned by the HTTP API, but are managed internally - read-only\nNote: 'created' and 'updated' are special properties managed automatically by xorm, but we are setting them manually", - "type": "integer", - "format": "int64" - }, - "enabled": { - "type": "boolean" - }, - "ttlQueriesMs": { - "description": "TTL MS, or \"time to live\", is how long a cached item will stay in the cache before it is removed (in milliseconds)", - "type": "integer", - "format": "int64" - }, - "ttlResourcesMs": { - "type": "integer", - "format": "int64" - }, - "updated": { - "type": "string", - "format": "date-time" - }, - "useDefaultTTL": { - "description": "If UseDefaultTTL is enabled, then the TTLQueriesMS and TTLResourcesMS in this object is always sent as the default TTL located in grafana.ini", - "type": "boolean" - } - } - }, - "CacheConfigResponse": { - "type": "object", - "properties": { - "created": { - "type": "string", - "format": "date-time" - }, - "dataSourceID": { - "description": "Fields that can be set by the API caller - read/write", - "type": "integer", - "format": "int64" - }, - "dataSourceUID": { - "type": "string" - }, - "defaultTTLMs": { - "description": "These are returned by the HTTP API, but are managed internally - read-only\nNote: 'created' and 'updated' are special properties managed automatically by xorm, but we are setting them manually", - "type": "integer", - "format": "int64" - }, - "enabled": { - "type": "boolean" - }, - "message": { - "type": "string" - }, - "ttlQueriesMs": { - "description": "TTL MS, or \"time to live\", is how long a cached item will stay in the cache before it is removed (in milliseconds)", - "type": "integer", - "format": "int64" - }, - "ttlResourcesMs": { - "type": "integer", - "format": "int64" - }, - "updated": { - "type": "string", - "format": "date-time" - }, - "useDefaultTTL": { - "description": "If UseDefaultTTL is enabled, then the TTLQueriesMS and TTLResourcesMS in this object is always sent as the default TTL located in grafana.ini", - "type": "boolean" - } - } - }, - "CacheConfigSetter": { - "description": "ConfigSetter defines the cache parameters that users can configure per datasource\nThis is only intended to be consumed by the SetCache HTTP Handler", - "type": "object", - "properties": { - "dataSourceID": { - "type": "integer", - "format": "int64" - }, - "dataSourceUID": { - "type": "string" - }, - "enabled": { - "type": "boolean" - }, - "ttlQueriesMs": { - "description": "TTL MS, or \"time to live\", is how long a cached item will stay in the cache before it is removed (in milliseconds)", - "type": "integer", - "format": "int64" - }, - "ttlResourcesMs": { - "type": "integer", - "format": "int64" - }, - "useDefaultTTL": { - "description": "If UseDefaultTTL is enabled, then the TTLQueriesMS and TTLResourcesMS in this object is always sent as the default TTL located in grafana.ini", - "type": "boolean" - } - } - }, "CalculateDiffTarget": { "type": "object", "properties": { @@ -3745,57 +1253,6 @@ } } }, - "CreateOrUpdateReport": { - "type": "object", - "properties": { - "dashboards": { - "type": "array", - "items": { - "$ref": "#/definitions/ReportDashboard" - } - }, - "enableCsv": { - "type": "boolean" - }, - "enableDashboardUrl": { - "type": "boolean" - }, - "formats": { - "type": "array", - "items": { - "$ref": "#/definitions/Type" - } - }, - "message": { - "type": "string" - }, - "name": { - "type": "string" - }, - "options": { - "$ref": "#/definitions/ReportOptions" - }, - "recipients": { - "type": "string" - }, - "replyTo": { - "type": "string" - }, - "scaleFactor": { - "type": "integer", - "format": "int64" - }, - "schedule": { - "$ref": "#/definitions/ReportSchedule" - }, - "state": { - "$ref": "#/definitions/State" - }, - "subject": { - "type": "string" - } - } - }, "CreateOrgCommand": { "type": "object", "properties": { @@ -3838,42 +1295,6 @@ } } }, - "CreateRoleForm": { - "type": "object", - "properties": { - "description": { - "type": "string" - }, - "displayName": { - "type": "string" - }, - "global": { - "type": "boolean" - }, - "group": { - "type": "string" - }, - "hidden": { - "type": "boolean" - }, - "name": { - "type": "string" - }, - "permissions": { - "type": "array", - "items": { - "$ref": "#/definitions/Permission" - } - }, - "uid": { - "type": "string" - }, - "version": { - "type": "integer", - "format": "int64" - } - } - }, "CreateServiceAccountForm": { "type": "object", "properties": { @@ -3897,6 +1318,30 @@ } } }, + "CreateSnapshotRequestDTO": { + "type": "object", + "properties": { + "resourceTypes": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "DASHBOARD", + "DATASOURCE", + "FOLDER", + "LIBRARY_ELEMENT", + "ALERT_RULE", + "ALERT_RULE_GROUP", + "CONTACT_POINT", + "NOTIFICATION_POLICY", + "NOTIFICATION_TEMPLATE", + "MUTE_TIMING", + "PLUGIN" + ] + } + } + } + }, "CreateSnapshotResponseDTO": { "type": "object", "properties": { @@ -4453,14 +1898,6 @@ } } }, - "DeleteTokenCommand": { - "type": "object", - "properties": { - "instance": { - "type": "string" - } - } - }, "DescendantCounts": { "type": "object", "additionalProperties": { @@ -4511,16 +1948,6 @@ "DsAccess": { "type": "string" }, - "DsPermissionType": { - "description": "Datasource permission\nDescription:\n`0` - No Access\n`1` - Query\n`2` - Edit\nEnum: 0,1,2", - "type": "integer", - "format": "int64" - }, - "Duration": { - "description": "A Duration represents the elapsed time between two instants\nas an int64 nanosecond count. The representation limits the\nlargest representable duration to approximately 290 years.", - "type": "integer", - "format": "int64" - }, "EmailDTO": { "type": "object", "properties": { @@ -4614,18 +2041,6 @@ } } }, - "FailedUser": { - "description": "FailedUser holds the information of an user that failed", - "type": "object", - "properties": { - "Error": { - "type": "string" - }, - "Login": { - "type": "string" - } - } - }, "Field": { "description": "A Field is essentially a slice of various types with extra properties and methods.\nSee NewField() for supported types.\n\nThe slice data in the Field is a not exported, so methods on the Field are used to to manipulate its data.", "type": "object", @@ -5053,26 +2468,6 @@ } } }, - "Group": { - "type": "object", - "properties": { - "groupID": { - "type": "string" - }, - "mappings": {} - } - }, - "GroupAttributes": { - "type": "object", - "properties": { - "roles": { - "type": "array", - "items": { - "type": "string" - } - } - } - }, "Hit": { "type": "object", "properties": { @@ -6038,6 +3433,9 @@ "language": { "type": "string" }, + "locale": { + "type": "string" + }, "navbar": { "$ref": "#/definitions/NavbarPreference" }, @@ -6304,6 +3702,10 @@ "description": "Selected language (beta)", "type": "string" }, + "locale": { + "description": "Selected locale (beta)", + "type": "string" + }, "navbar": { "$ref": "#/definitions/NavbarPreference" }, @@ -6324,20 +3726,6 @@ } } }, - "PrometheusRemoteWriteTargetJSON": { - "type": "object", - "properties": { - "data_source_uid": { - "type": "string" - }, - "id": { - "type": "string" - }, - "remote_write_path": { - "type": "string" - } - } - }, "PublicDashboard": { "type": "object", "properties": { @@ -6667,278 +4055,54 @@ } } }, - "RecordingRuleJSON": { - "description": "RecordingRuleJSON is the external representation of a recording rule", + "ResourceDependenciesResponseDTO": { "type": "object", "properties": { - "active": { - "type": "boolean" - }, - "count": { - "type": "boolean" - }, - "description": { - "type": "string" - }, - "dest_data_source_uid": { - "type": "string" - }, - "id": { - "type": "string" - }, - "interval": { - "type": "integer", - "format": "int64" - }, - "name": { - "type": "string" - }, - "prom_name": { - "type": "string" - }, - "queries": { + "resourceDependencies": { "type": "array", "items": { - "type": "object", - "additionalProperties": {} + "$ref": "#/definitions/ResourceDependencyDTO" } - }, - "range": { - "type": "integer", - "format": "int64" - }, - "target_ref_id": { - "type": "string" } } }, - "Report": { + "ResourceDependencyDTO": { "type": "object", "properties": { - "created": { - "type": "string", - "format": "date-time" - }, - "dashboards": { + "dependencies": { "type": "array", "items": { - "$ref": "#/definitions/ReportDashboard" + "type": "string", + "enum": [ + "DASHBOARD", + "DATASOURCE", + "FOLDER", + "LIBRARY_ELEMENT", + "ALERT_RULE", + "ALERT_RULE_GROUP", + "CONTACT_POINT", + "NOTIFICATION_POLICY", + "NOTIFICATION_TEMPLATE", + "MUTE_TIMING", + "PLUGIN" + ] } }, - "enableCsv": { - "type": "boolean" - }, - "enableDashboardUrl": { - "type": "boolean" - }, - "formats": { - "type": "array", - "items": { - "$ref": "#/definitions/Type" - } - }, - "id": { - "type": "integer", - "format": "int64" - }, - "message": { - "type": "string" - }, - "name": { - "type": "string" - }, - "options": { - "$ref": "#/definitions/ReportOptions" - }, - "orgId": { - "type": "integer", - "format": "int64" - }, - "recipients": { - "type": "string" - }, - "replyTo": { - "type": "string" - }, - "scaleFactor": { - "type": "integer", - "format": "int64" - }, - "schedule": { - "$ref": "#/definitions/ReportSchedule" - }, - "state": { - "$ref": "#/definitions/State" - }, - "subject": { - "type": "string" - }, - "uid": { - "type": "string" - }, - "updated": { + "resourceType": { "type": "string", - "format": "date-time" - }, - "userId": { - "type": "integer", - "format": "int64" - } - } - }, - "ReportBrandingOptions": { - "type": "object", - "properties": { - "emailFooterLink": { - "type": "string" - }, - "emailFooterMode": { - "type": "string" - }, - "emailFooterText": { - "type": "string" - }, - "emailLogoUrl": { - "type": "string" - }, - "reportLogoUrl": { - "type": "string" - } - } - }, - "ReportDashboard": { - "type": "object", - "properties": { - "dashboard": { - "$ref": "#/definitions/ReportDashboardID" - }, - "reportVariables": { - "type": "object" - }, - "timeRange": { - "$ref": "#/definitions/ReportTimeRange" - } - } - }, - "ReportDashboardID": { - "type": "object", - "properties": { - "id": { - "type": "integer", - "format": "int64" - }, - "name": { - "type": "string" - }, - "uid": { - "type": "string" - } - } - }, - "ReportEmail": { - "type": "object", - "properties": { - "emails": { - "description": "Comma-separated list of emails to which to send the report to.", - "type": "string" - }, - "id": { - "description": "Send the report to the emails specified in the report. Required if emails is not present.", - "type": "string", - "format": "int64" - }, - "useEmailsFromReport": { - "description": "Send the report to the emails specified in the report. Required if emails is not present.", - "type": "boolean" - } - } - }, - "ReportOptions": { - "type": "object", - "properties": { - "layout": { - "type": "string" - }, - "orientation": { - "type": "string" - }, - "pdfCombineOneFile": { - "type": "boolean" - }, - "pdfShowTemplateVariables": { - "type": "boolean" - }, - "timeRange": { - "$ref": "#/definitions/ReportTimeRange" - } - } - }, - "ReportSchedule": { - "type": "object", - "properties": { - "dayOfMonth": { - "type": "string" - }, - "endDate": { - "type": "string", - "format": "date-time" - }, - "frequency": { - "type": "string" - }, - "intervalAmount": { - "type": "integer", - "format": "int64" - }, - "intervalFrequency": { - "type": "string" - }, - "startDate": { - "type": "string", - "format": "date-time" - }, - "timeZone": { - "type": "string" - }, - "workdaysOnly": { - "type": "boolean" - } - } - }, - "ReportSettings": { - "type": "object", - "properties": { - "branding": { - "$ref": "#/definitions/ReportBrandingOptions" - }, - "embeddedImageTheme": { - "type": "string" - }, - "id": { - "type": "integer", - "format": "int64" - }, - "orgId": { - "type": "integer", - "format": "int64" - }, - "pdfTheme": { - "type": "string" - }, - "userId": { - "type": "integer", - "format": "int64" - } - } - }, - "ReportTimeRange": { - "type": "object", - "properties": { - "from": { - "type": "string" - }, - "to": { - "type": "string" + "enum": [ + "DASHBOARD", + "DATASOURCE", + "FOLDER", + "LIBRARY_ELEMENT", + "ALERT_RULE", + "ALERT_RULE_GROUP", + "CONTACT_POINT", + "NOTIFICATION_POLICY", + "NOTIFICATION_TEMPLATE", + "MUTE_TIMING", + "PLUGIN" + ] } } }, @@ -6976,35 +4140,6 @@ } } }, - "RoleAssignmentsDTO": { - "type": "object", - "properties": { - "role_uid": { - "type": "string" - }, - "service_accounts": { - "type": "array", - "items": { - "type": "integer", - "format": "int64" - } - }, - "teams": { - "type": "array", - "items": { - "type": "integer", - "format": "int64" - } - }, - "users": { - "type": "array", - "items": { - "type": "integer", - "format": "int64" - } - } - } - }, "RoleDTO": { "type": "object", "properties": { @@ -7055,32 +4190,6 @@ } } }, - "RolesSearchQuery": { - "type": "object", - "properties": { - "includeHidden": { - "type": "boolean" - }, - "orgId": { - "type": "integer", - "format": "int64" - }, - "teamIds": { - "type": "array", - "items": { - "type": "integer", - "format": "int64" - } - }, - "userIds": { - "type": "array", - "items": { - "type": "integer", - "format": "int64" - } - } - } - }, "SaveDashboardCommand": { "type": "object", "properties": { @@ -7114,32 +4223,6 @@ } } }, - "SearchDTO": { - "type": "object", - "properties": { - "action": { - "type": "string" - }, - "basicRole": { - "type": "string" - }, - "onlyRoles": { - "type": "boolean" - }, - "roleName": { - "type": "string" - }, - "scope": { - "type": "string" - }, - "teamId": { - "type": "string" - }, - "userId": { - "type": "string" - } - } - }, "SearchDeviceQueryResult": { "type": "object", "properties": { @@ -7211,50 +4294,6 @@ } } }, - "SearchResult": { - "type": "object", - "properties": { - "result": { - "type": "array", - "items": { - "$ref": "#/definitions/SearchResultItem" - } - } - } - }, - "SearchResultItem": { - "type": "object", - "properties": { - "action": { - "type": "string" - }, - "basicRole": { - "type": "string" - }, - "orgId": { - "type": "integer", - "format": "int64" - }, - "roleName": { - "type": "string" - }, - "scope": { - "type": "string" - }, - "teamId": { - "type": "integer", - "format": "int64" - }, - "userId": { - "type": "integer", - "format": "int64" - }, - "version": { - "type": "integer", - "format": "int64" - } - } - }, "SearchTeamQueryResult": { "type": "object", "properties": { @@ -7453,32 +4492,6 @@ } } }, - "SetRoleAssignmentsCommand": { - "type": "object", - "properties": { - "service_accounts": { - "type": "array", - "items": { - "type": "integer", - "format": "int64" - } - }, - "teams": { - "type": "array", - "items": { - "type": "integer", - "format": "int64" - } - }, - "users": { - "type": "array", - "items": { - "type": "integer", - "format": "int64" - } - } - } - }, "SetTeamMembershipsCommand": { "type": "object", "properties": { @@ -7496,23 +4509,6 @@ } } }, - "SetUserRolesCommand": { - "type": "object", - "properties": { - "global": { - "type": "boolean" - }, - "includeHidden": { - "type": "boolean" - }, - "roleUids": { - "type": "array", - "items": { - "type": "string" - } - } - } - }, "SettingsBag": { "type": "object", "additionalProperties": { @@ -7602,10 +4598,6 @@ "type": "string", "title": "Source type defines the status source." }, - "State": { - "description": "+enum", - "type": "string" - }, "Status": { "type": "integer", "format": "int64" @@ -7621,39 +4613,6 @@ "SupportedTransformationTypes": { "type": "string" }, - "SyncResult": { - "type": "object", - "title": "SyncResult holds the result of a sync with LDAP. This gives us information on which users were updated and how.", - "properties": { - "Elapsed": { - "$ref": "#/definitions/Duration" - }, - "FailedUsers": { - "type": "array", - "items": { - "$ref": "#/definitions/FailedUser" - } - }, - "MissingUserIds": { - "type": "array", - "items": { - "type": "integer", - "format": "int64" - } - }, - "Started": { - "type": "string", - "format": "date-time" - }, - "UpdatedUserIds": { - "type": "array", - "items": { - "type": "integer", - "format": "int64" - } - } - } - }, "TagsDTO": { "type": "object", "title": "TagsDTO is the frontend DTO for Tag.", @@ -7682,10 +4641,16 @@ "email": { "type": "string" }, + "externalUID": { + "type": "string" + }, "id": { "type": "integer", "format": "int64" }, + "isProvisioned": { + "type": "boolean" + }, "memberCount": { "type": "integer", "format": "int64" @@ -7705,58 +4670,6 @@ } } }, - "TeamGroupDTO": { - "type": "object", - "properties": { - "groupId": { - "type": "string" - }, - "orgId": { - "type": "integer", - "format": "int64" - }, - "teamId": { - "type": "integer", - "format": "int64" - } - } - }, - "TeamGroupMapping": { - "type": "object", - "properties": { - "groupId": { - "type": "string" - } - } - }, - "TeamLBACRule": { - "type": "object", - "properties": { - "rules": { - "type": "array", - "items": { - "type": "string" - } - }, - "teamId": { - "type": "string" - }, - "teamUid": { - "type": "string" - } - } - }, - "TeamLBACRules": { - "type": "object", - "properties": { - "rules": { - "type": "array", - "items": { - "$ref": "#/definitions/TeamLBACRule" - } - } - } - }, "TeamMemberDTO": { "type": "object", "properties": { @@ -7798,6 +4711,9 @@ "userId": { "type": "integer", "format": "int64" + }, + "userUID": { + "type": "string" } } }, @@ -7910,97 +4826,6 @@ } } }, - "Token": { - "type": "object", - "properties": { - "account": { - "type": "string" - }, - "anonymousRatio": { - "type": "integer", - "format": "int64" - }, - "company": { - "type": "string" - }, - "details_url": { - "type": "string" - }, - "exp": { - "type": "integer", - "format": "int64" - }, - "iat": { - "type": "integer", - "format": "int64" - }, - "included_users": { - "type": "integer", - "format": "int64" - }, - "iss": { - "type": "string" - }, - "jti": { - "type": "string" - }, - "lexp": { - "type": "integer", - "format": "int64" - }, - "lic_exp_warn_days": { - "type": "integer", - "format": "int64" - }, - "lid": { - "type": "string" - }, - "limit_by": { - "type": "string" - }, - "max_concurrent_user_sessions": { - "type": "integer", - "format": "int64" - }, - "nbf": { - "type": "integer", - "format": "int64" - }, - "prod": { - "type": "array", - "items": { - "type": "string" - } - }, - "slug": { - "type": "string" - }, - "status": { - "$ref": "#/definitions/TokenStatus" - }, - "sub": { - "type": "string" - }, - "tok_exp_warn_days": { - "type": "integer", - "format": "int64" - }, - "trial": { - "type": "boolean" - }, - "trial_exp": { - "type": "integer", - "format": "int64" - }, - "update_days": { - "type": "integer", - "format": "int64" - }, - "usage_billing": { - "type": "boolean" - } - } - }, "TokenDTO": { "type": "object", "properties": { @@ -8043,10 +4868,6 @@ } } }, - "TokenStatus": { - "type": "integer", - "format": "int64" - }, "Transformation": { "type": "object", "properties": { @@ -8074,10 +4895,6 @@ "$ref": "#/definitions/Transformation" } }, - "Type": { - "description": "+enum", - "type": "string" - }, "TypeMeta": { "description": "+k8s:deepcopy-gen=false", "type": "object", @@ -8379,6 +5196,9 @@ "language": { "type": "string" }, + "locale": { + "type": "string" + }, "navbar": { "$ref": "#/definitions/NavbarPreference" }, @@ -8417,39 +5237,6 @@ } } }, - "UpdateRoleCommand": { - "type": "object", - "properties": { - "description": { - "type": "string" - }, - "displayName": { - "type": "string" - }, - "global": { - "type": "boolean" - }, - "group": { - "type": "string" - }, - "hidden": { - "type": "boolean" - }, - "name": { - "type": "string" - }, - "permissions": { - "type": "array", - "items": { - "$ref": "#/definitions/Permission" - } - }, - "version": { - "type": "integer", - "format": "int64" - } - } - }, "UpdateServiceAccountForm": { "type": "object", "properties": { @@ -8489,17 +5276,6 @@ } } }, - "UpdateTeamLBACCommand": { - "type": "object", - "properties": { - "rules": { - "type": "array", - "items": { - "$ref": "#/definitions/TeamLBACRule" - } - } - } - }, "UpdateTeamMemberCommand": { "type": "object", "properties": { @@ -8781,21 +5557,6 @@ } } }, - "getGroupsResponse": { - "type": "object", - "properties": { - "groups": { - "type": "array", - "items": { - "$ref": "#/definitions/Group" - } - }, - "total": { - "type": "integer", - "format": "int64" - } - } - }, "healthResponse": { "type": "object", "properties": { @@ -8813,14 +5574,6 @@ } } }, - "messageResponse": { - "type": "object", - "properties": { - "message": { - "type": "string" - } - } - }, "publicError": { "description": "PublicError is derived from Error and only contains information\navailable to the end user.", "type": "object", @@ -8965,12 +5718,6 @@ } } }, - "apiResponse": { - "description": "", - "schema": { - "$ref": "#/definitions/messageResponse" - } - }, "badRequestError": { "description": "BadRequestError is returned when the request is invalid and it cannot be processed.", "schema": { @@ -9038,16 +5785,6 @@ "$ref": "#/definitions/ErrorResponseBody" } }, - "contentResponse": { - "description": "", - "schema": { - "type": "array", - "items": { - "type": "integer", - "format": "uint8" - } - } - }, "createCorrelationResponse": { "description": "", "schema": { @@ -9149,27 +5886,6 @@ "$ref": "#/definitions/PublicDashboard" } }, - "createReportResponse": { - "description": "", - "schema": { - "type": "object", - "properties": { - "id": { - "type": "integer", - "format": "int64" - }, - "message": { - "type": "string" - } - } - } - }, - "createRoleResponse": { - "description": "", - "schema": { - "$ref": "#/definitions/RoleDTO" - } - }, "createServiceAccountResponse": { "description": "", "schema": { @@ -9361,21 +6077,6 @@ } } }, - "getAccessControlStatusResponse": { - "description": "", - "schema": { - "$ref": "#/definitions/Status" - } - }, - "getAllRolesResponse": { - "description": "", - "schema": { - "type": "array", - "items": { - "$ref": "#/definitions/RoleDTO" - } - } - }, "getAnnotationByIDResponse": { "description": "", "schema": { @@ -9501,21 +6202,6 @@ } } }, - "getGroupRolesResponse": { - "description": "", - "schema": { - "type": "array", - "items": { - "$ref": "#/definitions/RoleDTO" - } - } - }, - "getGroupsResponse": { - "description": "", - "schema": { - "$ref": "#/definitions/getGroupsResponse" - } - }, "getHomeDashboardResponse": { "description": "", "schema": { @@ -9546,12 +6232,6 @@ "$ref": "#/definitions/LibraryElementSearchResponse" } }, - "getLicenseTokenResponse": { - "description": "", - "schema": { - "$ref": "#/definitions/Token" - } - }, "getOrgByIDResponse": { "description": "", "schema": { @@ -9669,27 +6349,6 @@ } } }, - "getReportResponse": { - "description": "", - "schema": { - "$ref": "#/definitions/Report" - } - }, - "getReportSettingsResponse": { - "description": "", - "schema": { - "$ref": "#/definitions/ReportSettings" - } - }, - "getReportsResponse": { - "description": "", - "schema": { - "type": "array", - "items": { - "$ref": "#/definitions/Report" - } - } - }, "getResourcePermissionsResponse": { "description": "", "schema": { @@ -9699,18 +6358,6 @@ } } }, - "getRoleAssignmentsResponse": { - "description": "", - "schema": { - "$ref": "#/definitions/RoleAssignmentsDTO" - } - }, - "getRoleResponse": { - "description": "", - "schema": { - "$ref": "#/definitions/RoleDTO" - } - }, "getSSOSettingsResponse": { "description": "", "schema": { @@ -9773,36 +6420,12 @@ "$ref": "#/definitions/GetSnapshotResponseDTO" } }, - "getStatusResponse": { - "description": "" - }, - "getSyncStatusResponse": { - "description": "", - "schema": { - "$ref": "#/definitions/ActiveSyncStatusDTO" - } - }, "getTeamByIDResponse": { "description": "", "schema": { "$ref": "#/definitions/TeamDTO" } }, - "getTeamGroupsApiResponse": { - "description": "", - "schema": { - "type": "array", - "items": { - "$ref": "#/definitions/TeamGroupDTO" - } - } - }, - "getTeamLBACRulesResponse": { - "description": "", - "schema": { - "$ref": "#/definitions/TeamLBACRules" - } - }, "getTeamMembersResponse": { "description": "", "schema": { @@ -9892,42 +6515,12 @@ } } }, - "listBuiltinRolesResponse": { - "description": "", - "schema": { - "type": "object", - "additionalProperties": { - "type": "array", - "items": { - "$ref": "#/definitions/RoleDTO" - } - } - } - }, "listPublicDashboardsResponse": { "description": "", "schema": { "$ref": "#/definitions/PublicDashboardListResponseWithPagination" } }, - "listRecordingRulesResponse": { - "description": "", - "schema": { - "type": "array", - "items": { - "$ref": "#/definitions/RecordingRuleJSON" - } - } - }, - "listRolesResponse": { - "description": "", - "schema": { - "type": "array", - "items": { - "$ref": "#/definitions/RoleDTO" - } - } - }, "listSSOSettingsResponse": { "description": "", "schema": { @@ -9972,18 +6565,6 @@ } } }, - "listTeamsRolesResponse": { - "description": "", - "schema": { - "type": "object", - "additionalProperties": { - "type": "array", - "items": { - "$ref": "#/definitions/RoleDTO" - } - } - } - }, "listTokensResponse": { "description": "", "schema": { @@ -9993,24 +6574,6 @@ } } }, - "listUsersRolesResponse": { - "description": "", - "schema": { - "type": "object", - "additionalProperties": { - "type": "array", - "items": { - "$ref": "#/definitions/RoleDTO" - } - } - } - }, - "noContentResponse": { - "description": "", - "schema": { - "type": "object" - } - }, "notAcceptableError": { "description": "NotAcceptableError is returned when the server cannot produce a response matching the accepted formats.", "schema": { @@ -10109,9 +6672,6 @@ } } }, - "postRenewLicenseTokenResponse": { - "description": "" - }, "preconditionFailedError": { "description": "PreconditionFailedError", "schema": { @@ -10136,22 +6696,10 @@ "$ref": "#/definitions/QueryDataResponse" } }, - "recordingRuleResponse": { + "resourceDependenciesResponse": { "description": "", "schema": { - "$ref": "#/definitions/RecordingRuleJSON" - } - }, - "recordingRuleWriteTargetResponse": { - "description": "", - "schema": { - "$ref": "#/definitions/PrometheusRemoteWriteTargetJSON" - } - }, - "refreshLicenseStatsResponse": { - "description": "", - "schema": { - "$ref": "#/definitions/ActiveUserStats" + "$ref": "#/definitions/ResourceDependenciesResponseDTO" } }, "resourcePermissionsDescription": { @@ -10208,12 +6756,6 @@ "$ref": "#/definitions/HitList" } }, - "searchResultResponse": { - "description": "", - "schema": { - "$ref": "#/definitions/SearchResult" - } - }, "searchTeamsResponse": { "description": "", "schema": { @@ -10235,12 +6777,6 @@ "$ref": "#/definitions/SearchUserQueryResult" } }, - "setRoleAssignmentsResponse": { - "description": "", - "schema": { - "$ref": "#/definitions/RoleAssignmentsDTO" - } - }, "snapshotListResponse": { "description": "", "schema": { @@ -10310,33 +6846,6 @@ } } }, - "updateTeamLBACRulesResponse": { - "description": "", - "schema": { - "type": "object", - "properties": { - "id": { - "type": "integer", - "format": "int64" - }, - "message": { - "type": "string" - }, - "name": { - "type": "string" - }, - "rules": { - "type": "array", - "items": { - "$ref": "#/definitions/TeamLBACRule" - } - }, - "uid": { - "type": "string" - } - } - } - }, "userResponse": { "description": "", "schema": { diff --git a/public/api-merged.json b/public/api-merged.json index b589f745464..a43d317fe11 100644 --- a/public/api-merged.json +++ b/public/api-merged.json @@ -22,698 +22,6 @@ }, "basePath": "/api", "paths": { - "/access-control/assignments/search": { - "post": { - "description": "Returns the result of the search through access-control role assignments.\n\nYou need to have a permission with action `teams.roles:read` on scope `teams:*`\nand a permission with action `users.roles:read` on scope `users:*`.", - "tags": [ - "enterprise" - ], - "summary": "Debug permissions.", - "operationId": "searchResult", - "responses": { - "200": { - "$ref": "#/responses/searchResultResponse" - }, - "400": { - "$ref": "#/responses/badRequestError" - }, - "403": { - "$ref": "#/responses/forbiddenError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - } - }, - "/access-control/roles": { - "get": { - "description": "Gets all existing roles. The response contains all global and organization local roles, for the organization which user is signed in.\n\nYou need to have a permission with action `roles:read` and scope `roles:*`.\n\nThe `delegatable` flag reduces the set of roles to only those for which the signed-in user has permissions to assign.", - "tags": [ - "access_control", - "enterprise" - ], - "summary": "Get all roles.", - "operationId": "listRoles", - "parameters": [ - { - "type": "boolean", - "name": "delegatable", - "in": "query" - }, - { - "type": "boolean", - "name": "includeHidden", - "in": "query" - } - ], - "responses": { - "200": { - "$ref": "#/responses/listRolesResponse" - }, - "403": { - "$ref": "#/responses/forbiddenError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - }, - "post": { - "description": "Creates a new custom role and maps given permissions to that role. Note that roles with the same prefix as Fixed Roles can’t be created.\n\nYou need to have a permission with action `roles:write` and scope `permissions:type:delegate`. `permissions:type:delegate` scope ensures that users can only create custom roles with the same, or a subset of permissions which the user has.\nFor example, if a user does not have required permissions for creating users, they won’t be able to create a custom role which allows to do that. This is done to prevent escalation of privileges.", - "tags": [ - "access_control", - "enterprise" - ], - "summary": "Create a new custom role.", - "operationId": "createRole", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/CreateRoleForm" - } - } - ], - "responses": { - "201": { - "$ref": "#/responses/createRoleResponse" - }, - "400": { - "$ref": "#/responses/badRequestError" - }, - "403": { - "$ref": "#/responses/forbiddenError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - } - }, - "/access-control/roles/{roleUID}": { - "get": { - "description": "Get a role for the given UID.\n\nYou need to have a permission with action `roles:read` and scope `roles:*`.", - "tags": [ - "access_control", - "enterprise" - ], - "summary": "Get a role.", - "operationId": "getRole", - "parameters": [ - { - "type": "string", - "name": "roleUID", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "$ref": "#/responses/getRoleResponse" - }, - "403": { - "$ref": "#/responses/forbiddenError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - }, - "put": { - "description": "You need to have a permission with action `roles:write` and scope `permissions:type:delegate`. `permissions:type:delegate` scope ensures that users can only create custom roles with the same, or a subset of permissions which the user has.", - "tags": [ - "access_control", - "enterprise" - ], - "summary": "Update a custom role.", - "operationId": "updateRole", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/UpdateRoleCommand" - } - }, - { - "type": "string", - "name": "roleUID", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "$ref": "#/responses/getRoleResponse" - }, - "400": { - "$ref": "#/responses/badRequestError" - }, - "403": { - "$ref": "#/responses/forbiddenError" - }, - "404": { - "$ref": "#/responses/notFoundError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - }, - "delete": { - "description": "Delete a role with the given UID, and it’s permissions. If the role is assigned to a built-in role, the deletion operation will fail, unless force query param is set to true, and in that case all assignments will also be deleted.\n\nYou need to have a permission with action `roles:delete` and scope `permissions:type:delegate`. `permissions:type:delegate` scope ensures that users can only delete a custom role with the same, or a subset of permissions which the user has. For example, if a user does not have required permissions for creating users, they won’t be able to delete a custom role which allows to do that.", - "tags": [ - "access_control", - "enterprise" - ], - "summary": "Delete a custom role.", - "operationId": "deleteRole", - "parameters": [ - { - "type": "boolean", - "name": "force", - "in": "query" - }, - { - "type": "boolean", - "name": "global", - "in": "query" - }, - { - "type": "string", - "name": "roleUID", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "$ref": "#/responses/okResponse" - }, - "400": { - "$ref": "#/responses/badRequestError" - }, - "403": { - "$ref": "#/responses/forbiddenError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - } - }, - "/access-control/roles/{roleUID}/assignments": { - "get": { - "description": "Get role assignments for the role with the given UID.\nDoes not include role assignments mapped through group attribute sync.\n\nYou need to have a permission with action `teams.roles:list` and scope `teams:id:*` and `users.roles:list` and scope `users:id:*`.", - "tags": [ - "access_control", - "enterprise" - ], - "summary": "Get role assignments.", - "operationId": "getRoleAssignments", - "parameters": [ - { - "type": "string", - "name": "roleUID", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "$ref": "#/responses/getRoleAssignmentsResponse" - }, - "403": { - "$ref": "#/responses/forbiddenError" - }, - "404": { - "$ref": "#/responses/notFoundError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - }, - "put": { - "description": "Set role assignments for the role with the given UID.\n\nYou need to have a permission with action `teams.roles:add` and `teams.roles:remove` and scope `permissions:type:delegate`, and `users.roles:add` and `users.roles:remove` and scope `permissions:type:delegate`.", - "tags": [ - "access_control", - "enterprise" - ], - "summary": "Set role assignments.", - "operationId": "setRoleAssignments", - "parameters": [ - { - "type": "string", - "name": "roleUID", - "in": "path", - "required": true - }, - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/SetRoleAssignmentsCommand" - } - } - ], - "responses": { - "200": { - "$ref": "#/responses/setRoleAssignmentsResponse" - }, - "403": { - "$ref": "#/responses/forbiddenError" - }, - "404": { - "$ref": "#/responses/notFoundError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - } - }, - "/access-control/status": { - "get": { - "description": "Returns an indicator to check if fine-grained access control is enabled or not.\n\nYou need to have a permission with action `status:accesscontrol` and scope `services:accesscontrol`.", - "tags": [ - "access_control", - "enterprise" - ], - "summary": "Get status.", - "operationId": "getAccessControlStatus", - "responses": { - "200": { - "$ref": "#/responses/getAccessControlStatusResponse" - }, - "403": { - "$ref": "#/responses/forbiddenError" - }, - "404": { - "$ref": "#/responses/notFoundError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - } - }, - "/access-control/teams/roles/search": { - "post": { - "description": "Lists the roles that have been directly assigned to the given teams.\n\nYou need to have a permission with action `teams.roles:read` and scope `teams:id:*`.", - "tags": [ - "access_control", - "enterprise" - ], - "summary": "List roles assigned to multiple teams.", - "operationId": "listTeamsRoles", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/RolesSearchQuery" - } - } - ], - "responses": { - "200": { - "$ref": "#/responses/listTeamsRolesResponse" - }, - "400": { - "$ref": "#/responses/badRequestError" - }, - "403": { - "$ref": "#/responses/forbiddenError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - } - }, - "/access-control/teams/{teamId}/roles": { - "get": { - "description": "You need to have a permission with action `teams.roles:read` and scope `teams:id:\u003cteam ID\u003e`.", - "tags": [ - "access_control", - "enterprise" - ], - "summary": "Get team roles.", - "operationId": "listTeamRoles", - "parameters": [ - { - "type": "integer", - "format": "int64", - "name": "teamId", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "$ref": "#/responses/okResponse" - }, - "400": { - "$ref": "#/responses/badRequestError" - }, - "403": { - "$ref": "#/responses/forbiddenError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - }, - "put": { - "description": "You need to have a permission with action `teams.roles:add` and `teams.roles:remove` and scope `permissions:type:delegate` for each.", - "tags": [ - "access_control", - "enterprise" - ], - "summary": "Update team role.", - "operationId": "setTeamRoles", - "parameters": [ - { - "type": "integer", - "format": "int64", - "name": "teamId", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "$ref": "#/responses/okResponse" - }, - "400": { - "$ref": "#/responses/badRequestError" - }, - "403": { - "$ref": "#/responses/forbiddenError" - }, - "404": { - "$ref": "#/responses/notFoundError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - }, - "post": { - "description": "You need to have a permission with action `teams.roles:add` and scope `permissions:type:delegate`.", - "tags": [ - "access_control", - "enterprise" - ], - "summary": "Add team role.", - "operationId": "addTeamRole", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/AddTeamRoleCommand" - } - }, - { - "type": "integer", - "format": "int64", - "name": "teamId", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "$ref": "#/responses/okResponse" - }, - "400": { - "$ref": "#/responses/badRequestError" - }, - "403": { - "$ref": "#/responses/forbiddenError" - }, - "404": { - "$ref": "#/responses/notFoundError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - } - }, - "/access-control/teams/{teamId}/roles/{roleUID}": { - "delete": { - "description": "You need to have a permission with action `teams.roles:remove` and scope `permissions:type:delegate`.", - "tags": [ - "access_control", - "enterprise" - ], - "summary": "Remove team role.", - "operationId": "removeTeamRole", - "parameters": [ - { - "type": "string", - "name": "roleUID", - "in": "path", - "required": true - }, - { - "type": "integer", - "format": "int64", - "name": "teamId", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "$ref": "#/responses/okResponse" - }, - "400": { - "$ref": "#/responses/badRequestError" - }, - "403": { - "$ref": "#/responses/forbiddenError" - }, - "404": { - "$ref": "#/responses/notFoundError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - } - }, - "/access-control/users/roles/search": { - "post": { - "description": "Lists the roles that have been directly assigned to the given users. The list does not include built-in roles (Viewer, Editor, Admin or Grafana Admin), and it does not include roles that have been inherited from a team.\n\nYou need to have a permission with action `users.roles:read` and scope `users:id:*`.", - "tags": [ - "access_control", - "enterprise" - ], - "summary": "List roles assigned to multiple users.", - "operationId": "listUsersRoles", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/RolesSearchQuery" - } - } - ], - "responses": { - "200": { - "$ref": "#/responses/listUsersRolesResponse" - }, - "400": { - "$ref": "#/responses/badRequestError" - }, - "403": { - "$ref": "#/responses/forbiddenError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - } - }, - "/access-control/users/{userId}/roles": { - "get": { - "description": "Lists the roles that have been directly assigned to a given user. The list does not include built-in roles (Viewer, Editor, Admin or Grafana Admin), and it does not include roles that have been inherited from a team.\n\nYou need to have a permission with action `users.roles:read` and scope `users:id:\u003cuser ID\u003e`.", - "tags": [ - "access_control", - "enterprise" - ], - "summary": "List roles assigned to a user.", - "operationId": "listUserRoles", - "parameters": [ - { - "type": "integer", - "format": "int64", - "name": "userId", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "$ref": "#/responses/getAllRolesResponse" - }, - "400": { - "$ref": "#/responses/badRequestError" - }, - "403": { - "$ref": "#/responses/forbiddenError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - }, - "put": { - "description": "Update the user’s role assignments to match the provided set of UIDs. This will remove any assigned roles that aren’t in the request and add roles that are in the set but are not already assigned to the user.\nRoles mapped through group attribute sync are not impacted.\nIf you want to add or remove a single role, consider using Add a user role assignment or Remove a user role assignment instead.\n\nYou need to have a permission with action `users.roles:add` and `users.roles:remove` and scope `permissions:type:delegate` for each. `permissions:type:delegate` scope ensures that users can only assign or unassign roles which have same, or a subset of permissions which the user has. For example, if a user does not have required permissions for creating users, they won’t be able to assign or unassign a role which will allow to do that. This is done to prevent escalation of privileges.", - "tags": [ - "access_control", - "enterprise" - ], - "summary": "Set user role assignments.", - "operationId": "setUserRoles", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/SetUserRolesCommand" - } - }, - { - "type": "integer", - "format": "int64", - "name": "userId", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "$ref": "#/responses/okResponse" - }, - "400": { - "$ref": "#/responses/badRequestError" - }, - "403": { - "$ref": "#/responses/forbiddenError" - }, - "404": { - "$ref": "#/responses/notFoundError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - }, - "post": { - "description": "Assign a role to a specific user. For bulk updates consider Set user role assignments.\n\nYou need to have a permission with action `users.roles:add` and scope `permissions:type:delegate`. `permissions:type:delegate` scope ensures that users can only assign roles which have same, or a subset of permissions which the user has. For example, if a user does not have required permissions for creating users, they won’t be able to assign a role which will allow to do that. This is done to prevent escalation of privileges.", - "tags": [ - "access_control", - "enterprise" - ], - "summary": "Add a user role assignment.", - "operationId": "addUserRole", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/AddUserRoleCommand" - } - }, - { - "type": "integer", - "format": "int64", - "name": "userId", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "$ref": "#/responses/okResponse" - }, - "403": { - "$ref": "#/responses/forbiddenError" - }, - "404": { - "$ref": "#/responses/notFoundError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - } - }, - "/access-control/users/{userId}/roles/{roleUID}": { - "delete": { - "description": "Revoke a role from a user. For bulk updates consider Set user role assignments.\n\nYou need to have a permission with action `users.roles:remove` and scope `permissions:type:delegate`. `permissions:type:delegate` scope ensures that users can only unassign roles which have same, or a subset of permissions which the user has. For example, if a user does not have required permissions for creating users, they won’t be able to unassign a role which will allow to do that. This is done to prevent escalation of privileges.", - "tags": [ - "access_control", - "enterprise" - ], - "summary": "Remove a user role assignment.", - "operationId": "removeUserRole", - "parameters": [ - { - "type": "boolean", - "description": "A flag indicating if the assignment is global or not. If set to false, the default org ID of the authenticated user will be used from the request to remove assignment.", - "name": "global", - "in": "query" - }, - { - "type": "string", - "name": "roleUID", - "in": "path", - "required": true - }, - { - "type": "integer", - "format": "int64", - "name": "userId", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "$ref": "#/responses/okResponse" - }, - "400": { - "$ref": "#/responses/badRequestError" - }, - "403": { - "$ref": "#/responses/forbiddenError" - }, - "404": { - "$ref": "#/responses/notFoundError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - } - }, "/access-control/{resource}/description": { "get": { "tags": [ @@ -993,31 +301,6 @@ } } }, - "/admin/ldap-sync-status": { - "get": { - "description": "You need to have a permission with action `ldap.status:read`.", - "tags": [ - "ldap_debug", - "enterprise" - ], - "summary": "Returns the current state of the LDAP background sync integration.", - "operationId": "getSyncStatus", - "responses": { - "200": { - "$ref": "#/responses/getSyncStatusResponse" - }, - "401": { - "$ref": "#/responses/unauthorisedError" - }, - "403": { - "$ref": "#/responses/forbiddenError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - } - }, "/admin/ldap/reload": { "post": { "security": [ @@ -1151,27 +434,6 @@ } } }, - "/admin/provisioning/access-control/reload": { - "post": { - "tags": [ - "access_control_provisioning", - "enterprise" - ], - "summary": "You need to have a permission with action `provisioning:reload` with scope `provisioners:accesscontrol`.", - "operationId": "adminProvisioningReloadAccessControl", - "responses": { - "202": { - "$ref": "#/responses/acceptedResponse" - }, - "401": { - "$ref": "#/responses/unauthorisedError" - }, - "403": { - "$ref": "#/responses/forbiddenError" - } - } - } - }, "/admin/provisioning/dashboards/reload": { "post": { "security": [ @@ -4485,85 +3747,6 @@ } } }, - "/datasources/uid/{uid}/lbac/teams": { - "get": { - "tags": [ - "enterprise" - ], - "summary": "Retrieves LBAC rules for a team.", - "operationId": "getTeamLBACRulesApi", - "parameters": [ - { - "type": "string", - "name": "uid", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "$ref": "#/responses/getTeamLBACRulesResponse" - }, - "400": { - "$ref": "#/responses/badRequestError" - }, - "401": { - "$ref": "#/responses/unauthorisedError" - }, - "403": { - "$ref": "#/responses/forbiddenError" - }, - "404": { - "$ref": "#/responses/notFoundError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - }, - "put": { - "tags": [ - "enterprise" - ], - "summary": "Updates LBAC rules for a team.", - "operationId": "updateTeamLBACRulesApi", - "parameters": [ - { - "type": "string", - "name": "uid", - "in": "path", - "required": true - }, - { - "name": "body", - "in": "body", - "schema": { - "$ref": "#/definitions/UpdateTeamLBACCommand" - } - } - ], - "responses": { - "200": { - "$ref": "#/responses/updateTeamLBACRulesResponse" - }, - "400": { - "$ref": "#/responses/badRequestError" - }, - "401": { - "$ref": "#/responses/unauthorisedError" - }, - "403": { - "$ref": "#/responses/forbiddenError" - }, - "404": { - "$ref": "#/responses/notFoundError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - } - }, "/datasources/uid/{uid}/resources/{datasource_proxy_route}": { "get": { "tags": [ @@ -4607,155 +3790,6 @@ } } }, - "/datasources/{dataSourceUID}/cache": { - "get": { - "description": "get cache config for a single data source", - "tags": [ - "enterprise" - ], - "operationId": "getDataSourceCacheConfig", - "parameters": [ - { - "type": "string", - "name": "dataSourceUID", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "description": "CacheConfigResponse", - "schema": { - "$ref": "#/definitions/CacheConfigResponse" - } - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - }, - "post": { - "description": "set cache config for a single data source", - "tags": [ - "enterprise" - ], - "operationId": "setDataSourceCacheConfig", - "parameters": [ - { - "type": "string", - "name": "dataSourceUID", - "in": "path", - "required": true - }, - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/CacheConfigSetter" - } - } - ], - "responses": { - "200": { - "description": "CacheConfigResponse", - "schema": { - "$ref": "#/definitions/CacheConfigResponse" - } - }, - "400": { - "$ref": "#/responses/badRequestError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - } - }, - "/datasources/{dataSourceUID}/cache/clean": { - "post": { - "description": "clean cache for a single data source", - "tags": [ - "enterprise" - ], - "operationId": "cleanDataSourceCache", - "parameters": [ - { - "type": "string", - "name": "dataSourceUID", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "description": "CacheConfigResponse", - "schema": { - "$ref": "#/definitions/CacheConfigResponse" - } - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - } - }, - "/datasources/{dataSourceUID}/cache/disable": { - "post": { - "description": "disable cache for a single data source", - "tags": [ - "enterprise" - ], - "operationId": "disableDataSourceCache", - "parameters": [ - { - "type": "string", - "name": "dataSourceUID", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "description": "CacheConfigResponse", - "schema": { - "$ref": "#/definitions/CacheConfigResponse" - } - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - } - }, - "/datasources/{dataSourceUID}/cache/enable": { - "post": { - "description": "enable cache for a single data source", - "tags": [ - "enterprise" - ], - "operationId": "enableDataSourceCache", - "parameters": [ - { - "type": "string", - "name": "dataSourceUID", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "description": "CacheConfigResponse", - "schema": { - "$ref": "#/definitions/CacheConfigResponse" - } - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - } - }, "/datasources/{id}": { "get": { "description": "If you are running Grafana Enterprise and have Fine-grained access control enabled\nyou need to have a permission with action: `datasources:read` and scopes: `datasources:*`, `datasources:id:*` and `datasources:id:1` (single data source).\n\nPlease refer to [updated API](#/datasources/getDataSourceByUID) instead", @@ -5397,188 +4431,6 @@ } } }, - "/groupsync/groups": { - "get": { - "tags": [ - "group_attribute_sync", - "enterprise" - ], - "summary": "List groups that have mappings set. This endpoint is behind the feature flag `groupAttributeSync` and is considered experimental.", - "operationId": "getMappedGroups", - "responses": { - "200": { - "$ref": "#/responses/getGroupsResponse" - }, - "400": { - "$ref": "#/responses/badRequestError" - }, - "401": { - "$ref": "#/responses/unauthorisedError" - }, - "403": { - "$ref": "#/responses/forbiddenError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - } - }, - "/groupsync/groups/{group_id}": { - "put": { - "tags": [ - "group_attribute_sync", - "enterprise" - ], - "summary": "Update mappings for a group. This endpoint is behind the feature flag `groupAttributeSync` and is considered experimental.", - "operationId": "updateGroupMappings", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/GroupAttributes" - } - }, - { - "type": "string", - "name": "group_id", - "in": "path", - "required": true - } - ], - "responses": { - "201": { - "$ref": "#/responses/apiResponse" - }, - "400": { - "$ref": "#/responses/badRequestError" - }, - "401": { - "$ref": "#/responses/unauthorisedError" - }, - "403": { - "$ref": "#/responses/forbiddenError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - }, - "post": { - "tags": [ - "group_attribute_sync", - "enterprise" - ], - "summary": "Create mappings for a group. This endpoint is behind the feature flag `groupAttributeSync` and is considered experimental.", - "operationId": "createGroupMappings", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/GroupAttributes" - } - }, - { - "type": "string", - "name": "group_id", - "in": "path", - "required": true - } - ], - "responses": { - "201": { - "$ref": "#/responses/apiResponse" - }, - "400": { - "$ref": "#/responses/badRequestError" - }, - "401": { - "$ref": "#/responses/unauthorisedError" - }, - "403": { - "$ref": "#/responses/forbiddenError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - }, - "delete": { - "tags": [ - "group_attribute_sync", - "enterprise" - ], - "summary": "Delete mappings for a group. This endpoint is behind the feature flag `groupAttributeSync` and is considered experimental.", - "operationId": "deleteGroupMappings", - "parameters": [ - { - "type": "string", - "name": "group_id", - "in": "path", - "required": true - } - ], - "responses": { - "204": { - "$ref": "#/responses/okResponse" - }, - "400": { - "$ref": "#/responses/badRequestError" - }, - "401": { - "$ref": "#/responses/unauthorisedError" - }, - "403": { - "$ref": "#/responses/forbiddenError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - } - }, - "/groupsync/groups/{group_id}/roles": { - "get": { - "tags": [ - "group_attribute_sync", - "enterprise" - ], - "summary": "Get roles mapped to a group. This endpoint is behind the feature flag `groupAttributeSync` and is considered experimental.", - "operationId": "getGroupRoles", - "parameters": [ - { - "type": "string", - "name": "group_id", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "$ref": "#/responses/getGroupRolesResponse" - }, - "400": { - "$ref": "#/responses/badRequestError" - }, - "401": { - "$ref": "#/responses/unauthorisedError" - }, - "403": { - "$ref": "#/responses/forbiddenError" - }, - "404": { - "$ref": "#/responses/notFoundError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - } - }, "/health": { "get": { "description": "apiHealthHandler will return ok if Grafana's web server is running and it\ncan access the database. If the database cannot be accessed it will return\nhttp status code 503.", @@ -5906,212 +4758,6 @@ } } }, - "/licensing/check": { - "get": { - "tags": [ - "licensing", - "enterprise" - ], - "summary": "Check license availability.", - "operationId": "getStatus", - "responses": { - "200": { - "$ref": "#/responses/getStatusResponse" - } - } - } - }, - "/licensing/custom-permissions": { - "get": { - "description": "You need to have a permission with action `licensing.reports:read`.", - "tags": [ - "licensing", - "enterprise" - ], - "summary": "Get custom permissions report.", - "operationId": "getCustomPermissionsReport", - "deprecated": true, - "responses": { - "500": { - "$ref": "#/responses/internalServerError" - } - } - } - }, - "/licensing/custom-permissions-csv": { - "get": { - "description": "You need to have a permission with action `licensing.reports:read`.", - "produces": [ - "text/csv" - ], - "tags": [ - "licensing", - "enterprise" - ], - "summary": "Get custom permissions report in CSV format.", - "operationId": "getCustomPermissionsCSV", - "deprecated": true, - "responses": { - "500": { - "$ref": "#/responses/internalServerError" - } - } - } - }, - "/licensing/refresh-stats": { - "get": { - "description": "You need to have a permission with action `licensing:read`.", - "tags": [ - "licensing", - "enterprise" - ], - "summary": "Refresh license stats.", - "operationId": "refreshLicenseStats", - "responses": { - "200": { - "$ref": "#/responses/refreshLicenseStatsResponse" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - } - }, - "/licensing/token": { - "get": { - "description": "You need to have a permission with action `licensing:read`.", - "tags": [ - "licensing", - "enterprise" - ], - "summary": "Get license token.", - "operationId": "getLicenseToken", - "responses": { - "200": { - "$ref": "#/responses/getLicenseTokenResponse" - } - } - }, - "post": { - "description": "You need to have a permission with action `licensing:update`.", - "tags": [ - "licensing", - "enterprise" - ], - "summary": "Create license token.", - "operationId": "postLicenseToken", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/DeleteTokenCommand" - } - } - ], - "responses": { - "200": { - "$ref": "#/responses/getLicenseTokenResponse" - }, - "400": { - "$ref": "#/responses/badRequestError" - } - } - }, - "delete": { - "description": "Removes the license stored in the Grafana database. Available in Grafana Enterprise v7.4+.\n\nYou need to have a permission with action `licensing:delete`.", - "tags": [ - "licensing", - "enterprise" - ], - "summary": "Remove license from database.", - "operationId": "deleteLicenseToken", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/DeleteTokenCommand" - } - } - ], - "responses": { - "202": { - "$ref": "#/responses/acceptedResponse" - }, - "400": { - "$ref": "#/responses/badRequestError" - }, - "401": { - "$ref": "#/responses/unauthorisedError" - }, - "403": { - "$ref": "#/responses/forbiddenError" - }, - "422": { - "$ref": "#/responses/unprocessableEntityError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - } - }, - "/licensing/token/renew": { - "post": { - "description": "Manually ask license issuer for a new token. Available in Grafana Enterprise v7.4+.\n\nYou need to have a permission with action `licensing:update`.", - "tags": [ - "licensing", - "enterprise" - ], - "summary": "Manually force license refresh.", - "operationId": "postRenewLicenseToken", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "type": "object" - } - } - ], - "responses": { - "200": { - "$ref": "#/responses/postRenewLicenseTokenResponse" - }, - "401": { - "$ref": "#/responses/unauthorisedError" - }, - "404": { - "$ref": "#/responses/notFoundError" - } - } - } - }, - "/logout/saml": { - "get": { - "tags": [ - "saml", - "enterprise" - ], - "summary": "GetLogout initiates single logout process.", - "operationId": "getSAMLLogout", - "responses": { - "302": { - "description": "(empty)" - }, - "404": { - "$ref": "#/responses/notFoundError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - } - }, "/org": { "get": { "tags": [ @@ -7758,841 +6404,6 @@ } } }, - "/recording-rules": { - "get": { - "tags": [ - "recording_rules", - "enterprise" - ], - "summary": "Lists all rules in the database: active or deleted.", - "operationId": "listRecordingRules", - "responses": { - "200": { - "$ref": "#/responses/listRecordingRulesResponse" - }, - "401": { - "$ref": "#/responses/unauthorisedError" - }, - "403": { - "$ref": "#/responses/forbiddenError" - }, - "404": { - "$ref": "#/responses/notFoundError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - }, - "put": { - "tags": [ - "recording_rules", - "enterprise" - ], - "summary": "Update the active status of a rule.", - "operationId": "updateRecordingRule", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/RecordingRuleJSON" - } - } - ], - "responses": { - "200": { - "$ref": "#/responses/recordingRuleResponse" - }, - "401": { - "$ref": "#/responses/unauthorisedError" - }, - "403": { - "$ref": "#/responses/forbiddenError" - }, - "404": { - "$ref": "#/responses/notFoundError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - }, - "post": { - "tags": [ - "recording_rules", - "enterprise" - ], - "summary": "Create a recording rule that is then registered and started.", - "operationId": "createRecordingRule", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/RecordingRuleJSON" - } - } - ], - "responses": { - "200": { - "$ref": "#/responses/recordingRuleResponse" - }, - "401": { - "$ref": "#/responses/unauthorisedError" - }, - "403": { - "$ref": "#/responses/forbiddenError" - }, - "404": { - "$ref": "#/responses/notFoundError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - } - }, - "/recording-rules/test": { - "post": { - "tags": [ - "recording_rules", - "enterprise" - ], - "summary": "Test a recording rule.", - "operationId": "testCreateRecordingRule", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/RecordingRuleJSON" - } - } - ], - "responses": { - "200": { - "$ref": "#/responses/okResponse" - }, - "401": { - "$ref": "#/responses/unauthorisedError" - }, - "403": { - "$ref": "#/responses/forbiddenError" - }, - "404": { - "$ref": "#/responses/notFoundError" - }, - "422": { - "$ref": "#/responses/unprocessableEntityError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - } - }, - "/recording-rules/writer": { - "get": { - "tags": [ - "recording_rules", - "enterprise" - ], - "summary": "Return the prometheus remote write target.", - "operationId": "getRecordingRuleWriteTarget", - "responses": { - "200": { - "$ref": "#/responses/recordingRuleWriteTargetResponse" - }, - "401": { - "$ref": "#/responses/unauthorisedError" - }, - "403": { - "$ref": "#/responses/forbiddenError" - }, - "404": { - "$ref": "#/responses/notFoundError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - }, - "post": { - "description": "It returns a 422 if there is not an existing prometheus data source configured.", - "tags": [ - "recording_rules", - "enterprise" - ], - "summary": "Create a remote write target.", - "operationId": "createRecordingRuleWriteTarget", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/PrometheusRemoteWriteTargetJSON" - } - } - ], - "responses": { - "200": { - "$ref": "#/responses/recordingRuleWriteTargetResponse" - }, - "401": { - "$ref": "#/responses/unauthorisedError" - }, - "403": { - "$ref": "#/responses/forbiddenError" - }, - "404": { - "$ref": "#/responses/notFoundError" - }, - "422": { - "$ref": "#/responses/unprocessableEntityError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - }, - "delete": { - "tags": [ - "recording_rules", - "enterprise" - ], - "summary": "Delete the remote write target.", - "operationId": "deleteRecordingRuleWriteTarget", - "responses": { - "200": { - "$ref": "#/responses/okResponse" - }, - "401": { - "$ref": "#/responses/unauthorisedError" - }, - "403": { - "$ref": "#/responses/forbiddenError" - }, - "404": { - "$ref": "#/responses/notFoundError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - } - }, - "/recording-rules/{recordingRuleID}": { - "delete": { - "tags": [ - "recording_rules", - "enterprise" - ], - "summary": "Delete removes the rule from the registry and stops it.", - "operationId": "deleteRecordingRule", - "parameters": [ - { - "type": "integer", - "format": "int64", - "name": "recordingRuleID", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "$ref": "#/responses/okResponse" - }, - "401": { - "$ref": "#/responses/unauthorisedError" - }, - "403": { - "$ref": "#/responses/forbiddenError" - }, - "404": { - "$ref": "#/responses/notFoundError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - } - }, - "/reports": { - "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.", - "operationId": "getReports", - "responses": { - "200": { - "$ref": "#/responses/getReportsResponse" - }, - "401": { - "$ref": "#/responses/unauthorisedError" - }, - "403": { - "$ref": "#/responses/forbiddenError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - }, - "post": { - "description": "Available to org admins only and with a valid license.\n\nYou need to have a permission with action `reports.admin:create`.", - "tags": [ - "reports", - "enterprise" - ], - "summary": "Create a report.", - "operationId": "createReport", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/CreateOrUpdateReport" - } - } - ], - "responses": { - "200": { - "$ref": "#/responses/createReportResponse" - }, - "400": { - "$ref": "#/responses/badRequestError" - }, - "401": { - "$ref": "#/responses/unauthorisedError" - }, - "403": { - "$ref": "#/responses/forbiddenError" - }, - "404": { - "$ref": "#/responses/notFoundError" - }, - "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`.", - "tags": [ - "reports", - "enterprise" - ], - "summary": "Send a report.", - "operationId": "sendReport", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/ReportEmail" - } - } - ], - "responses": { - "200": { - "$ref": "#/responses/okResponse" - }, - "400": { - "$ref": "#/responses/badRequestError" - }, - "401": { - "$ref": "#/responses/unauthorisedError" - }, - "403": { - "$ref": "#/responses/forbiddenError" - }, - "404": { - "$ref": "#/responses/notFoundError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - } - }, - "/reports/images/:image": { - "get": { - "description": "Available to org admins only and with a valid or expired license.\n\nYou need to have a permission with action `reports.settings:read`.", - "tags": [ - "reports", - "enterprise" - ], - "summary": "Get custom branding report image.", - "operationId": "getSettingsImage", - "responses": { - "200": { - "$ref": "#/responses/contentResponse" - }, - "401": { - "$ref": "#/responses/unauthorisedError" - }, - "403": { - "$ref": "#/responses/forbiddenError" - }, - "404": { - "$ref": "#/responses/notFoundError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - } - }, - "/reports/render/csvs": { - "get": { - "description": "Available to all users and with a valid license.", - "produces": [ - "application/zip" - ], - "tags": [ - "reports", - "enterprise" - ], - "summary": "Download a CSV report.", - "operationId": "renderReportCSVs", - "parameters": [ - { - "type": "string", - "name": "dashboards", - "in": "query" - }, - { - "type": "string", - "name": "title", - "in": "query" - } - ], - "responses": { - "200": { - "$ref": "#/responses/contentResponse" - }, - "204": { - "$ref": "#/responses/noContentResponse" - }, - "400": { - "$ref": "#/responses/badRequestError" - }, - "401": { - "$ref": "#/responses/unauthorisedError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - } - }, - "/reports/render/pdfs": { - "get": { - "description": "Available to all users and with a valid license.", - "produces": [ - "application/pdf" - ], - "tags": [ - "reports", - "enterprise" - ], - "summary": "Render report for multiple dashboards.", - "operationId": "renderReportPDFs", - "parameters": [ - { - "type": "string", - "name": "dashboards", - "in": "query" - }, - { - "type": "string", - "name": "orientation", - "in": "query" - }, - { - "type": "string", - "name": "layout", - "in": "query" - }, - { - "type": "string", - "name": "title", - "in": "query" - }, - { - "type": "string", - "name": "scaleFactor", - "in": "query" - }, - { - "type": "string", - "name": "includeTables", - "in": "query" - } - ], - "responses": { - "200": { - "$ref": "#/responses/contentResponse" - }, - "400": { - "$ref": "#/responses/badRequestError" - }, - "401": { - "$ref": "#/responses/unauthorisedError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - } - }, - "/reports/settings": { - "get": { - "description": "Available to org admins only and with a valid or expired license.\n\nYou need to have a permission with action `reports.settings:read`x.", - "tags": [ - "reports", - "enterprise" - ], - "summary": "Get report settings.", - "operationId": "getReportSettings", - "responses": { - "200": { - "$ref": "#/responses/getReportSettingsResponse" - }, - "401": { - "$ref": "#/responses/unauthorisedError" - }, - "403": { - "$ref": "#/responses/forbiddenError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - }, - "post": { - "description": "Available to org admins only and with a valid or expired license.\n\nYou need to have a permission with action `reports.settings:write`xx.", - "tags": [ - "reports", - "enterprise" - ], - "summary": "Save settings.", - "operationId": "saveReportSettings", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/ReportSettings" - } - } - ], - "responses": { - "200": { - "$ref": "#/responses/okResponse" - }, - "400": { - "$ref": "#/responses/badRequestError" - }, - "401": { - "$ref": "#/responses/unauthorisedError" - }, - "403": { - "$ref": "#/responses/forbiddenError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - } - }, - "/reports/test-email": { - "post": { - "description": "Available to org admins only and with a valid license.\n\nYou need to have a permission with action `reports:send`.", - "tags": [ - "reports", - "enterprise" - ], - "summary": "Send test report via email.", - "operationId": "sendTestEmail", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/CreateOrUpdateReport" - } - } - ], - "responses": { - "200": { - "$ref": "#/responses/okResponse" - }, - "400": { - "$ref": "#/responses/badRequestError" - }, - "401": { - "$ref": "#/responses/unauthorisedError" - }, - "403": { - "$ref": "#/responses/forbiddenError" - }, - "404": { - "$ref": "#/responses/notFoundError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - } - }, - "/reports/{id}": { - "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:id:\u003creport ID\u003e`.\n\nRequesting reports using the internal id will stop workgin in the future\nUse the reporting apiserver to manage reports. See: /apis/reporting.grafana.app/", - "tags": [ - "reports", - "enterprise" - ], - "summary": "Get a report.", - "operationId": "getReport", - "deprecated": true, - "parameters": [ - { - "type": "integer", - "format": "int64", - "name": "id", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "$ref": "#/responses/getReportResponse" - }, - "400": { - "$ref": "#/responses/badRequestError" - }, - "401": { - "$ref": "#/responses/unauthorisedError" - }, - "403": { - "$ref": "#/responses/forbiddenError" - }, - "404": { - "$ref": "#/responses/notFoundError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - }, - "put": { - "description": "Available to org admins only and with a valid or expired license.\n\nYou need to have a permission with action `reports.admin:write` with scope `reports:id:\u003creport ID\u003e`.\n\nRequesting reports using the internal id will stop workgin in the future\nUse the reporting apiserver to manage reports. See: /apis/reporting.grafana.app/", - "tags": [ - "reports", - "enterprise" - ], - "summary": "Update a report.", - "operationId": "updateReport", - "deprecated": true, - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/CreateOrUpdateReport" - } - }, - { - "type": "integer", - "format": "int64", - "name": "id", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "$ref": "#/responses/okResponse" - }, - "400": { - "$ref": "#/responses/badRequestError" - }, - "401": { - "$ref": "#/responses/unauthorisedError" - }, - "403": { - "$ref": "#/responses/forbiddenError" - }, - "404": { - "$ref": "#/responses/notFoundError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - }, - "delete": { - "description": "Available to org admins only and with a valid or expired license.\n\nYou need to have a permission with action `reports.delete` with scope `reports:id:\u003creport ID\u003e`.\n\nRequesting reports using the internal id will stop workgin in the future\nUse the reporting apiserver to manage reports. See: /apis/reporting.grafana.app/", - "tags": [ - "reports", - "enterprise" - ], - "summary": "Delete a report.", - "operationId": "deleteReport", - "deprecated": true, - "parameters": [ - { - "type": "integer", - "format": "int64", - "name": "id", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "$ref": "#/responses/okResponse" - }, - "400": { - "$ref": "#/responses/badRequestError" - }, - "401": { - "$ref": "#/responses/unauthorisedError" - }, - "403": { - "$ref": "#/responses/forbiddenError" - }, - "404": { - "$ref": "#/responses/notFoundError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - } - }, - "/saml/acs": { - "post": { - "tags": [ - "saml", - "enterprise" - ], - "summary": "It performs Assertion Consumer Service (ACS).", - "operationId": "postACS", - "parameters": [ - { - "type": "string", - "name": "RelayState", - "in": "query" - } - ], - "responses": { - "302": { - "description": "(empty)" - }, - "403": { - "$ref": "#/responses/forbiddenError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - } - }, - "/saml/metadata": { - "get": { - "produces": [ - "application/xml;application/samlmetadata+xml" - ], - "tags": [ - "saml", - "enterprise" - ], - "summary": "It exposes the SP (Grafana's) metadata for the IdP's consumption.", - "operationId": "getMetadata", - "responses": { - "200": { - "$ref": "#/responses/contentResponse" - } - } - } - }, - "/saml/slo": { - "get": { - "description": "There might be two possible requests:\n1. Logout response (callback) when Grafana initiates single logout and IdP returns response to logout request.\n2. Logout request when another SP initiates single logout and IdP sends logout request to the Grafana,\nor in case of IdP-initiated logout.", - "tags": [ - "saml", - "enterprise" - ], - "summary": "It performs Single Logout (SLO) callback.", - "operationId": "getSLO", - "responses": { - "302": { - "description": "(empty)" - }, - "400": { - "$ref": "#/responses/badRequestError" - }, - "403": { - "$ref": "#/responses/forbiddenError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - }, - "post": { - "description": "There might be two possible requests:\n1. Logout response (callback) when Grafana initiates single logout and IdP returns response to logout request.\n2. Logout request when another SP initiates single logout and IdP sends logout request to the Grafana,\nor in case of IdP-initiated logout.", - "tags": [ - "saml", - "enterprise" - ], - "summary": "It performs Single Logout (SLO) callback.", - "operationId": "postSLO", - "parameters": [ - { - "type": "string", - "name": "SAMLRequest", - "in": "query" - }, - { - "type": "string", - "name": "SAMLResponse", - "in": "query" - } - ], - "responses": { - "302": { - "description": "(empty)" - }, - "400": { - "$ref": "#/responses/badRequestError" - }, - "403": { - "$ref": "#/responses/forbiddenError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - } - }, "/search": { "get": { "tags": [ @@ -9391,132 +7202,6 @@ } } }, - "/teams/{teamId}/groups": { - "get": { - "tags": [ - "sync_team_groups", - "enterprise" - ], - "summary": "Get External Groups.", - "operationId": "getTeamGroupsApi", - "parameters": [ - { - "type": "integer", - "format": "int64", - "name": "teamId", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "$ref": "#/responses/getTeamGroupsApiResponse" - }, - "400": { - "$ref": "#/responses/badRequestError" - }, - "401": { - "$ref": "#/responses/unauthorisedError" - }, - "403": { - "$ref": "#/responses/forbiddenError" - }, - "404": { - "$ref": "#/responses/notFoundError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - }, - "post": { - "tags": [ - "sync_team_groups", - "enterprise" - ], - "summary": "Add External Group.", - "operationId": "addTeamGroupApi", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/TeamGroupMapping" - } - }, - { - "type": "integer", - "format": "int64", - "name": "teamId", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "$ref": "#/responses/okResponse" - }, - "400": { - "$ref": "#/responses/badRequestError" - }, - "401": { - "$ref": "#/responses/unauthorisedError" - }, - "403": { - "$ref": "#/responses/forbiddenError" - }, - "404": { - "$ref": "#/responses/notFoundError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - }, - "delete": { - "tags": [ - "sync_team_groups", - "enterprise" - ], - "summary": "Remove External Group.", - "operationId": "removeTeamGroupApiQuery", - "parameters": [ - { - "type": "string", - "name": "groupId", - "in": "query" - }, - { - "type": "integer", - "format": "int64", - "name": "teamId", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "$ref": "#/responses/okResponse" - }, - "400": { - "$ref": "#/responses/badRequestError" - }, - "401": { - "$ref": "#/responses/unauthorisedError" - }, - "403": { - "$ref": "#/responses/forbiddenError" - }, - "404": { - "$ref": "#/responses/notFoundError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - } - }, "/teams/{team_id}": { "get": { "tags": [ @@ -12051,46 +9736,6 @@ "Ack": { "type": "object" }, - "ActiveSyncStatusDTO": { - "description": "ActiveSyncStatusDTO holds the information for LDAP background Sync", - "type": "object", - "properties": { - "enabled": { - "type": "boolean" - }, - "nextSync": { - "type": "string", - "format": "date-time" - }, - "prevSync": { - "$ref": "#/definitions/SyncResult" - }, - "schedule": { - "type": "string" - } - } - }, - "ActiveUserStats": { - "type": "object", - "properties": { - "active_admins_and_editors": { - "type": "integer", - "format": "int64" - }, - "active_anonymous_devices": { - "type": "integer", - "format": "int64" - }, - "active_users": { - "type": "integer", - "format": "int64" - }, - "active_viewers": { - "type": "integer", - "format": "int64" - } - } - }, "AddAPIKeyCommand": { "type": "object", "properties": { @@ -12221,25 +9866,6 @@ } } }, - "AddTeamRoleCommand": { - "type": "object", - "properties": { - "roleUid": { - "type": "string" - } - } - }, - "AddUserRoleCommand": { - "type": "object", - "properties": { - "global": { - "type": "boolean" - }, - "roleUid": { - "type": "string" - } - } - }, "Address": { "type": "object", "properties": { @@ -13376,123 +11002,6 @@ } } }, - "CacheConfig": { - "description": "Config defines the internal representation of a cache configuration, including fields not set by the API caller", - "type": "object", - "properties": { - "created": { - "type": "string", - "format": "date-time" - }, - "dataSourceID": { - "description": "Fields that can be set by the API caller - read/write", - "type": "integer", - "format": "int64" - }, - "dataSourceUID": { - "type": "string" - }, - "defaultTTLMs": { - "description": "These are returned by the HTTP API, but are managed internally - read-only\nNote: 'created' and 'updated' are special properties managed automatically by xorm, but we are setting them manually", - "type": "integer", - "format": "int64" - }, - "enabled": { - "type": "boolean" - }, - "ttlQueriesMs": { - "description": "TTL MS, or \"time to live\", is how long a cached item will stay in the cache before it is removed (in milliseconds)", - "type": "integer", - "format": "int64" - }, - "ttlResourcesMs": { - "type": "integer", - "format": "int64" - }, - "updated": { - "type": "string", - "format": "date-time" - }, - "useDefaultTTL": { - "description": "If UseDefaultTTL is enabled, then the TTLQueriesMS and TTLResourcesMS in this object is always sent as the default TTL located in grafana.ini", - "type": "boolean" - } - } - }, - "CacheConfigResponse": { - "type": "object", - "properties": { - "created": { - "type": "string", - "format": "date-time" - }, - "dataSourceID": { - "description": "Fields that can be set by the API caller - read/write", - "type": "integer", - "format": "int64" - }, - "dataSourceUID": { - "type": "string" - }, - "defaultTTLMs": { - "description": "These are returned by the HTTP API, but are managed internally - read-only\nNote: 'created' and 'updated' are special properties managed automatically by xorm, but we are setting them manually", - "type": "integer", - "format": "int64" - }, - "enabled": { - "type": "boolean" - }, - "message": { - "type": "string" - }, - "ttlQueriesMs": { - "description": "TTL MS, or \"time to live\", is how long a cached item will stay in the cache before it is removed (in milliseconds)", - "type": "integer", - "format": "int64" - }, - "ttlResourcesMs": { - "type": "integer", - "format": "int64" - }, - "updated": { - "type": "string", - "format": "date-time" - }, - "useDefaultTTL": { - "description": "If UseDefaultTTL is enabled, then the TTLQueriesMS and TTLResourcesMS in this object is always sent as the default TTL located in grafana.ini", - "type": "boolean" - } - } - }, - "CacheConfigSetter": { - "description": "ConfigSetter defines the cache parameters that users can configure per datasource\nThis is only intended to be consumed by the SetCache HTTP Handler", - "type": "object", - "properties": { - "dataSourceID": { - "type": "integer", - "format": "int64" - }, - "dataSourceUID": { - "type": "string" - }, - "enabled": { - "type": "boolean" - }, - "ttlQueriesMs": { - "description": "TTL MS, or \"time to live\", is how long a cached item will stay in the cache before it is removed (in milliseconds)", - "type": "integer", - "format": "int64" - }, - "ttlResourcesMs": { - "type": "integer", - "format": "int64" - }, - "useDefaultTTL": { - "description": "If UseDefaultTTL is enabled, then the TTLQueriesMS and TTLResourcesMS in this object is always sent as the default TTL located in grafana.ini", - "type": "boolean" - } - } - }, "CalculateDiffTarget": { "type": "object", "properties": { @@ -14213,57 +11722,6 @@ } } }, - "CreateOrUpdateReport": { - "type": "object", - "properties": { - "dashboards": { - "type": "array", - "items": { - "$ref": "#/definitions/ReportDashboard" - } - }, - "enableCsv": { - "type": "boolean" - }, - "enableDashboardUrl": { - "type": "boolean" - }, - "formats": { - "type": "array", - "items": { - "$ref": "#/definitions/Type" - } - }, - "message": { - "type": "string" - }, - "name": { - "type": "string" - }, - "options": { - "$ref": "#/definitions/ReportOptions" - }, - "recipients": { - "type": "string" - }, - "replyTo": { - "type": "string" - }, - "scaleFactor": { - "type": "integer", - "format": "int64" - }, - "schedule": { - "$ref": "#/definitions/ReportSchedule" - }, - "state": { - "$ref": "#/definitions/State" - }, - "subject": { - "type": "string" - } - } - }, "CreateOrgCommand": { "type": "object", "properties": { @@ -14306,42 +11764,6 @@ } } }, - "CreateRoleForm": { - "type": "object", - "properties": { - "description": { - "type": "string" - }, - "displayName": { - "type": "string" - }, - "global": { - "type": "boolean" - }, - "group": { - "type": "string" - }, - "hidden": { - "type": "boolean" - }, - "name": { - "type": "string" - }, - "permissions": { - "type": "array", - "items": { - "$ref": "#/definitions/Permission" - } - }, - "uid": { - "type": "string" - }, - "version": { - "type": "integer", - "format": "int64" - } - } - }, "CreateServiceAccountForm": { "type": "object", "properties": { @@ -14945,14 +12367,6 @@ } } }, - "DeleteTokenCommand": { - "type": "object", - "properties": { - "instance": { - "type": "string" - } - } - }, "DescendantCounts": { "type": "object", "additionalProperties": { @@ -15044,15 +12458,10 @@ "DsAccess": { "type": "string" }, - "DsPermissionType": { - "description": "Datasource permission\nDescription:\n`0` - No Access\n`1` - Query\n`2` - Edit\nEnum: 0,1,2", - "type": "integer", - "format": "int64" - }, "Duration": { - "description": "A Duration represents the elapsed time between two instants\nas an int64 nanosecond count. The representation limits the\nlargest representable duration to approximately 290 years.", "type": "integer", - "format": "int64" + "format": "int64", + "title": "Duration is a type used for marshalling durations." }, "EmailConfig": { "type": "object", @@ -15336,18 +12745,6 @@ } } }, - "FailedUser": { - "description": "FailedUser holds the information of an user that failed", - "type": "object", - "properties": { - "Error": { - "type": "string" - }, - "Login": { - "type": "string" - } - } - }, "Failure": { "$ref": "#/definitions/ResponseDetails" }, @@ -16372,26 +13769,6 @@ } } }, - "Group": { - "type": "object", - "properties": { - "groupID": { - "type": "string" - }, - "mappings": {} - } - }, - "GroupAttributes": { - "type": "object", - "properties": { - "roles": { - "type": "array", - "items": { - "type": "string" - } - } - } - }, "HTTPClientConfig": { "type": "object", "title": "HTTPClientConfig configures an HTTP client.", @@ -18688,20 +16065,6 @@ } } }, - "PrometheusRemoteWriteTargetJSON": { - "type": "object", - "properties": { - "data_source_uid": { - "type": "string" - }, - "id": { - "type": "string" - }, - "remote_write_path": { - "type": "string" - } - } - }, "PrometheusRule": { "type": "object", "properties": { @@ -19511,51 +16874,6 @@ } } }, - "RecordingRuleJSON": { - "description": "RecordingRuleJSON is the external representation of a recording rule", - "type": "object", - "properties": { - "active": { - "type": "boolean" - }, - "count": { - "type": "boolean" - }, - "description": { - "type": "string" - }, - "dest_data_source_uid": { - "type": "string" - }, - "id": { - "type": "string" - }, - "interval": { - "type": "integer", - "format": "int64" - }, - "name": { - "type": "string" - }, - "prom_name": { - "type": "string" - }, - "queries": { - "type": "array", - "items": { - "type": "object", - "additionalProperties": {} - } - }, - "range": { - "type": "integer", - "format": "int64" - }, - "target_ref_id": { - "type": "string" - } - } - }, "RelativeTimeRange": { "description": "RelativeTimeRange is the per query start and end time\nfor requests.", "type": "object", @@ -19581,236 +16899,6 @@ } } }, - "Report": { - "type": "object", - "properties": { - "created": { - "type": "string", - "format": "date-time" - }, - "dashboards": { - "type": "array", - "items": { - "$ref": "#/definitions/ReportDashboard" - } - }, - "enableCsv": { - "type": "boolean" - }, - "enableDashboardUrl": { - "type": "boolean" - }, - "formats": { - "type": "array", - "items": { - "$ref": "#/definitions/Type" - } - }, - "id": { - "type": "integer", - "format": "int64" - }, - "message": { - "type": "string" - }, - "name": { - "type": "string" - }, - "options": { - "$ref": "#/definitions/ReportOptions" - }, - "orgId": { - "type": "integer", - "format": "int64" - }, - "recipients": { - "type": "string" - }, - "replyTo": { - "type": "string" - }, - "scaleFactor": { - "type": "integer", - "format": "int64" - }, - "schedule": { - "$ref": "#/definitions/ReportSchedule" - }, - "state": { - "$ref": "#/definitions/State" - }, - "subject": { - "type": "string" - }, - "uid": { - "type": "string" - }, - "updated": { - "type": "string", - "format": "date-time" - }, - "userId": { - "type": "integer", - "format": "int64" - } - } - }, - "ReportBrandingOptions": { - "type": "object", - "properties": { - "emailFooterLink": { - "type": "string" - }, - "emailFooterMode": { - "type": "string" - }, - "emailFooterText": { - "type": "string" - }, - "emailLogoUrl": { - "type": "string" - }, - "reportLogoUrl": { - "type": "string" - } - } - }, - "ReportDashboard": { - "type": "object", - "properties": { - "dashboard": { - "$ref": "#/definitions/ReportDashboardID" - }, - "reportVariables": { - "type": "object" - }, - "timeRange": { - "$ref": "#/definitions/ReportTimeRange" - } - } - }, - "ReportDashboardID": { - "type": "object", - "properties": { - "id": { - "type": "integer", - "format": "int64" - }, - "name": { - "type": "string" - }, - "uid": { - "type": "string" - } - } - }, - "ReportEmail": { - "type": "object", - "properties": { - "emails": { - "description": "Comma-separated list of emails to which to send the report to.", - "type": "string" - }, - "id": { - "description": "Send the report to the emails specified in the report. Required if emails is not present.", - "type": "string", - "format": "int64" - }, - "useEmailsFromReport": { - "description": "Send the report to the emails specified in the report. Required if emails is not present.", - "type": "boolean" - } - } - }, - "ReportOptions": { - "type": "object", - "properties": { - "layout": { - "type": "string" - }, - "orientation": { - "type": "string" - }, - "pdfCombineOneFile": { - "type": "boolean" - }, - "pdfShowTemplateVariables": { - "type": "boolean" - }, - "timeRange": { - "$ref": "#/definitions/ReportTimeRange" - } - } - }, - "ReportSchedule": { - "type": "object", - "properties": { - "dayOfMonth": { - "type": "string" - }, - "endDate": { - "type": "string", - "format": "date-time" - }, - "frequency": { - "type": "string" - }, - "intervalAmount": { - "type": "integer", - "format": "int64" - }, - "intervalFrequency": { - "type": "string" - }, - "startDate": { - "type": "string", - "format": "date-time" - }, - "timeZone": { - "type": "string" - }, - "workdaysOnly": { - "type": "boolean" - } - } - }, - "ReportSettings": { - "type": "object", - "properties": { - "branding": { - "$ref": "#/definitions/ReportBrandingOptions" - }, - "embeddedImageTheme": { - "type": "string" - }, - "id": { - "type": "integer", - "format": "int64" - }, - "orgId": { - "type": "integer", - "format": "int64" - }, - "pdfTheme": { - "type": "string" - }, - "userId": { - "type": "integer", - "format": "int64" - } - } - }, - "ReportTimeRange": { - "type": "object", - "properties": { - "from": { - "type": "string" - }, - "to": { - "type": "string" - } - } - }, "ResourceDependenciesResponseDTO": { "type": "object", "properties": { @@ -19904,35 +16992,6 @@ } } }, - "RoleAssignmentsDTO": { - "type": "object", - "properties": { - "role_uid": { - "type": "string" - }, - "service_accounts": { - "type": "array", - "items": { - "type": "integer", - "format": "int64" - } - }, - "teams": { - "type": "array", - "items": { - "type": "integer", - "format": "int64" - } - }, - "users": { - "type": "array", - "items": { - "type": "integer", - "format": "int64" - } - } - } - }, "RoleDTO": { "type": "object", "properties": { @@ -19983,32 +17042,6 @@ } } }, - "RolesSearchQuery": { - "type": "object", - "properties": { - "includeHidden": { - "type": "boolean" - }, - "orgId": { - "type": "integer", - "format": "int64" - }, - "teamIds": { - "type": "array", - "items": { - "type": "integer", - "format": "int64" - } - }, - "userIds": { - "type": "array", - "items": { - "type": "integer", - "format": "int64" - } - } - } - }, "Route": { "description": "A Route is a node that contains definitions of how to handle alerts. This is modified\nfrom the upstream alertmanager in that it adds the ObjectMatchers property.", "type": "object", @@ -20396,32 +17429,6 @@ } } }, - "SearchDTO": { - "type": "object", - "properties": { - "action": { - "type": "string" - }, - "basicRole": { - "type": "string" - }, - "onlyRoles": { - "type": "boolean" - }, - "roleName": { - "type": "string" - }, - "scope": { - "type": "string" - }, - "teamId": { - "type": "string" - }, - "userId": { - "type": "string" - } - } - }, "SearchDeviceQueryResult": { "type": "object", "properties": { @@ -20493,50 +17500,6 @@ } } }, - "SearchResult": { - "type": "object", - "properties": { - "result": { - "type": "array", - "items": { - "$ref": "#/definitions/SearchResultItem" - } - } - } - }, - "SearchResultItem": { - "type": "object", - "properties": { - "action": { - "type": "string" - }, - "basicRole": { - "type": "string" - }, - "orgId": { - "type": "integer", - "format": "int64" - }, - "roleName": { - "type": "string" - }, - "scope": { - "type": "string" - }, - "teamId": { - "type": "integer", - "format": "int64" - }, - "userId": { - "type": "integer", - "format": "int64" - }, - "version": { - "type": "integer", - "format": "int64" - } - } - }, "SearchTeamQueryResult": { "type": "object", "properties": { @@ -20743,32 +17706,6 @@ } } }, - "SetRoleAssignmentsCommand": { - "type": "object", - "properties": { - "service_accounts": { - "type": "array", - "items": { - "type": "integer", - "format": "int64" - } - }, - "teams": { - "type": "array", - "items": { - "type": "integer", - "format": "int64" - } - }, - "users": { - "type": "array", - "items": { - "type": "integer", - "format": "int64" - } - } - } - }, "SetTeamMembershipsCommand": { "type": "object", "properties": { @@ -20786,23 +17723,6 @@ } } }, - "SetUserRolesCommand": { - "type": "object", - "properties": { - "global": { - "type": "boolean" - }, - "includeHidden": { - "type": "boolean" - }, - "roleUids": { - "type": "array", - "items": { - "type": "string" - } - } - } - }, "SettingsBag": { "type": "object", "additionalProperties": { @@ -21093,10 +18013,6 @@ } } }, - "State": { - "description": "+enum", - "type": "string" - }, "Status": { "type": "integer", "format": "int64" @@ -21115,39 +18031,6 @@ "SupportedTransformationTypes": { "type": "string" }, - "SyncResult": { - "type": "object", - "title": "SyncResult holds the result of a sync with LDAP. This gives us information on which users were updated and how.", - "properties": { - "Elapsed": { - "$ref": "#/definitions/Duration" - }, - "FailedUsers": { - "type": "array", - "items": { - "$ref": "#/definitions/FailedUser" - } - }, - "MissingUserIds": { - "type": "array", - "items": { - "type": "integer", - "format": "int64" - } - }, - "Started": { - "type": "string", - "format": "date-time" - }, - "UpdatedUserIds": { - "type": "array", - "items": { - "type": "integer", - "format": "int64" - } - } - } - }, "TLSConfig": { "type": "object", "title": "TLSConfig configures the options for TLS connections.", @@ -21264,58 +18147,6 @@ } } }, - "TeamGroupDTO": { - "type": "object", - "properties": { - "groupId": { - "type": "string" - }, - "orgId": { - "type": "integer", - "format": "int64" - }, - "teamId": { - "type": "integer", - "format": "int64" - } - } - }, - "TeamGroupMapping": { - "type": "object", - "properties": { - "groupId": { - "type": "string" - } - } - }, - "TeamLBACRule": { - "type": "object", - "properties": { - "rules": { - "type": "array", - "items": { - "type": "string" - } - }, - "teamId": { - "type": "string" - }, - "teamUid": { - "type": "string" - } - } - }, - "TeamLBACRules": { - "type": "object", - "properties": { - "rules": { - "type": "array", - "items": { - "$ref": "#/definitions/TeamLBACRule" - } - } - } - }, "TeamMemberDTO": { "type": "object", "properties": { @@ -21698,97 +18529,6 @@ } } }, - "Token": { - "type": "object", - "properties": { - "account": { - "type": "string" - }, - "anonymousRatio": { - "type": "integer", - "format": "int64" - }, - "company": { - "type": "string" - }, - "details_url": { - "type": "string" - }, - "exp": { - "type": "integer", - "format": "int64" - }, - "iat": { - "type": "integer", - "format": "int64" - }, - "included_users": { - "type": "integer", - "format": "int64" - }, - "iss": { - "type": "string" - }, - "jti": { - "type": "string" - }, - "lexp": { - "type": "integer", - "format": "int64" - }, - "lic_exp_warn_days": { - "type": "integer", - "format": "int64" - }, - "lid": { - "type": "string" - }, - "limit_by": { - "type": "string" - }, - "max_concurrent_user_sessions": { - "type": "integer", - "format": "int64" - }, - "nbf": { - "type": "integer", - "format": "int64" - }, - "prod": { - "type": "array", - "items": { - "type": "string" - } - }, - "slug": { - "type": "string" - }, - "status": { - "$ref": "#/definitions/TokenStatus" - }, - "sub": { - "type": "string" - }, - "tok_exp_warn_days": { - "type": "integer", - "format": "int64" - }, - "trial": { - "type": "boolean" - }, - "trial_exp": { - "type": "integer", - "format": "int64" - }, - "update_days": { - "type": "integer", - "format": "int64" - }, - "usage_billing": { - "type": "boolean" - } - } - }, "TokenDTO": { "type": "object", "properties": { @@ -21831,10 +18571,6 @@ } } }, - "TokenStatus": { - "type": "integer", - "format": "int64" - }, "Transformation": { "type": "object", "properties": { @@ -21862,10 +18598,6 @@ "$ref": "#/definitions/Transformation" } }, - "Type": { - "description": "+enum", - "type": "string" - }, "TypeMeta": { "description": "+k8s:deepcopy-gen=false", "type": "object", @@ -22208,39 +18940,6 @@ } } }, - "UpdateRoleCommand": { - "type": "object", - "properties": { - "description": { - "type": "string" - }, - "displayName": { - "type": "string" - }, - "global": { - "type": "boolean" - }, - "group": { - "type": "string" - }, - "hidden": { - "type": "boolean" - }, - "name": { - "type": "string" - }, - "permissions": { - "type": "array", - "items": { - "$ref": "#/definitions/Permission" - } - }, - "version": { - "type": "integer", - "format": "int64" - } - } - }, "UpdateRuleGroupResponse": { "type": "object", "properties": { @@ -22306,17 +19005,6 @@ } } }, - "UpdateTeamLBACCommand": { - "type": "object", - "properties": { - "rules": { - "type": "array", - "items": { - "$ref": "#/definitions/TeamLBACRule" - } - } - } - }, "UpdateTeamMemberCommand": { "type": "object", "properties": { @@ -22901,21 +19589,6 @@ } } }, - "getGroupsResponse": { - "type": "object", - "properties": { - "groups": { - "type": "array", - "items": { - "$ref": "#/definitions/Group" - } - }, - "total": { - "type": "integer", - "format": "int64" - } - } - }, "gettableAlert": { "description": "GettableAlert gettable alert", "type": "object", @@ -23161,14 +19834,6 @@ "$ref": "#/definitions/matcher" } }, - "messageResponse": { - "type": "object", - "properties": { - "message": { - "type": "string" - } - } - }, "peerStatus": { "description": "PeerStatus peer status", "type": "object", @@ -23540,12 +20205,6 @@ } } }, - "apiResponse": { - "description": "(empty)", - "schema": { - "$ref": "#/definitions/messageResponse" - } - }, "badRequestError": { "description": "BadRequestError is returned when the request is invalid and it cannot be processed.", "schema": { @@ -23613,16 +20272,6 @@ "$ref": "#/definitions/ErrorResponseBody" } }, - "contentResponse": { - "description": "(empty)", - "schema": { - "type": "array", - "items": { - "type": "integer", - "format": "uint8" - } - } - }, "createCorrelationResponse": { "description": "(empty)", "schema": { @@ -23724,27 +20373,6 @@ "$ref": "#/definitions/PublicDashboard" } }, - "createReportResponse": { - "description": "(empty)", - "schema": { - "type": "object", - "properties": { - "id": { - "type": "integer", - "format": "int64" - }, - "message": { - "type": "string" - } - } - } - }, - "createRoleResponse": { - "description": "(empty)", - "schema": { - "$ref": "#/definitions/RoleDTO" - } - }, "createServiceAccountResponse": { "description": "(empty)", "schema": { @@ -23936,21 +20564,6 @@ } } }, - "getAccessControlStatusResponse": { - "description": "(empty)", - "schema": { - "$ref": "#/definitions/Status" - } - }, - "getAllRolesResponse": { - "description": "(empty)", - "schema": { - "type": "array", - "items": { - "$ref": "#/definitions/RoleDTO" - } - } - }, "getAnnotationByIDResponse": { "description": "(empty)", "schema": { @@ -24076,21 +20689,6 @@ } } }, - "getGroupRolesResponse": { - "description": "(empty)", - "schema": { - "type": "array", - "items": { - "$ref": "#/definitions/RoleDTO" - } - } - }, - "getGroupsResponse": { - "description": "(empty)", - "schema": { - "$ref": "#/definitions/getGroupsResponse" - } - }, "getHomeDashboardResponse": { "description": "(empty)", "schema": { @@ -24121,12 +20719,6 @@ "$ref": "#/definitions/LibraryElementSearchResponse" } }, - "getLicenseTokenResponse": { - "description": "(empty)", - "schema": { - "$ref": "#/definitions/Token" - } - }, "getOrgByIDResponse": { "description": "(empty)", "schema": { @@ -24244,27 +20836,6 @@ } } }, - "getReportResponse": { - "description": "(empty)", - "schema": { - "$ref": "#/definitions/Report" - } - }, - "getReportSettingsResponse": { - "description": "(empty)", - "schema": { - "$ref": "#/definitions/ReportSettings" - } - }, - "getReportsResponse": { - "description": "(empty)", - "schema": { - "type": "array", - "items": { - "$ref": "#/definitions/Report" - } - } - }, "getResourcePermissionsResponse": { "description": "(empty)", "schema": { @@ -24274,18 +20845,6 @@ } } }, - "getRoleAssignmentsResponse": { - "description": "(empty)", - "schema": { - "$ref": "#/definitions/RoleAssignmentsDTO" - } - }, - "getRoleResponse": { - "description": "(empty)", - "schema": { - "$ref": "#/definitions/RoleDTO" - } - }, "getSSOSettingsResponse": { "description": "(empty)", "schema": { @@ -24348,36 +20907,12 @@ "$ref": "#/definitions/GetSnapshotResponseDTO" } }, - "getStatusResponse": { - "description": "(empty)" - }, - "getSyncStatusResponse": { - "description": "(empty)", - "schema": { - "$ref": "#/definitions/ActiveSyncStatusDTO" - } - }, "getTeamByIDResponse": { "description": "(empty)", "schema": { "$ref": "#/definitions/TeamDTO" } }, - "getTeamGroupsApiResponse": { - "description": "(empty)", - "schema": { - "type": "array", - "items": { - "$ref": "#/definitions/TeamGroupDTO" - } - } - }, - "getTeamLBACRulesResponse": { - "description": "(empty)", - "schema": { - "$ref": "#/definitions/TeamLBACRules" - } - }, "getTeamMembersResponse": { "description": "(empty)", "schema": { @@ -24467,42 +21002,12 @@ } } }, - "listBuiltinRolesResponse": { - "description": "(empty)", - "schema": { - "type": "object", - "additionalProperties": { - "type": "array", - "items": { - "$ref": "#/definitions/RoleDTO" - } - } - } - }, "listPublicDashboardsResponse": { "description": "(empty)", "schema": { "$ref": "#/definitions/PublicDashboardListResponseWithPagination" } }, - "listRecordingRulesResponse": { - "description": "(empty)", - "schema": { - "type": "array", - "items": { - "$ref": "#/definitions/RecordingRuleJSON" - } - } - }, - "listRolesResponse": { - "description": "(empty)", - "schema": { - "type": "array", - "items": { - "$ref": "#/definitions/RoleDTO" - } - } - }, "listSSOSettingsResponse": { "description": "(empty)", "schema": { @@ -24547,18 +21052,6 @@ } } }, - "listTeamsRolesResponse": { - "description": "(empty)", - "schema": { - "type": "object", - "additionalProperties": { - "type": "array", - "items": { - "$ref": "#/definitions/RoleDTO" - } - } - } - }, "listTokensResponse": { "description": "(empty)", "schema": { @@ -24568,24 +21061,6 @@ } } }, - "listUsersRolesResponse": { - "description": "(empty)", - "schema": { - "type": "object", - "additionalProperties": { - "type": "array", - "items": { - "$ref": "#/definitions/RoleDTO" - } - } - } - }, - "noContentResponse": { - "description": "(empty)", - "schema": { - "type": "object" - } - }, "notAcceptableError": { "description": "NotAcceptableError is returned when the server cannot produce a response matching the accepted formats.", "schema": { @@ -24684,9 +21159,6 @@ } } }, - "postRenewLicenseTokenResponse": { - "description": "(empty)" - }, "preconditionFailedError": { "description": "PreconditionFailedError", "schema": { @@ -24720,24 +21192,6 @@ } } }, - "recordingRuleResponse": { - "description": "(empty)", - "schema": { - "$ref": "#/definitions/RecordingRuleJSON" - } - }, - "recordingRuleWriteTargetResponse": { - "description": "(empty)", - "schema": { - "$ref": "#/definitions/PrometheusRemoteWriteTargetJSON" - } - }, - "refreshLicenseStatsResponse": { - "description": "(empty)", - "schema": { - "$ref": "#/definitions/ActiveUserStats" - } - }, "resourceDependenciesResponse": { "description": "(empty)", "schema": { @@ -24798,12 +21252,6 @@ "$ref": "#/definitions/HitList" } }, - "searchResultResponse": { - "description": "(empty)", - "schema": { - "$ref": "#/definitions/SearchResult" - } - }, "searchTeamsResponse": { "description": "(empty)", "schema": { @@ -24825,12 +21273,6 @@ "$ref": "#/definitions/SearchUserQueryResult" } }, - "setRoleAssignmentsResponse": { - "description": "(empty)", - "schema": { - "$ref": "#/definitions/RoleAssignmentsDTO" - } - }, "snapshotListResponse": { "description": "(empty)", "schema": { @@ -24900,33 +21342,6 @@ } } }, - "updateTeamLBACRulesResponse": { - "description": "(empty)", - "schema": { - "type": "object", - "properties": { - "id": { - "type": "integer", - "format": "int64" - }, - "message": { - "type": "string" - }, - "name": { - "type": "string" - }, - "rules": { - "type": "array", - "items": { - "$ref": "#/definitions/TeamLBACRule" - } - }, - "uid": { - "type": "string" - } - } - } - }, "userResponse": { "description": "(empty)", "schema": { diff --git a/public/openapi3.json b/public/openapi3.json index c39e180b0bb..e56c9fa21a2 100644 --- a/public/openapi3.json +++ b/public/openapi3.json @@ -93,16 +93,6 @@ }, "description": "(empty)" }, - "apiResponse": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/messageResponse" - } - } - }, - "description": "(empty)" - }, "badRequestError": { "content": { "application/json": { @@ -210,20 +200,6 @@ }, "description": "ConflictError" }, - "contentResponse": { - "content": { - "application/json": { - "schema": { - "items": { - "format": "uint8", - "type": "integer" - }, - "type": "array" - } - } - }, - "description": "(empty)" - }, "createCorrelationResponse": { "content": { "application/json": { @@ -349,35 +325,6 @@ }, "description": "(empty)" }, - "createReportResponse": { - "content": { - "application/json": { - "schema": { - "properties": { - "id": { - "format": "int64", - "type": "integer" - }, - "message": { - "type": "string" - } - }, - "type": "object" - } - } - }, - "description": "(empty)" - }, - "createRoleResponse": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/RoleDTO" - } - } - }, - "description": "(empty)" - }, "createServiceAccountResponse": { "content": { "application/json": { @@ -641,29 +588,6 @@ }, "description": "(empty)" }, - "getAccessControlStatusResponse": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Status" - } - } - }, - "description": "(empty)" - }, - "getAllRolesResponse": { - "content": { - "application/json": { - "schema": { - "items": { - "$ref": "#/components/schemas/RoleDTO" - }, - "type": "array" - } - } - }, - "description": "(empty)" - }, "getAnnotationByIDResponse": { "content": { "application/json": { @@ -849,29 +773,6 @@ }, "description": "(empty)" }, - "getGroupRolesResponse": { - "content": { - "application/json": { - "schema": { - "items": { - "$ref": "#/components/schemas/RoleDTO" - }, - "type": "array" - } - } - }, - "description": "(empty)" - }, - "getGroupsResponse": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/getGroupsResponse" - } - } - }, - "description": "(empty)" - }, "getHomeDashboardResponse": { "content": { "application/json": { @@ -922,16 +823,6 @@ }, "description": "(empty)" }, - "getLicenseTokenResponse": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Token" - } - } - }, - "description": "(empty)" - }, "getOrgByIDResponse": { "content": { "application/json": { @@ -1113,39 +1004,6 @@ }, "description": "(empty)" }, - "getReportResponse": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Report" - } - } - }, - "description": "(empty)" - }, - "getReportSettingsResponse": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ReportSettings" - } - } - }, - "description": "(empty)" - }, - "getReportsResponse": { - "content": { - "application/json": { - "schema": { - "items": { - "$ref": "#/components/schemas/Report" - }, - "type": "array" - } - } - }, - "description": "(empty)" - }, "getResourcePermissionsResponse": { "content": { "application/json": { @@ -1159,26 +1017,6 @@ }, "description": "(empty)" }, - "getRoleAssignmentsResponse": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/RoleAssignmentsDTO" - } - } - }, - "description": "(empty)" - }, - "getRoleResponse": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/RoleDTO" - } - } - }, - "description": "(empty)" - }, "getSSOSettingsResponse": { "content": { "application/json": { @@ -1261,19 +1099,6 @@ }, "description": "(empty)" }, - "getStatusResponse": { - "description": "(empty)" - }, - "getSyncStatusResponse": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ActiveSyncStatusDTO" - } - } - }, - "description": "(empty)" - }, "getTeamByIDResponse": { "content": { "application/json": { @@ -1284,29 +1109,6 @@ }, "description": "(empty)" }, - "getTeamGroupsApiResponse": { - "content": { - "application/json": { - "schema": { - "items": { - "$ref": "#/components/schemas/TeamGroupDTO" - }, - "type": "array" - } - } - }, - "description": "(empty)" - }, - "getTeamLBACRulesResponse": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/TeamLBACRules" - } - } - }, - "description": "(empty)" - }, "getTeamMembersResponse": { "content": { "application/json": { @@ -1436,22 +1238,6 @@ }, "description": "(empty)" }, - "listBuiltinRolesResponse": { - "content": { - "application/json": { - "schema": { - "additionalProperties": { - "items": { - "$ref": "#/components/schemas/RoleDTO" - }, - "type": "array" - }, - "type": "object" - } - } - }, - "description": "(empty)" - }, "listPublicDashboardsResponse": { "content": { "application/json": { @@ -1462,32 +1248,6 @@ }, "description": "(empty)" }, - "listRecordingRulesResponse": { - "content": { - "application/json": { - "schema": { - "items": { - "$ref": "#/components/schemas/RecordingRuleJSON" - }, - "type": "array" - } - } - }, - "description": "(empty)" - }, - "listRolesResponse": { - "content": { - "application/json": { - "schema": { - "items": { - "$ref": "#/components/schemas/RoleDTO" - }, - "type": "array" - } - } - }, - "description": "(empty)" - }, "listSSOSettingsResponse": { "content": { "application/json": { @@ -1540,22 +1300,6 @@ }, "description": "(empty)" }, - "listTeamsRolesResponse": { - "content": { - "application/json": { - "schema": { - "additionalProperties": { - "items": { - "$ref": "#/components/schemas/RoleDTO" - }, - "type": "array" - }, - "type": "object" - } - } - }, - "description": "(empty)" - }, "listTokensResponse": { "content": { "application/json": { @@ -1569,32 +1313,6 @@ }, "description": "(empty)" }, - "listUsersRolesResponse": { - "content": { - "application/json": { - "schema": { - "additionalProperties": { - "items": { - "$ref": "#/components/schemas/RoleDTO" - }, - "type": "array" - }, - "type": "object" - } - } - }, - "description": "(empty)" - }, - "noContentResponse": { - "content": { - "application/json": { - "schema": { - "type": "object" - } - } - }, - "description": "(empty)" - }, "notAcceptableError": { "content": { "application/json": { @@ -1717,9 +1435,6 @@ }, "description": "(empty)" }, - "postRenewLicenseTokenResponse": { - "description": "(empty)" - }, "preconditionFailedError": { "content": { "application/json": { @@ -1773,36 +1488,6 @@ }, "description": "(empty)" }, - "recordingRuleResponse": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/RecordingRuleJSON" - } - } - }, - "description": "(empty)" - }, - "recordingRuleWriteTargetResponse": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/PrometheusRemoteWriteTargetJSON" - } - } - }, - "description": "(empty)" - }, - "refreshLicenseStatsResponse": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ActiveUserStats" - } - } - }, - "description": "(empty)" - }, "resourceDependenciesResponse": { "content": { "application/json": { @@ -1899,16 +1584,6 @@ }, "description": "(empty)" }, - "searchResultResponse": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SearchResult" - } - } - }, - "description": "(empty)" - }, "searchTeamsResponse": { "content": { "application/json": { @@ -1942,16 +1617,6 @@ }, "description": "(empty)" }, - "setRoleAssignmentsResponse": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/RoleAssignmentsDTO" - } - } - }, - "description": "(empty)" - }, "snapshotListResponse": { "content": { "application/json": { @@ -2057,37 +1722,6 @@ }, "description": "(empty)" }, - "updateTeamLBACRulesResponse": { - "content": { - "application/json": { - "schema": { - "properties": { - "id": { - "format": "int64", - "type": "integer" - }, - "message": { - "type": "string" - }, - "name": { - "type": "string" - }, - "rules": { - "items": { - "$ref": "#/components/schemas/TeamLBACRule" - }, - "type": "array" - }, - "uid": { - "type": "string" - } - }, - "type": "object" - } - } - }, - "description": "(empty)" - }, "userResponse": { "content": { "application/json": { @@ -2113,46 +1747,6 @@ "Ack": { "type": "object" }, - "ActiveSyncStatusDTO": { - "description": "ActiveSyncStatusDTO holds the information for LDAP background Sync", - "properties": { - "enabled": { - "type": "boolean" - }, - "nextSync": { - "format": "date-time", - "type": "string" - }, - "prevSync": { - "$ref": "#/components/schemas/SyncResult" - }, - "schedule": { - "type": "string" - } - }, - "type": "object" - }, - "ActiveUserStats": { - "properties": { - "active_admins_and_editors": { - "format": "int64", - "type": "integer" - }, - "active_anonymous_devices": { - "format": "int64", - "type": "integer" - }, - "active_users": { - "format": "int64", - "type": "integer" - }, - "active_viewers": { - "format": "int64", - "type": "integer" - } - }, - "type": "object" - }, "AddAPIKeyCommand": { "properties": { "name": { @@ -2283,25 +1877,6 @@ }, "type": "object" }, - "AddTeamRoleCommand": { - "properties": { - "roleUid": { - "type": "string" - } - }, - "type": "object" - }, - "AddUserRoleCommand": { - "properties": { - "global": { - "type": "boolean" - }, - "roleUid": { - "type": "string" - } - }, - "type": "object" - }, "Address": { "properties": { "address1": { @@ -3438,123 +3013,6 @@ "title": "BasicAuth contains basic HTTP authentication credentials.", "type": "object" }, - "CacheConfig": { - "description": "Config defines the internal representation of a cache configuration, including fields not set by the API caller", - "properties": { - "created": { - "format": "date-time", - "type": "string" - }, - "dataSourceID": { - "description": "Fields that can be set by the API caller - read/write", - "format": "int64", - "type": "integer" - }, - "dataSourceUID": { - "type": "string" - }, - "defaultTTLMs": { - "description": "These are returned by the HTTP API, but are managed internally - read-only\nNote: 'created' and 'updated' are special properties managed automatically by xorm, but we are setting them manually", - "format": "int64", - "type": "integer" - }, - "enabled": { - "type": "boolean" - }, - "ttlQueriesMs": { - "description": "TTL MS, or \"time to live\", is how long a cached item will stay in the cache before it is removed (in milliseconds)", - "format": "int64", - "type": "integer" - }, - "ttlResourcesMs": { - "format": "int64", - "type": "integer" - }, - "updated": { - "format": "date-time", - "type": "string" - }, - "useDefaultTTL": { - "description": "If UseDefaultTTL is enabled, then the TTLQueriesMS and TTLResourcesMS in this object is always sent as the default TTL located in grafana.ini", - "type": "boolean" - } - }, - "type": "object" - }, - "CacheConfigResponse": { - "properties": { - "created": { - "format": "date-time", - "type": "string" - }, - "dataSourceID": { - "description": "Fields that can be set by the API caller - read/write", - "format": "int64", - "type": "integer" - }, - "dataSourceUID": { - "type": "string" - }, - "defaultTTLMs": { - "description": "These are returned by the HTTP API, but are managed internally - read-only\nNote: 'created' and 'updated' are special properties managed automatically by xorm, but we are setting them manually", - "format": "int64", - "type": "integer" - }, - "enabled": { - "type": "boolean" - }, - "message": { - "type": "string" - }, - "ttlQueriesMs": { - "description": "TTL MS, or \"time to live\", is how long a cached item will stay in the cache before it is removed (in milliseconds)", - "format": "int64", - "type": "integer" - }, - "ttlResourcesMs": { - "format": "int64", - "type": "integer" - }, - "updated": { - "format": "date-time", - "type": "string" - }, - "useDefaultTTL": { - "description": "If UseDefaultTTL is enabled, then the TTLQueriesMS and TTLResourcesMS in this object is always sent as the default TTL located in grafana.ini", - "type": "boolean" - } - }, - "type": "object" - }, - "CacheConfigSetter": { - "description": "ConfigSetter defines the cache parameters that users can configure per datasource\nThis is only intended to be consumed by the SetCache HTTP Handler", - "properties": { - "dataSourceID": { - "format": "int64", - "type": "integer" - }, - "dataSourceUID": { - "type": "string" - }, - "enabled": { - "type": "boolean" - }, - "ttlQueriesMs": { - "description": "TTL MS, or \"time to live\", is how long a cached item will stay in the cache before it is removed (in milliseconds)", - "format": "int64", - "type": "integer" - }, - "ttlResourcesMs": { - "format": "int64", - "type": "integer" - }, - "useDefaultTTL": { - "description": "If UseDefaultTTL is enabled, then the TTLQueriesMS and TTLResourcesMS in this object is always sent as the default TTL located in grafana.ini", - "type": "boolean" - } - }, - "type": "object" - }, "CalculateDiffTarget": { "properties": { "dashboardId": { @@ -4275,57 +3733,6 @@ }, "type": "object" }, - "CreateOrUpdateReport": { - "properties": { - "dashboards": { - "items": { - "$ref": "#/components/schemas/ReportDashboard" - }, - "type": "array" - }, - "enableCsv": { - "type": "boolean" - }, - "enableDashboardUrl": { - "type": "boolean" - }, - "formats": { - "items": { - "$ref": "#/components/schemas/Type" - }, - "type": "array" - }, - "message": { - "type": "string" - }, - "name": { - "type": "string" - }, - "options": { - "$ref": "#/components/schemas/ReportOptions" - }, - "recipients": { - "type": "string" - }, - "replyTo": { - "type": "string" - }, - "scaleFactor": { - "format": "int64", - "type": "integer" - }, - "schedule": { - "$ref": "#/components/schemas/ReportSchedule" - }, - "state": { - "$ref": "#/components/schemas/State" - }, - "subject": { - "type": "string" - } - }, - "type": "object" - }, "CreateOrgCommand": { "properties": { "name": { @@ -4368,42 +3775,6 @@ ], "type": "object" }, - "CreateRoleForm": { - "properties": { - "description": { - "type": "string" - }, - "displayName": { - "type": "string" - }, - "global": { - "type": "boolean" - }, - "group": { - "type": "string" - }, - "hidden": { - "type": "boolean" - }, - "name": { - "type": "string" - }, - "permissions": { - "items": { - "$ref": "#/components/schemas/Permission" - }, - "type": "array" - }, - "uid": { - "type": "string" - }, - "version": { - "format": "int64", - "type": "integer" - } - }, - "type": "object" - }, "CreateServiceAccountForm": { "properties": { "isDisabled": { @@ -5007,14 +4378,6 @@ }, "type": "object" }, - "DeleteTokenCommand": { - "properties": { - "instance": { - "type": "string" - } - }, - "type": "object" - }, "DescendantCounts": { "additionalProperties": { "format": "int64", @@ -5106,14 +4469,9 @@ "DsAccess": { "type": "string" }, - "DsPermissionType": { - "description": "Datasource permission\nDescription:\n`0` - No Access\n`1` - Query\n`2` - Edit\nEnum: 0,1,2", - "format": "int64", - "type": "integer" - }, "Duration": { - "description": "A Duration represents the elapsed time between two instants\nas an int64 nanosecond count. The representation limits the\nlargest representable duration to approximately 290 years.", "format": "int64", + "title": "Duration is a type used for marshalling durations.", "type": "integer" }, "EmailConfig": { @@ -5398,18 +4756,6 @@ }, "type": "object" }, - "FailedUser": { - "description": "FailedUser holds the information of an user that failed", - "properties": { - "Error": { - "type": "string" - }, - "Login": { - "type": "string" - } - }, - "type": "object" - }, "Failure": { "$ref": "#/components/schemas/ResponseDetails" }, @@ -6434,26 +5780,6 @@ }, "type": "object" }, - "Group": { - "properties": { - "groupID": { - "type": "string" - }, - "mappings": {} - }, - "type": "object" - }, - "GroupAttributes": { - "properties": { - "roles": { - "items": { - "type": "string" - }, - "type": "array" - } - }, - "type": "object" - }, "HTTPClientConfig": { "properties": { "authorization": { @@ -8750,20 +8076,6 @@ }, "type": "object" }, - "PrometheusRemoteWriteTargetJSON": { - "properties": { - "data_source_uid": { - "type": "string" - }, - "id": { - "type": "string" - }, - "remote_write_path": { - "type": "string" - } - }, - "type": "object" - }, "PrometheusRule": { "properties": { "alert": { @@ -9573,51 +8885,6 @@ ], "type": "object" }, - "RecordingRuleJSON": { - "description": "RecordingRuleJSON is the external representation of a recording rule", - "properties": { - "active": { - "type": "boolean" - }, - "count": { - "type": "boolean" - }, - "description": { - "type": "string" - }, - "dest_data_source_uid": { - "type": "string" - }, - "id": { - "type": "string" - }, - "interval": { - "format": "int64", - "type": "integer" - }, - "name": { - "type": "string" - }, - "prom_name": { - "type": "string" - }, - "queries": { - "items": { - "additionalProperties": {}, - "type": "object" - }, - "type": "array" - }, - "range": { - "format": "int64", - "type": "integer" - }, - "target_ref_id": { - "type": "string" - } - }, - "type": "object" - }, "RelativeTimeRange": { "description": "RelativeTimeRange is the per query start and end time\nfor requests.", "properties": { @@ -9643,236 +8910,6 @@ }, "type": "object" }, - "Report": { - "properties": { - "created": { - "format": "date-time", - "type": "string" - }, - "dashboards": { - "items": { - "$ref": "#/components/schemas/ReportDashboard" - }, - "type": "array" - }, - "enableCsv": { - "type": "boolean" - }, - "enableDashboardUrl": { - "type": "boolean" - }, - "formats": { - "items": { - "$ref": "#/components/schemas/Type" - }, - "type": "array" - }, - "id": { - "format": "int64", - "type": "integer" - }, - "message": { - "type": "string" - }, - "name": { - "type": "string" - }, - "options": { - "$ref": "#/components/schemas/ReportOptions" - }, - "orgId": { - "format": "int64", - "type": "integer" - }, - "recipients": { - "type": "string" - }, - "replyTo": { - "type": "string" - }, - "scaleFactor": { - "format": "int64", - "type": "integer" - }, - "schedule": { - "$ref": "#/components/schemas/ReportSchedule" - }, - "state": { - "$ref": "#/components/schemas/State" - }, - "subject": { - "type": "string" - }, - "uid": { - "type": "string" - }, - "updated": { - "format": "date-time", - "type": "string" - }, - "userId": { - "format": "int64", - "type": "integer" - } - }, - "type": "object" - }, - "ReportBrandingOptions": { - "properties": { - "emailFooterLink": { - "type": "string" - }, - "emailFooterMode": { - "type": "string" - }, - "emailFooterText": { - "type": "string" - }, - "emailLogoUrl": { - "type": "string" - }, - "reportLogoUrl": { - "type": "string" - } - }, - "type": "object" - }, - "ReportDashboard": { - "properties": { - "dashboard": { - "$ref": "#/components/schemas/ReportDashboardID" - }, - "reportVariables": { - "type": "object" - }, - "timeRange": { - "$ref": "#/components/schemas/ReportTimeRange" - } - }, - "type": "object" - }, - "ReportDashboardID": { - "properties": { - "id": { - "format": "int64", - "type": "integer" - }, - "name": { - "type": "string" - }, - "uid": { - "type": "string" - } - }, - "type": "object" - }, - "ReportEmail": { - "properties": { - "emails": { - "description": "Comma-separated list of emails to which to send the report to.", - "type": "string" - }, - "id": { - "description": "Send the report to the emails specified in the report. Required if emails is not present.", - "format": "int64", - "type": "string" - }, - "useEmailsFromReport": { - "description": "Send the report to the emails specified in the report. Required if emails is not present.", - "type": "boolean" - } - }, - "type": "object" - }, - "ReportOptions": { - "properties": { - "layout": { - "type": "string" - }, - "orientation": { - "type": "string" - }, - "pdfCombineOneFile": { - "type": "boolean" - }, - "pdfShowTemplateVariables": { - "type": "boolean" - }, - "timeRange": { - "$ref": "#/components/schemas/ReportTimeRange" - } - }, - "type": "object" - }, - "ReportSchedule": { - "properties": { - "dayOfMonth": { - "type": "string" - }, - "endDate": { - "format": "date-time", - "type": "string" - }, - "frequency": { - "type": "string" - }, - "intervalAmount": { - "format": "int64", - "type": "integer" - }, - "intervalFrequency": { - "type": "string" - }, - "startDate": { - "format": "date-time", - "type": "string" - }, - "timeZone": { - "type": "string" - }, - "workdaysOnly": { - "type": "boolean" - } - }, - "type": "object" - }, - "ReportSettings": { - "properties": { - "branding": { - "$ref": "#/components/schemas/ReportBrandingOptions" - }, - "embeddedImageTheme": { - "type": "string" - }, - "id": { - "format": "int64", - "type": "integer" - }, - "orgId": { - "format": "int64", - "type": "integer" - }, - "pdfTheme": { - "type": "string" - }, - "userId": { - "format": "int64", - "type": "integer" - } - }, - "type": "object" - }, - "ReportTimeRange": { - "properties": { - "from": { - "type": "string" - }, - "to": { - "type": "string" - } - }, - "type": "object" - }, "ResourceDependenciesResponseDTO": { "properties": { "resourceDependencies": { @@ -9966,35 +9003,6 @@ }, "type": "object" }, - "RoleAssignmentsDTO": { - "properties": { - "role_uid": { - "type": "string" - }, - "service_accounts": { - "items": { - "format": "int64", - "type": "integer" - }, - "type": "array" - }, - "teams": { - "items": { - "format": "int64", - "type": "integer" - }, - "type": "array" - }, - "users": { - "items": { - "format": "int64", - "type": "integer" - }, - "type": "array" - } - }, - "type": "object" - }, "RoleDTO": { "properties": { "created": { @@ -10045,32 +9053,6 @@ }, "type": "object" }, - "RolesSearchQuery": { - "properties": { - "includeHidden": { - "type": "boolean" - }, - "orgId": { - "format": "int64", - "type": "integer" - }, - "teamIds": { - "items": { - "format": "int64", - "type": "integer" - }, - "type": "array" - }, - "userIds": { - "items": { - "format": "int64", - "type": "integer" - }, - "type": "array" - } - }, - "type": "object" - }, "Route": { "description": "A Route is a node that contains definitions of how to handle alerts. This is modified\nfrom the upstream alertmanager in that it adds the ObjectMatchers property.", "properties": { @@ -10458,32 +9440,6 @@ }, "type": "object" }, - "SearchDTO": { - "properties": { - "action": { - "type": "string" - }, - "basicRole": { - "type": "string" - }, - "onlyRoles": { - "type": "boolean" - }, - "roleName": { - "type": "string" - }, - "scope": { - "type": "string" - }, - "teamId": { - "type": "string" - }, - "userId": { - "type": "string" - } - }, - "type": "object" - }, "SearchDeviceQueryResult": { "properties": { "devices": { @@ -10555,50 +9511,6 @@ }, "type": "object" }, - "SearchResult": { - "properties": { - "result": { - "items": { - "$ref": "#/components/schemas/SearchResultItem" - }, - "type": "array" - } - }, - "type": "object" - }, - "SearchResultItem": { - "properties": { - "action": { - "type": "string" - }, - "basicRole": { - "type": "string" - }, - "orgId": { - "format": "int64", - "type": "integer" - }, - "roleName": { - "type": "string" - }, - "scope": { - "type": "string" - }, - "teamId": { - "format": "int64", - "type": "integer" - }, - "userId": { - "format": "int64", - "type": "integer" - }, - "version": { - "format": "int64", - "type": "integer" - } - }, - "type": "object" - }, "SearchTeamQueryResult": { "properties": { "page": { @@ -10804,32 +9716,6 @@ }, "type": "object" }, - "SetRoleAssignmentsCommand": { - "properties": { - "service_accounts": { - "items": { - "format": "int64", - "type": "integer" - }, - "type": "array" - }, - "teams": { - "items": { - "format": "int64", - "type": "integer" - }, - "type": "array" - }, - "users": { - "items": { - "format": "int64", - "type": "integer" - }, - "type": "array" - } - }, - "type": "object" - }, "SetTeamMembershipsCommand": { "properties": { "admins": { @@ -10847,23 +9733,6 @@ }, "type": "object" }, - "SetUserRolesCommand": { - "properties": { - "global": { - "type": "boolean" - }, - "includeHidden": { - "type": "boolean" - }, - "roleUids": { - "items": { - "type": "string" - }, - "type": "array" - } - }, - "type": "object" - }, "SettingsBag": { "additionalProperties": { "additionalProperties": { @@ -11154,10 +10023,6 @@ "title": "A Span defines a continuous sequence of buckets.", "type": "object" }, - "State": { - "description": "+enum", - "type": "string" - }, "Status": { "format": "int64", "type": "integer" @@ -11176,39 +10041,6 @@ "SupportedTransformationTypes": { "type": "string" }, - "SyncResult": { - "properties": { - "Elapsed": { - "$ref": "#/components/schemas/Duration" - }, - "FailedUsers": { - "items": { - "$ref": "#/components/schemas/FailedUser" - }, - "type": "array" - }, - "MissingUserIds": { - "items": { - "format": "int64", - "type": "integer" - }, - "type": "array" - }, - "Started": { - "format": "date-time", - "type": "string" - }, - "UpdatedUserIds": { - "items": { - "format": "int64", - "type": "integer" - }, - "type": "array" - } - }, - "title": "SyncResult holds the result of a sync with LDAP. This gives us information on which users were updated and how.", - "type": "object" - }, "TLSConfig": { "properties": { "ca": { @@ -11325,58 +10157,6 @@ }, "type": "object" }, - "TeamGroupDTO": { - "properties": { - "groupId": { - "type": "string" - }, - "orgId": { - "format": "int64", - "type": "integer" - }, - "teamId": { - "format": "int64", - "type": "integer" - } - }, - "type": "object" - }, - "TeamGroupMapping": { - "properties": { - "groupId": { - "type": "string" - } - }, - "type": "object" - }, - "TeamLBACRule": { - "properties": { - "rules": { - "items": { - "type": "string" - }, - "type": "array" - }, - "teamId": { - "type": "string" - }, - "teamUid": { - "type": "string" - } - }, - "type": "object" - }, - "TeamLBACRules": { - "properties": { - "rules": { - "items": { - "$ref": "#/components/schemas/TeamLBACRule" - }, - "type": "array" - } - }, - "type": "object" - }, "TeamMemberDTO": { "properties": { "auth_module": { @@ -11759,97 +10539,6 @@ }, "type": "object" }, - "Token": { - "properties": { - "account": { - "type": "string" - }, - "anonymousRatio": { - "format": "int64", - "type": "integer" - }, - "company": { - "type": "string" - }, - "details_url": { - "type": "string" - }, - "exp": { - "format": "int64", - "type": "integer" - }, - "iat": { - "format": "int64", - "type": "integer" - }, - "included_users": { - "format": "int64", - "type": "integer" - }, - "iss": { - "type": "string" - }, - "jti": { - "type": "string" - }, - "lexp": { - "format": "int64", - "type": "integer" - }, - "lic_exp_warn_days": { - "format": "int64", - "type": "integer" - }, - "lid": { - "type": "string" - }, - "limit_by": { - "type": "string" - }, - "max_concurrent_user_sessions": { - "format": "int64", - "type": "integer" - }, - "nbf": { - "format": "int64", - "type": "integer" - }, - "prod": { - "items": { - "type": "string" - }, - "type": "array" - }, - "slug": { - "type": "string" - }, - "status": { - "$ref": "#/components/schemas/TokenStatus" - }, - "sub": { - "type": "string" - }, - "tok_exp_warn_days": { - "format": "int64", - "type": "integer" - }, - "trial": { - "type": "boolean" - }, - "trial_exp": { - "format": "int64", - "type": "integer" - }, - "update_days": { - "format": "int64", - "type": "integer" - }, - "usage_billing": { - "type": "boolean" - } - }, - "type": "object" - }, "TokenDTO": { "properties": { "created": { @@ -11892,10 +10581,6 @@ }, "type": "object" }, - "TokenStatus": { - "format": "int64", - "type": "integer" - }, "Transformation": { "properties": { "expression": { @@ -11923,10 +10608,6 @@ }, "type": "array" }, - "Type": { - "description": "+enum", - "type": "string" - }, "TypeMeta": { "description": "+k8s:deepcopy-gen=false", "properties": { @@ -12269,39 +10950,6 @@ }, "type": "object" }, - "UpdateRoleCommand": { - "properties": { - "description": { - "type": "string" - }, - "displayName": { - "type": "string" - }, - "global": { - "type": "boolean" - }, - "group": { - "type": "string" - }, - "hidden": { - "type": "boolean" - }, - "name": { - "type": "string" - }, - "permissions": { - "items": { - "$ref": "#/components/schemas/Permission" - }, - "type": "array" - }, - "version": { - "format": "int64", - "type": "integer" - } - }, - "type": "object" - }, "UpdateRuleGroupResponse": { "properties": { "created": { @@ -12367,17 +11015,6 @@ }, "type": "object" }, - "UpdateTeamLBACCommand": { - "properties": { - "rules": { - "items": { - "$ref": "#/components/schemas/TeamLBACRule" - }, - "type": "array" - } - }, - "type": "object" - }, "UpdateTeamMemberCommand": { "properties": { "permission": { @@ -12961,21 +11598,6 @@ }, "type": "object" }, - "getGroupsResponse": { - "properties": { - "groups": { - "items": { - "$ref": "#/components/schemas/Group" - }, - "type": "array" - }, - "total": { - "format": "int64", - "type": "integer" - } - }, - "type": "object" - }, "gettableAlert": { "description": "GettableAlert gettable alert", "properties": { @@ -13219,14 +11841,6 @@ }, "type": "array" }, - "messageResponse": { - "properties": { - "message": { - "type": "string" - } - }, - "type": "object" - }, "peerStatus": { "description": "PeerStatus peer status", "properties": { @@ -13561,756 +12175,6 @@ }, "openapi": "3.0.3", "paths": { - "/access-control/assignments/search": { - "post": { - "description": "Returns the result of the search through access-control role assignments.\n\nYou need to have a permission with action `teams.roles:read` on scope `teams:*`\nand a permission with action `users.roles:read` on scope `users:*`.", - "operationId": "searchResult", - "responses": { - "200": { - "$ref": "#/components/responses/searchResultResponse" - }, - "400": { - "$ref": "#/components/responses/badRequestError" - }, - "403": { - "$ref": "#/components/responses/forbiddenError" - }, - "500": { - "$ref": "#/components/responses/internalServerError" - } - }, - "summary": "Debug permissions.", - "tags": [ - "enterprise" - ] - } - }, - "/access-control/roles": { - "get": { - "description": "Gets all existing roles. The response contains all global and organization local roles, for the organization which user is signed in.\n\nYou need to have a permission with action `roles:read` and scope `roles:*`.\n\nThe `delegatable` flag reduces the set of roles to only those for which the signed-in user has permissions to assign.", - "operationId": "listRoles", - "parameters": [ - { - "in": "query", - "name": "delegatable", - "schema": { - "type": "boolean" - } - }, - { - "in": "query", - "name": "includeHidden", - "schema": { - "type": "boolean" - } - } - ], - "responses": { - "200": { - "$ref": "#/components/responses/listRolesResponse" - }, - "403": { - "$ref": "#/components/responses/forbiddenError" - }, - "500": { - "$ref": "#/components/responses/internalServerError" - } - }, - "summary": "Get all roles.", - "tags": [ - "access_control", - "enterprise" - ] - }, - "post": { - "description": "Creates a new custom role and maps given permissions to that role. Note that roles with the same prefix as Fixed Roles can’t be created.\n\nYou need to have a permission with action `roles:write` and scope `permissions:type:delegate`. `permissions:type:delegate` scope ensures that users can only create custom roles with the same, or a subset of permissions which the user has.\nFor example, if a user does not have required permissions for creating users, they won’t be able to create a custom role which allows to do that. This is done to prevent escalation of privileges.", - "operationId": "createRole", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CreateRoleForm" - } - } - }, - "required": true, - "x-originalParamName": "body" - }, - "responses": { - "201": { - "$ref": "#/components/responses/createRoleResponse" - }, - "400": { - "$ref": "#/components/responses/badRequestError" - }, - "403": { - "$ref": "#/components/responses/forbiddenError" - }, - "500": { - "$ref": "#/components/responses/internalServerError" - } - }, - "summary": "Create a new custom role.", - "tags": [ - "access_control", - "enterprise" - ] - } - }, - "/access-control/roles/{roleUID}": { - "delete": { - "description": "Delete a role with the given UID, and it’s permissions. If the role is assigned to a built-in role, the deletion operation will fail, unless force query param is set to true, and in that case all assignments will also be deleted.\n\nYou need to have a permission with action `roles:delete` and scope `permissions:type:delegate`. `permissions:type:delegate` scope ensures that users can only delete a custom role with the same, or a subset of permissions which the user has. For example, if a user does not have required permissions for creating users, they won’t be able to delete a custom role which allows to do that.", - "operationId": "deleteRole", - "parameters": [ - { - "in": "query", - "name": "force", - "schema": { - "type": "boolean" - } - }, - { - "in": "query", - "name": "global", - "schema": { - "type": "boolean" - } - }, - { - "in": "path", - "name": "roleUID", - "required": true, - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "$ref": "#/components/responses/okResponse" - }, - "400": { - "$ref": "#/components/responses/badRequestError" - }, - "403": { - "$ref": "#/components/responses/forbiddenError" - }, - "500": { - "$ref": "#/components/responses/internalServerError" - } - }, - "summary": "Delete a custom role.", - "tags": [ - "access_control", - "enterprise" - ] - }, - "get": { - "description": "Get a role for the given UID.\n\nYou need to have a permission with action `roles:read` and scope `roles:*`.", - "operationId": "getRole", - "parameters": [ - { - "in": "path", - "name": "roleUID", - "required": true, - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "$ref": "#/components/responses/getRoleResponse" - }, - "403": { - "$ref": "#/components/responses/forbiddenError" - }, - "500": { - "$ref": "#/components/responses/internalServerError" - } - }, - "summary": "Get a role.", - "tags": [ - "access_control", - "enterprise" - ] - }, - "put": { - "description": "You need to have a permission with action `roles:write` and scope `permissions:type:delegate`. `permissions:type:delegate` scope ensures that users can only create custom roles with the same, or a subset of permissions which the user has.", - "operationId": "updateRole", - "parameters": [ - { - "in": "path", - "name": "roleUID", - "required": true, - "schema": { - "type": "string" - } - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/UpdateRoleCommand" - } - } - }, - "required": true, - "x-originalParamName": "body" - }, - "responses": { - "200": { - "$ref": "#/components/responses/getRoleResponse" - }, - "400": { - "$ref": "#/components/responses/badRequestError" - }, - "403": { - "$ref": "#/components/responses/forbiddenError" - }, - "404": { - "$ref": "#/components/responses/notFoundError" - }, - "500": { - "$ref": "#/components/responses/internalServerError" - } - }, - "summary": "Update a custom role.", - "tags": [ - "access_control", - "enterprise" - ] - } - }, - "/access-control/roles/{roleUID}/assignments": { - "get": { - "description": "Get role assignments for the role with the given UID.\nDoes not include role assignments mapped through group attribute sync.\n\nYou need to have a permission with action `teams.roles:list` and scope `teams:id:*` and `users.roles:list` and scope `users:id:*`.", - "operationId": "getRoleAssignments", - "parameters": [ - { - "in": "path", - "name": "roleUID", - "required": true, - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "$ref": "#/components/responses/getRoleAssignmentsResponse" - }, - "403": { - "$ref": "#/components/responses/forbiddenError" - }, - "404": { - "$ref": "#/components/responses/notFoundError" - }, - "500": { - "$ref": "#/components/responses/internalServerError" - } - }, - "summary": "Get role assignments.", - "tags": [ - "access_control", - "enterprise" - ] - }, - "put": { - "description": "Set role assignments for the role with the given UID.\n\nYou need to have a permission with action `teams.roles:add` and `teams.roles:remove` and scope `permissions:type:delegate`, and `users.roles:add` and `users.roles:remove` and scope `permissions:type:delegate`.", - "operationId": "setRoleAssignments", - "parameters": [ - { - "in": "path", - "name": "roleUID", - "required": true, - "schema": { - "type": "string" - } - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SetRoleAssignmentsCommand" - } - } - }, - "required": true, - "x-originalParamName": "body" - }, - "responses": { - "200": { - "$ref": "#/components/responses/setRoleAssignmentsResponse" - }, - "403": { - "$ref": "#/components/responses/forbiddenError" - }, - "404": { - "$ref": "#/components/responses/notFoundError" - }, - "500": { - "$ref": "#/components/responses/internalServerError" - } - }, - "summary": "Set role assignments.", - "tags": [ - "access_control", - "enterprise" - ] - } - }, - "/access-control/status": { - "get": { - "description": "Returns an indicator to check if fine-grained access control is enabled or not.\n\nYou need to have a permission with action `status:accesscontrol` and scope `services:accesscontrol`.", - "operationId": "getAccessControlStatus", - "responses": { - "200": { - "$ref": "#/components/responses/getAccessControlStatusResponse" - }, - "403": { - "$ref": "#/components/responses/forbiddenError" - }, - "404": { - "$ref": "#/components/responses/notFoundError" - }, - "500": { - "$ref": "#/components/responses/internalServerError" - } - }, - "summary": "Get status.", - "tags": [ - "access_control", - "enterprise" - ] - } - }, - "/access-control/teams/roles/search": { - "post": { - "description": "Lists the roles that have been directly assigned to the given teams.\n\nYou need to have a permission with action `teams.roles:read` and scope `teams:id:*`.", - "operationId": "listTeamsRoles", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/RolesSearchQuery" - } - } - }, - "required": true, - "x-originalParamName": "body" - }, - "responses": { - "200": { - "$ref": "#/components/responses/listTeamsRolesResponse" - }, - "400": { - "$ref": "#/components/responses/badRequestError" - }, - "403": { - "$ref": "#/components/responses/forbiddenError" - }, - "500": { - "$ref": "#/components/responses/internalServerError" - } - }, - "summary": "List roles assigned to multiple teams.", - "tags": [ - "access_control", - "enterprise" - ] - } - }, - "/access-control/teams/{teamId}/roles": { - "get": { - "description": "You need to have a permission with action `teams.roles:read` and scope `teams:id:\u003cteam ID\u003e`.", - "operationId": "listTeamRoles", - "parameters": [ - { - "in": "path", - "name": "teamId", - "required": true, - "schema": { - "format": "int64", - "type": "integer" - } - } - ], - "responses": { - "200": { - "$ref": "#/components/responses/okResponse" - }, - "400": { - "$ref": "#/components/responses/badRequestError" - }, - "403": { - "$ref": "#/components/responses/forbiddenError" - }, - "500": { - "$ref": "#/components/responses/internalServerError" - } - }, - "summary": "Get team roles.", - "tags": [ - "access_control", - "enterprise" - ] - }, - "post": { - "description": "You need to have a permission with action `teams.roles:add` and scope `permissions:type:delegate`.", - "operationId": "addTeamRole", - "parameters": [ - { - "in": "path", - "name": "teamId", - "required": true, - "schema": { - "format": "int64", - "type": "integer" - } - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/AddTeamRoleCommand" - } - } - }, - "required": true, - "x-originalParamName": "body" - }, - "responses": { - "200": { - "$ref": "#/components/responses/okResponse" - }, - "400": { - "$ref": "#/components/responses/badRequestError" - }, - "403": { - "$ref": "#/components/responses/forbiddenError" - }, - "404": { - "$ref": "#/components/responses/notFoundError" - }, - "500": { - "$ref": "#/components/responses/internalServerError" - } - }, - "summary": "Add team role.", - "tags": [ - "access_control", - "enterprise" - ] - }, - "put": { - "description": "You need to have a permission with action `teams.roles:add` and `teams.roles:remove` and scope `permissions:type:delegate` for each.", - "operationId": "setTeamRoles", - "parameters": [ - { - "in": "path", - "name": "teamId", - "required": true, - "schema": { - "format": "int64", - "type": "integer" - } - } - ], - "responses": { - "200": { - "$ref": "#/components/responses/okResponse" - }, - "400": { - "$ref": "#/components/responses/badRequestError" - }, - "403": { - "$ref": "#/components/responses/forbiddenError" - }, - "404": { - "$ref": "#/components/responses/notFoundError" - }, - "500": { - "$ref": "#/components/responses/internalServerError" - } - }, - "summary": "Update team role.", - "tags": [ - "access_control", - "enterprise" - ] - } - }, - "/access-control/teams/{teamId}/roles/{roleUID}": { - "delete": { - "description": "You need to have a permission with action `teams.roles:remove` and scope `permissions:type:delegate`.", - "operationId": "removeTeamRole", - "parameters": [ - { - "in": "path", - "name": "roleUID", - "required": true, - "schema": { - "type": "string" - } - }, - { - "in": "path", - "name": "teamId", - "required": true, - "schema": { - "format": "int64", - "type": "integer" - } - } - ], - "responses": { - "200": { - "$ref": "#/components/responses/okResponse" - }, - "400": { - "$ref": "#/components/responses/badRequestError" - }, - "403": { - "$ref": "#/components/responses/forbiddenError" - }, - "404": { - "$ref": "#/components/responses/notFoundError" - }, - "500": { - "$ref": "#/components/responses/internalServerError" - } - }, - "summary": "Remove team role.", - "tags": [ - "access_control", - "enterprise" - ] - } - }, - "/access-control/users/roles/search": { - "post": { - "description": "Lists the roles that have been directly assigned to the given users. The list does not include built-in roles (Viewer, Editor, Admin or Grafana Admin), and it does not include roles that have been inherited from a team.\n\nYou need to have a permission with action `users.roles:read` and scope `users:id:*`.", - "operationId": "listUsersRoles", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/RolesSearchQuery" - } - } - }, - "required": true, - "x-originalParamName": "body" - }, - "responses": { - "200": { - "$ref": "#/components/responses/listUsersRolesResponse" - }, - "400": { - "$ref": "#/components/responses/badRequestError" - }, - "403": { - "$ref": "#/components/responses/forbiddenError" - }, - "500": { - "$ref": "#/components/responses/internalServerError" - } - }, - "summary": "List roles assigned to multiple users.", - "tags": [ - "access_control", - "enterprise" - ] - } - }, - "/access-control/users/{userId}/roles": { - "get": { - "description": "Lists the roles that have been directly assigned to a given user. The list does not include built-in roles (Viewer, Editor, Admin or Grafana Admin), and it does not include roles that have been inherited from a team.\n\nYou need to have a permission with action `users.roles:read` and scope `users:id:\u003cuser ID\u003e`.", - "operationId": "listUserRoles", - "parameters": [ - { - "in": "path", - "name": "userId", - "required": true, - "schema": { - "format": "int64", - "type": "integer" - } - } - ], - "responses": { - "200": { - "$ref": "#/components/responses/getAllRolesResponse" - }, - "400": { - "$ref": "#/components/responses/badRequestError" - }, - "403": { - "$ref": "#/components/responses/forbiddenError" - }, - "500": { - "$ref": "#/components/responses/internalServerError" - } - }, - "summary": "List roles assigned to a user.", - "tags": [ - "access_control", - "enterprise" - ] - }, - "post": { - "description": "Assign a role to a specific user. For bulk updates consider Set user role assignments.\n\nYou need to have a permission with action `users.roles:add` and scope `permissions:type:delegate`. `permissions:type:delegate` scope ensures that users can only assign roles which have same, or a subset of permissions which the user has. For example, if a user does not have required permissions for creating users, they won’t be able to assign a role which will allow to do that. This is done to prevent escalation of privileges.", - "operationId": "addUserRole", - "parameters": [ - { - "in": "path", - "name": "userId", - "required": true, - "schema": { - "format": "int64", - "type": "integer" - } - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/AddUserRoleCommand" - } - } - }, - "required": true, - "x-originalParamName": "body" - }, - "responses": { - "200": { - "$ref": "#/components/responses/okResponse" - }, - "403": { - "$ref": "#/components/responses/forbiddenError" - }, - "404": { - "$ref": "#/components/responses/notFoundError" - }, - "500": { - "$ref": "#/components/responses/internalServerError" - } - }, - "summary": "Add a user role assignment.", - "tags": [ - "access_control", - "enterprise" - ] - }, - "put": { - "description": "Update the user’s role assignments to match the provided set of UIDs. This will remove any assigned roles that aren’t in the request and add roles that are in the set but are not already assigned to the user.\nRoles mapped through group attribute sync are not impacted.\nIf you want to add or remove a single role, consider using Add a user role assignment or Remove a user role assignment instead.\n\nYou need to have a permission with action `users.roles:add` and `users.roles:remove` and scope `permissions:type:delegate` for each. `permissions:type:delegate` scope ensures that users can only assign or unassign roles which have same, or a subset of permissions which the user has. For example, if a user does not have required permissions for creating users, they won’t be able to assign or unassign a role which will allow to do that. This is done to prevent escalation of privileges.", - "operationId": "setUserRoles", - "parameters": [ - { - "in": "path", - "name": "userId", - "required": true, - "schema": { - "format": "int64", - "type": "integer" - } - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SetUserRolesCommand" - } - } - }, - "required": true, - "x-originalParamName": "body" - }, - "responses": { - "200": { - "$ref": "#/components/responses/okResponse" - }, - "400": { - "$ref": "#/components/responses/badRequestError" - }, - "403": { - "$ref": "#/components/responses/forbiddenError" - }, - "404": { - "$ref": "#/components/responses/notFoundError" - }, - "500": { - "$ref": "#/components/responses/internalServerError" - } - }, - "summary": "Set user role assignments.", - "tags": [ - "access_control", - "enterprise" - ] - } - }, - "/access-control/users/{userId}/roles/{roleUID}": { - "delete": { - "description": "Revoke a role from a user. For bulk updates consider Set user role assignments.\n\nYou need to have a permission with action `users.roles:remove` and scope `permissions:type:delegate`. `permissions:type:delegate` scope ensures that users can only unassign roles which have same, or a subset of permissions which the user has. For example, if a user does not have required permissions for creating users, they won’t be able to unassign a role which will allow to do that. This is done to prevent escalation of privileges.", - "operationId": "removeUserRole", - "parameters": [ - { - "description": "A flag indicating if the assignment is global or not. If set to false, the default org ID of the authenticated user will be used from the request to remove assignment.", - "in": "query", - "name": "global", - "schema": { - "type": "boolean" - } - }, - { - "in": "path", - "name": "roleUID", - "required": true, - "schema": { - "type": "string" - } - }, - { - "in": "path", - "name": "userId", - "required": true, - "schema": { - "format": "int64", - "type": "integer" - } - } - ], - "responses": { - "200": { - "$ref": "#/components/responses/okResponse" - }, - "400": { - "$ref": "#/components/responses/badRequestError" - }, - "403": { - "$ref": "#/components/responses/forbiddenError" - }, - "404": { - "$ref": "#/components/responses/notFoundError" - }, - "500": { - "$ref": "#/components/responses/internalServerError" - } - }, - "summary": "Remove a user role assignment.", - "tags": [ - "access_control", - "enterprise" - ] - } - }, "/access-control/{resource}/description": { "get": { "operationId": "getResourceDescription", @@ -14630,31 +12494,6 @@ ] } }, - "/admin/ldap-sync-status": { - "get": { - "description": "You need to have a permission with action `ldap.status:read`.", - "operationId": "getSyncStatus", - "responses": { - "200": { - "$ref": "#/components/responses/getSyncStatusResponse" - }, - "401": { - "$ref": "#/components/responses/unauthorisedError" - }, - "403": { - "$ref": "#/components/responses/forbiddenError" - }, - "500": { - "$ref": "#/components/responses/internalServerError" - } - }, - "summary": "Returns the current state of the LDAP background sync integration.", - "tags": [ - "ldap_debug", - "enterprise" - ] - } - }, "/admin/ldap/reload": { "post": { "description": "If you are running Grafana Enterprise and have Fine-grained access control enabled, you need to have a permission with action `ldap.config:reload`.", @@ -14792,27 +12631,6 @@ ] } }, - "/admin/provisioning/access-control/reload": { - "post": { - "operationId": "adminProvisioningReloadAccessControl", - "responses": { - "202": { - "$ref": "#/components/responses/acceptedResponse" - }, - "401": { - "$ref": "#/components/responses/unauthorisedError" - }, - "403": { - "$ref": "#/components/responses/forbiddenError" - } - }, - "summary": "You need to have a permission with action `provisioning:reload` with scope `provisioners:accesscontrol`.", - "tags": [ - "access_control_provisioning", - "enterprise" - ] - } - }, "/admin/provisioning/dashboards/reload": { "post": { "description": "Reloads the provisioning config files for dashboards again. It won’t return until the new provisioned entities are already stored in the database. In case of dashboards, it will stop polling for changes in dashboard files and then restart it with new configurations after returning.\nIf you are running Grafana Enterprise and have Fine-grained access control enabled, you need to have a permission with action `provisioning:reload` and scope `provisioners:dashboards`.", @@ -18385,92 +16203,6 @@ ] } }, - "/datasources/uid/{uid}/lbac/teams": { - "get": { - "operationId": "getTeamLBACRulesApi", - "parameters": [ - { - "in": "path", - "name": "uid", - "required": true, - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "$ref": "#/components/responses/getTeamLBACRulesResponse" - }, - "400": { - "$ref": "#/components/responses/badRequestError" - }, - "401": { - "$ref": "#/components/responses/unauthorisedError" - }, - "403": { - "$ref": "#/components/responses/forbiddenError" - }, - "404": { - "$ref": "#/components/responses/notFoundError" - }, - "500": { - "$ref": "#/components/responses/internalServerError" - } - }, - "summary": "Retrieves LBAC rules for a team.", - "tags": [ - "enterprise" - ] - }, - "put": { - "operationId": "updateTeamLBACRulesApi", - "parameters": [ - { - "in": "path", - "name": "uid", - "required": true, - "schema": { - "type": "string" - } - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/UpdateTeamLBACCommand" - } - } - }, - "x-originalParamName": "body" - }, - "responses": { - "200": { - "$ref": "#/components/responses/updateTeamLBACRulesResponse" - }, - "400": { - "$ref": "#/components/responses/badRequestError" - }, - "401": { - "$ref": "#/components/responses/unauthorisedError" - }, - "403": { - "$ref": "#/components/responses/forbiddenError" - }, - "404": { - "$ref": "#/components/responses/notFoundError" - }, - "500": { - "$ref": "#/components/responses/internalServerError" - } - }, - "summary": "Updates LBAC rules for a team.", - "tags": [ - "enterprise" - ] - } - }, "/datasources/uid/{uid}/resources/{datasource_proxy_route}": { "get": { "operationId": "callDatasourceResourceWithUID", @@ -18518,188 +16250,6 @@ ] } }, - "/datasources/{dataSourceUID}/cache": { - "get": { - "description": "get cache config for a single data source", - "operationId": "getDataSourceCacheConfig", - "parameters": [ - { - "in": "path", - "name": "dataSourceUID", - "required": true, - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CacheConfigResponse" - } - } - }, - "description": "CacheConfigResponse" - }, - "500": { - "$ref": "#/components/responses/internalServerError" - } - }, - "tags": [ - "enterprise" - ] - }, - "post": { - "description": "set cache config for a single data source", - "operationId": "setDataSourceCacheConfig", - "parameters": [ - { - "in": "path", - "name": "dataSourceUID", - "required": true, - "schema": { - "type": "string" - } - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CacheConfigSetter" - } - } - }, - "required": true, - "x-originalParamName": "body" - }, - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CacheConfigResponse" - } - } - }, - "description": "CacheConfigResponse" - }, - "400": { - "$ref": "#/components/responses/badRequestError" - }, - "500": { - "$ref": "#/components/responses/internalServerError" - } - }, - "tags": [ - "enterprise" - ] - } - }, - "/datasources/{dataSourceUID}/cache/clean": { - "post": { - "description": "clean cache for a single data source", - "operationId": "cleanDataSourceCache", - "parameters": [ - { - "in": "path", - "name": "dataSourceUID", - "required": true, - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CacheConfigResponse" - } - } - }, - "description": "CacheConfigResponse" - }, - "500": { - "$ref": "#/components/responses/internalServerError" - } - }, - "tags": [ - "enterprise" - ] - } - }, - "/datasources/{dataSourceUID}/cache/disable": { - "post": { - "description": "disable cache for a single data source", - "operationId": "disableDataSourceCache", - "parameters": [ - { - "in": "path", - "name": "dataSourceUID", - "required": true, - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CacheConfigResponse" - } - } - }, - "description": "CacheConfigResponse" - }, - "500": { - "$ref": "#/components/responses/internalServerError" - } - }, - "tags": [ - "enterprise" - ] - } - }, - "/datasources/{dataSourceUID}/cache/enable": { - "post": { - "description": "enable cache for a single data source", - "operationId": "enableDataSourceCache", - "parameters": [ - { - "in": "path", - "name": "dataSourceUID", - "required": true, - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CacheConfigResponse" - } - } - }, - "description": "CacheConfigResponse" - }, - "500": { - "$ref": "#/components/responses/internalServerError" - } - }, - "tags": [ - "enterprise" - ] - } - }, "/datasources/{id}": { "delete": { "deprecated": true, @@ -19393,202 +16943,6 @@ ] } }, - "/groupsync/groups": { - "get": { - "operationId": "getMappedGroups", - "responses": { - "200": { - "$ref": "#/components/responses/getGroupsResponse" - }, - "400": { - "$ref": "#/components/responses/badRequestError" - }, - "401": { - "$ref": "#/components/responses/unauthorisedError" - }, - "403": { - "$ref": "#/components/responses/forbiddenError" - }, - "500": { - "$ref": "#/components/responses/internalServerError" - } - }, - "summary": "List groups that have mappings set. This endpoint is behind the feature flag `groupAttributeSync` and is considered experimental.", - "tags": [ - "group_attribute_sync", - "enterprise" - ] - } - }, - "/groupsync/groups/{group_id}": { - "delete": { - "operationId": "deleteGroupMappings", - "parameters": [ - { - "in": "path", - "name": "group_id", - "required": true, - "schema": { - "type": "string" - } - } - ], - "responses": { - "204": { - "$ref": "#/components/responses/okResponse" - }, - "400": { - "$ref": "#/components/responses/badRequestError" - }, - "401": { - "$ref": "#/components/responses/unauthorisedError" - }, - "403": { - "$ref": "#/components/responses/forbiddenError" - }, - "500": { - "$ref": "#/components/responses/internalServerError" - } - }, - "summary": "Delete mappings for a group. This endpoint is behind the feature flag `groupAttributeSync` and is considered experimental.", - "tags": [ - "group_attribute_sync", - "enterprise" - ] - }, - "post": { - "operationId": "createGroupMappings", - "parameters": [ - { - "in": "path", - "name": "group_id", - "required": true, - "schema": { - "type": "string" - } - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/GroupAttributes" - } - } - }, - "required": true, - "x-originalParamName": "body" - }, - "responses": { - "201": { - "$ref": "#/components/responses/apiResponse" - }, - "400": { - "$ref": "#/components/responses/badRequestError" - }, - "401": { - "$ref": "#/components/responses/unauthorisedError" - }, - "403": { - "$ref": "#/components/responses/forbiddenError" - }, - "500": { - "$ref": "#/components/responses/internalServerError" - } - }, - "summary": "Create mappings for a group. This endpoint is behind the feature flag `groupAttributeSync` and is considered experimental.", - "tags": [ - "group_attribute_sync", - "enterprise" - ] - }, - "put": { - "operationId": "updateGroupMappings", - "parameters": [ - { - "in": "path", - "name": "group_id", - "required": true, - "schema": { - "type": "string" - } - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/GroupAttributes" - } - } - }, - "required": true, - "x-originalParamName": "body" - }, - "responses": { - "201": { - "$ref": "#/components/responses/apiResponse" - }, - "400": { - "$ref": "#/components/responses/badRequestError" - }, - "401": { - "$ref": "#/components/responses/unauthorisedError" - }, - "403": { - "$ref": "#/components/responses/forbiddenError" - }, - "500": { - "$ref": "#/components/responses/internalServerError" - } - }, - "summary": "Update mappings for a group. This endpoint is behind the feature flag `groupAttributeSync` and is considered experimental.", - "tags": [ - "group_attribute_sync", - "enterprise" - ] - } - }, - "/groupsync/groups/{group_id}/roles": { - "get": { - "operationId": "getGroupRoles", - "parameters": [ - { - "in": "path", - "name": "group_id", - "required": true, - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "$ref": "#/components/responses/getGroupRolesResponse" - }, - "400": { - "$ref": "#/components/responses/badRequestError" - }, - "401": { - "$ref": "#/components/responses/unauthorisedError" - }, - "403": { - "$ref": "#/components/responses/forbiddenError" - }, - "404": { - "$ref": "#/components/responses/notFoundError" - }, - "500": { - "$ref": "#/components/responses/internalServerError" - } - }, - "summary": "Get roles mapped to a group. This endpoint is behind the feature flag `groupAttributeSync` and is considered experimental.", - "tags": [ - "group_attribute_sync", - "enterprise" - ] - } - }, "/health": { "get": { "description": "apiHealthHandler will return ok if Grafana's web server is running and it\ncan access the database. If the database cannot be accessed it will return\nhttp status code 503.", @@ -19950,212 +17304,6 @@ ] } }, - "/licensing/check": { - "get": { - "operationId": "getStatus", - "responses": { - "200": { - "$ref": "#/components/responses/getStatusResponse" - } - }, - "summary": "Check license availability.", - "tags": [ - "licensing", - "enterprise" - ] - } - }, - "/licensing/custom-permissions": { - "get": { - "deprecated": true, - "description": "You need to have a permission with action `licensing.reports:read`.", - "operationId": "getCustomPermissionsReport", - "responses": { - "500": { - "$ref": "#/components/responses/internalServerError" - } - }, - "summary": "Get custom permissions report.", - "tags": [ - "licensing", - "enterprise" - ] - } - }, - "/licensing/custom-permissions-csv": { - "get": { - "deprecated": true, - "description": "You need to have a permission with action `licensing.reports:read`.", - "operationId": "getCustomPermissionsCSV", - "responses": { - "500": { - "$ref": "#/components/responses/internalServerError" - } - }, - "summary": "Get custom permissions report in CSV format.", - "tags": [ - "licensing", - "enterprise" - ] - } - }, - "/licensing/refresh-stats": { - "get": { - "description": "You need to have a permission with action `licensing:read`.", - "operationId": "refreshLicenseStats", - "responses": { - "200": { - "$ref": "#/components/responses/refreshLicenseStatsResponse" - }, - "500": { - "$ref": "#/components/responses/internalServerError" - } - }, - "summary": "Refresh license stats.", - "tags": [ - "licensing", - "enterprise" - ] - } - }, - "/licensing/token": { - "delete": { - "description": "Removes the license stored in the Grafana database. Available in Grafana Enterprise v7.4+.\n\nYou need to have a permission with action `licensing:delete`.", - "operationId": "deleteLicenseToken", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/DeleteTokenCommand" - } - } - }, - "required": true, - "x-originalParamName": "body" - }, - "responses": { - "202": { - "$ref": "#/components/responses/acceptedResponse" - }, - "400": { - "$ref": "#/components/responses/badRequestError" - }, - "401": { - "$ref": "#/components/responses/unauthorisedError" - }, - "403": { - "$ref": "#/components/responses/forbiddenError" - }, - "422": { - "$ref": "#/components/responses/unprocessableEntityError" - }, - "500": { - "$ref": "#/components/responses/internalServerError" - } - }, - "summary": "Remove license from database.", - "tags": [ - "licensing", - "enterprise" - ] - }, - "get": { - "description": "You need to have a permission with action `licensing:read`.", - "operationId": "getLicenseToken", - "responses": { - "200": { - "$ref": "#/components/responses/getLicenseTokenResponse" - } - }, - "summary": "Get license token.", - "tags": [ - "licensing", - "enterprise" - ] - }, - "post": { - "description": "You need to have a permission with action `licensing:update`.", - "operationId": "postLicenseToken", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/DeleteTokenCommand" - } - } - }, - "required": true, - "x-originalParamName": "body" - }, - "responses": { - "200": { - "$ref": "#/components/responses/getLicenseTokenResponse" - }, - "400": { - "$ref": "#/components/responses/badRequestError" - } - }, - "summary": "Create license token.", - "tags": [ - "licensing", - "enterprise" - ] - } - }, - "/licensing/token/renew": { - "post": { - "description": "Manually ask license issuer for a new token. Available in Grafana Enterprise v7.4+.\n\nYou need to have a permission with action `licensing:update`.", - "operationId": "postRenewLicenseToken", - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object" - } - } - }, - "required": true, - "x-originalParamName": "body" - }, - "responses": { - "200": { - "$ref": "#/components/responses/postRenewLicenseTokenResponse" - }, - "401": { - "$ref": "#/components/responses/unauthorisedError" - }, - "404": { - "$ref": "#/components/responses/notFoundError" - } - }, - "summary": "Manually force license refresh.", - "tags": [ - "licensing", - "enterprise" - ] - } - }, - "/logout/saml": { - "get": { - "operationId": "getSAMLLogout", - "responses": { - "302": { - "description": "(empty)" - }, - "404": { - "$ref": "#/components/responses/notFoundError" - }, - "500": { - "$ref": "#/components/responses/internalServerError" - } - }, - "summary": "GetLogout initiates single logout process.", - "tags": [ - "saml", - "enterprise" - ] - } - }, "/org": { "get": { "operationId": "getCurrentOrg", @@ -21930,873 +19078,6 @@ ] } }, - "/recording-rules": { - "get": { - "operationId": "listRecordingRules", - "responses": { - "200": { - "$ref": "#/components/responses/listRecordingRulesResponse" - }, - "401": { - "$ref": "#/components/responses/unauthorisedError" - }, - "403": { - "$ref": "#/components/responses/forbiddenError" - }, - "404": { - "$ref": "#/components/responses/notFoundError" - }, - "500": { - "$ref": "#/components/responses/internalServerError" - } - }, - "summary": "Lists all rules in the database: active or deleted.", - "tags": [ - "recording_rules", - "enterprise" - ] - }, - "post": { - "operationId": "createRecordingRule", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/RecordingRuleJSON" - } - } - }, - "required": true, - "x-originalParamName": "body" - }, - "responses": { - "200": { - "$ref": "#/components/responses/recordingRuleResponse" - }, - "401": { - "$ref": "#/components/responses/unauthorisedError" - }, - "403": { - "$ref": "#/components/responses/forbiddenError" - }, - "404": { - "$ref": "#/components/responses/notFoundError" - }, - "500": { - "$ref": "#/components/responses/internalServerError" - } - }, - "summary": "Create a recording rule that is then registered and started.", - "tags": [ - "recording_rules", - "enterprise" - ] - }, - "put": { - "operationId": "updateRecordingRule", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/RecordingRuleJSON" - } - } - }, - "required": true, - "x-originalParamName": "body" - }, - "responses": { - "200": { - "$ref": "#/components/responses/recordingRuleResponse" - }, - "401": { - "$ref": "#/components/responses/unauthorisedError" - }, - "403": { - "$ref": "#/components/responses/forbiddenError" - }, - "404": { - "$ref": "#/components/responses/notFoundError" - }, - "500": { - "$ref": "#/components/responses/internalServerError" - } - }, - "summary": "Update the active status of a rule.", - "tags": [ - "recording_rules", - "enterprise" - ] - } - }, - "/recording-rules/test": { - "post": { - "operationId": "testCreateRecordingRule", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/RecordingRuleJSON" - } - } - }, - "required": true, - "x-originalParamName": "body" - }, - "responses": { - "200": { - "$ref": "#/components/responses/okResponse" - }, - "401": { - "$ref": "#/components/responses/unauthorisedError" - }, - "403": { - "$ref": "#/components/responses/forbiddenError" - }, - "404": { - "$ref": "#/components/responses/notFoundError" - }, - "422": { - "$ref": "#/components/responses/unprocessableEntityError" - }, - "500": { - "$ref": "#/components/responses/internalServerError" - } - }, - "summary": "Test a recording rule.", - "tags": [ - "recording_rules", - "enterprise" - ] - } - }, - "/recording-rules/writer": { - "delete": { - "operationId": "deleteRecordingRuleWriteTarget", - "responses": { - "200": { - "$ref": "#/components/responses/okResponse" - }, - "401": { - "$ref": "#/components/responses/unauthorisedError" - }, - "403": { - "$ref": "#/components/responses/forbiddenError" - }, - "404": { - "$ref": "#/components/responses/notFoundError" - }, - "500": { - "$ref": "#/components/responses/internalServerError" - } - }, - "summary": "Delete the remote write target.", - "tags": [ - "recording_rules", - "enterprise" - ] - }, - "get": { - "operationId": "getRecordingRuleWriteTarget", - "responses": { - "200": { - "$ref": "#/components/responses/recordingRuleWriteTargetResponse" - }, - "401": { - "$ref": "#/components/responses/unauthorisedError" - }, - "403": { - "$ref": "#/components/responses/forbiddenError" - }, - "404": { - "$ref": "#/components/responses/notFoundError" - }, - "500": { - "$ref": "#/components/responses/internalServerError" - } - }, - "summary": "Return the prometheus remote write target.", - "tags": [ - "recording_rules", - "enterprise" - ] - }, - "post": { - "description": "It returns a 422 if there is not an existing prometheus data source configured.", - "operationId": "createRecordingRuleWriteTarget", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/PrometheusRemoteWriteTargetJSON" - } - } - }, - "required": true, - "x-originalParamName": "body" - }, - "responses": { - "200": { - "$ref": "#/components/responses/recordingRuleWriteTargetResponse" - }, - "401": { - "$ref": "#/components/responses/unauthorisedError" - }, - "403": { - "$ref": "#/components/responses/forbiddenError" - }, - "404": { - "$ref": "#/components/responses/notFoundError" - }, - "422": { - "$ref": "#/components/responses/unprocessableEntityError" - }, - "500": { - "$ref": "#/components/responses/internalServerError" - } - }, - "summary": "Create a remote write target.", - "tags": [ - "recording_rules", - "enterprise" - ] - } - }, - "/recording-rules/{recordingRuleID}": { - "delete": { - "operationId": "deleteRecordingRule", - "parameters": [ - { - "in": "path", - "name": "recordingRuleID", - "required": true, - "schema": { - "format": "int64", - "type": "integer" - } - } - ], - "responses": { - "200": { - "$ref": "#/components/responses/okResponse" - }, - "401": { - "$ref": "#/components/responses/unauthorisedError" - }, - "403": { - "$ref": "#/components/responses/forbiddenError" - }, - "404": { - "$ref": "#/components/responses/notFoundError" - }, - "500": { - "$ref": "#/components/responses/internalServerError" - } - }, - "summary": "Delete removes the rule from the registry and stops it.", - "tags": [ - "recording_rules", - "enterprise" - ] - } - }, - "/reports": { - "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": "getReports", - "responses": { - "200": { - "$ref": "#/components/responses/getReportsResponse" - }, - "401": { - "$ref": "#/components/responses/unauthorisedError" - }, - "403": { - "$ref": "#/components/responses/forbiddenError" - }, - "500": { - "$ref": "#/components/responses/internalServerError" - } - }, - "summary": "List reports.", - "tags": [ - "reports", - "enterprise" - ] - }, - "post": { - "description": "Available to org admins only and with a valid license.\n\nYou need to have a permission with action `reports.admin:create`.", - "operationId": "createReport", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CreateOrUpdateReport" - } - } - }, - "required": true, - "x-originalParamName": "body" - }, - "responses": { - "200": { - "$ref": "#/components/responses/createReportResponse" - }, - "400": { - "$ref": "#/components/responses/badRequestError" - }, - "401": { - "$ref": "#/components/responses/unauthorisedError" - }, - "403": { - "$ref": "#/components/responses/forbiddenError" - }, - "404": { - "$ref": "#/components/responses/notFoundError" - }, - "500": { - "$ref": "#/components/responses/internalServerError" - } - }, - "summary": "Create a report.", - "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`.", - "operationId": "sendReport", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ReportEmail" - } - } - }, - "required": true, - "x-originalParamName": "body" - }, - "responses": { - "200": { - "$ref": "#/components/responses/okResponse" - }, - "400": { - "$ref": "#/components/responses/badRequestError" - }, - "401": { - "$ref": "#/components/responses/unauthorisedError" - }, - "403": { - "$ref": "#/components/responses/forbiddenError" - }, - "404": { - "$ref": "#/components/responses/notFoundError" - }, - "500": { - "$ref": "#/components/responses/internalServerError" - } - }, - "summary": "Send a report.", - "tags": [ - "reports", - "enterprise" - ] - } - }, - "/reports/images/:image": { - "get": { - "description": "Available to org admins only and with a valid or expired license.\n\nYou need to have a permission with action `reports.settings:read`.", - "operationId": "getSettingsImage", - "responses": { - "200": { - "$ref": "#/components/responses/contentResponse" - }, - "401": { - "$ref": "#/components/responses/unauthorisedError" - }, - "403": { - "$ref": "#/components/responses/forbiddenError" - }, - "404": { - "$ref": "#/components/responses/notFoundError" - }, - "500": { - "$ref": "#/components/responses/internalServerError" - } - }, - "summary": "Get custom branding report image.", - "tags": [ - "reports", - "enterprise" - ] - } - }, - "/reports/render/csvs": { - "get": { - "description": "Available to all users and with a valid license.", - "operationId": "renderReportCSVs", - "parameters": [ - { - "in": "query", - "name": "dashboards", - "schema": { - "type": "string" - } - }, - { - "in": "query", - "name": "title", - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "$ref": "#/components/responses/contentResponse" - }, - "204": { - "$ref": "#/components/responses/noContentResponse" - }, - "400": { - "$ref": "#/components/responses/badRequestError" - }, - "401": { - "$ref": "#/components/responses/unauthorisedError" - }, - "500": { - "$ref": "#/components/responses/internalServerError" - } - }, - "summary": "Download a CSV report.", - "tags": [ - "reports", - "enterprise" - ] - } - }, - "/reports/render/pdfs": { - "get": { - "description": "Available to all users and with a valid license.", - "operationId": "renderReportPDFs", - "parameters": [ - { - "in": "query", - "name": "dashboards", - "schema": { - "type": "string" - } - }, - { - "in": "query", - "name": "orientation", - "schema": { - "type": "string" - } - }, - { - "in": "query", - "name": "layout", - "schema": { - "type": "string" - } - }, - { - "in": "query", - "name": "title", - "schema": { - "type": "string" - } - }, - { - "in": "query", - "name": "scaleFactor", - "schema": { - "type": "string" - } - }, - { - "in": "query", - "name": "includeTables", - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "$ref": "#/components/responses/contentResponse" - }, - "400": { - "$ref": "#/components/responses/badRequestError" - }, - "401": { - "$ref": "#/components/responses/unauthorisedError" - }, - "500": { - "$ref": "#/components/responses/internalServerError" - } - }, - "summary": "Render report for multiple dashboards.", - "tags": [ - "reports", - "enterprise" - ] - } - }, - "/reports/settings": { - "get": { - "description": "Available to org admins only and with a valid or expired license.\n\nYou need to have a permission with action `reports.settings:read`x.", - "operationId": "getReportSettings", - "responses": { - "200": { - "$ref": "#/components/responses/getReportSettingsResponse" - }, - "401": { - "$ref": "#/components/responses/unauthorisedError" - }, - "403": { - "$ref": "#/components/responses/forbiddenError" - }, - "500": { - "$ref": "#/components/responses/internalServerError" - } - }, - "summary": "Get report settings.", - "tags": [ - "reports", - "enterprise" - ] - }, - "post": { - "description": "Available to org admins only and with a valid or expired license.\n\nYou need to have a permission with action `reports.settings:write`xx.", - "operationId": "saveReportSettings", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ReportSettings" - } - } - }, - "required": true, - "x-originalParamName": "body" - }, - "responses": { - "200": { - "$ref": "#/components/responses/okResponse" - }, - "400": { - "$ref": "#/components/responses/badRequestError" - }, - "401": { - "$ref": "#/components/responses/unauthorisedError" - }, - "403": { - "$ref": "#/components/responses/forbiddenError" - }, - "500": { - "$ref": "#/components/responses/internalServerError" - } - }, - "summary": "Save settings.", - "tags": [ - "reports", - "enterprise" - ] - } - }, - "/reports/test-email": { - "post": { - "description": "Available to org admins only and with a valid license.\n\nYou need to have a permission with action `reports:send`.", - "operationId": "sendTestEmail", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CreateOrUpdateReport" - } - } - }, - "required": true, - "x-originalParamName": "body" - }, - "responses": { - "200": { - "$ref": "#/components/responses/okResponse" - }, - "400": { - "$ref": "#/components/responses/badRequestError" - }, - "401": { - "$ref": "#/components/responses/unauthorisedError" - }, - "403": { - "$ref": "#/components/responses/forbiddenError" - }, - "404": { - "$ref": "#/components/responses/notFoundError" - }, - "500": { - "$ref": "#/components/responses/internalServerError" - } - }, - "summary": "Send test report via email.", - "tags": [ - "reports", - "enterprise" - ] - } - }, - "/reports/{id}": { - "delete": { - "deprecated": true, - "description": "Available to org admins only and with a valid or expired license.\n\nYou need to have a permission with action `reports.delete` with scope `reports:id:\u003creport ID\u003e`.\n\nRequesting reports using the internal id will stop workgin in the future\nUse the reporting apiserver to manage reports. See: /apis/reporting.grafana.app/", - "operationId": "deleteReport", - "parameters": [ - { - "in": "path", - "name": "id", - "required": true, - "schema": { - "format": "int64", - "type": "integer" - } - } - ], - "responses": { - "200": { - "$ref": "#/components/responses/okResponse" - }, - "400": { - "$ref": "#/components/responses/badRequestError" - }, - "401": { - "$ref": "#/components/responses/unauthorisedError" - }, - "403": { - "$ref": "#/components/responses/forbiddenError" - }, - "404": { - "$ref": "#/components/responses/notFoundError" - }, - "500": { - "$ref": "#/components/responses/internalServerError" - } - }, - "summary": "Delete a report.", - "tags": [ - "reports", - "enterprise" - ] - }, - "get": { - "deprecated": true, - "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:id:\u003creport ID\u003e`.\n\nRequesting reports using the internal id will stop workgin in the future\nUse the reporting apiserver to manage reports. See: /apis/reporting.grafana.app/", - "operationId": "getReport", - "parameters": [ - { - "in": "path", - "name": "id", - "required": true, - "schema": { - "format": "int64", - "type": "integer" - } - } - ], - "responses": { - "200": { - "$ref": "#/components/responses/getReportResponse" - }, - "400": { - "$ref": "#/components/responses/badRequestError" - }, - "401": { - "$ref": "#/components/responses/unauthorisedError" - }, - "403": { - "$ref": "#/components/responses/forbiddenError" - }, - "404": { - "$ref": "#/components/responses/notFoundError" - }, - "500": { - "$ref": "#/components/responses/internalServerError" - } - }, - "summary": "Get a report.", - "tags": [ - "reports", - "enterprise" - ] - }, - "put": { - "deprecated": true, - "description": "Available to org admins only and with a valid or expired license.\n\nYou need to have a permission with action `reports.admin:write` with scope `reports:id:\u003creport ID\u003e`.\n\nRequesting reports using the internal id will stop workgin in the future\nUse the reporting apiserver to manage reports. See: /apis/reporting.grafana.app/", - "operationId": "updateReport", - "parameters": [ - { - "in": "path", - "name": "id", - "required": true, - "schema": { - "format": "int64", - "type": "integer" - } - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CreateOrUpdateReport" - } - } - }, - "required": true, - "x-originalParamName": "body" - }, - "responses": { - "200": { - "$ref": "#/components/responses/okResponse" - }, - "400": { - "$ref": "#/components/responses/badRequestError" - }, - "401": { - "$ref": "#/components/responses/unauthorisedError" - }, - "403": { - "$ref": "#/components/responses/forbiddenError" - }, - "404": { - "$ref": "#/components/responses/notFoundError" - }, - "500": { - "$ref": "#/components/responses/internalServerError" - } - }, - "summary": "Update a report.", - "tags": [ - "reports", - "enterprise" - ] - } - }, - "/saml/acs": { - "post": { - "operationId": "postACS", - "parameters": [ - { - "in": "query", - "name": "RelayState", - "schema": { - "type": "string" - } - } - ], - "responses": { - "302": { - "description": "(empty)" - }, - "403": { - "$ref": "#/components/responses/forbiddenError" - }, - "500": { - "$ref": "#/components/responses/internalServerError" - } - }, - "summary": "It performs Assertion Consumer Service (ACS).", - "tags": [ - "saml", - "enterprise" - ] - } - }, - "/saml/metadata": { - "get": { - "operationId": "getMetadata", - "responses": { - "200": { - "$ref": "#/components/responses/contentResponse" - } - }, - "summary": "It exposes the SP (Grafana's) metadata for the IdP's consumption.", - "tags": [ - "saml", - "enterprise" - ] - } - }, - "/saml/slo": { - "get": { - "description": "There might be two possible requests:\n1. Logout response (callback) when Grafana initiates single logout and IdP returns response to logout request.\n2. Logout request when another SP initiates single logout and IdP sends logout request to the Grafana,\nor in case of IdP-initiated logout.", - "operationId": "getSLO", - "responses": { - "302": { - "description": "(empty)" - }, - "400": { - "$ref": "#/components/responses/badRequestError" - }, - "403": { - "$ref": "#/components/responses/forbiddenError" - }, - "500": { - "$ref": "#/components/responses/internalServerError" - } - }, - "summary": "It performs Single Logout (SLO) callback.", - "tags": [ - "saml", - "enterprise" - ] - }, - "post": { - "description": "There might be two possible requests:\n1. Logout response (callback) when Grafana initiates single logout and IdP returns response to logout request.\n2. Logout request when another SP initiates single logout and IdP sends logout request to the Grafana,\nor in case of IdP-initiated logout.", - "operationId": "postSLO", - "parameters": [ - { - "in": "query", - "name": "SAMLRequest", - "schema": { - "type": "string" - } - }, - { - "in": "query", - "name": "SAMLResponse", - "schema": { - "type": "string" - } - } - ], - "responses": { - "302": { - "description": "(empty)" - }, - "400": { - "$ref": "#/components/responses/badRequestError" - }, - "403": { - "$ref": "#/components/responses/forbiddenError" - }, - "500": { - "$ref": "#/components/responses/internalServerError" - } - }, - "summary": "It performs Single Logout (SLO) callback.", - "tags": [ - "saml", - "enterprise" - ] - } - }, "/search": { "get": { "operationId": "search", @@ -23661,143 +19942,6 @@ ] } }, - "/teams/{teamId}/groups": { - "delete": { - "operationId": "removeTeamGroupApiQuery", - "parameters": [ - { - "in": "query", - "name": "groupId", - "schema": { - "type": "string" - } - }, - { - "in": "path", - "name": "teamId", - "required": true, - "schema": { - "format": "int64", - "type": "integer" - } - } - ], - "responses": { - "200": { - "$ref": "#/components/responses/okResponse" - }, - "400": { - "$ref": "#/components/responses/badRequestError" - }, - "401": { - "$ref": "#/components/responses/unauthorisedError" - }, - "403": { - "$ref": "#/components/responses/forbiddenError" - }, - "404": { - "$ref": "#/components/responses/notFoundError" - }, - "500": { - "$ref": "#/components/responses/internalServerError" - } - }, - "summary": "Remove External Group.", - "tags": [ - "sync_team_groups", - "enterprise" - ] - }, - "get": { - "operationId": "getTeamGroupsApi", - "parameters": [ - { - "in": "path", - "name": "teamId", - "required": true, - "schema": { - "format": "int64", - "type": "integer" - } - } - ], - "responses": { - "200": { - "$ref": "#/components/responses/getTeamGroupsApiResponse" - }, - "400": { - "$ref": "#/components/responses/badRequestError" - }, - "401": { - "$ref": "#/components/responses/unauthorisedError" - }, - "403": { - "$ref": "#/components/responses/forbiddenError" - }, - "404": { - "$ref": "#/components/responses/notFoundError" - }, - "500": { - "$ref": "#/components/responses/internalServerError" - } - }, - "summary": "Get External Groups.", - "tags": [ - "sync_team_groups", - "enterprise" - ] - }, - "post": { - "operationId": "addTeamGroupApi", - "parameters": [ - { - "in": "path", - "name": "teamId", - "required": true, - "schema": { - "format": "int64", - "type": "integer" - } - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/TeamGroupMapping" - } - } - }, - "required": true, - "x-originalParamName": "body" - }, - "responses": { - "200": { - "$ref": "#/components/responses/okResponse" - }, - "400": { - "$ref": "#/components/responses/badRequestError" - }, - "401": { - "$ref": "#/components/responses/unauthorisedError" - }, - "403": { - "$ref": "#/components/responses/forbiddenError" - }, - "404": { - "$ref": "#/components/responses/notFoundError" - }, - "500": { - "$ref": "#/components/responses/internalServerError" - } - }, - "summary": "Add External Group.", - "tags": [ - "sync_team_groups", - "enterprise" - ] - } - }, "/teams/{team_id}": { "delete": { "operationId": "deleteTeamByID",