Skip to content

Commit 6e6e4a4

Browse files
committed
Apply feedback
1 parent 1c0f1f3 commit 6e6e4a4

File tree

2 files changed

+6
-8
lines changed

2 files changed

+6
-8
lines changed

articles/managed-grafana/how-to-create-api-keys.md

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -86,17 +86,15 @@ You can now use this Grafana API key to call the Grafana server.
8686

8787
---
8888

89-
## Make an HTTP request
89+
## Test the API key
9090

91-
Run the command below to make an HTTP request and check its status code.
91+
Run the [az grafana dashboard list](/cli/azure/grafana/dashboard#az-grafana-dashboard-list) command below to check if your API key is working. Replace the placeholders `<azure-managed-grafana-name>` and `<api-key>` with the name of your Azure Managed Grafana instance and your API key.
9292

93-
1. Open a terminal and enter the following command. Replace the placeholders `<api-key>` and `<managed-grafana-endpoint>` with your own API key and Azure Managed Grafana endpoint.
94-
95-
```bash
96-
curl -vv H "Authorization: Bearer <api-key>" https://dashboard.scus.<managed-grafana-endpoint>/api/dashboards/home
97-
```
93+
```azurecli-interactive
94+
az grafana dashboard list --name <azure-managed-grafana-name> --api-key <api-key>
95+
```
9896

99-
1. Review the terminal's output. The HTTP response code `200` indicates that the request was successful. The new API key is valid.
97+
The terminal's output lists all the dashboards your API key can access in the specified Azure Managed Grafana instance.
10098

10199
## Manage API keys
102100

-3.44 KB
Loading

0 commit comments

Comments
 (0)