2022-05-26 23:06:25 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								---
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								aliases:
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  -  /docs/grafana/latest/developers/http_api/external_group_sync/
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  -  /docs/grafana/latest/http_api/external_group_sync/
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								description: Grafana External Group Sync HTTP API
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								keywords:
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  -  grafana
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  -  http
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  -  documentation
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  -  api
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  -  team
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  -  teams
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  -  group
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  -  member
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  -  enterprise
							 
						 
					
						
							
								
									
										
										
										
											2022-07-09 03:21:29 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								title: 'External Group Sync HTTP API'
							 
						 
					
						
							
								
									
										
										
										
											2022-05-26 23:06:25 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								---
							 
						 
					
						
							
								
									
										
										
										
											2018-11-01 01:01:30 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								# External Group Synchronization API
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2022-05-27 20:42:51 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								>  External Group Synchronization is only available in Grafana Enterprise. Read more about [Grafana Enterprise]({{< relref "../../enterprise/" >}}).
  
						 
					
						
							
								
									
										
										
										
											2018-11-01 01:01:30 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2022-07-09 03:21:29 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								>  If you are running Grafana Enterprise, for some endpoints you'll need to have specific permissions. Refer to [Role-based access control permissions]({{< relref "../../administration/roles-and-permissions/access-control/custom-role-actions-scopes/" >}}) for more information.
  
						 
					
						
							
								
									
										
										
										
											2022-02-12 01:00:13 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2018-11-01 01:01:30 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								## Get External Groups
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								`GET /api/teams/:teamId/groups`  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2022-05-21 03:48:52 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								**Required permissions**
							 
						 
					
						
							
								
									
										
										
										
											2022-02-12 01:00:13 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2022-05-21 03:48:52 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								See note in the [introduction ]({{< ref "#external-group-synchronization-api" >}} ) for an explanation.
							 
						 
					
						
							
								
									
										
										
										
											2022-02-12 01:00:13 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								| Action                 | Scope    |
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								| ---------------------- | -------- |
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								| teams.permissions:read | teams:\* |
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2018-11-01 01:01:30 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								**Example Request**:
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								```http
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								GET /api/teams/1/groups HTTP/1.1
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								Accept: application/json
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								Content-Type: application/json
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								Authorization: Basic YWRtaW46YWRtaW4=
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								```
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								**Example Response**:
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								```http
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								HTTP/1.1 200
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								Content-Type: application/json
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								[
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  {
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    "orgId": 1,
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    "teamId": 1,
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    "groupId": "cn=editors,ou=groups,dc=grafana,dc=org"
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  }
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								]
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								```
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								Status Codes:
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								-  **200** - Ok 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								-  **401** - Unauthorized 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								-  **403** - Permission denied 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								## Add External Group
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								`POST /api/teams/:teamId/groups`  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2022-05-21 03:48:52 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								**Required permissions**
							 
						 
					
						
							
								
									
										
										
										
											2022-02-12 01:00:13 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2022-05-21 03:48:52 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								See note in the [introduction ]({{< ref "#external-group-synchronization-api" >}} ) for an explanation.
							 
						 
					
						
							
								
									
										
										
										
											2022-02-12 01:00:13 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								| Action                  | Scope    |
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								| ----------------------- | -------- |
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								| teams.permissions:write | teams:\* |
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2018-11-01 01:01:30 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								**Example Request**:
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								```http
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								POST /api/teams/1/members HTTP/1.1
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								Accept: application/json
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								Content-Type: application/json
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								Authorization: Basic YWRtaW46YWRtaW4=
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								{
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  "groupId": "cn=editors,ou=groups,dc=grafana,dc=org"
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								}
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								```
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								**Example Response**:
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								```http
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								HTTP/1.1 200
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								Content-Type: application/json
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								{"message":"Group added to Team"}
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								```
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								Status Codes:
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								-  **200** - Ok 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								-  **400** - Group is already added to this team 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								-  **401** - Unauthorized 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								-  **403** - Permission denied 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								-  **404** - Team not found 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								## Remove External Group
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								`DELETE /api/teams/:teamId/groups/:groupId`  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2022-05-21 03:48:52 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								**Required permissions**
							 
						 
					
						
							
								
									
										
										
										
											2022-02-12 01:00:13 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2022-05-21 03:48:52 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								See note in the [introduction ]({{< ref "#external-group-synchronization-api" >}} ) for an explanation.
							 
						 
					
						
							
								
									
										
										
										
											2022-02-12 01:00:13 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								| Action                  | Scope    |
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								| ----------------------- | -------- |
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								| teams.permissions:write | teams:\* |
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2018-11-01 01:01:30 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								**Example Request**:
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								```http
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								DELETE /api/teams/1/groups/cn=editors,ou=groups,dc=grafana,dc=org HTTP/1.1
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								Accept: application/json
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								Content-Type: application/json
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								Authorization: Basic YWRtaW46YWRtaW4=
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								```
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								**Example Response**:
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								```http
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								HTTP/1.1 200
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								Content-Type: application/json
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								{"message":"Team Group removed"}
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								```
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								Status Codes:
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								-  **200** - Ok 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								-  **401** - Unauthorized 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								-  **403** - Permission denied 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								-  **404** - Team not found/Group not found