Docs: Moves http api docs to the developer docs (#49255)

* updates relrefs after move

Co-authored-by: Chris Moyer <chris.moyer@grafana.com>

* applies weights

Co-authored-by: Chris Moyer <chris.moyer@grafana.com>
Signed-off-by: Jack Baldry <jack.baldry@grafana.com>

* updates developer _index page

* make prettier

Signed-off-by: Jack Baldry <jack.baldry@grafana.com>

Co-authored-by: Jack Baldry <jack.baldry@grafana.com>
This commit is contained in:
Christopher Moyer
2022-05-20 12:46:27 -05:00
committed by GitHub
co-authored by Chris Moyer Jack Baldry
parent 3d5d8c785b
commit ee9ea64834
88 changed files with 191 additions and 185 deletions
@@ -0,0 +1,51 @@
+++
aliases = ["/docs/grafana/latest/http_api/short_url/"]
description = "Grafana Short URL HTTP API"
keywords = ["grafana", "http", "documentation", "api", "shortUrl"]
title = "Short URL HTTP API "
+++
# Short URL API
Use this API to create shortened URLs. A short URL represents a longer URL containing complex query parameters in a smaller and simpler format.
## Create short URL
`POST /api/short-urls`
Creates a short URL.
**Example request:**
```http
POST /api/short-urls HTTP/1.1
Accept: application/json
Content-Type: application/json
Authorization: Bearer eyJrIjoiT0tTcG1pUlY2RnVKZTFVaDFsNFZXdE9ZWmNrMkZYbk
{
"path": "d/TxKARsmGz/new-dashboard?orgId=1&from=1599389322894&to=1599410922894"
}
```
JSON body schema:
- **path** – The path to shorten, relative to the Grafana [root_url]({{< relref "../../administration/configuration.md#root_url" >}}).
**Example response:**
```http
HTTP/1.1 200
Content-Type: application/json
{
"uid": AT76wBvGk,
"url": http://localhost:3000/goto/AT76wBvGk?orgId=1
}
```
Status codes:
- **200** – Created
- **400** – Errors (invalid JSON, missing or invalid fields)