Commit a928da7f by Kumaraguru Ramasamy Committed by Torkel Ödegaard

Docs: Improve API tutorial intro content and readability (#18762)

* API Tutorial: Improve content and readability

- Simplified the introductory paragraphs.
- Rewrote the descriptions and steps to improve readability.

* Updated topic as discussed in the PR

- Corrected the typo from "Graphana" to "Grafana".
- Rewritten the note as suggested by reviewers and to avoid passive voice.

Please review and share your thoughts.
parent e4a0b224
......@@ -9,13 +9,14 @@ weight = 10
# API Tutorial: How To Create API Tokens And Dashboards For A Specific Organization
A common scenario is to want to via the Grafana API setup new Grafana organizations or to add dynamically generated dashboards to an existing organization.
Use the Grafana API to setup new Grafana organizations or to add dynamically generated dashboards to an existing organization.
## Authentication
There are two ways to authenticate against the API: basic authentication and API Tokens.
There are two authentication methods to access the API:
Some parts of the API are only available through basic authentication and these parts of the API usually require that the user is a Grafana Admin. But all organization actions are accessed via an API Token. An API Token is tied to an organization and can be used to create dashboards etc but only for that organization.
- Basic authentication: A Grafana Admin user can access some parts of the Grafana API through basic authentication.
- API Tokens: All organization actions are accessed through an API Token. An API Token is associated with an organization. It can be used to create dashboards and other components specific for that organization.
## How To Create A New Organization and an API Token
......@@ -71,4 +72,4 @@ Using the Token that was created in the previous step, you can create a dashboar
}' http://localhost:3000/api/dashboards/db
```
This import will not work if you exported the dashboard via the Share -> Export menu in the Grafana UI (it strips out data source names etc.). View the JSON and save it to a file instead or fetch the dashboard JSON via the API.
> **Note.** If you export a dashboard for sharing externally using the Share > Export menu in the Grafana UI, you cannot import that dashboard. Instead, click **View JSON** and save it to a file or fetch the JSON output through the API.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment