External Group Synchronization API

External Group Synchronization is only available in Grafana Enterprise. Read more about Grafana Enterprise.

Get External Groups

GET /api/teams/:teamId/groups

Example Request:

  1. GET /api/teams/1/groups HTTP/1.1
  2. Accept: application/json
  3. Content-Type: application/json
  4. Authorization: Basic YWRtaW46YWRtaW4=

Example Response:

  1. HTTP/1.1 200
  2. Content-Type: application/json
  3. [
  4. {
  5. "orgId": 1,
  6. "teamId": 1,
  7. "groupId": "cn=editors,ou=groups,dc=grafana,dc=org"
  8. }
  9. ]

Status Codes:

  • 200 - Ok
  • 401 - Unauthorized
  • 403 - Permission denied

Add External Group

POST /api/teams/:teamId/groups

Example Request:

  1. POST /api/teams/1/members HTTP/1.1
  2. Accept: application/json
  3. Content-Type: application/json
  4. Authorization: Basic YWRtaW46YWRtaW4=
  5. {
  6. "groupId": "cn=editors,ou=groups,dc=grafana,dc=org"
  7. }

Example Response:

  1. HTTP/1.1 200
  2. Content-Type: application/json
  3. {"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

Example Request:

  1. DELETE /api/teams/1/groups/cn=editors,ou=groups,dc=grafana,dc=org HTTP/1.1
  2. Accept: application/json
  3. Content-Type: application/json
  4. Authorization: Basic YWRtaW46YWRtaW4=

Example Response:

  1. HTTP/1.1 200
  2. Content-Type: application/json
  3. {"message":"Team Group removed"}

Status Codes:

  • 200 - Ok
  • 401 - Unauthorized
  • 403 - Permission denied
  • 404 - Team not found/Group not found