Group attribute sync: Add swagger defs for group attribute sync endpoints (#94531)

* add generated files

* add swagger def for group role endpoint

* some cleanup to make Go client nicer to use
This commit is contained in:
Ieva 2024-10-17 12:01:55 +01:00 committed by GitHub
parent 4c5483ee15
commit dca881289a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 1359 additions and 0 deletions

View File

@ -988,6 +988,327 @@
}
}
},
"/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"
}
}
}
},
"/groupsync/mappings": {
"get": {
"tags": [
"group_attribute_sync",
"enterprise"
],
"summary": "List group mappings. This endpoint is behind the feature flag `groupAttributeSync` and is considered experimental.",
"operationId": "getGroupMappings",
"responses": {
"200": {
"$ref": "#/responses/getGroupMappingsResponse"
},
"400": {
"$ref": "#/responses/badRequestError"
},
"401": {
"$ref": "#/responses/unauthorisedError"
},
"403": {
"$ref": "#/responses/forbiddenError"
},
"500": {
"$ref": "#/responses/internalServerError"
}
}
},
"post": {
"tags": [
"group_attribute_sync",
"enterprise"
],
"summary": "Create a group mapping. This endpoint is behind the feature flag `groupAttributeSync` and is considered experimental.",
"operationId": "createGroupMapping",
"parameters": [
{
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/groupMappingRequestBody"
}
}
],
"responses": {
"201": {
"$ref": "#/responses/apiResponse"
},
"400": {
"$ref": "#/responses/badRequestError"
},
"401": {
"$ref": "#/responses/unauthorisedError"
},
"403": {
"$ref": "#/responses/forbiddenError"
},
"409": {
"$ref": "#/responses/conflictError"
},
"500": {
"$ref": "#/responses/internalServerError"
}
}
}
},
"/groupsync/mappings/{mapping_uid}": {
"get": {
"tags": [
"group_attribute_sync",
"enterprise"
],
"summary": "Get a group mapping. This endpoint is behind the feature flag `groupAttributeSync` and is considered experimental.",
"operationId": "getGroupMapping",
"parameters": [
{
"type": "string",
"name": "mapping_uid",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"$ref": "#/responses/getGroupMappingResponse"
},
"400": {
"$ref": "#/responses/badRequestError"
},
"401": {
"$ref": "#/responses/unauthorisedError"
},
"403": {
"$ref": "#/responses/forbiddenError"
},
"404": {
"$ref": "#/responses/notFoundError"
},
"500": {
"$ref": "#/responses/internalServerError"
}
}
},
"delete": {
"tags": [
"group_attribute_sync",
"enterprise"
],
"summary": "Delete a group mapping. This endpoint is behind the feature flag `groupAttributeSync` and is considered experimental.",
"operationId": "deleteGroupMapping",
"parameters": [
{
"type": "string",
"name": "mapping_uid",
"in": "path",
"required": true
}
],
"responses": {
"204": {
"$ref": "#/responses/okResponse"
},
"400": {
"$ref": "#/responses/badRequestError"
},
"401": {
"$ref": "#/responses/unauthorisedError"
},
"403": {
"$ref": "#/responses/forbiddenError"
},
"404": {
"$ref": "#/responses/notFoundError"
},
"500": {
"$ref": "#/responses/internalServerError"
}
}
}
},
"/licensing/check": {
"get": {
"tags": [
@ -4822,6 +5143,44 @@
}
}
},
"Group": {
"type": "object",
"properties": {
"groupID": {
"type": "string"
},
"mappings": {}
}
},
"GroupAttributes": {
"type": "object",
"properties": {
"roles": {
"type": "array",
"items": {
"type": "string"
}
}
}
},
"GroupMapping": {
"type": "object",
"properties": {
"groupID": {
"type": "string"
},
"orgID": {
"type": "integer",
"format": "int64"
},
"uid": {
"type": "string"
},
"variant": {
"type": "string"
}
}
},
"Hit": {
"type": "object",
"properties": {
@ -8451,6 +8810,46 @@
}
}
},
"getGroupMappings": {
"type": "object",
"properties": {
"mappings": {
"type": "array",
"items": {
"$ref": "#/definitions/GroupMapping"
}
}
}
},
"getGroupsResponse": {
"type": "object",
"properties": {
"groups": {
"type": "array",
"items": {
"$ref": "#/definitions/Group"
}
},
"total": {
"type": "integer",
"format": "int64"
}
}
},
"groupMappingRequestBody": {
"type": "object",
"properties": {
"groupID": {
"type": "string"
},
"mapping": {
"type": "object"
},
"variant": {
"type": "string"
}
}
},
"healthResponse": {
"type": "object",
"properties": {
@ -8468,6 +8867,14 @@
}
}
},
"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",
@ -8606,6 +9013,12 @@
}
}
},
"apiResponse": {
"description": "",
"schema": {
"$ref": "#/definitions/messageResponse"
}
},
"badRequestError": {
"description": "BadRequestError is returned when the request is invalid and it cannot be processed.",
"schema": {
@ -9136,6 +9549,33 @@
}
}
},
"getGroupMappingResponse": {
"description": "",
"schema": {
"$ref": "#/definitions/GroupMapping"
}
},
"getGroupMappingsResponse": {
"description": "",
"schema": {
"$ref": "#/definitions/getGroupMappings"
}
},
"getGroupRolesResponse": {
"description": "",
"schema": {
"type": "array",
"items": {
"$ref": "#/definitions/RoleDTO"
}
}
},
"getGroupsResponse": {
"description": "",
"schema": {
"$ref": "#/definitions/getGroupsResponse"
}
},
"getHomeDashboardResponse": {
"description": "",
"schema": {

View File

@ -5420,6 +5420,327 @@
}
}
},
"/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"
}
}
}
},
"/groupsync/mappings": {
"get": {
"tags": [
"group_attribute_sync",
"enterprise"
],
"summary": "List group mappings. This endpoint is behind the feature flag `groupAttributeSync` and is considered experimental.",
"operationId": "getGroupMappings",
"responses": {
"200": {
"$ref": "#/responses/getGroupMappingsResponse"
},
"400": {
"$ref": "#/responses/badRequestError"
},
"401": {
"$ref": "#/responses/unauthorisedError"
},
"403": {
"$ref": "#/responses/forbiddenError"
},
"500": {
"$ref": "#/responses/internalServerError"
}
}
},
"post": {
"tags": [
"group_attribute_sync",
"enterprise"
],
"summary": "Create a group mapping. This endpoint is behind the feature flag `groupAttributeSync` and is considered experimental.",
"operationId": "createGroupMapping",
"parameters": [
{
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/groupMappingRequestBody"
}
}
],
"responses": {
"201": {
"$ref": "#/responses/apiResponse"
},
"400": {
"$ref": "#/responses/badRequestError"
},
"401": {
"$ref": "#/responses/unauthorisedError"
},
"403": {
"$ref": "#/responses/forbiddenError"
},
"409": {
"$ref": "#/responses/conflictError"
},
"500": {
"$ref": "#/responses/internalServerError"
}
}
}
},
"/groupsync/mappings/{mapping_uid}": {
"get": {
"tags": [
"group_attribute_sync",
"enterprise"
],
"summary": "Get a group mapping. This endpoint is behind the feature flag `groupAttributeSync` and is considered experimental.",
"operationId": "getGroupMapping",
"parameters": [
{
"type": "string",
"name": "mapping_uid",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"$ref": "#/responses/getGroupMappingResponse"
},
"400": {
"$ref": "#/responses/badRequestError"
},
"401": {
"$ref": "#/responses/unauthorisedError"
},
"403": {
"$ref": "#/responses/forbiddenError"
},
"404": {
"$ref": "#/responses/notFoundError"
},
"500": {
"$ref": "#/responses/internalServerError"
}
}
},
"delete": {
"tags": [
"group_attribute_sync",
"enterprise"
],
"summary": "Delete a group mapping. This endpoint is behind the feature flag `groupAttributeSync` and is considered experimental.",
"operationId": "deleteGroupMapping",
"parameters": [
{
"type": "string",
"name": "mapping_uid",
"in": "path",
"required": true
}
],
"responses": {
"204": {
"$ref": "#/responses/okResponse"
},
"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.",
@ -16084,6 +16405,44 @@
}
}
},
"Group": {
"type": "object",
"properties": {
"groupID": {
"type": "string"
},
"mappings": {}
}
},
"GroupAttributes": {
"type": "object",
"properties": {
"roles": {
"type": "array",
"items": {
"type": "string"
}
}
}
},
"GroupMapping": {
"type": "object",
"properties": {
"groupID": {
"type": "string"
},
"orgID": {
"type": "integer",
"format": "int64"
},
"uid": {
"type": "string"
},
"variant": {
"type": "string"
}
}
},
"HTTPClientConfig": {
"type": "object",
"title": "HTTPClientConfig configures an HTTP client.",
@ -22306,6 +22665,32 @@
}
}
},
"getGroupMappings": {
"type": "object",
"properties": {
"mappings": {
"type": "array",
"items": {
"$ref": "#/definitions/GroupMapping"
}
}
}
},
"getGroupsResponse": {
"type": "object",
"properties": {
"groups": {
"type": "array",
"items": {
"$ref": "#/definitions/Group"
}
},
"total": {
"type": "integer",
"format": "int64"
}
}
},
"gettableAlert": {
"description": "GettableAlert gettable alert",
"type": "object",
@ -22493,6 +22878,20 @@
"$ref": "#/definitions/gettableSilence"
}
},
"groupMappingRequestBody": {
"type": "object",
"properties": {
"groupID": {
"type": "string"
},
"mapping": {
"type": "object"
},
"variant": {
"type": "string"
}
}
},
"healthResponse": {
"type": "object",
"properties": {
@ -22551,6 +22950,14 @@
"$ref": "#/definitions/matcher"
}
},
"messageResponse": {
"type": "object",
"properties": {
"message": {
"type": "string"
}
}
},
"peerStatus": {
"description": "PeerStatus peer status",
"type": "object",
@ -22946,6 +23353,12 @@
}
}
},
"apiResponse": {
"description": "(empty)",
"schema": {
"$ref": "#/definitions/messageResponse"
}
},
"badRequestError": {
"description": "BadRequestError is returned when the request is invalid and it cannot be processed.",
"schema": {
@ -23476,6 +23889,33 @@
}
}
},
"getGroupMappingResponse": {
"description": "(empty)",
"schema": {
"$ref": "#/definitions/GroupMapping"
}
},
"getGroupMappingsResponse": {
"description": "(empty)",
"schema": {
"$ref": "#/definitions/getGroupMappings"
}
},
"getGroupRolesResponse": {
"description": "(empty)",
"schema": {
"type": "array",
"items": {
"$ref": "#/definitions/RoleDTO"
}
}
},
"getGroupsResponse": {
"description": "(empty)",
"schema": {
"$ref": "#/definitions/getGroupsResponse"
}
},
"getHomeDashboardResponse": {
"description": "(empty)",
"schema": {

View File

@ -139,6 +139,16 @@
},
"description": "(empty)"
},
"apiResponse": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/messageResponse"
}
}
},
"description": "(empty)"
},
"badRequestError": {
"content": {
"application/json": {
@ -885,6 +895,49 @@
},
"description": "(empty)"
},
"getGroupMappingResponse": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/GroupMapping"
}
}
},
"description": "(empty)"
},
"getGroupMappingsResponse": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/getGroupMappings"
}
}
},
"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": {
@ -6311,6 +6364,44 @@
},
"type": "object"
},
"Group": {
"properties": {
"groupID": {
"type": "string"
},
"mappings": {}
},
"type": "object"
},
"GroupAttributes": {
"properties": {
"roles": {
"items": {
"type": "string"
},
"type": "array"
}
},
"type": "object"
},
"GroupMapping": {
"properties": {
"groupID": {
"type": "string"
},
"orgID": {
"format": "int64",
"type": "integer"
},
"uid": {
"type": "string"
},
"variant": {
"type": "string"
}
},
"type": "object"
},
"HTTPClientConfig": {
"properties": {
"authorization": {
@ -12531,6 +12622,32 @@
},
"type": "object"
},
"getGroupMappings": {
"properties": {
"mappings": {
"items": {
"$ref": "#/components/schemas/GroupMapping"
},
"type": "array"
}
},
"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": {
@ -12716,6 +12833,20 @@
},
"type": "array"
},
"groupMappingRequestBody": {
"properties": {
"groupID": {
"type": "string"
},
"mapping": {
"type": "object"
},
"variant": {
"type": "string"
}
},
"type": "object"
},
"healthResponse": {
"properties": {
"commit": {
@ -12774,6 +12905,14 @@
},
"type": "array"
},
"messageResponse": {
"properties": {
"message": {
"type": "string"
}
},
"type": "object"
},
"peerStatus": {
"description": "PeerStatus peer status",
"properties": {
@ -18953,6 +19092,346 @@
]
}
},
"/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"
]
}
},
"/groupsync/mappings": {
"get": {
"operationId": "getGroupMappings",
"responses": {
"200": {
"$ref": "#/components/responses/getGroupMappingsResponse"
},
"400": {
"$ref": "#/components/responses/badRequestError"
},
"401": {
"$ref": "#/components/responses/unauthorisedError"
},
"403": {
"$ref": "#/components/responses/forbiddenError"
},
"500": {
"$ref": "#/components/responses/internalServerError"
}
},
"summary": "List group mappings. This endpoint is behind the feature flag `groupAttributeSync` and is considered experimental.",
"tags": [
"group_attribute_sync",
"enterprise"
]
},
"post": {
"operationId": "createGroupMapping",
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/groupMappingRequestBody"
}
}
},
"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"
},
"409": {
"$ref": "#/components/responses/conflictError"
},
"500": {
"$ref": "#/components/responses/internalServerError"
}
},
"summary": "Create a group mapping. This endpoint is behind the feature flag `groupAttributeSync` and is considered experimental.",
"tags": [
"group_attribute_sync",
"enterprise"
]
}
},
"/groupsync/mappings/{mapping_uid}": {
"delete": {
"operationId": "deleteGroupMapping",
"parameters": [
{
"in": "path",
"name": "mapping_uid",
"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"
},
"404": {
"$ref": "#/components/responses/notFoundError"
},
"500": {
"$ref": "#/components/responses/internalServerError"
}
},
"summary": "Delete a group mapping. This endpoint is behind the feature flag `groupAttributeSync` and is considered experimental.",
"tags": [
"group_attribute_sync",
"enterprise"
]
},
"get": {
"operationId": "getGroupMapping",
"parameters": [
{
"in": "path",
"name": "mapping_uid",
"required": true,
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"$ref": "#/components/responses/getGroupMappingResponse"
},
"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 group mapping. 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.",