{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/elaichi-ai/json-schema/elaichi-ai-acl-entry-schema.json",
  "title": "AclEntry",
  "description": "One access grant on a connection, toolbox, template, connector, workflow, collection, dashboard, knowledge base, app or (at `view` only) a stored tool file.",
  "x-generated": "2026-11-06",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/elaichi-ai-openapi.json#/components/schemas/AclEntry",
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "Grant id (`acl_…`), the `{aclId}` that `DELETE .../share/{aclId}` takes."
    },
    "resource_type": {
      "type": "string",
      "enum": [
        "connection",
        "toolbox",
        "template",
        "connector",
        "automation",
        "collection",
        "dashboard",
        "knowledge_base",
        "bundle",
        "file"
      ]
    },
    "resource_id": {
      "type": "string",
      "description": "The shared resource's id (a connector's slug, for that type)."
    },
    "grantee_type": {
      "$ref": "#/$defs/GranteeType"
    },
    "grantee_id": {
      "type": [
        "string",
        "null"
      ],
      "description": "User id (`usr_…`) or team id (`team_…`). Null for a `grantee_type: \"org\"` grant."
    },
    "level": {
      "$ref": "#/$defs/AccessLevel"
    },
    "created_at": {
      "type": "string",
      "format": "date-time"
    },
    "updated_at": {
      "type": "string",
      "format": "date-time"
    }
  },
  "$defs": {
    "AccessLevel": {
      "type": "string",
      "enum": [
        "view",
        "use",
        "edit"
      ],
      "description": "Same ladder for every shareable resource, low to high. `view` — see it exists, read its metadata/config; cannot exercise it. `use` — `view` + exercise it, resource-specific: run tools through a connection; execute a toolbox's tools through its bound connections (this DELEGATES — the caller runs through each entry's pinning editor's own authority, not necessarily their own); stamp a new toolbox by copying a template's entries; create connections from a connector. `edit` — `use` + change its settings, entries and its own grants."
    },
    "GranteeType": {
      "type": "string",
      "enum": [
        "user",
        "team",
        "org"
      ],
      "description": "`user` and `team` grants target one `grantee_id`; `org` applies to every member of the organization and takes no id."
    }
  }
}