{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/broad-institute/json-schema/broad-institute-permission-report-schema.json",
  "title": "PermissionReport",
  "description": "ACLs for users of a workspace and methods referenced by that workspace",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/broad-institute-method-configurations-api-openapi.yml#/components/schemas/PermissionReport",
  "required": [
    "referencedMethods",
    "workspaceACL"
  ],
  "type": "object",
  "properties": {
    "workspaceACL": {
      "type": "object",
      "additionalProperties": {
        "$ref": "#/$defs/WorkspaceAccessEntry"
      },
      "description": "a map of (user email -> WorkspaceAccessEntry). `exampleEmail` is an example key."
    },
    "referencedMethods": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/EntityAccessControl"
      }
    }
  },
  "$defs": {
    "EntityAccessControl": {
      "required": [
        "acls",
        "referencedBy"
      ],
      "type": "object",
      "properties": {
        "method": {
          "$ref": "#/$defs/MethodShort"
        },
        "referencedBy": {
          "$ref": "#/$defs/MethodConfigurationName"
        },
        "acls": {
          "type": "array",
          "description": "method repo ACLs for the referenced method",
          "items": {
            "$ref": "#/$defs/FireCloudPermission"
          }
        },
        "message": {
          "type": "string",
          "description": "error message generated when retrieving acls for this method"
        }
      }
    },
    "FireCloudPermission": {
      "required": [
        "role",
        "user"
      ],
      "type": "object",
      "properties": {
        "user": {
          "type": "string"
        },
        "role": {
          "type": "string"
        }
      }
    },
    "MethodConfigurationName": {
      "required": [
        "name",
        "namespace"
      ],
      "type": "object",
      "properties": {
        "namespace": {
          "type": "string",
          "description": "This method configuration's namespace"
        },
        "name": {
          "type": "string",
          "description": "The name of the method configuration"
        }
      }
    },
    "MethodShort": {
      "required": [
        "managers",
        "name",
        "namespace",
        "snapshotId"
      ],
      "type": "object",
      "properties": {
        "managers": {
          "type": "array",
          "description": "List of Owners.",
          "items": {
            "type": "string"
          }
        },
        "namespace": {
          "type": "string",
          "description": "Namespace which contains AgoraEntity.",
          "default": "YOUR_NAMESPACE"
        },
        "name": {
          "type": "string",
          "description": "Name of the AgoraEntity.",
          "default": "BWA"
        },
        "snapshotId": {
          "type": "integer",
          "description": "SnapshotId of AgoraEntity",
          "format": "int32"
        },
        "public": {
          "type": "boolean",
          "description": "If this AgoraEntity is publicly readable."
        }
      }
    },
    "WorkspaceAccessEntry": {
      "required": [
        "accessLevel",
        "canCompute",
        "canShare",
        "pending"
      ],
      "type": "object",
      "properties": {
        "accessLevel": {
          "type": "string",
          "description": "The access level granted to this user or group (OWNER, READER, WRITER, NO ACCESS)"
        },
        "pending": {
          "type": "boolean",
          "description": "The status of the users access"
        },
        "canShare": {
          "type": "boolean",
          "description": "True if the user can share the workspace with others, false otherwise"
        },
        "canCompute": {
          "type": "boolean",
          "description": "True if the user can launch compute in this workspace, false otherwise"
        }
      },
      "description": ""
    }
  }
}