Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion skills/dtctl/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ Gotchas: set `davis.enabled: false` on data tiles; `makeTimeseries` for log/span

## Permissions & safety

- Verify before mutating: `dtctl auth can-i <verb> <resource>`. Scopes: [TOKEN_SCOPES.md](https://github.com/Dynatrace/dtctl/blob/main/docs/TOKEN_SCOPES.md).
- Verify before mutating: append `--check-scopes` to the exact command. It prints the required vs. granted token scopes and exits without running it: `ok`, `insufficient_scope` (exit 5), or `unknown` when dtctl can't verify: the token's scopes aren't readable (API/platform token, no context), or the command's scopes depend on its input (`apply`; `exec api` when the environment's API spec gives no scope for the path). Then preview with `--dry-run` where the command's `--help` lists it, or have the API validate a settings object without saving: `dtctl create settings -f <file> --schema <id> --scope <scope> --validate-only`. None of these applies the safety level. Scopes: [TOKEN_SCOPES.md](https://github.com/Dynatrace/dtctl/blob/main/docs/TOKEN_SCOPES.md).
- Destructive ops may be blocked by safety level — switch with `dtctl config use-context <name>`, or raise the level when creating the context.
- Prefer `get`/`describe` first; `--mine` scopes to resources you own; `--plain` for all machine consumption.

Expand Down
4 changes: 2 additions & 2 deletions skills/dtctl/references/troubleshooting.md
Original file line number Diff line number Diff line change
Expand Up @@ -106,8 +106,8 @@ dtctl config set-credentials "my-token" --token "$TOKEN"
# Check auth context (token type, not identity)
dtctl auth status --plain

# Check permissions
dtctl auth can-i <verb> <resource>
# Check the token's scopes for a command without running it
dtctl <verb> <resource> [args] --check-scopes
```

> **Note:** `dtctl auth whoami` is not a connectivity check. It hits the platform
Expand Down
Loading