Appearance
API quickstart
The IDVIZE REST API exposes the same operations as the console: posture, applications, identities, plans, approvals and evidence.
Authentication today
API calls use a signed-in user token (Bearer). Each call runs with that user's roles and permissions, exactly as in the console. Tenant API keys for service integrations, and federated sign-in through your own identity provider (OIDC) for the console and the API, are planned. Both are tracked as open security debt in the Trust centre.
1. Get a user token
Sign in with an IDVIZE user account. Use a dedicated account for integrations, with only the roles it needs, and keep its password in your secrets manager, never in source code.
bash
API=https://<tenant>.api.idvize.com/v1
TOKEN=$(curl -s -X POST $API/security/auth/token \
-H "Content-Type: application/json" \
-d "{\"username\":\"$IDVIZE_USER\",\"password\":\"$IDVIZE_PASSWORD\"}" \
| jq -r '.data.token.access_token')Tokens are short-lived. Sign in again when a call returns 401, and call POST /security/auth/logout when you are done.
2. Call the API
bash
curl -s $API/os/risks -H "Authorization: Bearer $TOKEN"3. Plan, approve, preview, execute
Planning and approving must be done by two different users: separation of duties is enforced by the API.
bash
# 1. Plan: the agent returns steps, blast radius, prerequisites and rollback
SESSION=$(curl -s -X POST $API/agent-execution/sessions \
-H "Authorization: Bearer $PLANNER_TOKEN" -H "Content-Type: application/json" \
-d '{"agentType":"sso","applicationId":"app-123","controlId":"AM-001",
"context":{"redirectUris":["https://app.example.com/callback"]}}' \
| jq -r '.data.sessionId')
# 2. Approve, as a different user. Read the pending approval's ID from the session first.
APPROVAL=$(curl -s $API/agent-execution/sessions/$SESSION -H "Authorization: Bearer $APPROVER_TOKEN" \
| jq -r '.data.approvals[] | select(.status=="pending") | .approvalId')
curl -s -X POST $API/agent-execution/sessions/$SESSION/approve \
-H "Authorization: Bearer $APPROVER_TOKEN" -H "Content-Type: application/json" \
-d "{\"approvalId\":\"$APPROVAL\",\"decision\":\"approved\",\"comment\":\"Reviewed plan and rollback\"}"
# 3. Dry run of the approved plan (no change to the target system)
curl -s -X POST $API/agent-execution/sessions/$SESSION/preview -H "Authorization: Bearer $APPROVER_TOKEN"
# 4. Execute, then fetch the evidence
curl -s -X POST $API/agent-execution/sessions/$SESSION/execute -H "Authorization: Bearer $APPROVER_TOKEN"
curl -s $API/agent-execution/sessions/$SESSION/evidence -H "Authorization: Bearer $APPROVER_TOKEN"The session moves through pending_approval → approved → executing → completed (or rolled_back), and every transition is in the audit trail. A preview is only accepted once the session is approved; before that the API answers 409.
Reference
- API reference and versioning policy
- Rate limits, pagination and error format are listed in the reference.