cURL Examples¶
Quick reference for interacting with Vargate from the command line.
Setup¶
Set your API key as an environment variable:
Submit a Governed Tool Call¶
curl -X POST "$VARGATE_URL/mcp/tools/call" \
-H "Content-Type: application/json" \
-H "X-API-Key: $VARGATE_API_KEY" \
-d '{
"agent_id": "my-agent-v1",
"agent_type": "autonomous",
"agent_version": "1.0.0",
"tool": "http",
"method": "GET",
"params": {"url": "https://api.example.com/data"}
}'
Verify Audit Chain¶
View Audit Log¶
Replay a Decision¶
curl -X POST "$VARGATE_URL/audit/replay" \
-H "Content-Type: application/json" \
-H "X-API-Key: $VARGATE_API_KEY" \
-d '{"action_id": "550e8400-e29b-41d4-a716-446655440000"}'
Get Merkle Proof¶
List Policy Templates¶
Apply a Policy Template¶
curl -X PATCH "$VARGATE_URL/dashboard/settings" \
-H "Content-Type: application/json" \
-H "X-API-Key: $VARGATE_API_KEY" \
-d '{
"policy_template": "financial",
"policy_config": {
"transaction_limit": 10000,
"approval_threshold": 5000
}
}'
Configure Webhooks¶
curl -X PATCH "$VARGATE_URL/dashboard/settings" \
-H "Content-Type: application/json" \
-H "X-API-Key: $VARGATE_API_KEY" \
-d '{
"webhook_url": "https://your-server.com/webhook",
"webhook_events": ["action.denied", "action.pending"]
}'
Test Webhook Delivery¶
Check Gateway Health¶
Blockchain Anchor Status¶
Export Compliance Package¶
# JSON format
curl "$VARGATE_URL/compliance/export/YOUR_TENANT_ID?from=2026-01-01&to=2026-12-31&format=json" \
-H "X-API-Key: $VARGATE_API_KEY" \
-o compliance-report.json
# PDF format
curl "$VARGATE_URL/compliance/export/YOUR_TENANT_ID?from=2026-01-01&to=2026-12-31&format=pdf" \
-H "X-API-Key: $VARGATE_API_KEY" \
-o compliance-report.pdf
GDPR Erasure¶
# Erase subject data
curl -X POST "$VARGATE_URL/audit/erase/user-123" \
-H "X-API-Key: $VARGATE_API_KEY"
# Verify erasure
curl "$VARGATE_URL/audit/erase/user-123/verify" \
-H "X-API-Key: $VARGATE_API_KEY"