Docs: Document fine-grained access control (#33563)
This commit is contained in:
@@ -5,12 +5,23 @@ keywords = ["grafana", "http", "documentation", "api", "user"]
|
||||
aliases = ["/docs/grafana/latest/http_api/user/"]
|
||||
+++
|
||||
|
||||
# User HTTP resources / actions
|
||||
# User API
|
||||
|
||||
> If you are running Grafana Enterprise and have [Fine-grained access control]({{< relref "../enterprise/access-control/_index.md" >}}) enabled, for some endpoints you would need to have relevant permissions.
|
||||
Refer to specific resources to understand what permissions are required.
|
||||
|
||||
## Search Users
|
||||
|
||||
`GET /api/users?perpage=10&page=1`
|
||||
|
||||
#### Required permissions
|
||||
|
||||
See note in the [introduction]({{< ref "#user-api" >}}) for an explanation.
|
||||
|
||||
Action | Scope
|
||||
--- | --- |
|
||||
users:read | global:users:*
|
||||
|
||||
**Example Request**:
|
||||
|
||||
```http
|
||||
@@ -58,6 +69,14 @@ Content-Type: application/json
|
||||
|
||||
`GET /api/users/search?perpage=10&page=1&query=mygraf`
|
||||
|
||||
#### Required permissions
|
||||
|
||||
See note in the [introduction]({{< ref "#user-api" >}}) for an explanation.
|
||||
|
||||
Action | Scope
|
||||
--- | --- |
|
||||
users:read | global:users:*
|
||||
|
||||
**Example Request**:
|
||||
|
||||
```http
|
||||
@@ -111,6 +130,14 @@ Content-Type: application/json
|
||||
|
||||
`GET /api/users/:id`
|
||||
|
||||
#### Required permissions
|
||||
|
||||
See note in the [introduction]({{< ref "#user-api" >}}) for an explanation.
|
||||
|
||||
Action | Scope
|
||||
--- | --- |
|
||||
users:read | users:*
|
||||
|
||||
**Example Request**:
|
||||
|
||||
```http
|
||||
@@ -148,6 +175,14 @@ Content-Type: application/json
|
||||
|
||||
`GET /api/users/lookup?loginOrEmail=user@mygraf.com`
|
||||
|
||||
#### Required permissions
|
||||
|
||||
See note in the [introduction]({{< ref "#user-api" >}}) for an explanation.
|
||||
|
||||
Action | Scope
|
||||
--- | --- |
|
||||
users:read | global:users:*
|
||||
|
||||
**Example Request using the email as option**:
|
||||
|
||||
```http
|
||||
@@ -195,6 +230,14 @@ Content-Type: application/json
|
||||
|
||||
`PUT /api/users/:id`
|
||||
|
||||
#### Required permissions
|
||||
|
||||
See note in the [introduction]({{< ref "#user-api" >}}) for an explanation.
|
||||
|
||||
Action | Scope
|
||||
--- | --- |
|
||||
users:write | users:*
|
||||
|
||||
**Example Request**:
|
||||
|
||||
```http
|
||||
@@ -226,6 +269,14 @@ Content-Type: application/json
|
||||
|
||||
`GET /api/users/:id/orgs`
|
||||
|
||||
#### Required permissions
|
||||
|
||||
See note in the [introduction]({{< ref "#user-api" >}}) for an explanation.
|
||||
|
||||
Action | Scope
|
||||
--- | --- |
|
||||
users:read | users:*
|
||||
|
||||
**Example Request**:
|
||||
|
||||
```http
|
||||
@@ -256,6 +307,14 @@ Content-Type: application/json
|
||||
|
||||
`GET /api/users/:id/teams`
|
||||
|
||||
#### Required permissions
|
||||
|
||||
See note in the [introduction]({{< ref "#user-api" >}}) for an explanation.
|
||||
|
||||
Action | Scope
|
||||
--- | --- |
|
||||
users.teams:read | users:*
|
||||
|
||||
**Example Request**:
|
||||
|
||||
```http
|
||||
|
||||
Reference in New Issue
Block a user