mirror of
https://github.com/grafana/grafana.git
synced 2024-11-22 00:47:38 -06:00
Docs: /sources/http_api/user.md (#31152)
I believe it's a mistake in the docs, since http requests against those endpoints are not supposed to be authenticated with API keys. If I correctly understand Grafana's auth design, the API key is not issued/tied to a user, therefore there is no mechanism to detect who the user is when the request is authenticated with an API key. Please note there may be other endpoints like this...
This commit is contained in:
parent
96ca2d6afc
commit
3efca53edf
@ -298,9 +298,11 @@ Content-Type: application/json
|
|||||||
GET /api/user HTTP/1.1
|
GET /api/user HTTP/1.1
|
||||||
Accept: application/json
|
Accept: application/json
|
||||||
Content-Type: application/json
|
Content-Type: application/json
|
||||||
Authorization: Bearer eyJrIjoiT0tTcG1pUlY2RnVKZTFVaDFsNFZXdE9ZWmNrMkZYbk
|
Authorization: Basic YWRtaW46YWRtaW4=
|
||||||
```
|
```
|
||||||
|
|
||||||
|
Requires basic authentication.
|
||||||
|
|
||||||
**Example Response**:
|
**Example Response**:
|
||||||
|
|
||||||
```http
|
```http
|
||||||
@ -328,7 +330,7 @@ Content-Type: application/json
|
|||||||
|
|
||||||
`PUT /api/user/password`
|
`PUT /api/user/password`
|
||||||
|
|
||||||
Changes the password for the user
|
Changes the password for the user. Requires basic authentication.
|
||||||
|
|
||||||
**Example Request**:
|
**Example Request**:
|
||||||
|
|
||||||
@ -336,7 +338,7 @@ Changes the password for the user
|
|||||||
PUT /api/user/password HTTP/1.1
|
PUT /api/user/password HTTP/1.1
|
||||||
Accept: application/json
|
Accept: application/json
|
||||||
Content-Type: application/json
|
Content-Type: application/json
|
||||||
Authorization: Bearer eyJrIjoiT0tTcG1pUlY2RnVKZTFVaDFsNFZXdE9ZWmNrMkZYbk
|
Authorization: Basic YWRtaW46YWRtaW4=
|
||||||
|
|
||||||
{
|
{
|
||||||
"oldPassword": "old_password",
|
"oldPassword": "old_password",
|
||||||
@ -415,7 +417,7 @@ Content-Type: application/json
|
|||||||
|
|
||||||
`GET /api/user/orgs`
|
`GET /api/user/orgs`
|
||||||
|
|
||||||
Return a list of all organizations of the current user.
|
Return a list of all organizations of the current user. Requires basic authentication.
|
||||||
|
|
||||||
**Example Request**:
|
**Example Request**:
|
||||||
|
|
||||||
@ -423,7 +425,7 @@ Return a list of all organizations of the current user.
|
|||||||
GET /api/user/orgs HTTP/1.1
|
GET /api/user/orgs HTTP/1.1
|
||||||
Accept: application/json
|
Accept: application/json
|
||||||
Content-Type: application/json
|
Content-Type: application/json
|
||||||
Authorization: Bearer eyJrIjoiT0tTcG1pUlY2RnVKZTFVaDFsNFZXdE9ZWmNrMkZYbk
|
Authorization: Basic YWRtaW46YWRtaW4=
|
||||||
```
|
```
|
||||||
|
|
||||||
**Example Response**:
|
**Example Response**:
|
||||||
|
Loading…
Reference in New Issue
Block a user