Reference / Os Access

Create a host access rule.

POST /v1/os/access-rules
Secret API key operationId: create

Authorization

Server-to-server. Send a secret key as a Bearer token plus the x-application-id header.

Request body · required

  • effect string required
  • subject_id string<uuid> uuid
  • subject_kind string required
  • target_id string<uuid> uuid
  • target_kind string required

Responses

201 Created
{
  "data": {
    "created_at": "2026-01-15T09:30:00Z",
    "effect": "string",
    "id": "018f3c4a-7b2e-7c1d-9e0a-1f2b3c4d5e6f",
    "subject_id": "018f3c4a-7b2e-7c1d-9e0a-1f2b3c4d5e6f",
    "subject_kind": "string",
    "target_id": "018f3c4a-7b2e-7c1d-9e0a-1f2b3c4d5e6f",
    "target_kind": "string"
  },
  "error": {
    "code": "string",
    "message": "string"
  },
  "meta": {
    "timestamp": "string"
  },
  "success": false
}
422 Invalid rule

Request

curl -X POST "https://api.identrahq.com/v1/os/access-rules" \
  -H "Content-Type: application/json" \
  -d '{
  "effect": "allow",
  "subject_id": "018f3c4a-7b2e-7c1d-9e0a-1f2b3c4d5e6f",
  "subject_kind": "user",
  "target_id": "018f3c4a-7b2e-7c1d-9e0a-1f2b3c4d5e6f",
  "target_kind": "host"
}'

Try it

live request
POST https://api.identrahq.com/v1/os/access-rules

Request body

application/json