> ## Documentation Index
> Fetch the complete documentation index at: https://docs.memorylake.cn/llms.txt
> Use this file to discover all available pages before exploring further.

# 获取权限目录

> 列出权限规则可指定的资源类型和操作，以及每个操作的前置权限

```
GET /openapi/memorylake/admin/v1/permission-catalog
```

列出权限规则可指定的资源类型和操作，以及每个操作的前置权限。已关闭的产品功能不列出。任何成员都可读取完整目录；`grantable_to=access_group`（可授予用户组的内容）需要下述权限。

<Note>
  **所需权限：** 取决于您发送的内容：

  * 传入 `grantable_to=access_group` 时：`access_group:view`
</Note>

### 查询参数

<ParamField query="grantable_to" type="string">
  `access_group`：仅可授予用户组的权限（[设置用户组权限](/features/memorylake/api-reference/access-control/set-access-group-permissions)）
</ParamField>

<RequestExample>
  ```bash cURL theme={null}
  curl -X GET 'https://app.memorylake.cn/openapi/memorylake/admin/v1/permission-catalog' \
    -H 'Authorization: Bearer sk_xxxxxx'
  ```
</RequestExample>

### 响应

<ResponseField name="data" type="object">
  <Expandable title="Permission Catalog 对象">
    <ResponseField name="resource_types" type="array">
      资源类型及其操作；已停用的产品功能不包含在内

      <Expandable title="Catalog Resource Type 对象">
        <ResponseField name="actions" type="array">
          该资源类型可用的操作

          <Expandable title="Catalog Action 对象">
            <ResponseField name="action" type="string">操作键，与权限规则中使用的一致</ResponseField>
            <ResponseField name="destructive" type="boolean">删除数据或不可逆地更改数据</ResponseField>
            <ResponseField name="grantable" type="boolean">false 表示仅团队所有者持有此操作；该操作无法授予角色、成员或用户组，[创建权限规则](/features/memorylake/api-reference/access-control/create-permission-rules)会拒绝它</ResponseField>

            <ResponseField name="prerequisites" type="array">
              该操作发挥作用所需的其他操作；[创建权限规则](/features/memorylake/api-reference/access-control/create-permission-rules)可一并添加（`auto_grant_prerequisites`）

              <Expandable title="Catalog Prerequisite 对象">
                <ResponseField name="action" type="string">所需操作</ResponseField>
                <ResponseField name="resource_type" type="string">需要该权限的位置；与依赖操作为同一资源时不返回</ResponseField>
              </Expandable>
            </ResponseField>
          </Expandable>
        </ResponseField>

        <ResponseField name="resource_type" type="string">资源类型，与权限规则和访问范围中使用的一致</ResponseField>
      </Expandable>
    </ResponseField>
  </Expandable>
</ResponseField>

<ResponseExample>
  ```json Success (200) theme={null}
  {
    "success": true,
    "message": "Operation completed successfully",
    "data": {
      "resource_types": [
        {
          "actions": [
            {
              "action": "example",
              "destructive": false,
              "grantable": false,
              "prerequisites": []
            }
          ],
          "resource_type": "example"
        }
      ]
    }
  }
  ```
</ResponseExample>


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.