The open and composable observability and data visualization platform. Visualize metrics, logs, and traces from multiple sources like Prometheus, Loki, Elasticsearch, InfluxDB, Postgres and many more.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
grafana/docs/sources/developers/http_api/team_sync.md

3.1 KiB

aliases canonical description keywords labels title
[../../http_api/external_group_sync/ ./external_group_sync/] /docs/grafana/latest/developers/http_api/team_sync/ Grafana Team Sync HTTP API [grafana http documentation api team teams group member enterprise] [{products [enterprise oss]}] Team Sync HTTP API

Team Sync API

Team Sync is only available in Grafana Enterprise. Read more about [Grafana Enterprise]({{< relref "/docs/grafana/latest/introduction/grafana-enterprise" >}}).

If you are running Grafana Enterprise, for some endpoints you'll need to have specific permissions. Refer to [Role-based access control permissions]({{< relref "/docs/grafana/latest/administration/roles-and-permissions/access-control/custom-role-actions-scopes" >}}) for more information.

Get External Groups

GET /api/teams/:teamId/groups

Required permissions

See note in the [introduction]({{< ref "#external-group-synchronization-api" >}}) for an explanation.

Action Scope
teams.permissions:read teams:*

Example Request:

GET /api/teams/1/groups HTTP/1.1
Accept: application/json
Content-Type: application/json
Authorization: Bearer glsa_kcVxDhZtu5ISOZIEt

Example Response:

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

Required permissions

See note in the [introduction]({{< ref "#external-group-synchronization-api" >}}) for an explanation.

Action Scope
teams.permissions:write teams:*

Example Request:

POST /api/teams/1/groups HTTP/1.1
Accept: application/json
Content-Type: application/json
Authorization: Bearer YWRtaW46YWRtaW4=

{
  "groupId": "cn=editors,ou=groups,dc=grafana,dc=org"
}

Example Response:

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=external-group-id

Required permissions

See note in the [introduction]({{< ref "#external-group-synchronization-api" >}}) for an explanation.

Action Scope
teams.permissions:write teams:*

Example Request:

DELETE /api/teams/1/groups?groupId=cn%3Deditors%2Cou%3Dgroups%2Cdc%3Dgrafana%2Cdc%3Dorg HTTP/1.1
Accept: application/json
Content-Type: application/json
Authorization: Bearer glsa_kcVxDhZtu5ISOZIEt

Example Response:

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