GenAuth DocsDocuments
Concepts
User Guide
Development Integration
AgentAuth
Metadata
Development Integration
Multi-tenant (beta)
Console Documentation
Multi-tenant Console
Tenant Console
Saas Application Demo
Concepts
User Guide
Development Integration
AgentAuth
Metadata
Development Integration
Multi-tenant (beta)
Console Documentation
Multi-tenant Console
Tenant Console
Saas Application Demo
Old version
  • Single Page Web Application

  • Mobile and Client Applications

  • Standard Web Application

    • Java

    • Node.js

    • Python

      • 安装使用
      • 用户认证模块
      • 管理模块

        • 用户管理

        • 分组管理

        • 角色管理

        • 组织机构管理

        • 访问控制管理

          • 创建资源
          • 批量创建资源
          • 获取资源详情
          • 批量获取资源详情
          • 分页获取资源列表
          • 修改资源
          • 删除资源
          • 批量删除资源
          • 创建权限分组
          • 批量创建权限分组
          • 获取权限分组详情
          • 批量获取权限分组详情
          • 修改权限分组信息
          • 删除权限分组信息
          • 批量删除权限分组
          • 授权资源
          • 获取某个主体被授权的资源列表
          • 判断用户是否对某个资源的某个操作有权限
        • 外部身份源管理

        • 自定义字段管理

  • Framework Integration

  • Others

  1. Development Integration
  2. /
  3. Standard Web Application
  4. /
  5. Python
  6. /
  7. 管理模块

  8. /
  9. 访问控制管理

  10. /
  11. 批量获取资源详情

¶ 批量获取资源详情

Update time: 2025-07-23 07:34:21
Edit

根据筛选条件,批量获取资源详情。

¶ 请求参数

名称类型必填默认值描述示例值
codeListstring[]是-资源 code 列表,批量可以使用逗号分隔。code1,code2
namespacestring否-所属权限分组的 code。default

¶ 示例代码

from authing import ManagementClient

management_client = ManagementClient(
    access_key_id="GEN_AUTH_USERPOOL_ID",
    access_key_secret="GEN_AUTH_USERPOOL_SECRET",
)

data = management_client.get_resources_batch(

      code_list: "code1,code2",

      namespace: "default",

)

¶ 请求响应

类型: ResourceListRespDto

名称类型描述
statusCodenumber业务状态码,可以通过此状态码判断操作是否成功,200 表示成功。
messagestring描述信息
apiCodenumber细分错误码,可通过此错误码得到具体的错误类型。
dataarray资源详情列表

示例结果:

{
  "statusCode": 200,
  "message": "操作成功",
  "apiCode": 20001,
  "data": {
    "code": "ecs",
    "description": "服务器",
    "type": "API",
    "actions": "[{\"name\":\"ecs:Start\",\"description\":\"启动 ECS 服务器\"},{\"name\":\"ecs:Stop\",\"description\":\"停止 ECS 服务器\"}]",
    "apiIdentifier": "https://my-awesome-api.com/api",
    "namespace": "default"
  }
}

¶ 数据结构

¶ ResourceDto

名称类型必填描述
codestring是资源唯一标志符。 示例值: ecs
descriptionstring否资源描述。 示例值: 服务器
typestring是资源类型,如数据、API、按钮、菜单。 枚举值:DATA,API,MENU,BUTTON
actionsarray否资源定义的操作类型。嵌套类型:ResourceAction。 示例值: [{"name":"ecs:Start","description":"启动 ECS 服务器"},{"name":"ecs:Stop","description":"停止 ECS 服务器"}]
apiIdentifierstring否API 资源的 URL 标识。 示例值: https://my-awesome-api.com/api
namespacestring否所属权限分组的 code。 示例值: default

¶ ResourceAction

名称类型必填描述
namestring是资源操作名称。 示例值: ecs:Start
descriptionstring是资源操作描述。 示例值: ecs:Start
Previous article: 获取资源详情 Next article: 分页获取资源列表
  • 请求参数
  • 示例代码
  • 请求响应
  • 数据结构

User identity management

Integrated third-party login
Customized authentication process

Enterprise internal management

Single sign-on
Multi-factor authentication
Permission management

Developer

Development Documentation
GitHub (opens new window)

Company

official@genauth.ai
16th Floor, Building B, Beichen Century Center, Chaoyang District, Beijing (Total)
Room 406, 4th Floor, Block B, No. 200, Tianfu Fifth Street, High-tech Zone, Chengdu (Branch)

© Beijing Steamory Technology Co., Ltd.