Docs: Document fine-grained access control (#33563)
This commit is contained in:
@@ -5,13 +5,15 @@ keywords = ["grafana", "http", "documentation", "api", "organization"]
|
||||
aliases = ["/docs/grafana/latest/http_api/organization/"]
|
||||
+++
|
||||
|
||||
|
||||
# Organization API
|
||||
|
||||
The Organization HTTP API is divided in two resources, `/api/org` (current organization)
|
||||
and `/api/orgs` (admin organizations). One big difference between these are that
|
||||
the admin of all organizations API only works with basic authentication, see [Admin Organizations API](#admin-organizations-api) for more information.
|
||||
|
||||
> 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.
|
||||
|
||||
## Current Organization API
|
||||
|
||||
### Get current Organization
|
||||
@@ -46,6 +48,14 @@ Content-Type: application/json
|
||||
Returns all org users within the current organization.
|
||||
Accessible to users with org admin role.
|
||||
|
||||
#### Required permissions
|
||||
|
||||
See note in the [introduction]({{< ref "#organization-api" >}}) for an explanation.
|
||||
|
||||
Action | Scope
|
||||
--- | --- |
|
||||
org.users:read | users:*
|
||||
|
||||
**Example Request**:
|
||||
|
||||
```http
|
||||
@@ -112,6 +122,14 @@ Content-Type: application/json
|
||||
|
||||
`PATCH /api/org/users/:userId`
|
||||
|
||||
#### Required permissions
|
||||
|
||||
See note in the [introduction]({{< ref "#organization-api" >}}) for an explanation.
|
||||
|
||||
Action | Scope
|
||||
--- | --- |
|
||||
org.users.role:update | users:*
|
||||
|
||||
**Example Request**:
|
||||
|
||||
```http
|
||||
@@ -138,6 +156,14 @@ Content-Type: application/json
|
||||
|
||||
`DELETE /api/org/users/:userId`
|
||||
|
||||
#### Required permissions
|
||||
|
||||
See note in the [introduction]({{< ref "#organization-api" >}}) for an explanation.
|
||||
|
||||
Action | Scope
|
||||
--- | --- |
|
||||
org.users:remove | users:*
|
||||
|
||||
**Example Request**:
|
||||
|
||||
```http
|
||||
@@ -188,6 +214,14 @@ Content-Type: application/json
|
||||
|
||||
Adds a global user to the current organization.
|
||||
|
||||
#### Required permissions
|
||||
|
||||
See note in the [introduction]({{< ref "#organization-api" >}}) for an explanation.
|
||||
|
||||
Action | Scope
|
||||
--- | --- |
|
||||
org.users:add | users:*
|
||||
|
||||
**Example Request**:
|
||||
|
||||
```http
|
||||
@@ -407,6 +441,14 @@ Content-Type: application/json
|
||||
|
||||
Only works with Basic Authentication (username and password), see [introduction](#admin-organizations-api).
|
||||
|
||||
#### Required permissions
|
||||
|
||||
See note in the [introduction]({{< ref "#organization-api" >}}) for an explanation.
|
||||
|
||||
Action | Scope
|
||||
--- | --- |
|
||||
org.users:read | users:*
|
||||
|
||||
**Example Request**:
|
||||
|
||||
```http
|
||||
@@ -440,6 +482,14 @@ Content-Type: application/json
|
||||
|
||||
Only works with Basic Authentication (username and password), see [introduction](#admin-organizations-api).
|
||||
|
||||
#### Required permissions
|
||||
|
||||
See note in the [introduction]({{< ref "#organization-api" >}}) for an explanation.
|
||||
|
||||
Action | Scope
|
||||
--- | --- |
|
||||
org.users:add | users:*
|
||||
|
||||
**Example Request**:
|
||||
|
||||
```http
|
||||
@@ -468,6 +518,14 @@ Content-Type: application/json
|
||||
|
||||
Only works with Basic Authentication (username and password), see [introduction](#admin-organizations-api).
|
||||
|
||||
#### Required permissions
|
||||
|
||||
See note in the [introduction]({{< ref "#organization-api" >}}) for an explanation.
|
||||
|
||||
Action | Scope
|
||||
--- | --- |
|
||||
org.users.role:update | users:*
|
||||
|
||||
**Example Request**:
|
||||
|
||||
```http
|
||||
@@ -495,6 +553,14 @@ Content-Type: application/json
|
||||
|
||||
Only works with Basic Authentication (username and password), see [introduction](#admin-organizations-api).
|
||||
|
||||
#### Required permissions
|
||||
|
||||
See note in the [introduction]({{< ref "#organization-api" >}}) for an explanation.
|
||||
|
||||
Action | Scope
|
||||
--- | --- |
|
||||
org.users:remove | users:*
|
||||
|
||||
**Example Request**:
|
||||
|
||||
```http
|
||||
|
||||
Reference in New Issue
Block a user