agents

Update Tenant Agent Policy

Merges a partial policy onto what is stored (tenant_manage in that tenant). An unknown key, a wrong type, max_credential_ttl_days < 1, a default above the max, or an unknown role id is 400 invalid_policy.

patch/tenants/{id}/agent-policy

Request

  • Base URL: https://api.instruxi.dev/api/v1/enforcer
  • URL: https://api.instruxi.dev/api/v1/enforcer/tenants/{id}/agent-policy
  • Auth: one of:
    • API key in header Authorization
    • API key in header X-API-Key

Path parameters

idstring required

tenant id

Request body

allowed_role_idsstring[]

AllowedRoleIDs are the role ids a non-admin may give an agent. Absent from storage, it defaults to the built-in "user" and "developer" roles (resolved by the usecase, which can see roles).

default_credential_ttl_daysinteger
max_agents_per_stewardinteger
max_credential_ttl_daysinteger
member_agentsboolean
require_expiryboolean

Example request

{
  "default_credential_ttl_days": 30,
  "max_agents_per_steward": 10,
  "max_credential_ttl_days": 90,
  "member_agents": true
}

Response

OK

successboolean

Example response

{
  "data": {
    "default_credential_ttl_days": 30,
    "max_agents_per_steward": 10,
    "max_credential_ttl_days": 90,
    "member_agents": true
  },
  "success": true
}

Changes

No recorded changes to this operation across all 1 revision of this API.