mirror of
https://github.com/grafana/grafana.git
synced 2025-07-31 01:12:19 +08:00
Query History: Remove migration (#67470)
This commit is contained in:
@ -335,62 +335,3 @@ Status codes:
|
||||
- **200** – OK
|
||||
- **401** – Unauthorized
|
||||
- **500** – Internal error
|
||||
|
||||
## Migrate queries to Query history
|
||||
|
||||
`POST /api/query-history/migrate`
|
||||
|
||||
Migrates multiple queries in to query history.
|
||||
|
||||
**Example request:**
|
||||
|
||||
```http
|
||||
POST /api/query-history HTTP/1.1
|
||||
Accept: application/json
|
||||
Content-Type: application/json
|
||||
Authorization: Bearer eyJrIjoiT0tTcG1pUlY2RnVKZTFVaDFsNFZXdE9ZWmNrMkZYbk
|
||||
{
|
||||
"queries": [
|
||||
{
|
||||
"datasourceUid": "PE1C5CBDA0504A6A3",
|
||||
"queries": [
|
||||
{
|
||||
"refId": "A",
|
||||
"key": "Q-87fed8e3-62ba-4eb2-8d2a-4129979bb4de-0",
|
||||
"scenarioId": "csv_content",
|
||||
"datasource": {
|
||||
"type": "testdata",
|
||||
"uid": "PD8C576611E62080A"
|
||||
}
|
||||
}
|
||||
],
|
||||
"starred": false,
|
||||
"createdAt": 1643630762,
|
||||
"comment": "debugging"
|
||||
}
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
JSON body schema:
|
||||
|
||||
- **queries** – JSON of query history items.
|
||||
|
||||
**Example response:**
|
||||
|
||||
```http
|
||||
HTTP/1.1 200
|
||||
Content-Type: application/json
|
||||
{
|
||||
"message": "Query history successfully migrated",
|
||||
"totalCount": 105,
|
||||
"starredCount": 10
|
||||
}
|
||||
```
|
||||
|
||||
Status codes:
|
||||
|
||||
- **200** – OK
|
||||
- **400** - Errors (invalid JSON, missing or invalid fields)
|
||||
- **401** – Unauthorized
|
||||
- **500** – Internal error
|
||||
|
Reference in New Issue
Block a user