grafana/docs/sources/http_api/short_url.md
Robby Milo abee02dbcd
Docs: updates for file-based menu (#28500)
* initial

* cleanup

* remove bad aliases

* cleanup, fix links

* add docs-file-based-command

* update docs

* update readme

* fix broken links

* fix spelling

Co-authored-by: Diana Payton <52059945+oddlittlebird@users.noreply.github.com>
2020-11-09 12:26:49 -08:00

52 lines
1.1 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

+++
title = "Short URL HTTP API "
description = "Grafana Short URL HTTP API"
keywords = ["grafana", "http", "documentation", "api", "shortUrl"]
aliases = ["/docs/grafana/latest/http_api/short_url/"]
+++
# 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)