Skip to content

Resources API

The Resources API manages inventory records and resource-specific operations.

  • List resources.
  • Create or update resources.
  • Attach scopes and policies.
  • Inspect status and operational metadata.
  • Trigger allowed actions through documented workflows.
Terminal window
curl -sS "$ANCHOR_API/resources" \
-H "Authorization: Bearer $ANCHOR_TOKEN"

Representative response:

[
{
"id": 42,
"public_id": "res_prod_linux_admin",
"name": "prod-linux-admin",
"type": "linux_account",
"scope_id": 7,
"status": "verified",
"last_verified_at": "2026-05-06T13:15:00Z"
}
]

The exact fields depend on the product version and resource type. This representative example shows the shape of an automation-friendly request:

Terminal window
curl -sS -X POST "$ANCHOR_API/resources" \
-H "Authorization: Bearer $ANCHOR_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"name": "prod-linux-admin",
"type": "linux_account",
"scope_id": 7,
"host": "prod-linux-01.internal",
"username": "admin",
"metadata": {
"owner": "platform-security",
"environment": "production"
}
}'
Terminal window
curl -sS -X POST "$ANCHOR_API/resources/42/verify" \
-H "Authorization: Bearer $ANCHOR_TOKEN"
Terminal window
curl -sS -X POST "$ANCHOR_API/resources/42/rotate" \
-H "Authorization: Bearer $ANCHOR_TOKEN"

Use stable identifiers for automation and preserve resource names that humans can review.