mirror of
https://github.com/grafana/grafana.git
synced 2025-08-02 08:52:14 +08:00
Chore: Modify patch and update of preference to take homedashboarduid than h… (#48281)
* modify patch and update of preference to take homedashboarduid than homedashboardid * to be tested * use getdashboard * update doc
This commit is contained in:
@ -35,7 +35,19 @@ Authorization: Bearer eyJrIjoiT0tTcG1pUlY2RnVKZTFVaDFsNFZXdE9ZWmNrMkZYbk
|
||||
HTTP/1.1 200
|
||||
Content-Type: application/json
|
||||
|
||||
```
|
||||
```
|
||||
|
||||
## Update Current User Prefs
|
||||
|
||||
`PUT /api/user/preferences`
|
||||
|
||||
**Example Request**:
|
||||
|
||||
```http
|
||||
PUT /api/user/preferences HTTP/1.1
|
||||
Accept: application/json
|
||||
Content-Type: application/json
|
||||
Authorization: Bearer eyJrIjoiT0tTcG1pUlY2RnVKZTFVaDFsNFZXdE9ZWmNrMkZYbk
|
||||
|
||||
```
|
||||
|
||||
@ -52,7 +64,7 @@ Authorization: Bearer eyJrIjoiT0tTcG1pUlY2RnVKZTFVaDFsNFZXdE9ZWmNrMkZYbk
|
||||
Update one or more preferences without modifying the others.
|
||||
|
||||
`PATCH /api/user/preferences`
|
||||
|
||||
|
||||
**Example Request**:
|
||||
|
||||
```http
|
||||
@ -113,7 +125,18 @@ Authorization: Bearer eyJrIjoiT0tTcG1pUlY2RnVKZTFVaDFsNFZXdE9ZWmNrMkZYbk
|
||||
Content-Type: text/plain; charset=utf-8
|
||||
|
||||
```
|
||||
Content-Type: application/json
|
||||
|
||||
## Patch Current Org Prefs
|
||||
|
||||
Update one or more preferences without modifying the others.
|
||||
|
||||
`PATCH /api/org/preferences`
|
||||
|
||||
**Example Request**:
|
||||
|
||||
```http
|
||||
PATCH /api/org/preferences HTTP/1.1
|
||||
Accept: application/json
|
||||
Content-Type: application/json
|
||||
Authorization: Bearer eyJrIjoiT0tTcG1pUlY2RnVKZTFVaDFsNFZXdE9ZWmNrMkZYbk
|
||||
|
||||
@ -130,7 +153,7 @@ Authorization: Bearer eyJrIjoiT0tTcG1pUlY2RnVKZTFVaDFsNFZXdE9ZWmNrMkZYbk
|
||||
|
||||
{
|
||||
"theme": "",
|
||||
`PATCH /api/org/preferences`
|
||||
"homeDashboardUID":"home",
|
||||
"timezone":"utc"
|
||||
}
|
||||
```
|
||||
|
Reference in New Issue
Block a user