openapi: 3.2.0 info: description: 身份服务主要负责管理账号权限相关的接口,例如:账号、角色、权限点资源等 title: 神策业务门户 Identity API version: '' servers: - url: /api/v3/portal/v2 tags: - name: Identity paths: /identity/account/list: get: description: 获取账号列表,包含账号的基本信息、角色的简要信息以及账号的扩展属性值;如需获取账号更多的详细信息,可使用「获取单个账号信息」接口获取;该接口支持翻页,每页最多返回 100 条记录 operationId: ListAccounts parameters: - description: 全局唯一的密钥,用于验证和授权访问 API 接口 in: header name: api-key required: true schema: type: string - description: 项目名, 指定请求所属项目 in: header name: sensorsdata-project required: true schema: type: string - description: 列表页号,默认值:1,取值范围:>=1 example: 1 in: query name: page_index schema: format: int32 type: integer - description: 单页返回最大记录数, 默认值:20,取值范围:1-100 example: 20 in: query name: page_size schema: format: int32 type: integer - description: 模糊搜索关键字,模糊匹配账号的 username 或 cname example: 张三 in: query name: query schema: type: string - description: 扩展字段,多个字段使用英文逗号分隔,例如:last_access_time,xxx example: last_access_time in: query name: expand_field schema: type: string responses: default: content: application/json: example: code: SUCCESS data: accounts: - roles: - name: analyst cname: 管理员 id: 1 related_extra_attributes: - attr_code: JOB has_children_node: true full_name: 集团/技术部 node_code: '4' node_name: 技术部 desc: 集团技术部 account: custom_params: last_access_time: '2022-05-03 11:18:41' create_time: '2022-05-03 11:18:41' phone: '12399999999' name: admin cname: 管理员 expire_time: '2022-05-03 11:18:41' is_global: true disabled: false id: 1 position: 销售 uuid: 38135721-2938-4585-b19b-396ceb910d88 email: demo@sensorsdata.com page: total: 100 current_page: 1 page_count: 100 extra_attributes_definitions: - code: JOB name: 职位 attr_value_scope: GLOBAL id: 1 type: VALUE desc: 职位属性 request_id: '1' schema: $ref: '#/components/schemas/sensorsdata.portal.v2.api.ListAccountResponseHttpApiResult' description: sensorsdata.portal.v2.api.ListAccountResponse summary: 获取账号列表 x-sd-openapi: responseClass: com.sensorsdata.portal.v2.api.ListAccountResponse isServerStreaming: false requestClass: com.sensorsdata.portal.v2.api.ListAccountRequest grpcServiceBase: com.sensorsdata.portal.v2.api.IdentityServiceGrpc.IdentityServiceImplBase internalDesc: classes in template for grpc service dynamic invoking isClientStreaming: false tags: - Identity /identity/account/get: get: description: 获取单个账号信息;包括账号基本信息、账号关联的角色信息、账号扩展属性等;如果通过 id/uuid 无法查询到相应的账号,接口会返回「账号不存在」的错误 operationId: GetAccount parameters: - description: 全局唯一的密钥,用于验证和授权访问 API 接口 in: header name: api-key required: true schema: type: string - description: 项目名, 指定请求所属项目 in: header name: sensorsdata-project required: true schema: type: string - description: 账号 id(id/uuid 任选一个,如果两个字段同时填充会报参数错误) example: '1' in: query name: id schema: type: string - description: 账号 uuid(id/uuid 任选一个,如果两个字段同时填充会报错) example: 38135721-2938-4585-b19b-396ceb910d88 in: query name: uuid schema: type: string responses: default: content: application/json: example: code: SUCCESS data: related_roles: - update_time: '2022-01-01 00:00:00' type_name: 系统角色 create_time: '2022-01-01 00:00:00' role_type: SYSTEM_ROLE name: admin cname: 管理员 description: 管理员角色描述信息 is_project_customize_default_role: true id: 1 create_user_cname: 管理员 related_extra_attributes: - attr_code: JOB has_children_node: true full_name: 集团/技术部 node_code: '4' node_name: 技术部 desc: 集团技术部 extra_attributes_definitions: - code: JOB name: 职位 attr_value_scope: GLOBAL id: 1 type: VALUE desc: 职位属性 account: custom_params: last_access_time: '2022-05-03 11:18:41' create_time: '2022-05-03 11:18:41' phone: '12399999999' name: admin cname: 管理员 expire_time: '2022-05-03 11:18:41' is_global: true disabled: false id: 1 position: 销售 uuid: 38135721-2938-4585-b19b-396ceb910d88 email: demo@sensorsdata.com request_id: '1' schema: $ref: '#/components/schemas/sensorsdata.portal.v2.api.GetAccountResponseHttpApiResult' description: sensorsdata.portal.v2.api.GetAccountResponse summary: 获取单个账号 x-sd-openapi: responseClass: com.sensorsdata.portal.v2.api.GetAccountResponse isServerStreaming: false requestClass: com.sensorsdata.portal.v2.api.AccountIdOrUuidRequest grpcServiceBase: com.sensorsdata.portal.v2.api.IdentityServiceGrpc.IdentityServiceImplBase internalDesc: classes in template for grpc service dynamic invoking isClientStreaming: false tags: - Identity /identity/account/get-by-name: get: description: 获取单个账号信息;包括账号基本信息、账号关联的角色信息、账号扩展属性等;如果通过 name 无法查询到相应的账号,接口会返回「账号不存在」的错误 operationId: GetAccountByName parameters: - description: 全局唯一的密钥,用于验证和授权访问 API 接口 in: header name: api-key required: true schema: type: string - description: 项目名, 指定请求所属项目 in: header name: sensorsdata-project required: true schema: type: string - description: 账号名称 必填 example: lh@qq.com in: query name: account_name required: true schema: type: string - description: 是否平台账号 example: true in: query name: is_global required: true schema: type: boolean responses: default: content: application/json: example: code: SUCCESS data: related_roles: - update_time: '2022-01-01 00:00:00' type_name: 系统角色 create_time: '2022-01-01 00:00:00' role_type: SYSTEM_ROLE name: admin cname: 管理员 description: 管理员角色描述信息 is_project_customize_default_role: true id: 1 create_user_cname: 管理员 related_extra_attributes: - attr_code: JOB has_children_node: true full_name: 集团/技术部 node_code: '4' node_name: 技术部 desc: 集团技术部 extra_attributes_definitions: - code: JOB name: 职位 attr_value_scope: GLOBAL id: 1 type: VALUE desc: 职位属性 account: custom_params: last_access_time: '2022-05-03 11:18:41' create_time: '2022-05-03 11:18:41' phone: '12399999999' name: admin cname: 管理员 expire_time: '2022-05-03 11:18:41' is_global: true disabled: false id: 1 position: 销售 uuid: 38135721-2938-4585-b19b-396ceb910d88 email: demo@sensorsdata.com request_id: '1' schema: $ref: '#/components/schemas/sensorsdata.portal.v2.api.GetAccountResponseHttpApiResult' description: sensorsdata.portal.v2.api.GetAccountResponse summary: 查询通过account name查询账号信息 x-sd-openapi: responseClass: com.sensorsdata.portal.v2.api.GetAccountResponse isServerStreaming: false requestClass: com.sensorsdata.portal.v2.api.AccountNameRequest grpcServiceBase: com.sensorsdata.portal.v2.api.IdentityServiceGrpc.IdentityServiceImplBase internalDesc: classes in template for grpc service dynamic invoking isClientStreaming: false tags: - Identity /identity/account/get-by-api-key: post: description: 根据 api-key 获取其绑定的账号基本信息;当请求体中 api_key 为空时,返回当前请求鉴权所用 api-key 对应的账号(whoami)。 operationId: GetAccountByApiKey parameters: - description: 全局唯一的密钥,用于验证和授权访问 API 接口 in: header name: api-key required: true schema: type: string - description: 项目名, 指定请求所属项目 in: header name: sensorsdata-project required: true schema: type: string requestBody: content: application/json: schema: $ref: '#/components/schemas/sensorsdata.portal.v2.api.GetAccountByApiKeyRequest' description: 「根据 api-key 获取账号」的请求对象 required: false responses: default: content: application/json: example: code: SUCCESS data: account: custom_params: last_access_time: '2022-05-03 11:18:41' create_time: '2022-05-03 11:18:41' phone: '12399999999' name: admin cname: 管理员 expire_time: '2022-05-03 11:18:41' is_global: true disabled: false id: 1 position: 销售 uuid: 38135721-2938-4585-b19b-396ceb910d88 email: demo@sensorsdata.com request_id: '1' schema: $ref: '#/components/schemas/sensorsdata.portal.v2.api.GetAccountByApiKeyResponseHttpApiResult' description: sensorsdata.portal.v2.api.GetAccountByApiKeyResponse summary: 根据 api-key 获取对应的账号信息 x-sd-openapi: responseClass: com.sensorsdata.portal.v2.api.GetAccountByApiKeyResponse isServerStreaming: false requestClass: com.sensorsdata.portal.v2.api.GetAccountByApiKeyRequest grpcServiceBase: com.sensorsdata.portal.v2.api.IdentityServiceGrpc.IdentityServiceImplBase internalDesc: classes in template for grpc service dynamic invoking isClientStreaming: false x-codegen-request-body-name: GetAccountByApiKeyRequest tags: - Identity /identity/account/project/invite: post: description: 邀请账号到某个项目中,并绑定职务和角色 operationId: InviteAccountToProject parameters: - description: 全局唯一的密钥,用于验证和授权访问 API 接口 in: header name: api-key required: true schema: type: string - description: 项目名, 指定请求所属项目 in: header name: sensorsdata-project required: true schema: type: string requestBody: content: application/json: schema: $ref: '#/components/schemas/sensorsdata.portal.v2.api.InviteAccountRequest' description: 「邀请账号」的请求对象 required: false responses: default: content: application/json: example: code: SUCCESS data: flag: true request_id: '1' schema: $ref: '#/components/schemas/sensorsdata.portal.v2.api.StatusResponseHttpApiResult' description: sensorsdata.portal.v2.api.StatusResponse summary: 邀请平台账号到项目中 x-sd-openapi: responseClass: com.sensorsdata.portal.v2.api.StatusResponse isServerStreaming: false requestClass: com.sensorsdata.portal.v2.api.InviteAccountRequest grpcServiceBase: com.sensorsdata.portal.v2.api.IdentityServiceGrpc.IdentityServiceImplBase internalDesc: classes in template for grpc service dynamic invoking isClientStreaming: false x-codegen-request-body-name: InviteAccountRequest tags: - Identity /identity/account/add: post: description: 新增账号,同时为账号绑定角色 operationId: AddAccount parameters: - description: 全局唯一的密钥,用于验证和授权访问 API 接口 in: header name: api-key required: true schema: type: string - description: 项目名, 指定请求所属项目 in: header name: sensorsdata-project required: true schema: type: string requestBody: content: application/json: schema: $ref: '#/components/schemas/sensorsdata.portal.v2.api.AddAccountRequest' description: 「新增账号」的请求对象 required: false responses: default: content: application/json: example: code: SUCCESS data: account: custom_params: last_access_time: '2022-05-03 11:18:41' create_time: '2022-05-03 11:18:41' phone: '12399999999' name: admin cname: 管理员 expire_time: '2022-05-03 11:18:41' is_global: true disabled: false id: 1 position: 销售 uuid: 38135721-2938-4585-b19b-396ceb910d88 email: demo@sensorsdata.com request_id: '1' schema: $ref: '#/components/schemas/sensorsdata.portal.v2.api.AddAccountResponseHttpApiResult' description: sensorsdata.portal.v2.api.AddAccountResponse summary: 新增账号 x-sd-openapi: responseClass: com.sensorsdata.portal.v2.api.AddAccountResponse isServerStreaming: false requestClass: com.sensorsdata.portal.v2.api.AddAccountRequest grpcServiceBase: com.sensorsdata.portal.v2.api.IdentityServiceGrpc.IdentityServiceImplBase internalDesc: classes in template for grpc service dynamic invoking isClientStreaming: false x-codegen-request-body-name: AddAccountRequest tags: - Identity /identity/account/update: post: description: 修改账号信息,同时可以修改账号绑定的角色;根据请求参数中携带的 id/uuid 进行更新;如果通过 id/uuid 无法查询到相应的账号,接口会返回「账号不存在」的错误 operationId: UpdateAccount parameters: - description: 全局唯一的密钥,用于验证和授权访问 API 接口 in: header name: api-key required: true schema: type: string - description: 项目名, 指定请求所属项目 in: header name: sensorsdata-project required: true schema: type: string requestBody: content: application/json: schema: $ref: '#/components/schemas/sensorsdata.portal.v2.api.UpdateAccountRequest' description: 「修改账号信息」的请求对象 required: false responses: default: content: application/json: example: code: SUCCESS data: account: custom_params: last_access_time: '2022-05-03 11:18:41' create_time: '2022-05-03 11:18:41' phone: '12399999999' name: admin cname: 管理员 expire_time: '2022-05-03 11:18:41' is_global: true disabled: false id: 1 position: 销售 uuid: 38135721-2938-4585-b19b-396ceb910d88 email: demo@sensorsdata.com request_id: '1' schema: $ref: '#/components/schemas/sensorsdata.portal.v2.api.UpdateAccountResponseHttpApiResult' description: sensorsdata.portal.v2.api.UpdateAccountResponse summary: 修改账号 x-sd-openapi: responseClass: com.sensorsdata.portal.v2.api.UpdateAccountResponse isServerStreaming: false requestClass: com.sensorsdata.portal.v2.api.UpdateAccountRequest grpcServiceBase: com.sensorsdata.portal.v2.api.IdentityServiceGrpc.IdentityServiceImplBase internalDesc: classes in template for grpc service dynamic invoking isClientStreaming: false x-codegen-request-body-name: UpdateAccountRequest tags: - Identity /identity/account/delete: post: description: 删除账号(软删除);如果只是想要临时禁用账号,后续会恢复该账号,可以使用「禁用账号」接口;如果通过 id/uuid 无法查询到相应的账号,接口会返回「账号不存在」的错误 operationId: DeleteAccount parameters: - description: 全局唯一的密钥,用于验证和授权访问 API 接口 in: header name: api-key required: true schema: type: string - description: 项目名, 指定请求所属项目 in: header name: sensorsdata-project required: true schema: type: string requestBody: content: application/json: schema: $ref: '#/components/schemas/sensorsdata.portal.v2.api.AccountIdOrUuidRequest' description: 「账号 id 或 uuid」的请求对象 required: false responses: default: content: application/json: example: code: SUCCESS data: flag: true request_id: '1' schema: $ref: '#/components/schemas/sensorsdata.portal.v2.api.StatusResponseHttpApiResult' description: sensorsdata.portal.v2.api.StatusResponse summary: 删除账号 x-sd-openapi: responseClass: com.sensorsdata.portal.v2.api.StatusResponse isServerStreaming: false requestClass: com.sensorsdata.portal.v2.api.AccountIdOrUuidRequest grpcServiceBase: com.sensorsdata.portal.v2.api.IdentityServiceGrpc.IdentityServiceImplBase internalDesc: classes in template for grpc service dynamic invoking isClientStreaming: false x-codegen-request-body-name: AccountIdOrUuidRequest tags: - Identity /identity/account/disable: post: description: 禁用账号;账号被禁用后,该账号将无法使用,但该账号对应的数据仍然被保留;被禁用的账号可以通过「启用账号」接口进行恢复 operationId: DisableAccount parameters: - description: 全局唯一的密钥,用于验证和授权访问 API 接口 in: header name: api-key required: true schema: type: string - description: 项目名, 指定请求所属项目 in: header name: sensorsdata-project required: true schema: type: string requestBody: content: application/json: schema: $ref: '#/components/schemas/sensorsdata.portal.v2.api.DisableAccountRequest' description: 「禁用账户」的请求对象 required: false responses: default: content: application/json: example: code: SUCCESS data: flag: true request_id: '1' schema: $ref: '#/components/schemas/sensorsdata.portal.v2.api.StatusResponseHttpApiResult' description: sensorsdata.portal.v2.api.StatusResponse summary: 禁用账号 x-sd-openapi: responseClass: com.sensorsdata.portal.v2.api.StatusResponse isServerStreaming: false requestClass: com.sensorsdata.portal.v2.api.DisableAccountRequest grpcServiceBase: com.sensorsdata.portal.v2.api.IdentityServiceGrpc.IdentityServiceImplBase internalDesc: classes in template for grpc service dynamic invoking isClientStreaming: false x-codegen-request-body-name: DisableAccountRequest tags: - Identity /identity/account/enable: post: description: 启用账号;启用被禁用的账号,可以指定账号启用后的过期时间,到达该过期时间之后,账号会被自动禁用 operationId: EnableAccount parameters: - description: 全局唯一的密钥,用于验证和授权访问 API 接口 in: header name: api-key required: true schema: type: string - description: 项目名, 指定请求所属项目 in: header name: sensorsdata-project required: true schema: type: string requestBody: content: application/json: schema: $ref: '#/components/schemas/sensorsdata.portal.v2.api.EnableAccountRequest' description: 「启用账户」的请求对象 required: false responses: default: content: application/json: example: code: SUCCESS data: flag: true request_id: '1' schema: $ref: '#/components/schemas/sensorsdata.portal.v2.api.StatusResponseHttpApiResult' description: sensorsdata.portal.v2.api.StatusResponse summary: 启用账号 x-sd-openapi: responseClass: com.sensorsdata.portal.v2.api.StatusResponse isServerStreaming: false requestClass: com.sensorsdata.portal.v2.api.EnableAccountRequest grpcServiceBase: com.sensorsdata.portal.v2.api.IdentityServiceGrpc.IdentityServiceImplBase internalDesc: classes in template for grpc service dynamic invoking isClientStreaming: false x-codegen-request-body-name: EnableAccountRequest tags: - Identity /identity/account/role/add: post: description: 新增账号关联的角色列表,接口幂等 operationId: AddAccountRole parameters: - description: 全局唯一的密钥,用于验证和授权访问 API 接口 in: header name: api-key required: true schema: type: string - description: 项目名, 指定请求所属项目 in: header name: sensorsdata-project required: true schema: type: string requestBody: content: application/json: schema: $ref: '#/components/schemas/sensorsdata.portal.v2.api.AccountRoleRequest' description: 账号角色请求对象 required: false responses: default: content: application/json: example: code: SUCCESS data: flag: true request_id: '1' schema: $ref: '#/components/schemas/sensorsdata.portal.v2.api.StatusResponseHttpApiResult' description: sensorsdata.portal.v2.api.StatusResponse summary: 新增账号关联的角色 x-sd-openapi: responseClass: com.sensorsdata.portal.v2.api.StatusResponse isServerStreaming: false requestClass: com.sensorsdata.portal.v2.api.AccountRoleRequest grpcServiceBase: com.sensorsdata.portal.v2.api.IdentityServiceGrpc.IdentityServiceImplBase internalDesc: classes in template for grpc service dynamic invoking isClientStreaming: false x-codegen-request-body-name: AccountRoleRequest tags: - Identity /identity/account/role/delete: post: description: 删除账号关联的角色列表,接口幂等 operationId: DeleteAccountRole parameters: - description: 全局唯一的密钥,用于验证和授权访问 API 接口 in: header name: api-key required: true schema: type: string - description: 项目名, 指定请求所属项目 in: header name: sensorsdata-project required: true schema: type: string requestBody: content: application/json: schema: $ref: '#/components/schemas/sensorsdata.portal.v2.api.AccountRoleRequest' description: 账号角色请求对象 required: false responses: default: content: application/json: example: code: SUCCESS data: flag: true request_id: '1' schema: $ref: '#/components/schemas/sensorsdata.portal.v2.api.StatusResponseHttpApiResult' description: sensorsdata.portal.v2.api.StatusResponse summary: 删除账号关联的角色 x-sd-openapi: responseClass: com.sensorsdata.portal.v2.api.StatusResponse isServerStreaming: false requestClass: com.sensorsdata.portal.v2.api.AccountRoleRequest grpcServiceBase: com.sensorsdata.portal.v2.api.IdentityServiceGrpc.IdentityServiceImplBase internalDesc: classes in template for grpc service dynamic invoking isClientStreaming: false x-codegen-request-body-name: AccountRoleRequest tags: - Identity /identity/global-account/add: post: description: 创建平台账号;新建平台账号,同时为账号关联项目信息、角色信息、职位信息等;如果账号已经存在,接口会返回「账号已经存在」的错误 operationId: AddGlobalAccount parameters: - description: 全局唯一的密钥,用于验证和授权访问 API 接口 in: header name: api-key required: true schema: type: string - description: 项目名, 指定请求所属项目 in: header name: sensorsdata-project required: true schema: type: string requestBody: content: application/json: schema: $ref: '#/components/schemas/sensorsdata.portal.v2.api.AddGlobalAccountRequest' description: 「新增平台账户」的请求对象 required: false responses: default: content: application/json: example: code: SUCCESS data: flag: true request_id: '1' schema: $ref: '#/components/schemas/sensorsdata.portal.v2.api.StatusResponseHttpApiResult' description: sensorsdata.portal.v2.api.StatusResponse summary: 创建平台账号 x-sd-openapi: responseClass: com.sensorsdata.portal.v2.api.StatusResponse isServerStreaming: false requestClass: com.sensorsdata.portal.v2.api.AddGlobalAccountRequest grpcServiceBase: com.sensorsdata.portal.v2.api.IdentityServiceGrpc.IdentityServiceImplBase internalDesc: classes in template for grpc service dynamic invoking isClientStreaming: false x-codegen-request-body-name: AddGlobalAccountRequest tags: - Identity /identity/global-account/update: post: description: 全量更新平台账号;账号 id 和 uuid 二选一填入;全量更新平台账号的基本信息、平台账号关联的项目信息、角色信息、职位信息等 operationId: UpdateGlobalAccount parameters: - description: 全局唯一的密钥,用于验证和授权访问 API 接口 in: header name: api-key required: true schema: type: string - description: 项目名, 指定请求所属项目 in: header name: sensorsdata-project required: true schema: type: string requestBody: content: application/json: schema: $ref: '#/components/schemas/sensorsdata.portal.v2.api.UpdateGlobalAccountRequest' description: 「更新平台账户」的请求对象 required: false responses: default: content: application/json: example: code: SUCCESS data: flag: true request_id: '1' schema: $ref: '#/components/schemas/sensorsdata.portal.v2.api.StatusResponseHttpApiResult' description: sensorsdata.portal.v2.api.StatusResponse summary: 更新平台账号 x-sd-openapi: responseClass: com.sensorsdata.portal.v2.api.StatusResponse isServerStreaming: false requestClass: com.sensorsdata.portal.v2.api.UpdateGlobalAccountRequest grpcServiceBase: com.sensorsdata.portal.v2.api.IdentityServiceGrpc.IdentityServiceImplBase internalDesc: classes in template for grpc service dynamic invoking isClientStreaming: false x-codegen-request-body-name: UpdateGlobalAccountRequest tags: - Identity /identity/global-account/delete: post: description: 移除平台账号;如果被删除的账号不是平台账号,接口会返回「不允许删除改账号」的错误 operationId: DeleteGlobalAccount parameters: - description: 全局唯一的密钥,用于验证和授权访问 API 接口 in: header name: api-key required: true schema: type: string - description: 项目名, 指定请求所属项目 in: header name: sensorsdata-project required: true schema: type: string requestBody: content: application/json: schema: $ref: '#/components/schemas/sensorsdata.portal.v2.api.DeleteGlobalAccountRequest' description: 「移除平台账户」的请求对象 required: false responses: default: content: application/json: example: code: SUCCESS data: flag: true request_id: '1' schema: $ref: '#/components/schemas/sensorsdata.portal.v2.api.StatusResponseHttpApiResult' description: sensorsdata.portal.v2.api.StatusResponse summary: 移除平台账号 x-sd-openapi: responseClass: com.sensorsdata.portal.v2.api.StatusResponse isServerStreaming: false requestClass: com.sensorsdata.portal.v2.api.DeleteGlobalAccountRequest grpcServiceBase: com.sensorsdata.portal.v2.api.IdentityServiceGrpc.IdentityServiceImplBase internalDesc: classes in template for grpc service dynamic invoking isClientStreaming: false x-codegen-request-body-name: DeleteGlobalAccountRequest tags: - Identity /identity/global-account/list: get: description: 获取平台账号列表;包含平台账号的基本信息、平台账号关联的项目信息、角色信息、职位信息等;该接口支持翻页,每页最多返回 100 条记录 operationId: ListGlobalAccount parameters: - description: 全局唯一的密钥,用于验证和授权访问 API 接口 in: header name: api-key required: true schema: type: string - description: 项目名, 指定请求所属项目 in: header name: sensorsdata-project required: true schema: type: string - description: 列表页号,默认值:1,取值范围:>=1 example: 1 in: query name: page_index schema: format: int32 type: integer - description: 单页返回最大记录数, 默认值:20,取值范围:1-100 example: 20 in: query name: page_size schema: format: int32 type: integer - description: 模糊搜索关键字,模糊匹配账号的 username 或 cname example: 张三 in: query name: query schema: type: string responses: default: content: application/json: example: code: SUCCESS data: page: total: 100 current_page: 1 page_count: 100 results: - related_projects: - {} account: phone: '12399999999' name: admin cname: 管理员 expire_time: '2022-05-03 11:18:41' disabled: false id: 1 uuid: 38135721-2938-4585-b19b-396ceb910d88 email: demo@sensorsdata.com request_id: '1' schema: $ref: '#/components/schemas/sensorsdata.portal.v2.api.ListGlobalAccountResponseHttpApiResult' description: sensorsdata.portal.v2.api.ListGlobalAccountResponse summary: 获取平台账号列表 x-sd-openapi: responseClass: com.sensorsdata.portal.v2.api.ListGlobalAccountResponse isServerStreaming: false requestClass: com.sensorsdata.portal.v2.api.ListGlobalAccountRequest grpcServiceBase: com.sensorsdata.portal.v2.api.IdentityServiceGrpc.IdentityServiceImplBase internalDesc: classes in template for grpc service dynamic invoking isClientStreaming: false tags: - Identity /identity/global-account/get: get: description: 查询单个平台账号;包括平台账号的基本信息、平台账号关联的项目信息、角色信息、职位信息等;如果通过 id/uuid 无法查询到相应的账号,接口会返回「账号不存在」的错误(注意:该接口需升级到 SBP1.5.1 才能使用) operationId: GetGlobalAccount parameters: - description: 全局唯一的密钥,用于验证和授权访问 API 接口 in: header name: api-key required: true schema: type: string - description: 项目名, 指定请求所属项目 in: header name: sensorsdata-project required: true schema: type: string - description: 账号 id(id/uuid 任意选填一个即可。如果均填写,会以id进行查询查询) example: 1 in: query name: id schema: format: int32 type: integer - description: 账号 uuid(id/uuid 任意选填一个即可。如果均填写,会以id进行查询操作) example: 38135721-2938-4585-b19b-396ceb910d88 in: query name: uuid schema: type: string responses: default: content: application/json: example: code: SUCCESS data: related_projects: - {} account: phone: '12399999999' name: admin cname: 管理员 expire_time: '2022-05-03 11:18:41' disabled: false id: 1 uuid: 38135721-2938-4585-b19b-396ceb910d88 email: demo@sensorsdata.com request_id: '1' schema: $ref: '#/components/schemas/sensorsdata.portal.v2.api.GetGlobalAccountResponseHttpApiResult' description: sensorsdata.portal.v2.api.GetGlobalAccountResponse summary: 查询单个平台账号 x-sd-openapi: responseClass: com.sensorsdata.portal.v2.api.GetGlobalAccountResponse isServerStreaming: false requestClass: com.sensorsdata.portal.v2.api.GetGlobalAccountRequest grpcServiceBase: com.sensorsdata.portal.v2.api.IdentityServiceGrpc.IdentityServiceImplBase internalDesc: classes in template for grpc service dynamic invoking isClientStreaming: false tags: - Identity /identity/global-account/batch-list: post: description: 根据指定筛选条件批量查询平台账号;每个平台账号仅包括账号基本信息;支持的筛选条件包括(四选一)「账号 ID」「登录账号」「登录名称」「账号 UUID」;仅支持精确匹配;筛选条件列表最大长度为 100,超过时仅保留前 100 个筛选条件 operationId: BatchListGlobalAccount parameters: - description: 全局唯一的密钥,用于验证和授权访问 API 接口 in: header name: api-key required: true schema: type: string - description: 项目名, 指定请求所属项目 in: header name: sensorsdata-project required: true schema: type: string requestBody: content: application/json: schema: $ref: '#/components/schemas/sensorsdata.portal.v2.api.BatchListGlobalAccountsRequest' description: 「批量查询平台账号基本信息」的请求对象 required: false responses: default: content: application/json: example: code: SUCCESS data: total: 100 accounts: - phone: '12399999999' name: admin cname: 管理员 expire_time: '2022-05-03 11:18:41' disabled: false id: 1 uuid: 38135721-2938-4585-b19b-396ceb910d88 email: demo@sensorsdata.com request_id: '1' schema: $ref: '#/components/schemas/sensorsdata.portal.v2.api.BatchListGlobalAccountResponseHttpApiResult' description: sensorsdata.portal.v2.api.BatchListGlobalAccountResponse summary: 批量查询平台账号基本信息 x-sd-openapi: responseClass: com.sensorsdata.portal.v2.api.BatchListGlobalAccountResponse isServerStreaming: false requestClass: com.sensorsdata.portal.v2.api.BatchListGlobalAccountsRequest grpcServiceBase: com.sensorsdata.portal.v2.api.IdentityServiceGrpc.IdentityServiceImplBase internalDesc: classes in template for grpc service dynamic invoking isClientStreaming: false x-codegen-request-body-name: BatchListGlobalAccountsRequest tags: - Identity /identity/role/list: get: description: 获取角色列表,仅包含角色的基本信息;该接口支持翻页,每页最多返回 100 条记录;如需获取角色权限数据,可使用「获取角色基本信息以及角色的权限信息」接口获取 operationId: ListRoles parameters: - description: 全局唯一的密钥,用于验证和授权访问 API 接口 in: header name: api-key required: true schema: type: string - description: 项目名, 指定请求所属项目 in: header name: sensorsdata-project required: true schema: type: string - description: 当前访问页号,默认值:1 example: 1 in: query name: page_index schema: format: int32 type: integer - description: 单页返回最大记录数,默认值:20,取值范围:1-100 example: 20 in: query name: page_size schema: format: int32 type: integer - description: 模糊搜索关键字,模糊匹配角色的 name 或 cname example: 管理员 in: query name: query schema: type: string responses: default: content: application/json: example: code: SUCCESS data: roles: - update_time: '2022-01-01 00:00:00' type_name: 系统角色 create_time: '2022-01-01 00:00:00' role_type: SYSTEM_ROLE name: admin cname: 管理员 description: 管理员角色描述信息 is_project_customize_default_role: true id: 1 create_user_cname: 管理员 page: total: 100 current_page: 1 page_count: 100 request_id: '1' schema: $ref: '#/components/schemas/sensorsdata.portal.v2.api.ListRoleResponseHttpApiResult' description: sensorsdata.portal.v2.api.ListRoleResponse summary: 获取角色列表 x-sd-openapi: responseClass: com.sensorsdata.portal.v2.api.ListRoleResponse isServerStreaming: false requestClass: com.sensorsdata.portal.v2.api.ListRoleRequest grpcServiceBase: com.sensorsdata.portal.v2.api.IdentityServiceGrpc.IdentityServiceImplBase internalDesc: classes in template for grpc service dynamic invoking isClientStreaming: false tags: - Identity /identity/role/get: get: description: 获取角色基本信息以及角色的权限信息;如果通过角色 id 无法查询到相应的账号,接口会返回「角色不存在」的错误 operationId: GetRole parameters: - description: 全局唯一的密钥,用于验证和授权访问 API 接口 in: header name: api-key required: true schema: type: string - description: 项目名, 指定请求所属项目 in: header name: sensorsdata-project required: true schema: type: string - description: 角色 id example: 1 in: query name: id required: true schema: format: int32 type: integer responses: default: content: application/json: example: code: SUCCESS data: role: update_time: '2022-01-01 00:00:00' type_name: 系统角色 create_time: '2022-01-01 00:00:00' role_type: SYSTEM_ROLE name: admin cname: 管理员 description: 管理员角色描述信息 is_project_customize_default_role: true id: 1 create_user_cname: 管理员 statements: - operation: '8013' effect: ALLOW - operation: '8014' effect: DENY request_id: '1' schema: $ref: '#/components/schemas/sensorsdata.portal.v2.api.GetRoleResponseHttpApiResult' description: sensorsdata.portal.v2.api.GetRoleResponse summary: 获取角色基本信息和权限信息 x-sd-openapi: responseClass: com.sensorsdata.portal.v2.api.GetRoleResponse isServerStreaming: false requestClass: com.sensorsdata.portal.v2.api.GetRoleRequest grpcServiceBase: com.sensorsdata.portal.v2.api.IdentityServiceGrpc.IdentityServiceImplBase internalDesc: classes in template for grpc service dynamic invoking isClientStreaming: false tags: - Identity /identity/role/add: post: description: 新增角色,同时设置角色的权限配置(注意:该接口需升级到 SBP1.4.1 才能使用) operationId: AddRole parameters: - description: 全局唯一的密钥,用于验证和授权访问 API 接口 in: header name: api-key required: true schema: type: string - description: 项目名, 指定请求所属项目 in: header name: sensorsdata-project required: true schema: type: string requestBody: content: application/json: schema: $ref: '#/components/schemas/sensorsdata.portal.v2.api.AddRoleRequest' description: 「新增角色」的请求对象 required: false responses: default: content: application/json: example: code: SUCCESS data: role: update_time: '2022-01-01 00:00:00' type_name: 系统角色 create_time: '2022-01-01 00:00:00' role_type: SYSTEM_ROLE name: admin cname: 管理员 description: 管理员角色描述信息 is_project_customize_default_role: true id: 1 create_user_cname: 管理员 request_id: '1' schema: $ref: '#/components/schemas/sensorsdata.portal.v2.api.AddRoleResponseHttpApiResult' description: sensorsdata.portal.v2.api.AddRoleResponse summary: 新增角色并分配权限 x-sd-openapi: responseClass: com.sensorsdata.portal.v2.api.AddRoleResponse isServerStreaming: false requestClass: com.sensorsdata.portal.v2.api.AddRoleRequest grpcServiceBase: com.sensorsdata.portal.v2.api.IdentityServiceGrpc.IdentityServiceImplBase internalDesc: classes in template for grpc service dynamic invoking isClientStreaming: false x-codegen-request-body-name: AddRoleRequest tags: - Identity /identity/role/update: post: description: 修改角色基本信息以及角色的权限配置(注意:该接口需升级到 SBP1.4.1 才能使用);如果通过角色 id 无法查询到相应的账号,接口会返回「角色不存在」的错误 operationId: UpdateRole parameters: - description: 全局唯一的密钥,用于验证和授权访问 API 接口 in: header name: api-key required: true schema: type: string - description: 项目名, 指定请求所属项目 in: header name: sensorsdata-project required: true schema: type: string requestBody: content: application/json: schema: $ref: '#/components/schemas/sensorsdata.portal.v2.api.UpdateRoleRequest' description: 「修改角色」的请求对象 required: false responses: default: content: application/json: example: code: SUCCESS data: role: update_time: '2022-01-01 00:00:00' type_name: 系统角色 create_time: '2022-01-01 00:00:00' role_type: SYSTEM_ROLE name: admin cname: 管理员 description: 管理员角色描述信息 is_project_customize_default_role: true id: 1 create_user_cname: 管理员 request_id: '1' schema: $ref: '#/components/schemas/sensorsdata.portal.v2.api.UpdateRoleResponseHttpApiResult' description: sensorsdata.portal.v2.api.UpdateRoleResponse summary: 修改角色和权限 x-sd-openapi: responseClass: com.sensorsdata.portal.v2.api.UpdateRoleResponse isServerStreaming: false requestClass: com.sensorsdata.portal.v2.api.UpdateRoleRequest grpcServiceBase: com.sensorsdata.portal.v2.api.IdentityServiceGrpc.IdentityServiceImplBase internalDesc: classes in template for grpc service dynamic invoking isClientStreaming: false x-codegen-request-body-name: UpdateRoleRequest tags: - Identity /identity/role/delete: post: description: 删除角色;如果存在账号关联该角色,需要先取消账号关联之后才能进行角色删除操作;如果通过角色 id 无法查询到相应的账号,接口会返回「角色不存在」的错误 operationId: DeleteRole parameters: - description: 全局唯一的密钥,用于验证和授权访问 API 接口 in: header name: api-key required: true schema: type: string - description: 项目名, 指定请求所属项目 in: header name: sensorsdata-project required: true schema: type: string requestBody: content: application/json: schema: $ref: '#/components/schemas/sensorsdata.portal.v2.api.DeleteRoleRequest' description: 「删除角色」的请求对象 required: false responses: default: content: application/json: example: code: SUCCESS data: flag: true request_id: '1' schema: $ref: '#/components/schemas/sensorsdata.portal.v2.api.StatusResponseHttpApiResult' description: sensorsdata.portal.v2.api.StatusResponse summary: 删除角色 x-sd-openapi: responseClass: com.sensorsdata.portal.v2.api.StatusResponse isServerStreaming: false requestClass: com.sensorsdata.portal.v2.api.DeleteRoleRequest grpcServiceBase: com.sensorsdata.portal.v2.api.IdentityServiceGrpc.IdentityServiceImplBase internalDesc: classes in template for grpc service dynamic invoking isClientStreaming: false x-codegen-request-body-name: DeleteRoleRequest tags: - Identity /identity/resource/register: post: description: 注册功能资源以及该功能资源下的操作;如果功能资源已经存在,可以调用该方法进行功能资源的更新 operationId: RegisterResource parameters: - description: 全局唯一的密钥,用于验证和授权访问 API 接口 in: header name: api-key required: true schema: type: string - description: 项目名, 指定请求所属项目 in: header name: sensorsdata-project required: true schema: type: string requestBody: content: application/json: schema: $ref: '#/components/schemas/sensorsdata.portal.v2.api.RegisterResourceRequest' description: 「注册功能资源」的请求对象 required: false responses: default: content: application/json: example: code: SUCCESS data: flag: true request_id: '1' schema: $ref: '#/components/schemas/sensorsdata.portal.v2.api.StatusResponseHttpApiResult' description: sensorsdata.portal.v2.api.StatusResponse summary: 注册功能资源 x-sd-openapi: responseClass: com.sensorsdata.portal.v2.api.StatusResponse isServerStreaming: false requestClass: com.sensorsdata.portal.v2.api.RegisterResourceRequest grpcServiceBase: com.sensorsdata.portal.v2.api.IdentityServiceGrpc.IdentityServiceImplBase internalDesc: classes in template for grpc service dynamic invoking isClientStreaming: false x-codegen-request-body-name: RegisterResourceRequest tags: - Identity /identity/resource/delete: post: description: 删除功能资源以及该功能资源关联的操作;如果功能资源的 code 不存在,返回值中 flag 会标记为 false,否则会标记为 true operationId: DeleteResource parameters: - description: 全局唯一的密钥,用于验证和授权访问 API 接口 in: header name: api-key required: true schema: type: string - description: 项目名, 指定请求所属项目 in: header name: sensorsdata-project required: true schema: type: string requestBody: content: application/json: schema: $ref: '#/components/schemas/sensorsdata.portal.v2.api.DeleteResourceRequest' description: 「删除功能资源」的请求对象 required: false responses: default: content: application/json: example: code: SUCCESS data: flag: true request_id: '1' schema: $ref: '#/components/schemas/sensorsdata.portal.v2.api.StatusResponseHttpApiResult' description: sensorsdata.portal.v2.api.StatusResponse summary: 删除功能资源 x-sd-openapi: responseClass: com.sensorsdata.portal.v2.api.StatusResponse isServerStreaming: false requestClass: com.sensorsdata.portal.v2.api.DeleteResourceRequest grpcServiceBase: com.sensorsdata.portal.v2.api.IdentityServiceGrpc.IdentityServiceImplBase internalDesc: classes in template for grpc service dynamic invoking isClientStreaming: false x-codegen-request-body-name: DeleteResourceRequest tags: - Identity /identity/resource/category/register: post: description: 注册资源分类的操作;如果资源分类已经存在,可以调用该方法对资源分类进行更新操作 operationId: RegisterCategory parameters: - description: 全局唯一的密钥,用于验证和授权访问 API 接口 in: header name: api-key required: true schema: type: string - description: 项目名, 指定请求所属项目 in: header name: sensorsdata-project required: true schema: type: string requestBody: content: application/json: schema: $ref: '#/components/schemas/sensorsdata.portal.v2.api.RegisterCategoryRequest' description: 「注册分类」的请求对象 required: false responses: default: content: application/json: example: code: SUCCESS data: flag: true request_id: '1' schema: $ref: '#/components/schemas/sensorsdata.portal.v2.api.StatusResponseHttpApiResult' description: sensorsdata.portal.v2.api.StatusResponse summary: 注册资源分类 x-sd-openapi: responseClass: com.sensorsdata.portal.v2.api.StatusResponse isServerStreaming: false requestClass: com.sensorsdata.portal.v2.api.RegisterCategoryRequest grpcServiceBase: com.sensorsdata.portal.v2.api.IdentityServiceGrpc.IdentityServiceImplBase internalDesc: classes in template for grpc service dynamic invoking isClientStreaming: false x-codegen-request-body-name: RegisterCategoryRequest tags: - Identity /identity/resource/category/delete: post: description: 删除资源分类的操作;如果资源分类和功能资源绑定,则此操作会解除和功能资源的绑定关系,并删除资源分类 operationId: DeleteCategory parameters: - description: 全局唯一的密钥,用于验证和授权访问 API 接口 in: header name: api-key required: true schema: type: string - description: 项目名, 指定请求所属项目 in: header name: sensorsdata-project required: true schema: type: string requestBody: content: application/json: schema: $ref: '#/components/schemas/sensorsdata.portal.v2.api.DeleteCategoryRequest' description: 「删除分类」的请求对象 required: false responses: default: content: application/json: example: code: SUCCESS data: flag: true request_id: '1' schema: $ref: '#/components/schemas/sensorsdata.portal.v2.api.StatusResponseHttpApiResult' description: sensorsdata.portal.v2.api.StatusResponse summary: 删除资源分类 x-sd-openapi: responseClass: com.sensorsdata.portal.v2.api.StatusResponse isServerStreaming: false requestClass: com.sensorsdata.portal.v2.api.DeleteCategoryRequest grpcServiceBase: com.sensorsdata.portal.v2.api.IdentityServiceGrpc.IdentityServiceImplBase internalDesc: classes in template for grpc service dynamic invoking isClientStreaming: false x-codegen-request-body-name: DeleteCategoryRequest tags: - Identity /identity/resource/category/bind: post: description: 资源分类关联具体的功能资源;功能资源只有和具体的资源分类关联后,该功能资源才能展示在前端页面 operationId: BindCategoryAndResource parameters: - description: 全局唯一的密钥,用于验证和授权访问 API 接口 in: header name: api-key required: true schema: type: string - description: 项目名, 指定请求所属项目 in: header name: sensorsdata-project required: true schema: type: string requestBody: content: application/json: schema: $ref: '#/components/schemas/sensorsdata.portal.v2.api.BindCategoryAndResourceRequest' description: 「资源分类关联具体的功能资源」的请求对象 required: false responses: default: content: application/json: example: code: SUCCESS data: flag: true request_id: '1' schema: $ref: '#/components/schemas/sensorsdata.portal.v2.api.StatusResponseHttpApiResult' description: sensorsdata.portal.v2.api.StatusResponse summary: 资源分类关联具体的功能资源 x-sd-openapi: responseClass: com.sensorsdata.portal.v2.api.StatusResponse isServerStreaming: false requestClass: com.sensorsdata.portal.v2.api.BindCategoryAndResourceRequest grpcServiceBase: com.sensorsdata.portal.v2.api.IdentityServiceGrpc.IdentityServiceImplBase internalDesc: classes in template for grpc service dynamic invoking isClientStreaming: false x-codegen-request-body-name: BindCategoryAndResourceRequest tags: - Identity /identity/duty/list: get: description: 获取职务列表,该接口支持翻页,每页最多返回 100 条记录 operationId: ListDuties parameters: - description: 全局唯一的密钥,用于验证和授权访问 API 接口 in: header name: api-key required: true schema: type: string - description: 项目名, 指定请求所属项目 in: header name: sensorsdata-project required: true schema: type: string - description: 列表页号,默认值:1,取值范围:>=1 example: 1 in: query name: page_index required: true schema: format: int32 type: integer - description: 单页返回最大记录数, 默认值:20,取值范围:1-100 example: 20 in: query name: page_size required: true schema: format: int32 type: integer - description: 模糊搜索关键字,模糊匹配职务名称 example: 普通员工 in: query name: query schema: type: string responses: default: content: application/json: example: code: SUCCESS data: page: total: 100 current_page: 1 page_count: 100 duties: - name: 普通员工 id: 5 request_id: '1' schema: $ref: '#/components/schemas/sensorsdata.portal.v2.api.ListDutyResponseHttpApiResult' description: sensorsdata.portal.v2.api.ListDutyResponse summary: 获取职务列表 x-sd-openapi: responseClass: com.sensorsdata.portal.v2.api.ListDutyResponse isServerStreaming: false requestClass: com.sensorsdata.portal.v2.api.ListDutyRequest grpcServiceBase: com.sensorsdata.portal.v2.api.IdentityServiceGrpc.IdentityServiceImplBase internalDesc: classes in template for grpc service dynamic invoking isClientStreaming: false tags: - Identity /identity/attr/upsert: post: description: 添加/更新扩展属性,如果已经存在,则更新 operationId: UpsertAttribute parameters: - description: 全局唯一的密钥,用于验证和授权访问 API 接口 in: header name: api-key required: true schema: type: string - description: 项目名, 指定请求所属项目 in: header name: sensorsdata-project required: true schema: type: string requestBody: content: application/json: schema: $ref: '#/components/schemas/sensorsdata.portal.v2.api.UpsertAttributeRequest' description: 扩展属性的定义 required: false responses: default: content: application/json: example: code: SUCCESS data: {} request_id: '1' schema: $ref: '#/components/schemas/sensorsdata.common.HttpApiResult' description: '' summary: 添加/更新扩展属性 x-sd-openapi: responseClass: com.google.protobuf.Empty isServerStreaming: false requestClass: com.sensorsdata.portal.v2.api.UpsertAttributeRequest grpcServiceBase: com.sensorsdata.portal.v2.api.IdentityServiceGrpc.IdentityServiceImplBase internalDesc: classes in template for grpc service dynamic invoking isClientStreaming: false x-codegen-request-body-name: UpsertAttributeRequest tags: - Identity /identity/attr/query: get: description: 获取扩展属性 operationId: GetAttribute parameters: - description: 全局唯一的密钥,用于验证和授权访问 API 接口 in: header name: api-key required: true schema: type: string - description: 项目名, 指定请求所属项目 in: header name: sensorsdata-project required: true schema: type: string - description: 属性编码 example: JOB in: query name: code schema: type: string responses: default: content: application/json: example: code: SUCCESS data: attribute: code: JOB nodes: - attr_code: JOB detach_from_parent: true code: RD_1 project_id: 1 name: 研发部 parent_code: RD desc: 描述信息 scope: GLOBAL name: 职位 type: VALUE desc: 职位属性 project_ids: - 1 - 2 request_id: '1' schema: $ref: '#/components/schemas/sensorsdata.portal.v2.api.GetAttributeResponseHttpApiResult' description: sensorsdata.portal.v2.api.GetAttributeResponse summary: 获取扩展属性 x-sd-openapi: responseClass: com.sensorsdata.portal.v2.api.GetAttributeResponse isServerStreaming: false requestClass: com.sensorsdata.portal.v2.api.GetAttributeRequest grpcServiceBase: com.sensorsdata.portal.v2.api.IdentityServiceGrpc.IdentityServiceImplBase internalDesc: classes in template for grpc service dynamic invoking isClientStreaming: false tags: - Identity /identity/attr/delete: post: description: 删除扩展属性 operationId: DeleteAttribute parameters: - description: 全局唯一的密钥,用于验证和授权访问 API 接口 in: header name: api-key required: true schema: type: string - description: 项目名, 指定请求所属项目 in: header name: sensorsdata-project required: true schema: type: string requestBody: content: application/json: schema: $ref: '#/components/schemas/sensorsdata.portal.v2.api.DeleteAttributeRequest' description: 扩展属性的定义 required: false responses: default: content: application/json: example: code: SUCCESS data: {} request_id: '1' schema: $ref: '#/components/schemas/sensorsdata.common.HttpApiResult' description: '' summary: 删除扩展属性 x-sd-openapi: responseClass: com.google.protobuf.Empty isServerStreaming: false requestClass: com.sensorsdata.portal.v2.api.DeleteAttributeRequest grpcServiceBase: com.sensorsdata.portal.v2.api.IdentityServiceGrpc.IdentityServiceImplBase internalDesc: classes in template for grpc service dynamic invoking isClientStreaming: false x-codegen-request-body-name: DeleteAttributeRequest tags: - Identity /identity/attr/node: post: description: 不存在则新增,存在则更新 operationId: UpsertAttributeNode parameters: - description: 全局唯一的密钥,用于验证和授权访问 API 接口 in: header name: api-key required: true schema: type: string - description: 项目名, 指定请求所属项目 in: header name: sensorsdata-project required: true schema: type: string requestBody: content: application/json: schema: $ref: '#/components/schemas/sensorsdata.portal.v2.api.UpsertAttributeNodeRequest' description: 扩展属性的节点信息,存在则更新,不存在则新增 required: false responses: default: content: application/json: example: code: SUCCESS data: {} request_id: '1' schema: $ref: '#/components/schemas/sensorsdata.common.HttpApiResult' description: '' summary: 新增/更新扩展属性节点信息 x-sd-openapi: responseClass: com.google.protobuf.Empty isServerStreaming: false requestClass: com.sensorsdata.portal.v2.api.UpsertAttributeNodeRequest grpcServiceBase: com.sensorsdata.portal.v2.api.IdentityServiceGrpc.IdentityServiceImplBase internalDesc: classes in template for grpc service dynamic invoking isClientStreaming: false x-codegen-request-body-name: UpsertAttributeNodeRequest tags: - Identity /identity/attr/node/query: get: description: 获取节点信息 operationId: GetAttributeNode parameters: - description: 全局唯一的密钥,用于验证和授权访问 API 接口 in: header name: api-key required: true schema: type: string - description: 项目名, 指定请求所属项目 in: header name: sensorsdata-project required: true schema: type: string - description: 所属属性 example: JOB in: query name: attr_code schema: type: string - description: 列表页号,默认值:1,取值范围:>=1 example: 1 in: query name: page_index schema: format: int32 type: integer - description: 单页返回最大记录数, 默认值:20,取值范围:1-500 example: 20 in: query name: page_size schema: format: int32 type: integer requestBody: content: application/json: schema: $ref: '#/components/schemas/sensorsdata.portal.v2.api.GetAttributeNodeRequestBody' description: 获取扩展属性的节点信息 required: false responses: default: content: application/json: example: code: SUCCESS data: nodes: - attr_code: JOB detach_from_parent: true code: RD_1 project_id: 1 name: 研发部 parent_code: RD desc: 描述信息 count: 20 request_id: '1' schema: $ref: '#/components/schemas/sensorsdata.portal.v2.api.GetAttributeNodeResponseHttpApiResult' description: sensorsdata.portal.v2.api.GetAttributeNodeResponse summary: 获取扩展属性节点信息 x-sd-openapi: responseClass: com.sensorsdata.portal.v2.api.GetAttributeNodeResponse isServerStreaming: false requestClass: com.sensorsdata.portal.v2.api.GetAttributeNodeRequest grpcServiceBase: com.sensorsdata.portal.v2.api.IdentityServiceGrpc.IdentityServiceImplBase internalDesc: classes in template for grpc service dynamic invoking isClientStreaming: false x-codegen-request-body-name: GetAttributeNodeRequestBody tags: - Identity /identity/attr/node/delete: post: description: 删除节点 operationId: DeleteAttributeNode parameters: - description: 全局唯一的密钥,用于验证和授权访问 API 接口 in: header name: api-key required: true schema: type: string - description: 项目名, 指定请求所属项目 in: header name: sensorsdata-project required: true schema: type: string requestBody: content: application/json: schema: $ref: '#/components/schemas/sensorsdata.portal.v2.api.DeleteAttributeNodeRequest' description: 删除扩展属性的节点 required: false responses: default: content: application/json: example: code: SUCCESS data: {} request_id: '1' schema: $ref: '#/components/schemas/sensorsdata.common.HttpApiResult' description: '' summary: 删除扩展属性的节点 x-sd-openapi: responseClass: com.google.protobuf.Empty isServerStreaming: false requestClass: com.sensorsdata.portal.v2.api.DeleteAttributeNodeRequest grpcServiceBase: com.sensorsdata.portal.v2.api.IdentityServiceGrpc.IdentityServiceImplBase internalDesc: classes in template for grpc service dynamic invoking isClientStreaming: false x-codegen-request-body-name: DeleteAttributeNodeRequest tags: - Identity /identity/attr/project: post: description: 将对应的项目和扩展属性绑定 operationId: UpsertProjectAttribute parameters: - description: 全局唯一的密钥,用于验证和授权访问 API 接口 in: header name: api-key required: true schema: type: string - description: 项目名, 指定请求所属项目 in: header name: sensorsdata-project required: true schema: type: string requestBody: content: application/json: schema: $ref: '#/components/schemas/sensorsdata.portal.v2.api.UpsertProjectAttributeRequest' description: 项目和扩展属性关联关系 required: false responses: default: content: application/json: example: code: SUCCESS data: {} request_id: '1' schema: $ref: '#/components/schemas/sensorsdata.common.HttpApiResult' description: '' summary: 项目与扩展属性绑定 x-sd-openapi: responseClass: com.google.protobuf.Empty isServerStreaming: false requestClass: com.sensorsdata.portal.v2.api.UpsertProjectAttributeRequest grpcServiceBase: com.sensorsdata.portal.v2.api.IdentityServiceGrpc.IdentityServiceImplBase internalDesc: classes in template for grpc service dynamic invoking isClientStreaming: false x-codegen-request-body-name: UpsertProjectAttributeRequest tags: - Identity /identity/attr/project/query: get: description: 获取对应的绑定数据 operationId: GetProjectAttribute parameters: - description: 全局唯一的密钥,用于验证和授权访问 API 接口 in: header name: api-key required: true schema: type: string - description: 项目名, 指定请求所属项目 in: header name: sensorsdata-project required: true schema: type: string - description: 扩展属性 example: JOB in: query name: attr_code schema: type: string - description: 绑定的项目 id example: 1 in: query name: project_id schema: format: int32 type: integer responses: default: content: application/json: example: code: SUCCESS data: project_attributes: - attr_code: JOB project_id: 1 attr_name: 岗位 project_name: 正式项目 request_id: '1' schema: $ref: '#/components/schemas/sensorsdata.portal.v2.api.GetProjectAttributeResponseHttpApiResult' description: sensorsdata.portal.v2.api.GetProjectAttributeResponse summary: 获取项目与扩展属性绑定关系 x-sd-openapi: responseClass: com.sensorsdata.portal.v2.api.GetProjectAttributeResponse isServerStreaming: false requestClass: com.sensorsdata.portal.v2.api.GetProjectAttributeRequest grpcServiceBase: com.sensorsdata.portal.v2.api.IdentityServiceGrpc.IdentityServiceImplBase internalDesc: classes in template for grpc service dynamic invoking isClientStreaming: false tags: - Identity /identity/attr/project/delete: post: description: 删除对应的绑定数据 operationId: DeleteProjectAttribute parameters: - description: 全局唯一的密钥,用于验证和授权访问 API 接口 in: header name: api-key required: true schema: type: string - description: 项目名, 指定请求所属项目 in: header name: sensorsdata-project required: true schema: type: string requestBody: content: application/json: schema: $ref: '#/components/schemas/sensorsdata.portal.v2.api.DeleteProjectAttributeRequest' description: 删除项目和扩展属性关联关系 required: false responses: default: content: application/json: example: code: SUCCESS data: {} request_id: '1' schema: $ref: '#/components/schemas/sensorsdata.common.HttpApiResult' description: '' summary: 删除项目与扩展属性绑定关系 x-sd-openapi: responseClass: com.google.protobuf.Empty isServerStreaming: false requestClass: com.sensorsdata.portal.v2.api.DeleteProjectAttributeRequest grpcServiceBase: com.sensorsdata.portal.v2.api.IdentityServiceGrpc.IdentityServiceImplBase internalDesc: classes in template for grpc service dynamic invoking isClientStreaming: false x-codegen-request-body-name: DeleteProjectAttributeRequest tags: - Identity /identity/attr/account: post: description: 将人和扩展属性绑定 operationId: UpsertAccountAttribute parameters: - description: 全局唯一的密钥,用于验证和授权访问 API 接口 in: header name: api-key required: true schema: type: string - description: 项目名, 指定请求所属项目 in: header name: sensorsdata-project required: true schema: type: string requestBody: content: application/json: schema: $ref: '#/components/schemas/sensorsdata.portal.v2.api.UpsertAccountAttributeRequest' description: 账号和扩展属性的关联关系 required: false responses: default: content: application/json: example: code: SUCCESS data: {} request_id: '1' schema: $ref: '#/components/schemas/sensorsdata.common.HttpApiResult' description: '' summary: 将人和扩展属性绑定 x-sd-openapi: responseClass: com.google.protobuf.Empty isServerStreaming: false requestClass: com.sensorsdata.portal.v2.api.UpsertAccountAttributeRequest grpcServiceBase: com.sensorsdata.portal.v2.api.IdentityServiceGrpc.IdentityServiceImplBase internalDesc: classes in template for grpc service dynamic invoking isClientStreaming: false x-codegen-request-body-name: UpsertAccountAttributeRequest tags: - Identity /identity/attr/account/query: get: description: 获取人和扩展属性绑定关系 operationId: GetAccountAttribute parameters: - description: 全局唯一的密钥,用于验证和授权访问 API 接口 in: header name: api-key required: true schema: type: string - description: 项目名, 指定请求所属项目 in: header name: sensorsdata-project required: true schema: type: string - description: 账号ID example: 1 in: query name: user_id schema: format: int32 type: integer - description: 项目id, 当扩展属性scope=GLOBAL时,project_id=NULL;scope=PROJECT时,project_id必填 example: 1 in: query name: project_id schema: format: int32 type: integer - description: 扩展属性维度 example: JOB in: query name: attr_code schema: type: string responses: default: content: application/json: example: code: SUCCESS data: account_attributes: - attr_code: JOB user_id: 1 project_id: 1 attr_name: 岗位 node_code: RD node_name: RD request_id: '1' schema: $ref: '#/components/schemas/sensorsdata.portal.v2.api.GetAccountAttributeResponseHttpApiResult' description: sensorsdata.portal.v2.api.GetAccountAttributeResponse summary: 获取人和扩展属性绑定关系 x-sd-openapi: responseClass: com.sensorsdata.portal.v2.api.GetAccountAttributeResponse isServerStreaming: false requestClass: com.sensorsdata.portal.v2.api.GetAccountAttributeRequest grpcServiceBase: com.sensorsdata.portal.v2.api.IdentityServiceGrpc.IdentityServiceImplBase internalDesc: classes in template for grpc service dynamic invoking isClientStreaming: false tags: - Identity /identity/attr/account/delete: post: description: 将人和扩展属性解绑 operationId: DeleteAccountAttribute parameters: - description: 全局唯一的密钥,用于验证和授权访问 API 接口 in: header name: api-key required: true schema: type: string - description: 项目名, 指定请求所属项目 in: header name: sensorsdata-project required: true schema: type: string requestBody: content: application/json: schema: $ref: '#/components/schemas/sensorsdata.portal.v2.api.DeleteAccountAttributeRequest' description: 删除账号和扩展属性的关联关系 required: false responses: default: content: application/json: example: code: SUCCESS data: {} request_id: '1' schema: $ref: '#/components/schemas/sensorsdata.common.HttpApiResult' description: '' summary: 删除人和扩展属性节点的绑定关系 x-sd-openapi: responseClass: com.google.protobuf.Empty isServerStreaming: false requestClass: com.sensorsdata.portal.v2.api.DeleteAccountAttributeRequest grpcServiceBase: com.sensorsdata.portal.v2.api.IdentityServiceGrpc.IdentityServiceImplBase internalDesc: classes in template for grpc service dynamic invoking isClientStreaming: false x-codegen-request-body-name: DeleteAccountAttributeRequest tags: - Identity /identity/attr/role: post: description: 将角色和扩展属性绑定 operationId: UpsertRoleAttribute parameters: - description: 全局唯一的密钥,用于验证和授权访问 API 接口 in: header name: api-key required: true schema: type: string - description: 项目名, 指定请求所属项目 in: header name: sensorsdata-project required: true schema: type: string requestBody: content: application/json: schema: $ref: '#/components/schemas/sensorsdata.portal.v2.api.UpsertRoleAttributeRequest' description: 角色和扩展属性的关联关系 required: false responses: default: content: application/json: example: code: SUCCESS data: {} request_id: '1' schema: $ref: '#/components/schemas/sensorsdata.common.HttpApiResult' description: '' summary: 将角色和扩展属性绑定 x-sd-openapi: responseClass: com.google.protobuf.Empty isServerStreaming: false requestClass: com.sensorsdata.portal.v2.api.UpsertRoleAttributeRequest grpcServiceBase: com.sensorsdata.portal.v2.api.IdentityServiceGrpc.IdentityServiceImplBase internalDesc: classes in template for grpc service dynamic invoking isClientStreaming: false x-codegen-request-body-name: UpsertRoleAttributeRequest tags: - Identity /identity/attr/role/query: get: description: 获取角色和扩展属性绑定关系 operationId: GetRoleAttribute parameters: - description: 全局唯一的密钥,用于验证和授权访问 API 接口 in: header name: api-key required: true schema: type: string - description: 项目名, 指定请求所属项目 in: header name: sensorsdata-project required: true schema: type: string - description: 角色ID example: 1 in: query name: role_id schema: format: int32 type: integer responses: default: content: application/json: example: code: SUCCESS data: role_attributes: - attr_code: JOB role_id: 1 attr_name: 岗位 node_code: RD node_name: RD not_auth_children: false request_id: '1' schema: $ref: '#/components/schemas/sensorsdata.portal.v2.api.GetRoleAttributeResponseHttpApiResult' description: sensorsdata.portal.v2.api.GetRoleAttributeResponse summary: 获取角色和扩展属性绑定关系 x-sd-openapi: responseClass: com.sensorsdata.portal.v2.api.GetRoleAttributeResponse isServerStreaming: false requestClass: com.sensorsdata.portal.v2.api.GetRoleAttributeRequest grpcServiceBase: com.sensorsdata.portal.v2.api.IdentityServiceGrpc.IdentityServiceImplBase internalDesc: classes in template for grpc service dynamic invoking isClientStreaming: false tags: - Identity /identity/attr/role/delete: post: description: 将角色和扩展属性解绑 operationId: DeleteRoleAttribute parameters: - description: 全局唯一的密钥,用于验证和授权访问 API 接口 in: header name: api-key required: true schema: type: string - description: 项目名, 指定请求所属项目 in: header name: sensorsdata-project required: true schema: type: string requestBody: content: application/json: schema: $ref: '#/components/schemas/sensorsdata.portal.v2.api.DeleteRoleAttributeRequest' description: 删除角色和扩展属性的关联关系 required: false responses: default: content: application/json: example: code: SUCCESS data: {} request_id: '1' schema: $ref: '#/components/schemas/sensorsdata.common.HttpApiResult' description: '' summary: 删除角色和扩展属性节点的绑定关系 x-sd-openapi: responseClass: com.google.protobuf.Empty isServerStreaming: false requestClass: com.sensorsdata.portal.v2.api.DeleteRoleAttributeRequest grpcServiceBase: com.sensorsdata.portal.v2.api.IdentityServiceGrpc.IdentityServiceImplBase internalDesc: classes in template for grpc service dynamic invoking isClientStreaming: false x-codegen-request-body-name: DeleteRoleAttributeRequest tags: - Identity /identity/resource/permission/save: post: description: 保存单个业务线数据资源的授权信息;一个资源可授权多个权限组。 operationId: SaveResourcePermission parameters: - description: 全局唯一的密钥,用于验证和授权访问 API 接口 in: header name: api-key required: true schema: type: string - description: 项目名, 指定请求所属项目 in: header name: sensorsdata-project required: true schema: type: string requestBody: content: application/json: schema: $ref: '#/components/schemas/sensorsdata.portal.v2.SaveResourcePermissionRequest' required: false responses: default: content: application/json: example: code: SUCCESS data: {} request_id: '1' schema: $ref: '#/components/schemas/sensorsdata.common.HttpApiResult' description: '' summary: 保存业务线的数据资源授权信息 x-sd-openapi: responseClass: com.google.protobuf.Empty isServerStreaming: false requestClass: com.sensorsdata.portal.v2.SaveResourcePermissionRequest grpcServiceBase: com.sensorsdata.portal.v2.api.IdentityServiceGrpc.IdentityServiceImplBase internalDesc: classes in template for grpc service dynamic invoking isClientStreaming: false x-codegen-request-body-name: SaveResourcePermissionRequest tags: - Identity /identity/resource/permission/batch-add: post: description: 对同一个资源编码下的多个资源批量新增权限授权信息。 operationId: BatchAddResourcePermission parameters: - description: 全局唯一的密钥,用于验证和授权访问 API 接口 in: header name: api-key required: true schema: type: string - description: 项目名, 指定请求所属项目 in: header name: sensorsdata-project required: true schema: type: string requestBody: content: application/json: schema: $ref: '#/components/schemas/sensorsdata.portal.v2.BatchAddResourcePermissionRequest' required: false responses: default: content: application/json: example: code: SUCCESS data: {} request_id: '1' schema: $ref: '#/components/schemas/sensorsdata.common.HttpApiResult' description: '' summary: 批量新增资源的部分权限授权信息 x-sd-openapi: responseClass: com.google.protobuf.Empty isServerStreaming: false requestClass: com.sensorsdata.portal.v2.BatchAddResourcePermissionRequest grpcServiceBase: com.sensorsdata.portal.v2.api.IdentityServiceGrpc.IdentityServiceImplBase internalDesc: classes in template for grpc service dynamic invoking isClientStreaming: false x-codegen-request-body-name: BatchAddResourcePermissionRequest tags: - Identity /identity/resource/permission/batch-delete: post: description: 对同一个资源编码下的多个资源批量删除指定权限授权信息。 operationId: BatchDeleteResourcePermission parameters: - description: 全局唯一的密钥,用于验证和授权访问 API 接口 in: header name: api-key required: true schema: type: string - description: 项目名, 指定请求所属项目 in: header name: sensorsdata-project required: true schema: type: string requestBody: content: application/json: schema: $ref: '#/components/schemas/sensorsdata.portal.v2.BatchDeleteResourcePermissionRequest' required: false responses: default: content: application/json: example: code: SUCCESS data: {} request_id: '1' schema: $ref: '#/components/schemas/sensorsdata.common.HttpApiResult' description: '' summary: 批量删除资源的部分权限授权信息 x-sd-openapi: responseClass: com.google.protobuf.Empty isServerStreaming: false requestClass: com.sensorsdata.portal.v2.BatchDeleteResourcePermissionRequest grpcServiceBase: com.sensorsdata.portal.v2.api.IdentityServiceGrpc.IdentityServiceImplBase internalDesc: classes in template for grpc service dynamic invoking isClientStreaming: false x-codegen-request-body-name: BatchDeleteResourcePermissionRequest tags: - Identity /identity/resource/permission/policies/list: post: description: 获取 BASE_RESOURCE 权限策略保存的授权信息及授权身份信息。 operationId: ListResourcePolicies parameters: - description: 全局唯一的密钥,用于验证和授权访问 API 接口 in: header name: api-key required: true schema: type: string - description: 项目名, 指定请求所属项目 in: header name: sensorsdata-project required: true schema: type: string requestBody: content: application/json: schema: $ref: '#/components/schemas/sensorsdata.portal.v2.ResourcePoliciesRequest' required: false responses: default: content: application/json: example: code: SUCCESS data: policy_principals: - principals: - {} policy: statements: - condition: index: 10 conditions: - function: EQUAL index: 10 params: - expression: user.p1/user.p2+user.p3 field: '#ResourceId' time_point: relative_time: time_interval: {} variable: $ENTRY_TIME value: {} param_type: FIELD operator: AND effect: ALLOW operation: '11011' request_id: '1' schema: $ref: '#/components/schemas/sensorsdata.portal.v2.ListPolicyPrincipalsResponseHttpApiResult' description: sensorsdata.portal.v2.ListPolicyPrincipalsResponse summary: 获取资源权限策略保存的授权信息及授权身份信息 x-sd-openapi: responseClass: com.sensorsdata.portal.v2.ListPolicyPrincipalsResponse isServerStreaming: false requestClass: com.sensorsdata.portal.v2.ResourcePoliciesRequest grpcServiceBase: com.sensorsdata.portal.v2.api.IdentityServiceGrpc.IdentityServiceImplBase internalDesc: classes in template for grpc service dynamic invoking isClientStreaming: false x-codegen-request-body-name: ResourcePoliciesRequest tags: - Identity /identity/resource/permission/policies/batch-list: post: description: 批量获取 BASE_RESOURCE 权限策略保存的授权信息及授权身份信息。 operationId: BatchListResourcePolicies parameters: - description: 全局唯一的密钥,用于验证和授权访问 API 接口 in: header name: api-key required: true schema: type: string - description: 项目名, 指定请求所属项目 in: header name: sensorsdata-project required: true schema: type: string requestBody: content: application/json: schema: $ref: '#/components/schemas/sensorsdata.portal.v2.BatchListResourcePoliciesRequest' required: false responses: default: content: application/json: example: code: SUCCESS data: resource_policies: - policy_principals: - principals: - {} policy: statements: - condition: index: 10 conditions: - function: EQUAL index: 10 params: - expression: user.p1/user.p2+user.p3 field: '#ResourceId' time_point: relative_time: time_interval: {} variable: $ENTRY_TIME value: {} param_type: FIELD operator: AND effect: ALLOW operation: '11011' request_id: '1' schema: $ref: '#/components/schemas/sensorsdata.portal.v2.BatchListResourcePoliciesResponseHttpApiResult' description: sensorsdata.portal.v2.BatchListResourcePoliciesResponse summary: 批量获取资源权限策略保存的授权信息及授权身份信息 x-sd-openapi: responseClass: com.sensorsdata.portal.v2.BatchListResourcePoliciesResponse isServerStreaming: false requestClass: com.sensorsdata.portal.v2.BatchListResourcePoliciesRequest grpcServiceBase: com.sensorsdata.portal.v2.api.IdentityServiceGrpc.IdentityServiceImplBase internalDesc: classes in template for grpc service dynamic invoking isClientStreaming: false x-codegen-request-body-name: BatchListResourcePoliciesRequest tags: - Identity /identity/resource/permission/operation-condition/list: post: description: 获取当前人在某个资源下对应多个权限合并后的授权信息。 operationId: ListResourceOperationCondition parameters: - description: 全局唯一的密钥,用于验证和授权访问 API 接口 in: header name: api-key required: true schema: type: string - description: 项目名, 指定请求所属项目 in: header name: sensorsdata-project required: true schema: type: string requestBody: content: application/json: schema: $ref: '#/components/schemas/sensorsdata.portal.v2.ResourceOperationConditionRequest' required: false responses: default: content: application/json: example: code: SUCCESS data: {} request_id: '1' schema: $ref: '#/components/schemas/sensorsdata.portal.v2.ListOperationConditionResponseHttpApiResult' description: sensorsdata.portal.v2.ListOperationConditionResponse summary: 获取当前人在某个资源下对应多个权限合并后的授权信息 x-sd-openapi: responseClass: com.sensorsdata.portal.v2.ListOperationConditionResponse isServerStreaming: false requestClass: com.sensorsdata.portal.v2.ResourceOperationConditionRequest grpcServiceBase: com.sensorsdata.portal.v2.api.IdentityServiceGrpc.IdentityServiceImplBase internalDesc: classes in template for grpc service dynamic invoking isClientStreaming: false x-codegen-request-body-name: ResourceOperationConditionRequest tags: - Identity /identity/resource/permission/operation-condition/batch-list: post: description: 获取当前人在多个资源下对应多个权限合并后的授权信息。 operationId: BatchListResourceOperationCondition parameters: - description: 全局唯一的密钥,用于验证和授权访问 API 接口 in: header name: api-key required: true schema: type: string - description: 项目名, 指定请求所属项目 in: header name: sensorsdata-project required: true schema: type: string requestBody: content: application/json: schema: $ref: '#/components/schemas/sensorsdata.portal.v2.BatchListResourceOperationConditionRequest' required: false responses: default: content: application/json: example: code: SUCCESS data: resource_operation_conditions: - {} request_id: '1' schema: $ref: '#/components/schemas/sensorsdata.portal.v2.BatchListResourceOperationConditionResponseHttpApiResult' description: sensorsdata.portal.v2.BatchListResourceOperationConditionResponse summary: 获取当前人在多个资源下对应多个权限合并后的授权信息 x-sd-openapi: responseClass: com.sensorsdata.portal.v2.BatchListResourceOperationConditionResponse isServerStreaming: false requestClass: com.sensorsdata.portal.v2.BatchListResourceOperationConditionRequest grpcServiceBase: com.sensorsdata.portal.v2.api.IdentityServiceGrpc.IdentityServiceImplBase internalDesc: classes in template for grpc service dynamic invoking isClientStreaming: false x-codegen-request-body-name: BatchListResourceOperationConditionRequest tags: - Identity components: schemas: sensorsdata.portal.v2.api.AddRoleResponse: description: 「新增角色」的响应对象 properties: role: $ref: '#/components/schemas/sensorsdata.portal.v2.api.Role' title: AddRoleResponse type: object sensorsdata.portal.v2.OperationCompoundCondition: description: 权限的condition结构;ALLOW:允许,DENY:拒绝 properties: allow_condition: $ref: '#/components/schemas/sensorsdata.common.CompoundFilterCondition' deny_condition: $ref: '#/components/schemas/sensorsdata.common.CompoundFilterCondition' permission_scope: description: 权限的scope enum: - UNSPECIFIED - PARTIAL_PERMISSION - ALLOW_ALL - DENY_ALL type: string title: OperationCompoundCondition type: object sensorsdata.portal.v2.Principals: description: '' properties: type: description: '' enum: - PRINCIPAL_TYPE_UNSPECIFIED - ACCOUNT - ROLE - ATTRIBUTE type: string principal_ids: description: '' items: type: string type: array title: Principals type: object sensorsdata.common.FilterCondition: description: 单个过滤条件 properties: function: description: 过滤条件的判断函数 enum: - PREDICATE_FUNCTION_TYPE_UNSPECIFIED - IS_SET - IS_NOT_SET - EQUAL - NOT_EQUAL - IN - NOT_IN - LESS - LESS_EQUAL - GREATER - GREATER_EQUAL - BETWEEN - RIGHT_OPEN_BETWEEN - HASH_BETWEEN - LEFT_OPEN_BETWEEN - OPEN_BETWEEN - IS_TRUE - IS_FALSE - CONTAIN - NOT_CONTAIN - IS_EMPTY - IS_NOT_EMPTY - RLIKE - NOT_RLIKE - INCLUDE - NOT_INCLUDE - ABSOLUTE_BETWEEN - RELATIVE_WITHIN - RELATIVE_BETWEEN - RELATIVE_EVENT_TIME - RELATIVE_BEFORE - INTERSECTS - NOT_INTERSECTS - SUBSET_OF - NOT_SUBSET_OF - SUPERSET_OF - NOT_SUPERSET_OF example: EQUAL type: string params: description: 函数的参数 items: $ref: '#/components/schemas/sensorsdata.common.PredicateFunctionParam' type: array index: description: 当前筛选条件所处的位置下标,主要为了保证前端展示顺序的稳定 example: 10 format: int32 type: integer title: FilterCondition type: object sensorsdata.portal.v2.api.ListGlobalAccountResponse: description: 「获取平台账户列表」的响应对象 properties: results: description: 平台账号基本信息及相关信息列表(包括账号关联的项目信息、职位信息、角色信息等) items: $ref: '#/components/schemas/sensorsdata.portal.v2.api.ListGlobalAccountDetail' type: array page: $ref: '#/components/schemas/sensorsdata.portal.v2.api.PageInfo' title: ListGlobalAccountResponse type: object sensorsdata.portal.v2.api.AccountWithRelatedInfo: description: 账号及其相关信息(包括角色和扩展属性值) properties: account: $ref: '#/components/schemas/sensorsdata.portal.v2.api.Account' related_extra_attributes: description: 扩展属性的值 items: $ref: '#/components/schemas/sensorsdata.portal.v2.api.ExtraAttribute' type: array roles: description: 角色的简要信息 items: $ref: '#/components/schemas/sensorsdata.portal.v2.api.RoleInfoSummary' type: array title: AccountWithRelatedInfo type: object sensorsdata.portal.v2.api.AddGlobalAccountRequest: description: 「新增平台账户」的请求对象 properties: account: $ref: '#/components/schemas/sensorsdata.portal.v2.api.AddGlobalAccountDetail' related_projects: description: 新增平台账号关联的项目信息、角色信息、职位信息等 items: $ref: '#/components/schemas/sensorsdata.portal.v2.api.AccountRelatedProjectInfo' type: array required: - account - related_projects title: AddGlobalAccountRequest type: object sensorsdata.portal.v2.BatchListResourcePoliciesRequest: description: '' properties: project_id: description: '' format: int32 type: integer resources: description: '' items: type: string type: array project_name: description: '' type: string title: BatchListResourcePoliciesRequest type: object sensorsdata.portal.v2.api.AddAccountResponseHttpApiResult: properties: code: type: string message: type: string request_id: type: string data: $ref: '#/components/schemas/sensorsdata.portal.v2.api.AddAccountResponse' error_info: $ref: '#/components/schemas/sensorsdata.common.ErrorInfo' title: sensorsdata.portal.v2.api.AddAccountResponseHttpApiResult type: object sensorsdata.portal.v2.Statement: description: "权限描述结构定义,参考下面几个示例:\n ```\n 允许 operation code=8013 的操作:{\"operation\": \"8013\", \"effect\": \"ALLOW\"}\n 禁用 operation code=8013 的操作:{\"operation\": \"8013\", \"effect\": \"DENY\"}\n 允许对资源 id 为 [4,5] 的资源执行 operation code = 8013 的操作:\n {\n \"operation\": \"8013\",\n \"effect\": \"ALLOW\",\n \"condition\": {\n \"operator\": \"OR\",\n \"conditions\": [\n {\n \"function\": \"EQUAL\",\n \"params\": [\n {\n \"param_type\": \"FIELD\",\n \"field\": \"#ResourceId\",\n \"variable\": \"\",\n \"expression\": \"\",\n \"value\": {\"list_value\": [\"4\",\"5\"]}\n }\n ]\n }\n ]\n }\n }\n ```" properties: operation: description: 权限操作的 code example: '11011' type: string effect: description: 权限作用效果;ALLOW:允许,DENY:拒绝 enum: - PERMISSION_EFFECT_UNSPECIFIED - ALLOW - DENY example: ALLOW type: string condition: $ref: '#/components/schemas/sensorsdata.common.CompoundFilterCondition' required: - effect - operation title: Statement type: object sensorsdata.portal.v2.api.ListDutyResponseHttpApiResult: properties: code: type: string message: type: string request_id: type: string data: $ref: '#/components/schemas/sensorsdata.portal.v2.api.ListDutyResponse' error_info: $ref: '#/components/schemas/sensorsdata.common.ErrorInfo' title: sensorsdata.portal.v2.api.ListDutyResponseHttpApiResult type: object sensorsdata.portal.v2.api.UpdateGlobalAccountRequest: description: 「更新平台账户」的请求对象 properties: account: $ref: '#/components/schemas/sensorsdata.portal.v2.api.UpdateGlobalAccountDetail' related_projects: description: 更新平台账号关联的项目信息、角色信息、职位信息等 items: $ref: '#/components/schemas/sensorsdata.portal.v2.api.AccountRelatedProjectInfo' type: array required: - account - related_projects title: UpdateGlobalAccountRequest type: object sensorsdata.portal.v2.api.UpdateRoleResponseHttpApiResult: properties: code: type: string message: type: string request_id: type: string data: $ref: '#/components/schemas/sensorsdata.portal.v2.api.UpdateRoleResponse' error_info: $ref: '#/components/schemas/sensorsdata.common.ErrorInfo' title: sensorsdata.portal.v2.api.UpdateRoleResponseHttpApiResult type: object sensorsdata.common.ErrorContext: description: 发生错误时,系统快照信息 properties: origin_stack: description: 上游异常的 stack,由系统截获 type: string origin_cause: description: 上游异常的 cause by,由系统截获 type: string origin_code: description: 上游异常的错误简码 type: string origin_complete_code: description: 上游异常的完整错误码 type: string error_extend_desc: description: 本次异常的辅助说明,可传入 type: string title: ErrorContext type: object sensorsdata.portal.v2.api.GetAccountResponse: description: 「获取单个账号信息」的响应对象 properties: account: $ref: '#/components/schemas/sensorsdata.portal.v2.api.Account' related_roles: description: 账号关联的角色列表 items: $ref: '#/components/schemas/sensorsdata.portal.v2.api.Role' type: array extra_attributes_definitions: description: 扩展属性定义 items: $ref: '#/components/schemas/sensorsdata.portal.v2.api.ExtraAttributeDefinition' type: array related_extra_attributes: description: 扩展属性的值 items: $ref: '#/components/schemas/sensorsdata.portal.v2.api.ExtraAttribute' type: array title: GetAccountResponse type: object sensorsdata.portal.v2.api.GlobalAccount: description: 平台账号基本信息 properties: id: description: 账号 id,当前租户下账号唯一标识 example: 1 format: int32 type: integer uuid: description: 账号 uuid,当前租户下账号唯一标识 example: 38135721-2938-4585-b19b-396ceb910d88 type: string name: description: 登录帐号名 example: admin type: string cname: description: 账号显示名 example: 管理员 type: string email: description: 邮箱 example: demo@sensorsdata.com type: string phone: description: 手机号码 example: '12399999999' type: string expire_time: description: 账号过期时间,日期格式:yyyy-MM-dd HH:mm:ss example: '2022-05-03 11:18:41' type: string disabled: description: 是否被禁用 example: false type: boolean title: GlobalAccount type: object sensorsdata.portal.v2.api.I18nMessage: description: i18n 国际化信息 properties: zh_cn: description: 中文简体 example: 职位 type: string en_us: description: 英文 example: job type: string zh_tw: description: 中文繁体 example: 職位 type: string ja: description: 日语 example: ロケーション type: string th: description: 泰语 example: ตำแหน่ง type: string title: I18nMessage type: object sensorsdata.portal.v2.api.ListRoleResponseHttpApiResult: properties: code: type: string message: type: string request_id: type: string data: $ref: '#/components/schemas/sensorsdata.portal.v2.api.ListRoleResponse' error_info: $ref: '#/components/schemas/sensorsdata.common.ErrorInfo' title: sensorsdata.portal.v2.api.ListRoleResponseHttpApiResult type: object sensorsdata.portal.v2.api.DeleteResourceRequest: description: 「删除功能资源」的请求对象 properties: code: description: 资源编码;该字段和「注册功能资源」接口中的 code 字段含义一致 example: data_permission_view_all_data type: string required: - code title: DeleteResourceRequest type: object sensorsdata.portal.v2.api.Resource: description: 资源定义 properties: operation_code: description: 关联的操作(权限)编码 example: '11011' type: string code: description: 资源编码,需要保证唯一性,建议为小写字母,多个以下划线拼接 example: data_permission_view_all_data type: string name_i18n_message: $ref: '#/components/schemas/sensorsdata.portal.v2.api.I18nMessage' desc_i18n_message: $ref: '#/components/schemas/sensorsdata.portal.v2.api.I18nMessage' deny_desc_i18n_message: $ref: '#/components/schemas/sensorsdata.portal.v2.api.I18nMessage' condition_type: description: 数据条件类型 enum: - CONDITION_TYPE_UNSPECIFIED - ALL - ADMIN - MINE - DEFINE example: ALL type: string is_default: description: 是否默认数据资源 example: true type: boolean api: description: 获取数据资源的 api example: /api/property/all?include_virtual=true type: string display_column: description: 从 api 中获取值的健名称 example: cname type: string value_column: description: 数据资源的固定值 example: id type: string config: description: 自定义扩展,JSON 格式的字符串 example: '{"extraText":"清空全部","extraType":"link"}' type: string title: Resource type: object sensorsdata.portal.v2.api.AttributeNode: description: 扩展属性的节点信息 properties: code: description: 节点编码 example: RD_1 type: string name: description: 节点名称 example: 研发部 type: string parent_code: description: 父节点,如果是根节点,为空即可 example: RD type: string attr_code: description: 所属属性 example: JOB type: string desc: description: 节点描述 example: 描述信息 type: string project_id: description: 节点所属项目 example: 1 format: int32 type: integer children: description: 子节点 items: $ref: '#/components/schemas/sensorsdata.portal.v2.api.AttributeNode' type: array detach_from_parent: description: 从父节点摘除, POST /attr/node 更新节点时使用 example: true type: boolean title: AttributeNode type: object sensorsdata.common.CompoundFilterCondition: description: 复合过滤条件,用于描述 condition 或 compound_filter 之间的关系 properties: operator: description: 逻辑运算法 enum: - LOGICAL_OPERATOR_UNSPECIFIED - AND - OR example: AND type: string conditions: description: 过滤条件列表,只有最后一级才有 items: $ref: '#/components/schemas/sensorsdata.common.FilterCondition' type: array compound_conditions: description: 嵌套的下一级复合过滤条件 items: $ref: '#/components/schemas/sensorsdata.common.CompoundFilterCondition' type: array index: description: 当前筛选条件所处的位置下标,主要为了保证前端展示顺序的稳定 example: 10 format: int32 type: integer title: CompoundFilterCondition type: object sensorsdata.portal.v2.api.UpdateAccountRequest: description: 「修改账号信息」的请求对象 properties: account: $ref: '#/components/schemas/sensorsdata.portal.v2.api.UpdateAccountDetail' related_role_ids: description: 账号关联的角色 id 数组,不允许为空 example: '[1,2,3]' items: format: int32 type: integer type: array required: - account - related_role_ids title: UpdateAccountRequest type: object sensorsdata.portal.v2.SaveResourcePermissionRequest: description: '' properties: resource: description: '' type: string policy_principals: description: '' items: $ref: '#/components/schemas/sensorsdata.portal.v2.PolicyPrincipals' type: array no_filter_license: description: '' type: boolean project_id: description: '' format: int32 type: integer project_name: description: '' type: string title: SaveResourcePermissionRequest type: object sensorsdata.portal.v2.api.UpsertRoleAttributeRequest: description: 角色和扩展属性的关联关系 properties: role_attributes: description: 绑定关系 items: $ref: '#/components/schemas/sensorsdata.portal.v2.api.RoleAttribute' type: array title: UpsertRoleAttributeRequest type: object sensorsdata.common.HttpApiResult: properties: code: type: string message: type: string request_id: type: string data: properties: {} type: object error_info: $ref: '#/components/schemas/sensorsdata.common.ErrorInfo' title: HttpApiResult type: object sensorsdata.portal.v2.api.ListAccountResponse: description: 「获取账号列表」的响应对象 properties: accounts: description: 账号及其相关信息的列表(包括角色和扩展属性值) items: $ref: '#/components/schemas/sensorsdata.portal.v2.api.AccountWithRelatedInfo' type: array extra_attributes_definitions: description: 扩展属性定义 items: $ref: '#/components/schemas/sensorsdata.portal.v2.api.ExtraAttributeDefinition' type: array page: $ref: '#/components/schemas/sensorsdata.portal.v2.api.PageInfo' title: ListAccountResponse type: object sensorsdata.portal.v2.PolicyPrincipals: description: '' properties: policy: $ref: '#/components/schemas/sensorsdata.portal.v2.Policy' principals: description: '' items: $ref: '#/components/schemas/sensorsdata.portal.v2.Principals' type: array title: PolicyPrincipals type: object sensorsdata.portal.v2.api.BatchListGlobalAccountResponse: description: 「批量查询平台账号基本信息」的响应对象 properties: accounts: description: 平台账号基本信息 items: $ref: '#/components/schemas/sensorsdata.portal.v2.api.GlobalAccount' type: array total: description: 总条数 example: 100 format: int32 type: integer title: BatchListGlobalAccountResponse type: object sensorsdata.portal.v2.api.RegisterCategoryRequest: description: 「注册分类」的请求对象 properties: code: description: 资源分类的分类编码,需要保证唯一性,建议为小写字母,多个以下划线拼接 example: setting_sensors_analysis type: string name_i18n_message: $ref: '#/components/schemas/sensorsdata.portal.v2.api.I18nMessage' sort: description: 排序序号,可选字段,默认值为 0 example: 10 format: int32 type: integer required: - code - name_i18n_message title: RegisterCategoryRequest type: object sensorsdata.portal.v2.BatchListResourcePoliciesResponse: description: '' properties: resource_policies: description: '' items: $ref: '#/components/schemas/sensorsdata.portal.v2.ResourcePolicies' type: array title: BatchListResourcePoliciesResponse type: object sensorsdata.portal.v2.ListPolicyPrincipalsResponse: description: '' properties: policy_principals: description: '' items: $ref: '#/components/schemas/sensorsdata.portal.v2.PolicyPrincipals' type: array title: ListPolicyPrincipalsResponse type: object sensorsdata.portal.v2.api.UpdateGlobalAccountDetail: description: 平台账号基本信息 properties: id: description: 「选填,和 uuid 二选一」账号 id,当前租户下账号唯一标识 example: 1 format: int32 type: integer uuid: description: 「选填,和 uuid 二选一」账号 uuid,当前租户下账号唯一标识 example: 38135721-2938-4585-b19b-396ceb910d88 type: string cname: description: 账号显示名 example: 管理员 type: string email: description: 邮箱 example: demo@sensorsdata.com type: string phone: description: 手机号码 example: '12399999999' type: string expire_time: description: 账号过期时间,日期格式:yyyy-MM-dd HH:mm:ss example: '2022-05-03 11:18:41' type: string disabled: description: 是否被禁用 example: false type: boolean title: UpdateGlobalAccountDetail type: object sensorsdata.portal.v2.api.AddAccountDetail: description: 账号添加的正文 properties: name: description: 登录帐号名;如果添加的账号为平台账号,需要确保该字段全局唯一;如果添加的账号为项目账号,需要确保该字段在项目下唯一 example: admin type: string cname: description: 账号显示名 example: 管理员 type: string email: description: 邮箱;如果添加的账号为平台账号,需要确保该字段全局唯一;如果添加的账号为项目账号,需要确保该字段在项目下唯一 example: demo@sensorsdata.com type: string phone: description: 手机号码 example: '12399999999' type: string password: description: 密码;长度为 8-30 个字符,格式需要满足:数字 + 不区分大小写的英文 + 符号,三者不可缺一 example: password type: string expire_time: description: 账号过期时间(选填,默认永久),日期格式:yyyy-MM-dd HH:mm:ss example: '2022-01-01 00:00:00' type: string disabled: description: 是否被禁用(选填,默认 false) example: false type: boolean position: description: 职务 example: 销售 type: string required: - cname - email - name - password title: AddAccountDetail type: object sensorsdata.portal.v2.api.BatchListGlobalAccountResponseHttpApiResult: properties: code: type: string message: type: string request_id: type: string data: $ref: '#/components/schemas/sensorsdata.portal.v2.api.BatchListGlobalAccountResponse' error_info: $ref: '#/components/schemas/sensorsdata.common.ErrorInfo' title: sensorsdata.portal.v2.api.BatchListGlobalAccountResponseHttpApiResult type: object sensorsdata.portal.v2.api.AddRoleRequest: description: 「新增角色」的请求对象 properties: role: $ref: '#/components/schemas/sensorsdata.portal.v2.api.RoleAddBody' statements: description: 角色权限配置 example: '[{"operation": "8013", "effect": "ALLOW"}, {"operation": "8014", "effect": "DENY"}]' items: $ref: '#/components/schemas/sensorsdata.portal.v2.Statement' type: array required: - role - statements title: AddRoleRequest type: object sensorsdata.common.Literal: description: '' properties: data_type: description: '' enum: - DATA_TYPE_UNSPECIFIED - BOOL - INT - NUMBER - STRING - LIST - DATETIME - DATE - BIGINT - DECIMAL type: string bool_value: description: '' type: boolean int_value: description: '' format: int64 type: integer number_value: description: '' format: double type: number string_value: description: '' type: string list_value: description: '' items: type: string type: array datetime_value: description: '' format: date-time type: string date_value: description: '' type: string bigint_value: description: '' format: int64 type: integer decimal_value: description: '' type: string title: Literal type: object sensorsdata.portal.v2.api.DeleteAttributeRequest: description: 扩展属性的定义 properties: code: description: 属性编码 example: JOB type: string title: DeleteAttributeRequest type: object sensorsdata.portal.v2.api.AddGlobalAccountDetail: description: 新增平台账户的正文 properties: name: description: 登录帐号名; example: admin type: string cname: description: 账号显示名 example: 管理员 type: string email: description: 邮箱;如果添加的账号为平台账号,需要确保该字段全局唯一;如果添加的账号为项目账号,需要确保该字段在项目下唯一 example: demo@sensorsdata.com type: string phone: description: 手机号码 example: '12399999999' type: string password: description: 密码;长度为 8-30 个字符,格式需要满足:数字 + 不区分大小写的英文 + 符号,三者不可缺一 example: password type: string expire_time: description: 账号过期时间(选填,默认永久),日期格式:yyyy-MM-dd HH:mm:ss example: '2022-01-01 00:00:00' type: string disabled: description: 是否被禁用(选填,默认 false) example: false type: boolean required: - cname - email - name - password title: AddGlobalAccountDetail type: object sensorsdata.common.ErrorInfo: properties: code: description: 具体的错误码 example: XX-D-F-2-1 type: string description: description: 错误描述 example: 前端参数校验异常,PARAMETER_FORMAT_ERROR(quantiles=[10, -90] is not include [0, 100]) type: string system_response: description: 致错的可能原因列表 example: 系统终止了查询处理 type: string error_causes: items: $ref: '#/components/schemas/sensorsdata.common.ErrorCause' type: array context: $ref: '#/components/schemas/sensorsdata.common.ErrorContext' title: ErrorInfo type: object sensorsdata.portal.v2.api.UpdateAccountDetail: description: 「修改账号」的请求对象 properties: id: description: "账号 id(id/uuid 任选一个,如果两个字段同时填充会报参数错误)\n 由于 grpc 转 http 接口时,参数解析只支持简单类型,而 int32 类型无法描述 id = null 的情况,所以使用 string 类型代替" example: '1' type: string uuid: description: 账号 uuid(id/uuid 任选一个,如果两个字段同时填充会报错) example: 38135721-2938-4585-b19b-396ceb910d88 type: string cname: description: 账号显示名 example: 管理员 type: string email: description: 邮箱;如果添加的账号为平台账号,需要确保该字段全局唯一;如果添加的账号为项目账号,需要确保该字段在项目下唯一 example: demo@sensorsdata.com type: string phone: description: 手机号码 example: '12399999999' type: string expire_time: description: 账号过期时间(选填,默认永久),日期格式:yyyy-MM-dd HH:mm:ss example: '2022-01-01 00:00:00' type: string position: description: 职务 example: 销售 type: string required: - cname title: UpdateAccountDetail type: object sensorsdata.portal.v2.api.GetProjectAttributeResponse: description: 项目和扩展属性关联关系 properties: project_attributes: description: 扩展属性关联关系 items: $ref: '#/components/schemas/sensorsdata.portal.v2.api.ProjectAttribute' type: array title: GetProjectAttributeResponse type: object sensorsdata.portal.v2.api.UpsertAttributeRequest: description: 扩展属性的定义 properties: attribute: $ref: '#/components/schemas/sensorsdata.portal.v2.api.Attribute' project_ids: description: 属性关联的项目 example: '[1,2]' items: format: int32 type: integer type: array title: UpsertAttributeRequest type: object sensorsdata.portal.v2.api.Duty: description: 职务定义,包含 id,职务名称 properties: id: description: 职务 id example: 5 format: int32 type: integer name: description: 职务名称 example: 普通员工 type: string required: - id - name title: Duty type: object sensorsdata.portal.v2.api.StatusResponse: description: 仅返回状态标识的 grpc 响应结构 properties: flag: description: 操作成功标识;true:操作成功,false:操作失败 example: true type: boolean title: StatusResponse type: object sensorsdata.common.ErrorCause: properties: error_cause: description: 致错原因1 example: 参数异常1 type: string action_suggestion: description: 操作建议,针对该原因,建议的解决方式 example: 检测入参的数据类型1 type: string title: ErrorCause type: object sensorsdata.portal.v2.api.DisableAccountRequest: description: 「禁用账户」的请求对象 properties: id: description: 账号 id example: 1 format: int32 type: integer required: - id title: DisableAccountRequest type: object sensorsdata.portal.v2.api.Role: description: 角色信息 properties: id: description: 角色 id example: 1 format: int32 type: integer name: description: 角色名 example: admin type: string cname: description: 角色显示名 example: 管理员 type: string description: description: 角色描述 example: 管理员角色描述信息 type: string create_user_cname: description: 创建人 example: 管理员 type: string create_time: description: 创建时间,日期格式:yyyy-MM-dd HH:mm:ss example: '2022-01-01 00:00:00' type: string update_time: description: 更新时间,日期格式:yyyy-MM-dd HH:mm:ss example: '2022-01-01 00:00:00' type: string role_type: description: 角色类型;SYSTEM_ROLE:系统角色,CUSTOM_ROLE:自定义角色,THIRD_PART_ROLE:第三方角色 example: SYSTEM_ROLE type: string type_name: description: 角色类型名称 example: 系统角色 type: string is_project_customize_default_role: description: 是否是默认角色;true:默认角色,false:非默认角色 example: true type: boolean title: Role type: object sensorsdata.portal.v2.ListPolicyPrincipalsResponseHttpApiResult: properties: code: type: string message: type: string request_id: type: string data: $ref: '#/components/schemas/sensorsdata.portal.v2.ListPolicyPrincipalsResponse' error_info: $ref: '#/components/schemas/sensorsdata.common.ErrorInfo' title: sensorsdata.portal.v2.ListPolicyPrincipalsResponseHttpApiResult type: object sensorsdata.portal.v2.api.RoleAddBody: description: 角色新增请求体 properties: name: description: 角色名;选填,长度不超过50个字符,且需要确保该字段在项目下唯一;如果该字段为空,会自动生成一个角色名,格式为:autoName{number} example: admin type: string cname: description: 角色显示名;长度不超过50个字符,且需要确保该字段在项目下唯一 example: 管理员 type: string description: description: 角色描述 example: 管理员角色描述信息 type: string is_project_customize_default_role: description: 是否是默认角色;选填,默认为false example: false type: boolean required: - cname title: RoleAddBody type: object sensorsdata.common.TimeInterval: description: '' properties: size: description: '' format: int32 type: integer unit: description: '' enum: - DATE_TIME_UNIT_UNSPECIFIED - MILLISECOND - SECOND - MINUTE - HOUR - DAY - WEEK - MONTH - YEAR type: string title: TimeInterval type: object sensorsdata.portal.v2.ResourcePoliciesRequest: description: '' properties: project_id: description: '' format: int32 type: integer resource: description: '' type: string project_name: description: '' type: string title: ResourcePoliciesRequest type: object sensorsdata.portal.v2.api.AddAccountResponse: description: 「新增账号」的响应对象 properties: account: $ref: '#/components/schemas/sensorsdata.portal.v2.api.Account' title: AddAccountResponse type: object sensorsdata.portal.v2.ResourceOperationConditionRequest: description: '' properties: project_id: description: '' format: int32 type: integer account_id: description: '' type: string resource: description: '' type: string operations: description: '' items: type: string type: array project_name: description: '' type: string title: ResourceOperationConditionRequest type: object sensorsdata.portal.v2.api.RoleInfoSummary: description: 角色信息概览 properties: id: description: 角色 id example: 1 format: int32 type: integer name: description: 角色名称 example: analyst type: string cname: description: 角色显示名 example: 管理员 type: string title: RoleInfoSummary type: object sensorsdata.portal.v2.api.Account: description: 账号基本信息 properties: id: description: 账号 id,当前租户下账号唯一标识 example: 1 format: int32 type: integer uuid: description: 账号 uuid,当前租户下账号唯一标识 example: 38135721-2938-4585-b19b-396ceb910d88 type: string name: description: 登录帐号名 example: admin type: string cname: description: 账号显示名 example: 管理员 type: string email: description: 邮箱 example: demo@sensorsdata.com type: string phone: description: 手机号码 example: '12399999999' type: string expire_time: description: 账号过期时间,日期格式:yyyy-MM-dd HH:mm:ss example: '2022-05-03 11:18:41' type: string is_global: description: 是否是平台账号;true:平台账号,false:项目账号 example: true type: boolean disabled: description: 是否被禁用 example: false type: boolean position: description: 职务 example: 销售 type: string create_time: description: 账号创建时间,日期格式:yyyy-MM-dd HH:mm:ss example: '2022-05-03 11:18:41' type: string custom_params: additionalProperties: description: '' type: string description: '扩展字段map, key: last_access_time, value: ''2022-05-03 11:18:41''' example: last_access_time: '2022-05-03 11:18:41' type: object title: Account type: object sensorsdata.portal.v2.api.DeleteCategoryRequest: description: 「删除分类」的请求对象 properties: code: description: 资源分类的分类编码,需要和「注册分类」接口中的资源分类的分类编码字段保持一致 example: setting_sensors_analysis type: string required: - code title: DeleteCategoryRequest type: object sensorsdata.portal.v2.api.AccountAttribute: description: 账号和扩展属性的关联关系 properties: user_id: description: 账号ID example: 1 format: int32 type: integer project_id: description: 项目id, 当扩展属性scope=GLOBAL时,project_id=NULL;scope=PROJECT时,project_id必填 example: 1 format: int32 type: integer attr_code: description: 扩展属性维度 example: JOB type: string attr_name: description: 扩展属性名称 example: 岗位 type: string node_code: description: 扩展节点code example: RD type: string node_name: description: 扩展节点name example: RD type: string title: AccountAttribute type: object sensorsdata.portal.v2.api.RoleUpdateBody: description: 角色更新请求体 properties: id: description: 角色 id example: 1 format: int32 type: integer name: description: 角色名;长度不超过50个字符,且需要确保该字段在项目下唯一 example: admin type: string cname: description: 角色显示名;长度不超过50个字符,且需要确保该字段在项目下唯一 example: 管理员 type: string description: description: 角色描述 example: 管理员角色描述信息 type: string is_project_customize_default_role: description: 是否是默认角色;选填,默认为false example: false type: boolean required: - cname - id title: RoleUpdateBody type: object sensorsdata.portal.v2.ListOperationConditionResponse: description: 获取指定账号的权限响应 properties: compound_condition_map: additionalProperties: $ref: '#/components/schemas/sensorsdata.portal.v2.OperationCompoundCondition' description: key为权限点,value为对应的权限表达式 type: object title: ListOperationConditionResponse type: object sensorsdata.portal.v2.api.ListGlobalAccountResponseHttpApiResult: properties: code: type: string message: type: string request_id: type: string data: $ref: '#/components/schemas/sensorsdata.portal.v2.api.ListGlobalAccountResponse' error_info: $ref: '#/components/schemas/sensorsdata.common.ErrorInfo' title: sensorsdata.portal.v2.api.ListGlobalAccountResponseHttpApiResult type: object sensorsdata.portal.v2.api.UpdateAccountResponseHttpApiResult: properties: code: type: string message: type: string request_id: type: string data: $ref: '#/components/schemas/sensorsdata.portal.v2.api.UpdateAccountResponse' error_info: $ref: '#/components/schemas/sensorsdata.common.ErrorInfo' title: sensorsdata.portal.v2.api.UpdateAccountResponseHttpApiResult type: object sensorsdata.portal.v2.api.GetAccountByApiKeyResponseHttpApiResult: properties: code: type: string message: type: string request_id: type: string data: $ref: '#/components/schemas/sensorsdata.portal.v2.api.GetAccountByApiKeyResponse' error_info: $ref: '#/components/schemas/sensorsdata.common.ErrorInfo' title: sensorsdata.portal.v2.api.GetAccountByApiKeyResponseHttpApiResult type: object sensorsdata.portal.v2.api.GetAccountByApiKeyResponse: description: 「根据 api-key 获取账号」的响应对象 properties: account: $ref: '#/components/schemas/sensorsdata.portal.v2.api.Account' title: GetAccountByApiKeyResponse type: object sensorsdata.portal.v2.api.AccountRelatedProjectInfo: description: 平台账号关联的项目信息 properties: project_id: description: 平台账号关联的项目id format: int32 type: integer position: description: 平台账号在此项目下的职务名 type: string role_ids: description: 平台账号在此项目下关联的角色id列表 items: format: int32 type: integer type: array required: - project_id - role_ids title: AccountRelatedProjectInfo type: object sensorsdata.portal.v2.api.Operation: description: 操作定义 properties: code: description: 操作编码,需要保证唯一性,建议数值型 example: '11011' type: string type: description: 资源类型 enum: - OPERATION_TYPE_UNSPECIFIED - BASE_PRINCIPAL - BASE_RESOURCE example: BASE_PRINCIPAL type: string name_i18n_message: $ref: '#/components/schemas/sensorsdata.portal.v2.api.I18nMessage' tip_i18n_message: $ref: '#/components/schemas/sensorsdata.portal.v2.api.I18nMessage' desc_i18n_message: $ref: '#/components/schemas/sensorsdata.portal.v2.api.I18nMessage' config: description: 自定义扩展,JSON 格式的字符串 example: '{"related_info":["event_filter","profile_filter","access_data"],"operation_key":"1"}' type: string checkable: description: 是否默认选中,false:表示选中,true:表示不选中 example: true type: boolean disable: description: 默认是否禁用编辑,true:表示禁用,false:表示不禁用 example: false type: boolean module_name: description: 所属模块名称,该操作所属的 module 名称 example: BASIC_MODULE type: string sort: description: 排序序号 example: 10 format: int32 type: integer data_resources: description: 数据资源集合 items: $ref: '#/components/schemas/sensorsdata.portal.v2.api.Resource' type: array title: Operation type: object sensorsdata.portal.v2.api.BatchListGlobalAccountsRequest: description: 「批量查询平台账号基本信息」的请求对象 properties: query_account_option: description: 「必填」账号查询条件 可根据账号ID、账号name、账号UUID查询账号 enum: - FUNCTION_QUERY_ACCOUNT_OPTION_UNSPECIFIED - ACCOUNT_ID - ACCOUNT_NAME - ACCOUNT_CNAME - ACCOUNT_UUID example: ACCOUNT_ID type: string account_ids: description: 「可选,四选一」目标账号的 id 列表 example: '["178","467","124"]' items: format: int32 type: integer type: array account_names: description: 「可选,四选一」目标账号登录账号列表 example: '["admin","ss@123.com","shenCe1"]' items: type: string type: array account_cnames: description: 「可选,四选一」目标账号的姓名(展示名称)列表 example: '["神策工程师A","神策工程师B","神策工程师C"]' items: type: string type: array account_uuids: description: 「可选,四选一」目标账号的 uuid 列表 example: '["xkfdq131e","dakg1213","1231jf2okf"]' items: type: string type: array title: BatchListGlobalAccountsRequest type: object sensorsdata.portal.v2.api.AccountRoleRequest: description: 账号角色请求对象 properties: id: description: 账号 id(id/uuid 任意选填一个即可。如果均填写,会以id进行查询查询) example: 1 format: int32 type: integer uuid: description: 账号 uuid(id/uuid 任意选填一个即可。如果均填写,会以id进行查询操作) example: 38135721-2938-4585-b19b-396ceb910d88 type: string role_id: description: 平台账号在此项目下关联的角色id example: 2 format: int32 type: integer required: - role_id title: AccountRoleRequest type: object sensorsdata.portal.v2.api.Attribute: description: 扩展属性的定义 properties: code: description: 属性编码 example: JOB type: string name: description: 属性名 example: 职位 type: string desc: description: 属性描述 example: 职位属性 type: string type: description: 属性类型 enum: - TYPE_UNSPECIFIED - VALUE - TREE example: VALUE type: string scope: description: 属性值的作用范围,GLOBAL:全局,PROJECT:项目 enum: - SCOPE_UNSPECIFIED - GLOBAL - PROJECT example: GLOBAL type: string nodes: description: 节点信息 items: $ref: '#/components/schemas/sensorsdata.portal.v2.api.AttributeNode' type: array title: Attribute type: object sensorsdata.portal.v2.api.DeleteAccountAttributeRequest: description: 删除账号和扩展属性的关联关系 properties: account_attributes: description: 绑定关系 items: $ref: '#/components/schemas/sensorsdata.portal.v2.api.AccountAttribute' type: array title: DeleteAccountAttributeRequest type: object sensorsdata.portal.v2.api.GetAccountAttributeResponse: description: 获取账号和扩展属性的关联关系响应 properties: account_attributes: description: 当前账号绑定的扩展属性信息 items: $ref: '#/components/schemas/sensorsdata.portal.v2.api.AccountAttribute' type: array title: GetAccountAttributeResponse type: object sensorsdata.portal.v2.api.DeleteGlobalAccountRequest: description: 「移除平台账户」的请求对象 properties: id: description: 账号 id(id/uuid 任意选填一个即可。如果均填写,会以id进行移除操作) example: 1 format: int32 type: integer uuid: description: 账号 uuid(id/uuid 任意选填一个即可。如果均填写,会以id进行移除操作) example: 38135721-2938-4585-b19b-396ceb910d88 type: string title: DeleteGlobalAccountRequest type: object sensorsdata.portal.v2.api.UpdateRoleRequest: description: 「修改角色」的请求对象 properties: role: $ref: '#/components/schemas/sensorsdata.portal.v2.api.RoleUpdateBody' statements: description: 角色权限配置 example: '[{"operation": "8013", "effect": "ALLOW"}, {"operation": "8014", "effect": "DENY"}]' items: $ref: '#/components/schemas/sensorsdata.portal.v2.Statement' type: array required: - role - statements title: UpdateRoleRequest type: object sensorsdata.portal.v2.api.GetAttributeResponse: description: 扩展属性的定义 properties: attribute: $ref: '#/components/schemas/sensorsdata.portal.v2.api.Attribute' project_ids: description: 属性关联的项目 example: '[1,2]' items: format: int32 type: integer type: array title: GetAttributeResponse type: object sensorsdata.portal.v2.api.ProjectAttribute: description: 项目和扩展属性关联关系 properties: attr_code: description: 扩展属性 example: JOB type: string attr_name: description: 扩展属性名称 example: 岗位 type: string project_id: description: 绑定的项目 id example: 1 format: int32 type: integer project_name: description: 绑定的项目名称 example: 正式项目 type: string title: ProjectAttribute type: object sensorsdata.portal.v2.api.UpsertAttributeNodeRequest: description: 扩展属性的节点信息,存在则更新,不存在则新增 properties: nodes: description: 节点信息 items: $ref: '#/components/schemas/sensorsdata.portal.v2.api.AttributeNode' type: array title: UpsertAttributeNodeRequest type: object sensorsdata.portal.v2.api.GetAttributeResponseHttpApiResult: properties: code: type: string message: type: string request_id: type: string data: $ref: '#/components/schemas/sensorsdata.portal.v2.api.GetAttributeResponse' error_info: $ref: '#/components/schemas/sensorsdata.common.ErrorInfo' title: sensorsdata.portal.v2.api.GetAttributeResponseHttpApiResult type: object sensorsdata.portal.v2.api.EnableAccountRequest: description: 「启用账户」的请求对象 properties: id: description: 账号 id example: 1 format: int32 type: integer expire_time: description: 账号过期时间(选填,默认永久),日期格式:yyyy-MM-dd HH:mm:ss example: '2022-01-01 00:00:00' type: string required: - id title: EnableAccountRequest type: object sensorsdata.portal.v2.api.AddAccountRequest: description: 「新增账号」的请求对象 properties: account: $ref: '#/components/schemas/sensorsdata.portal.v2.api.AddAccountDetail' related_role_ids: description: 账号关联的角色 id 数组,不允许为空 example: '[1,2,3]' items: format: int32 type: integer type: array required: - account - related_role_ids title: AddAccountRequest type: object sensorsdata.common.PredicateFunctionParam: description: "```\n 函数的参数,有几种可能\n 1. 一个 field, 如 events.$Anything.$city\n 2. 一个 Literal 的常量\n 3. 一个变量, 如 $ENTRY_TIME, 需要在执行上下文里进行替换\n 4. 一个 TimePoint, 代表一个相对或绝对的时间点, 用于时间类型的条件\n 5. 一个 expression user.p1/user.p2+user.p3\n ```" properties: param_type: description: 函数的参数类型 enum: - FUNCTION_PARAM_TYPE_UNSPECIFIED - FIELD - VALUE - VARIABLE - TIME_POINT - EXPRESSION example: FIELD type: string field: description: 字段名 example: '#ResourceId' type: string value: $ref: '#/components/schemas/sensorsdata.common.Literal' variable: description: 变量,需要在执行上下文里进行替换 example: $ENTRY_TIME type: string time_point: $ref: '#/components/schemas/sensorsdata.common.TimePoint' expression: description: 自定义表达式 example: user.p1/user.p2+user.p3 type: string title: PredicateFunctionParam type: object sensorsdata.portal.v2.api.InviteAccountRequest: description: 「邀请账号」的请求对象 properties: invite_accounts: description: 邀请的账号列表 items: $ref: '#/components/schemas/sensorsdata.portal.v2.api.InviteAccount' type: array title: InviteAccountRequest type: object sensorsdata.portal.v2.api.UpdateAccountResponse: description: 「修改账号信息」的响应对象 properties: account: $ref: '#/components/schemas/sensorsdata.portal.v2.api.Account' title: UpdateAccountResponse type: object sensorsdata.portal.v2.api.AccountIdOrUuidRequest: description: 「账号 id 或 uuid」的请求对象 properties: id: description: 账号 id(id/uuid 任选一个,如果两个字段同时填充会报参数错误) example: '1' type: string uuid: description: 账号 uuid(id/uuid 任选一个,如果两个字段同时填充会报错) example: 38135721-2938-4585-b19b-396ceb910d88 type: string title: AccountIdOrUuidRequest type: object sensorsdata.portal.v2.Policy: description: '' properties: code: description: '' type: string name: description: '' type: string type: description: '' enum: - POLICY_TYPE_UNSPECIFIED - BASE_PRINCIPAL - BASE_RESOURCE type: string statements: description: '' items: $ref: '#/components/schemas/sensorsdata.portal.v2.Statement' type: array title: Policy type: object sensorsdata.portal.v2.api.GetProjectAttributeResponseHttpApiResult: properties: code: type: string message: type: string request_id: type: string data: $ref: '#/components/schemas/sensorsdata.portal.v2.api.GetProjectAttributeResponse' error_info: $ref: '#/components/schemas/sensorsdata.common.ErrorInfo' title: sensorsdata.portal.v2.api.GetProjectAttributeResponseHttpApiResult type: object sensorsdata.portal.v2.api.UpdateRoleResponse: description: 「修改角色」的响应对象 properties: role: $ref: '#/components/schemas/sensorsdata.portal.v2.api.Role' title: UpdateRoleResponse type: object sensorsdata.common.TimePoint: description: '' properties: type: description: '' enum: - TIME_POINT_TYPE_UNSPECIFIED - STATIC - RELATIVE - EXPRESSION type: string trunc_unit: description: '' enum: - TRUNC_UNIT_UNSPECIFIED - TRUNC_HOUR - TRUNC_DAY - TRUNC_WEEK - TRUNC_MONTH - TRUNC_YEAR - TRUNC_BIGBANG type: string static_time: description: '' format: date-time type: string relative_time: $ref: '#/components/schemas/sensorsdata.common.TimePoint.RelativeTimePoint' expression: description: '' type: string title: TimePoint type: object sensorsdata.portal.v2.api.GetRoleResponse: description: 「获取单个角色信息」的响应对象 properties: role: $ref: '#/components/schemas/sensorsdata.portal.v2.api.Role' statements: description: 角色权限配置 example: '[{"operation": "8013", "effect": "ALLOW"}, {"operation": "8014", "effect": "DENY"}]' items: $ref: '#/components/schemas/sensorsdata.portal.v2.Statement' type: array title: GetRoleResponse type: object sensorsdata.portal.v2.api.GetRoleResponseHttpApiResult: properties: code: type: string message: type: string request_id: type: string data: $ref: '#/components/schemas/sensorsdata.portal.v2.api.GetRoleResponse' error_info: $ref: '#/components/schemas/sensorsdata.common.ErrorInfo' title: sensorsdata.portal.v2.api.GetRoleResponseHttpApiResult type: object sensorsdata.portal.v2.api.UpsertProjectAttributeRequest: description: 项目和扩展属性关联关系 properties: project_attributes: description: 绑定关系 items: $ref: '#/components/schemas/sensorsdata.portal.v2.api.ProjectAttribute' type: array title: UpsertProjectAttributeRequest type: object sensorsdata.portal.v2.BatchDeleteResourcePermissionRequest: description: '' properties: resources: $ref: '#/components/schemas/sensorsdata.portal.v2.Resources' delete_operations: description: '' items: type: string type: array project_id: description: '' format: int32 type: integer project_name: description: '' type: string title: BatchDeleteResourcePermissionRequest type: object sensorsdata.portal.v2.api.PageInfo: description: 分页信息 properties: current_page: description: 当前页,起始页号:1 example: 1 format: int32 type: integer page_count: description: 总页数 example: 100 format: int32 type: integer total: description: 总条数 example: 100 format: int32 type: integer title: PageInfo type: object sensorsdata.portal.v2.api.ListGlobalAccountDetail: description: 平台账号及其相关信息(包括项目信息、职位信息、角色信息) properties: account: $ref: '#/components/schemas/sensorsdata.portal.v2.api.GlobalAccount' related_projects: description: 平台账号关联的项目信息 items: $ref: '#/components/schemas/sensorsdata.portal.v2.api.AccountRelatedProjectInfo' type: array title: ListGlobalAccountDetail type: object sensorsdata.common.TimePoint.RelativeTimePoint: description: '' properties: base_time: description: '' type: string time_interval: $ref: '#/components/schemas/sensorsdata.common.TimeInterval' title: RelativeTimePoint type: object sensorsdata.portal.v2.api.InviteAccount: description: 「邀请账号」的对象 properties: id: description: 账号 id example: 78 format: int32 type: integer duty_name: description: 职务名称 example: lh type: string related_role_ids: description: 关联的角色 id example: '[1,4,9]' items: format: int32 type: integer type: array required: - id - related_role_ids title: InviteAccount type: object sensorsdata.portal.v2.api.GetAccountAttributeResponseHttpApiResult: properties: code: type: string message: type: string request_id: type: string data: $ref: '#/components/schemas/sensorsdata.portal.v2.api.GetAccountAttributeResponse' error_info: $ref: '#/components/schemas/sensorsdata.common.ErrorInfo' title: sensorsdata.portal.v2.api.GetAccountAttributeResponseHttpApiResult type: object sensorsdata.portal.v2.api.GetAccountByApiKeyRequest: description: 「根据 api-key 获取账号」的请求对象 properties: api_key: description: api-key 明文;为空时返回当前请求鉴权所用 api-key 对应的账号(whoami) example: '#K-1Q0rg4L3ssqXZYp57u0LMONvHQs8MF61' type: string title: GetAccountByApiKeyRequest type: object sensorsdata.portal.v2.api.GetGlobalAccountResponseHttpApiResult: properties: code: type: string message: type: string request_id: type: string data: $ref: '#/components/schemas/sensorsdata.portal.v2.api.GetGlobalAccountResponse' error_info: $ref: '#/components/schemas/sensorsdata.common.ErrorInfo' title: sensorsdata.portal.v2.api.GetGlobalAccountResponseHttpApiResult type: object sensorsdata.portal.v2.BatchListResourceOperationConditionResponseHttpApiResult: properties: code: type: string message: type: string request_id: type: string data: $ref: '#/components/schemas/sensorsdata.portal.v2.BatchListResourceOperationConditionResponse' error_info: $ref: '#/components/schemas/sensorsdata.common.ErrorInfo' title: sensorsdata.portal.v2.BatchListResourceOperationConditionResponseHttpApiResult type: object sensorsdata.portal.v2.api.ExtraAttribute: description: 扩展属性值,通过该结构来描述对象关联的具体的扩展属性值 properties: attr_code: description: 属性编码(根据 ExtraAttributeDefinition 获取属性编码的定义) example: JOB type: string node_code: description: 节点编码 example: '4' type: string node_name: description: 节点名 example: 技术部 type: string full_name: description: 节点全称(主要用于树形结构属性,表示当前节点到树的根节点的路径) example: 集团/技术部 type: string has_children_node: description: 是否包含子节点;如果是树形结构,仅绑定树中的某个节点(不包括子树),则 has_children_node=false,如果绑定树中的某个节点及其子树,则 has_children_node=true example: true type: boolean desc: description: 节点描述 example: 集团技术部 type: string title: ExtraAttribute type: object sensorsdata.portal.v2.BatchListResourceOperationConditionResponse: description: '' properties: resource_operation_conditions: description: '' items: $ref: '#/components/schemas/sensorsdata.portal.v2.ResourceOperationCondition' type: array title: BatchListResourceOperationConditionResponse type: object sensorsdata.portal.v2.api.BindCategoryAndResourceRequest: description: 「资源分类关联具体的功能资源」的请求对象 properties: group: description: 功能资源所属的分组,可选值为 DATA_PERMISSION、FEATURE_PERMISSION、MANAGEMENT_PERMISSION enum: - GROUP_UNSPECIFIED - DATA_PERMISSION - FEATURE_PERMISSION - MANAGEMENT_PERMISSION example: DATA_PERMISSION type: string category_code: description: 资源分类的分类编码,需要和「注册分类」接口中的资源分类的分类编码字段保持一致 example: setting_sensors_analysis type: string resource_code: description: 功能资源code,需要和「注册功能资源」接口中资源编码字段保持一致 example: data_permission_view_all_data type: string required: - category_code - group - resource_code title: BindCategoryAndResourceRequest type: object sensorsdata.portal.v2.BatchListResourcePoliciesResponseHttpApiResult: properties: code: type: string message: type: string request_id: type: string data: $ref: '#/components/schemas/sensorsdata.portal.v2.BatchListResourcePoliciesResponse' error_info: $ref: '#/components/schemas/sensorsdata.common.ErrorInfo' title: sensorsdata.portal.v2.BatchListResourcePoliciesResponseHttpApiResult type: object sensorsdata.portal.v2.api.GetAttributeNodeResponse: description: 获取扩展属性的节点信息 properties: nodes: description: 节点信息 items: $ref: '#/components/schemas/sensorsdata.portal.v2.api.AttributeNode' type: array count: description: 当前响应的数据数 example: 20 format: int32 type: integer title: GetAttributeNodeResponse type: object sensorsdata.portal.v2.api.GetRoleAttributeResponse: description: 角色和扩展属性的关联关系响应 properties: role_attributes: description: 当前角色绑定的扩展属性信息 items: $ref: '#/components/schemas/sensorsdata.portal.v2.api.RoleAttribute' type: array title: GetRoleAttributeResponse type: object sensorsdata.portal.v2.api.DeleteAttributeNodeRequest: description: 删除扩展属性的节点 properties: attr_code: description: 所属属性 example: JOB type: string codes: description: 节点编码集合 example: RD_1 items: type: string type: array title: DeleteAttributeNodeRequest type: object sensorsdata.portal.v2.ResourcePolicies: description: '' properties: resource_code: description: '' type: string resource_id: description: '' type: string policy_principals: description: '' items: $ref: '#/components/schemas/sensorsdata.portal.v2.PolicyPrincipals' type: array title: ResourcePolicies type: object sensorsdata.portal.v2.BatchListResourceOperationConditionRequest: description: '' properties: project_id: description: '' format: int32 type: integer account_id: description: '' format: int32 type: integer resources: description: '' items: type: string type: array operations: description: '' items: type: string type: array project_name: description: '' type: string title: BatchListResourceOperationConditionRequest type: object sensorsdata.portal.v2.ListOperationConditionResponseHttpApiResult: properties: code: type: string message: type: string request_id: type: string data: $ref: '#/components/schemas/sensorsdata.portal.v2.ListOperationConditionResponse' error_info: $ref: '#/components/schemas/sensorsdata.common.ErrorInfo' title: sensorsdata.portal.v2.ListOperationConditionResponseHttpApiResult type: object sensorsdata.portal.v2.api.DeleteRoleRequest: description: 「删除角色」的请求对象 properties: id: description: 角色 id example: 1 format: int32 type: integer required: - id title: DeleteRoleRequest type: object sensorsdata.portal.v2.api.DeleteRoleAttributeRequest: description: 删除角色和扩展属性的关联关系 properties: role_attributes: description: 绑定关系 items: $ref: '#/components/schemas/sensorsdata.portal.v2.api.RoleAttribute' type: array title: DeleteRoleAttributeRequest type: object sensorsdata.portal.v2.api.GetAccountResponseHttpApiResult: properties: code: type: string message: type: string request_id: type: string data: $ref: '#/components/schemas/sensorsdata.portal.v2.api.GetAccountResponse' error_info: $ref: '#/components/schemas/sensorsdata.common.ErrorInfo' title: sensorsdata.portal.v2.api.GetAccountResponseHttpApiResult type: object sensorsdata.portal.v2.Resources: description: '' properties: resource_code: description: '' type: string resource_ids: description: '' items: type: string type: array title: Resources type: object sensorsdata.portal.v2.api.StatusResponseHttpApiResult: properties: code: type: string message: type: string request_id: type: string data: $ref: '#/components/schemas/sensorsdata.portal.v2.api.StatusResponse' error_info: $ref: '#/components/schemas/sensorsdata.common.ErrorInfo' title: sensorsdata.portal.v2.api.StatusResponseHttpApiResult type: object sensorsdata.portal.v2.api.GetAttributeNodeRequestBody: description: 获取扩展属性的节点信息 properties: codes: description: 节点编码集合 example: RD_1 items: type: string type: array title: GetAttributeNodeRequest type: object sensorsdata.portal.v2.api.UpsertAccountAttributeRequest: description: 账号和扩展属性的关联关系 properties: account_attributes: description: 绑定关系 items: $ref: '#/components/schemas/sensorsdata.portal.v2.api.AccountAttribute' type: array title: UpsertAccountAttributeRequest type: object sensorsdata.portal.v2.api.ListDutyResponse: description: '' properties: duties: description: 职务信息 items: $ref: '#/components/schemas/sensorsdata.portal.v2.api.Duty' type: array page: $ref: '#/components/schemas/sensorsdata.portal.v2.api.PageInfo' title: ListDutyResponse type: object sensorsdata.portal.v2.api.AddRoleResponseHttpApiResult: properties: code: type: string message: type: string request_id: type: string data: $ref: '#/components/schemas/sensorsdata.portal.v2.api.AddRoleResponse' error_info: $ref: '#/components/schemas/sensorsdata.common.ErrorInfo' title: sensorsdata.portal.v2.api.AddRoleResponseHttpApiResult type: object sensorsdata.portal.v2.api.RegisterResourceRequest: description: 「注册功能资源」的请求对象 properties: code: description: 资源编码;规范:唯一性,小写英文字母,多个以下划线拼接 example: data_permission_view_all_data type: string product: description: 所属产品线;例如:SA、SBP、SFN、SDF、SDH等 example: SA type: string name_i18n_message: $ref: '#/components/schemas/sensorsdata.portal.v2.api.I18nMessage' tip_i18n_message: $ref: '#/components/schemas/sensorsdata.portal.v2.api.I18nMessage' config: description: 自定义扩展;支持权限点依赖联动 type: string operations: description: 操作(权限)集合;不允许为空 items: $ref: '#/components/schemas/sensorsdata.portal.v2.api.Operation' type: array required: - code - name_i18n_message - operations - product title: RegisterResourceRequest type: object sensorsdata.portal.v2.api.RoleAttribute: description: 角色和扩展属性的关联关系 properties: role_id: description: 角色ID example: 1 format: int32 type: integer attr_code: description: 扩展属性维度 example: JOB type: string attr_name: description: 扩展属性名称 example: 岗位 type: string node_code: description: 扩展节点code example: RD type: string node_name: description: 扩展节点name example: RD type: string not_auth_children: description: 是否不授权所有子节点,默认false example: false type: boolean title: RoleAttribute type: object sensorsdata.portal.v2.api.GetGlobalAccountResponse: description: 「获取单个平台账户」的响应对象 properties: account: $ref: '#/components/schemas/sensorsdata.portal.v2.api.GlobalAccount' related_projects: description: 平台账号关联的项目信息、角色信息、职位信息等 items: $ref: '#/components/schemas/sensorsdata.portal.v2.api.AccountRelatedProjectInfo' type: array title: GetGlobalAccountResponse type: object sensorsdata.portal.v2.api.ListAccountResponseHttpApiResult: properties: code: type: string message: type: string request_id: type: string data: $ref: '#/components/schemas/sensorsdata.portal.v2.api.ListAccountResponse' error_info: $ref: '#/components/schemas/sensorsdata.common.ErrorInfo' title: sensorsdata.portal.v2.api.ListAccountResponseHttpApiResult type: object sensorsdata.portal.v2.api.ListRoleResponse: description: 「获取账号下的角色列表」的响应对象 properties: roles: description: 角色列表 items: $ref: '#/components/schemas/sensorsdata.portal.v2.api.Role' type: array page: $ref: '#/components/schemas/sensorsdata.portal.v2.api.PageInfo' title: ListRoleResponse type: object sensorsdata.portal.v2.api.ExtraAttributeDefinition: description: 扩展属性的定义 properties: id: description: 用于保存 id 映射 example: 1 format: int32 type: integer code: description: 属性编码 example: JOB type: string name: description: 属性名 example: 职位 type: string desc: description: 属性描述 example: 职位属性 type: string type: description: 属性类型 enum: - TYPE_UNSPECIFIED - VALUE - TREE example: VALUE type: string attr_value_scope: description: 属性值的作用范围,GLOBAL:全局,PROJECT:项目 example: GLOBAL type: string title: ExtraAttributeDefinition type: object sensorsdata.portal.v2.ResourceOperationCondition: description: '' properties: resource_code: description: '' type: string resource_id: description: '' type: string compound_condition_map: additionalProperties: $ref: '#/components/schemas/sensorsdata.portal.v2.OperationCompoundCondition' description: '' type: object title: ResourceOperationCondition type: object sensorsdata.portal.v2.api.GetRoleAttributeResponseHttpApiResult: properties: code: type: string message: type: string request_id: type: string data: $ref: '#/components/schemas/sensorsdata.portal.v2.api.GetRoleAttributeResponse' error_info: $ref: '#/components/schemas/sensorsdata.common.ErrorInfo' title: sensorsdata.portal.v2.api.GetRoleAttributeResponseHttpApiResult type: object sensorsdata.portal.v2.api.DeleteProjectAttributeRequest: description: 删除项目和扩展属性关联关系 properties: project_attributes: description: 绑定的数据 items: $ref: '#/components/schemas/sensorsdata.portal.v2.api.ProjectAttribute' type: array title: DeleteProjectAttributeRequest type: object sensorsdata.portal.v2.api.GetAttributeNodeResponseHttpApiResult: properties: code: type: string message: type: string request_id: type: string data: $ref: '#/components/schemas/sensorsdata.portal.v2.api.GetAttributeNodeResponse' error_info: $ref: '#/components/schemas/sensorsdata.common.ErrorInfo' title: sensorsdata.portal.v2.api.GetAttributeNodeResponseHttpApiResult type: object sensorsdata.portal.v2.BatchAddResourcePermissionRequest: description: '' properties: resources: $ref: '#/components/schemas/sensorsdata.portal.v2.Resources' policy_principals: description: '' items: $ref: '#/components/schemas/sensorsdata.portal.v2.PolicyPrincipals' type: array project_id: description: '' format: int32 type: integer project_name: description: '' type: string title: BatchAddResourcePermissionRequest type: object x-sd-openapi-service-name: Identity x-sd-openapi-service-name-hyphen: identity x-sd-openapi-app-name: portal x-sd-openapi-service-name-zh_cn: 身份 x-original-swagger-version: '2.0'