Skip to content

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.

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
Terminal window
# List all tokens for the current user
ayx one token list
# Machine-readable
ayx --output json one token list

token list takes no filter flags. Use jq to filter the JSON output.

Terminal window
# Preview the request
ayx one token create --body '{"name":"ci-bot","description":"..."}'
# Commit
ayx one token create \
--body '{"name":"ci-bot","description":"..."}' \
--apply

The 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.

Terminal window
ayx one token detail <id>
# JSON for scripting
ayx --output json one token detail <id>

Pass --profile <name> to query a specific environment.

Deleting a token immediately revokes it. Any automation using it will stop working.

Terminal window
# Preview
ayx one token delete <id>
# Commit
ayx one token delete <id> --apply --yes

--yes skips the TTY confirmation, required in non-interactive scripts.

Terminal window
# Audit: list all token IDs and names
ayx --output json one token list \
| jq -r '.data[] | "\(.id)\t\(.name)"'
# Rotate: create new, then delete old
NEW_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 --yes