4cacab01f4
* Use relative aliases for all non-current Grafana aliases Signed-off-by: Jack Baldry <jack.baldry@grafana.com> * Remove all current page aliases find docs/sources -type f -name '*.md' -exec sed -z -i 's#\n *- /docs/grafana/latest/[^\n]*\n#\n#' {} \; find docs/sources -type f -name '*.md' -exec sed -Ez -i 's#\n((aliases:\n *-)|aliases:\n)#\n\2#' {} \; Signed-off-by: Jack Baldry <jack.baldry@grafana.com> Signed-off-by: Jack Baldry <jack.baldry@grafana.com>
56 lines
1.0 KiB
Markdown
56 lines
1.0 KiB
Markdown
---
|
||
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
|
||
|
||
```
|
||
|
||
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
|
||
|
||
```
|
||
|
||
Status codes:
|
||
|
||
- **200** – Created
|
||
- **400** – Errors (invalid JSON, missing or invalid fields)
|