Verified live against tenant pf922288, 01 Jul 2026. Real IDs baked in. Ephemeral IDs (request/session) are captured at runtime, not hardcoded.
tag = docs bucket (BT-CLI / API)VERIFIED — ran live, non-destructive, safe to demoSTATE-CHANGING — correct syntax, changes/creates/deletes; run deliberately
Real values (pf922288)
system ad.upm.academy .......... ID 19 (Active Directory)
system linhost2 ................ ID 6 (Linux — used for the create demo)
account svc_app ................. ID 18119 (exists; credential test PASSED)
safe GitHub - BTSolution-Engineering ... 9b56a95b-0a8a-4be6-de3c-08dd5118ea68
folder IaC-Demo ............... bec2694b-994a-47cd-07c2-08de5e7a5e2d
group SecretsSafe_Access ..... ID 9 (Dev_Ansible=10, API_Users=11)
secret path ................... GitHub - BTSolution-Engineering/IaC-Demo/AWS
perm flags ..................... None, Read, Create, Edit, Delete, Share, Manage
Setup — run once per session
Session setupVERIFIED
source .venv/bin/activate
bt whoami
Credentials load from ~/.bt-cli/config.yaml — no source .env needed. bt whoami should show Password Safe = Connected (user NH-Ansible, ID 120).
Show the underlying REST call (demo toggle)APIVERIFIED
bt --show-rest pws accounts get 18119
Prepend bt --show-rest to any command to print the REST request + response panels (method, URL, headers, body) — auth headers auto-redacted. Great for proving each command hits the public API. Also works as env: export BT_SHOW_REST=1.
1 · Create account or secret — BT-CLI
Create managed account (local, on a non-directory system)BT-CLISTATE
--system takes the integer ID (6 = linhost2, Linux). Sub a real PASSWORD. Note: directory accounts (like svc_app on ad.upm.academy) require a UserPrincipalName and are onboarded via discovery, not this manual create — so the create demo uses a local system.
Flags aren't freely combinable — the server validates the whole set. Valid combos (verified live): Read · Read, Edit · Read, Create, Edit, Delete, Share · Read, Create, Edit, Delete, Share, Manage (full owner). Manage only works with the full set — Read,Edit,Manage is rejected as an "Invalid permission combination".
Returns a RequestID in the JSON. Requires the account to be under an access policy with a schedule your identity can use — otherwise you get "Could not find a schedule to use with this release request." If so, use quick checkout (step 5), which lists only accounts you can actually request.
List pending requestsAPIVERIFIED
bt pws credentials list --status pending
Ran live (currently "No requests found"). Also: --all, --status approved.
Approve a pending requestAPISTATE
bt pws credentials approve REQUEST_ID
REQUEST_ID is the integer from the checkout above / from credentials list.
Run with no args to go interactive — it lists only the accounts you're actually allowed to request, you pick one, and it does request → approve → show password in one step. This sidesteps the access-policy/schedule issue above.
Quick checkout — scripted, to a variableBT-CLISTATE
PW=$(bt pws quick checkout -s "SYSTEM" -a "ACCOUNT" --raw)
Same flow, non-interactive. Fill SYSTEM/ACCOUNT with one shown in the interactive list. echo "$PW" to view.
Path is Safe/Folder/SecretName. Resolved live to Secret "AWS". Drop --raw for a table view.
6 · Revoke access — API
Check in + rotate on releaseAPISTATE
bt pws credentials checkin REQUEST_ID --rotate
REQUEST_ID is an integer (from step 4/5).
List active sessions (capture the session ID)APIVERIFIED
bt pws sessions list --active
Ran live (currently "No sessions found"). The ID column is the SESSION_ID (integer) below.
Suspend session (resumable)APISTATE
bt pws sessions suspend SESSION_ID
Terminate session (permanent)APISTATE
bt pws sessions terminate SESSION_ID --force
7 · Offboard the account — BT-CLI
Offboard system (removes system + accounts + asset)BT-CLISTATE
bt pws quick offboard -s "ad.upm.academy"
Destructive: deletes ad.upm.academy (ID 19) and all its accounts incl. svc_app. Don't run unless you mean it.
8 · Export audit evidence — API
Full evidence export (JSON)APIVERIFIED
bt pws audit export --file ~/evidence.json
Defaults to BOTH requests and sessions when no flag is given. --file must be a writable path — the CLI fetches the evidence then writes the file, so a "Permission denied" here means the directory isn't writable (use ~/ or /tmp, not a read-only checkout dir).
ServiceNow / SailPoint and scoped-token API auth (certs, rate limits, bulk ops) are UI/console config, not bt-cli commands — nothing to copy/paste here.