dynatrace-clilisted
Install: claude install-skill abdullahkhawer/devops-skills
# Dynatrace CLI Skill
Use the instance and rules below when constructing all Dynatrace API commands.
## Instances
Update the table below with your Dynatrace environment URLs and token file paths:
| Environment | Base URL | Token File |
|---|---|---|
| Production | `https://<your-env-id>.live.dynatrace.com` | `~/.dynatrace/prod.token` |
| Staging | `https://<your-env-id>.live.dynatrace.com` | `~/.dynatrace/staging.token` |
If the target instance is unclear, ask the user before running any command.
## Prerequisites (one-time setup by user)
Generate a Dynatrace API token with the required scopes (**Settings → Integration → Dynatrace API**) for each environment and save it to the corresponding token file. Never print or display token values. Do not perform these steps yourself.
```bash
mkdir -p ~/.dynatrace && echo "<your-api-token>" > <TOKEN_FILE> && chmod 600 <TOKEN_FILE>
```
## Command Format
```bash
curl -s -H "Authorization: Api-Token $(cat <TOKEN_FILE>)" \
"<BASE_URL>/api/v2/<endpoint>" | jq .
```
## Available API Endpoints
### Read-only (safe, no confirmation needed)
| Endpoint | Method | Description |
|---|---|---|
| `/api/v2/entities` | GET | List monitored entities (hosts, services, etc.) |
| `/api/v2/entities/<id>` | GET | Get a specific entity |
| `/api/v2/metrics/query` | GET | Query metric data points |
| `/api/v2/problems` | GET | List problems |
| `/api/v2/problems/<id>` | GET | Get a specific problem |
| `/api/v2/events` | GET | List events |
| `/a