API tokens
ayx one token manages API tokens for the active Alteryx One profile. Tokens are scoped to the authenticated caller. Creating and deleting tokens are mutating; add --apply to commit.
Quick reference
Section titled “Quick reference”| Command | What it does |
|---|---|
token list |
List API tokens for the current user |
token create --body <json> |
Create a new API token |
token detail <id> |
Show details for a specific token |
token delete <id> |
Delete a token |
Listing tokens
Section titled “Listing tokens”# List all tokens for the current userayx one token list
# Machine-readableayx --output json one token listtoken list takes no filter flags. Use jq to filter the JSON output.
Creating a token
Section titled “Creating a token”# Preview the requestayx one token create --body '{"name":"ci-bot","description":"..."}'
# Commitayx one token create \ --body '{"name":"ci-bot","description":"..."}' \ --applyThe token value is returned once at creation time. Store it immediately — it cannot be retrieved again.
Pass --profile <name> to create the token against a non-default environment.
Inspecting a token
Section titled “Inspecting a token”ayx one token detail <id>
# JSON for scriptingayx --output json one token detail <id>Pass --profile <name> to query a specific environment.
Deleting a token
Section titled “Deleting a token”Deleting a token immediately revokes it. Any automation using it will stop working.
# Previewayx one token delete <id>
# Commitayx one token delete <id> --apply --yes--yes skips the TTY confirmation, required in non-interactive scripts.
Automation patterns
Section titled “Automation patterns”# Audit: list all token IDs and namesayx --output json one token list \ | jq -r '.data[] | "\(.id)\t\(.name)"'
# Rotate: create new, then delete oldNEW_ID=$(ayx --output json one token create \ --body '{"name":"ci-bot-new"}' --apply \ | jq -r '.data.id')
# Store the new token value from that response, then:ayx one token delete <old-id> --apply --yesRelated
Section titled “Related”- Identity & auth
- Person — manage the users who own tokens
- Safety model