{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://raw.githubusercontent.com/api-evangelist/acronis/main/json-schema/acronis-access-policies-list-schema.json",
  "title": "accessPoliciesList",
  "x-generated": "2026-10-27",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/acronis-users-api-openapi.yml#/components/schemas/accessPoliciesList",
  "type": "object",
  "required": [
    "timestamp",
    "items"
  ],
  "properties": {
    "paging": {
      "$ref": "#/$defs/paging"
    },
    "timestamp": {
      "$ref": "#/$defs/item1"
    },
    "items": {
      "type": "array",
      "items": {
        "type": "object",
        "required": [
          "id",
          "version",
          "created_at",
          "updated_at",
          "deleted_at",
          "trustee_id",
          "trustee_type",
          "issuer_id",
          "tenant_id",
          "role_id"
        ],
        "properties": {
          "id": {
            "description": "Access policy unique identifier.",
            "type": "string"
          },
          "version": {
            "description": "Auto-incremented entity version.",
            "type": "integer"
          },
          "created_at": {
            "$ref": "#/$defs/item1"
          },
          "updated_at": {
            "$ref": "#/$defs/item1"
          },
          "deleted_at": {
            "description": "Soft deletion timestamp.",
            "allOf": [
              {
                "$ref": "#/$defs/item1"
              }
            ]
          },
          "trustee_id": {
            "description": "Unique identifier of the Subject for whom access policy is granted.",
            "type": "string"
          },
          "trustee_type": {
            "description": "Type of the Subject for whom access policy is granted.",
            "enum": [
              "user",
              "user_group",
              "client"
            ],
            "type": "string"
          },
          "issuer_id": {
            "description": "Issuer unique identifier.",
            "type": "string"
          },
          "tenant_id": {
            "description": "Tenant unique identifier.",
            "type": "string"
          },
          "resource_server_id": {
            "description": "Tenant unique identifier.",
            "type": "string"
          },
          "resource_namespace": {
            "description": "Resource namespace.",
            "type": "string"
          },
          "resource_path": {
            "description": "Resource path.",
            "type": "string"
          },
          "role_id": {
            "$ref": "#/$defs/userRole"
          }
        }
      }
    }
  },
  "$defs": {
    "item1": {
      "description": "RFC3339 Formatted date.",
      "type": "string",
      "pattern": "\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?([\\+\\-]\\d{2}\\:\\d{2})?",
      "minLength": 19,
      "maxLength": 32
    },
    "paging": {
      "title": "Generic paging parameters schema",
      "type": "object",
      "properties": {
        "cursors": {
          "type": "object",
          "properties": {
            "after": {
              "type": "string"
            }
          }
        }
      }
    },
    "userRole": {
      "description": "Name of the user role.",
      "enum": [
        "root_admin",
        "partner_admin",
        "company_admin",
        "unit_admin",
        "readonly_admin",
        "protection_admin",
        "protection_ro_admin",
        "restore_operator",
        "backup_user",
        "sync_share_admin",
        "sync_share_user",
        "sync_share_guest",
        "pds_operator",
        "pds_support",
        "notary_admin",
        "notary_user",
        "hci_admin",
        "omnivoice_admin",
        "omnivoice_user",
        "greathorn_admin",
        "greathorn_user",
        "greathorn_analyst",
        "greathorn_client_manager"
      ],
      "type": "string"
    }
  }
}