From 6b891817c76dcf72bd49640d4fedbe804a5b09dc Mon Sep 17 00:00:00 2001 From: miaosiyu Date: Sun, 3 Dec 2023 15:59:54 +0800 Subject: [PATCH] feat: update idaas api doc --- IDaasApi.md | 4239 ++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 4227 insertions(+), 12 deletions(-) diff --git a/IDaasApi.md b/IDaasApi.md index 98894a8..613df0f 100644 --- a/IDaasApi.md +++ b/IDaasApi.md @@ -1,22 +1,4237 @@ -#### IDaasApi +# IDaasApi [toc] -##### init(ak, sk) +## init(ak, sk) + 初始化 + * ak accessKey 编程者账号key * sk secretKey 编程者账号密钥 -##### user [UserApi](./api/ModuleIdentity.md) -用户模块接口 +## api + +### user -##### app [AppApi](./api/ModuleApplication.md) -应用模块接口 +#### create(param) -##### permission [PermissionApi](./api/ModulePermission.md) -权限模块接口 +创建用户 -##### authentication [AuthenticationApi](./api/ModuleAuthentication.md) -认证模块接口 +POST /v1/users -##### organization [OrganizationApi](./api/ModuleOranization.md) -组织模块接口 +##### param properties + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
名称类型是否必须描述
usernamestringfalse用户名,唯一,不传后台自动生成
passwordstringfalse密码,不传后台生成默认密码
display_namestringfalse显示名称
firstnamestringfalse
lastnamestringfalse
realnamestringfalse真实姓名
pinyinstringfalse拼音
nicknamestringfalse昵称
user_typestringfalse用户类型,不传后台设置系统默认类型
mobilestringfalse手机
emailstringfalse邮箱
genderstringfalse性别
cert_typestringfalse证件类型
cert_numberstringfalse证件号
regionstringfalse区域
work_timestringfalse加入时间
work_titlestringfalse职位
ext_propjsonfalse扩展信息,json对象{"age": 18, "love": "足球"}
statusstringfalse状态:1正常,0禁用,后期扩展:离职、休假、借调。
password_statusstringfalse密码状态(valid/invalid)
idp_config_idnumberfalse身份源ID,作为创建时记录,不做更新
is_notifybooleanfalse是否通知:默认不传false不通知,true通知
+ + +#### disable(param) + +锁定用户 + +PATCH /v1/users/{id}/disable + +##### param properties + + + + + + + + + + + + + + + + + + + + + +
名称类型是否必须描述
idstringtrue
+ + +#### enable(param) + +解锁用户 + +PATCH /v1/users/{id}/enable + +##### param properties + + + + + + + + + + + + + + + + + + + + + +
名称类型是否必须描述
idstringtrue
+ + +#### batchDisable(param) + +批量锁定用户 + +POST /v1/jobs/users-disable + +##### param properties + + + + + + + + + + + + + + + + + + + + + +
名称类型是否必须描述
idsarraytrue
+ + +#### batchEnable(param) + +批量解锁用户 + +POST /v1/jobs/users-enable + +##### param properties + + + + + + + + + + + + + + + + + + + + + +
名称类型是否必须描述
idsarraytrue
+ + +#### modify(param) + +编辑用户 + +PATCH /v1/users/{id} + +##### param properties + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
名称类型是否必须描述
idstringtrue
usernamestringfalse用户名,验证唯一
display_namestringfalse显示名称
firstnamestringfalse
lastnamestringfalse
realnamestringfalse真实姓名
pinyinstringfalse拼音
nicknamestringfalse昵称
mobilestringfalse手机
emailstringfalse邮箱
genderstringfalse性别:1男,0女
cert_typestringfalse证件类型
cert_numberstringfalse证件号
regionstringfalse区域
work_timestringfalse加入时间
work_titlestringfalse职位
ext_propjsonfalse扩展信息,json对象{"age": 18, "love": "足球"}
last_login_ipaddrstringfalse上次登录IP
last_login_timestringfalse上次登录时间
+ + +#### delete(param) + +删除用户 + +DELETE /v1/users/{id} + +##### param properties + + + + + + + + + + + + + + + + + + + + + +
名称类型是否必须描述
idstringtrue
+ + +#### batchDelete(param) + +批量删除用户 + +DELETE /v1/users + +##### param properties + + + + + + + + + + + + + + + + + + + + + +
名称类型是否必须描述
idsarraytrue
+ + +#### list(param) + +查询用户列表 + +GET /v1/users + +##### param properties + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
名称类型是否必须描述
page_sizeintegerfalse
page_numintegerfalse
search_typestringfalse默认按用户字段搜索,当值为:generic时,全文检索
keywordstringfalse检索值
+ + +#### get(param) + +查询用户详情 + +GET /v1/users/{id} + +##### param properties + + + + + + + + + + + + + + + + + + + + + +
名称类型是否必须描述
idstringtrue
+ + +#### modifyPassword(param) + +修改密码 + +PATCH /v1/users/{id}/passwords + +##### param properties + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
名称类型是否必须描述
idstringtrue
old_passwordstringfalse
new_passwordstringfalse
+ + +#### getStoredCredentials(param) + +查询用户存储凭证列表 + +GET /v1/user-stored-credentials + +##### param properties + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
名称类型是否必须描述
user_idnumberfalse用户id标识
provider_codestringfalse社会化登录提供者的code
idp_config_idnumberfalse社会化登录配置的ID
id1stringfalse社会化身份标识1,约定此字段保存用户唯一标识,如openid
id2stringfalse社会化身份标识2,如unionid
metadatastringfalse更多社会化身份标识
statusstringfalse状态
usernamestringfalse用户名
display_namestringfalse显示名
page_sizeintegerfalse
page_numintegerfalse
+ + +#### createStoreCredential(param) + +创建用户存储凭证 + +POST /v1/user-stored-credentials + +##### param properties + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
名称类型是否必须描述
provider_codestringfalse社会化身份源code
id1stringfalse社会化身份标识1,如openid
id2stringfalse社会化身份标识2,如unionid
metadatastringfalse更多社会化身份标识
statusstringfalse状态
nicknamestringfalse昵称
avatarstringfalse头像
id_provider_connectionstringfalse
idp_config_idnumberfalse社会化登录配置的ID
realnamestringfalse真实姓名
mobilestringfalse手机
emailstringfalse邮箱
genderstringfalse性别
+ +### authentication +### app + +#### create(param) + +创建应用 + +POST /v1/applications + +##### param properties + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
名称类型是否必须描述
namestringfalse应用名称
typestringfalse应用类型1,自建应用,2模板应用(市场应用)
template_idstringfalse模板id,不填写则代表自建应用
categorystringfalse应用分类,1 标准web应用,2单页web应用,3客户端应用,4后端服务
descrstringfalse应用描述
logostringfalselogo路径,格式为:http://ip:port/logo.png
login_urlstringfalse登录路径
redirect_urlstringfalse重定向路径
logout_urlstringfalse登出路径
sub_account_policystringfalse子账号策略,1启用,0不启用,启用后单点登录返回
propobjectfalsekv字典数据
protocol_typestringfalse如果不传默认是oidc
protocol_propobjectfalse单点登录协议属性,如果不存在则为oidc的配置
config_propobjectfalse应用配置属性
domain_snstringfalse域名
+ + +#### modify(param) + +更新应用基本信息 + +PATCH /v1/applications/{id} + +##### param properties + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
名称类型是否必须描述
idstringtrue
namestringfalse应用名称
typestringfalse应用类型,1自建应用,2市场应用
app_idstringfalse应用key
app_secretstringfalse应用secret,拥有管理员权限时返回
categorystringfalse应用分类
descrstringfalse应用描述
logonullfalselogo路径
login_urlstringfalse登录路径
redirect_urlstringfalse重定向路径
logout_urlstringfalse登出路径
sub_account_policystringfalse子账号策略
propobjectfalse扩展属性
statusstringfalse状态,0禁用,1启用
domain_snstringfalse应用 Domain SN
+ + +#### getTemplate(param) + +查询应用模板列表 + +GET /v1/application-templates + +##### param properties + + + + + + + + + + + + + + + + + + + + + +
名称类型是否必须描述
namestringtrue应用名称
+ + +#### list(param) + +查询应用列表 + +GET /v1/applications + +##### param properties + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
名称类型是否必须描述
namestringfalse应用名称
typestringfalse应用类型
page_sortstringfalse排序,格式:字段名[顺序]
typesstringfalse应用类型列表,逗号分隔
+ + +#### getByDomain(param) + +按条件查询应用 + +GET /v1/application + +##### param properties + + + + + + + + + + + + + + + + + + + + + + + + + + + +
名称类型是否必须描述
domainstringfalse域名
domain_snstringfalse域名简写
+ + +#### get(param) + +按 ID 查询应用 + +GET /v1/applications/{id} + +##### param properties + + + + + + + + + + + + + + + + + + + + + +
名称类型是否必须描述
idstringtrue唯一标识
+ + +#### enable(param) + +启用应用 + +POST /v1/applications/{id}/enable + +##### param properties + + + + + + + + + + + + + + + + + + + + + +
名称类型是否必须描述
idstringtrue应用标识
+ + +#### disable(param) + +禁用应用 + +POST /v1/applications/{id}/disable + +##### param properties + + + + + + + + + + + + + + + + + + + + + +
名称类型是否必须描述
idstringtrue应用标识
+ + +#### delete(param) + +删除应用 + +DELETE /v1/applications/{id} + +##### param properties + + + + + + + + + + + + + + + + + + + + + +
名称类型是否必须描述
idstringtrue
+ + +#### createSecrets(param) + +刷新应用安全码 + +POST /v1/applications/{id}/secrets + +##### param properties + + + + + + + + + + + + + + + + + + + + + +
名称类型是否必须描述
idstringtrue
+ + +#### getConfig(param) + +查询应用配置信息 + +GET /v1/applications/{id}/configs + +##### param properties + + + + + + + + + + + + + + + + + + + + + +
名称类型是否必须描述
idstringtrue应用ID
+ + +#### modifyConfig(param) + +更新应用配置 + +PATCH /v1/applications/{id}/configs + +##### param properties + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
名称类型是否必须描述
idstringtrue
allowed_login_methodstringfalse允许的登录方式,格式为:["password", "vercode"]
default_login_methodstringfalse默认登录方式,格式为:password
allowed_reg_methodstringfalse允许注册方式,格式为:["mobile", "email"]
default_reg_methodstringfalse默认注册方式,格式为:mobile
default_protocolstringfalse默认登录协议
access_policystringfalse应用级访问控制权限,all: 所有人可访问 permitted: 拒绝未授权访问
reg_policystringfalse新用户注册策略(是否允许自动注册,注册验证方式等),1是,2否,
+ + +#### disableSSO(param) + +禁用应用单点登录 + +POST /v1/applications/{id}/sso/disable + +##### param properties + + + + + + + + + + + + + + + + + + + + + +
名称类型是否必须描述
idstringtrue应用标识
+ + +#### enableSSO(param) + +启用应用单点登录 + +POST /v1/applications/{id}/sso/enable + +##### param properties + + + + + + + + + + + + + + + + + + + + + +
名称类型是否必须描述
idstringtrue应用标识
+ + +#### createMFA(param) + +创建应用多因素认证配置 + +POST /v1/applications/{id}/mfa + +##### param properties + + + + + + + + + + + + + + + + + + + + + + + + + + + +
名称类型是否必须描述
idtrue应用id
config_idstringtrue已配置的idp conn id
+ + +#### deleteMFA(param) + +删除应用多因素认证配置 + +DELETE /v1/applications/{app_id}/mfa/{config_id} + +##### param properties + + + + + + + + + + + + + + + + + + + + + + + + + + + +
名称类型是否必须描述
app_idstringtrue应用id
config_idtrue
+ + +#### createIDP(param) + +创建应用认证源 + +POST /v1/applications/{id}/idp + +##### param properties + + + + + + + + + + + + + + + + + + + + + + + + + + + +
名称类型是否必须描述
idtrue应用id
config_idstringtrue已配置的idp conn id
+ + +#### deleteIDPConfig(param) + +删除应用认证源 + +DELETE /v1/applications/{app_id}/idp/{config_id} + +##### param properties + + + + + + + + + + + + + + + + + + + + + + + + + + + +
名称类型是否必须描述
app_idstringtrue应用id
config_idtrue
+ + +#### enableProtocol(param) + +启用应用认证协议 + +POST /v1/applications/{app_id}/protocols/{protocol_type}/enable + +##### param properties + + + + + + + + + + + + + + + + + + + + + + + + + + + +
名称类型是否必须描述
app_idtrue应用 id
protocol_typetrue协议名称,如 oidc
+ + +#### disableProtocol(param) + +禁用应用认证协议 + +POST /v1/applications/{app_id}/protocols/{protocol_type}/disable + +##### param properties + + + + + + + + + + + + + + + + + + + + + + + + + + + +
名称类型是否必须描述
app_idtrue应用 id
protocol_typetrue协议名称,如 oidc
+ + +#### getProtocols(param) + +查询应用认证协议列表 + +GET /v1/applications/{id}/protocols + +##### param properties + + + + + + + + + + + + + + + + + + + + + + + + + + + +
名称类型是否必须描述
idstringtrue应用唯一标识ID
statusstringfalse启用状态 1, 0
+ + +#### getProtocol(param) + +查询应用认证协议 + +GET /v1/applications/{app_id}/protocols/{protocol_type} + +##### param properties + + + + + + + + + + + + + + + + + + + + + + + + + + + +
名称类型是否必须描述
app_idtrue应用id
protocol_typetrue单点类型,cas、oauth2、saml、oidc、sxp
+ + +#### modifyProtocol(param) + +更新应用认证协议 + +PUT /v1/applications/{app_id}/protocols/{protocol_type} + +##### param properties + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
名称类型是否必须描述
app_idtrue应用id
protocol_typetrue单点类型,cas、oauth2、saml、oidc、sxp
config_contentobjectfalse配置参数
+ + +#### createAccount(param) + +创建应用子账号 + +POST /v1/applications/{id}/accounts + +##### param properties + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
名称类型是否必须描述
idtrue应用id
user_idstringfalse用户唯一标识
app_idstringfalse应用唯一标识
acc_namestringfalse帐号名
acc_name_displayedstringfalse显示名
acc_sourcestringfalse帐号来源
acc_passwordstringfalse帐号密码
acc_statusstringfalse帐号状态,1启用,0禁用
acc_propobjectfalse扩展属性
usernmaestringfalse用户名称
+ + +#### modifyAccount(param) + +更新应用子账号 + +PUT /v1/applications/{app_id}/accounts/{id} + +##### param properties + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
名称类型是否必须描述
app_idstringtrue应用id
idtrue子账号id
user_idstringfalse用户唯一标识
app_idstringfalse应用唯一标识
acc_namestringfalse帐号名
acc_name_displayedstringfalse显示名
acc_sourcestringfalse帐号来源
acc_passwordstringfalse密码
acc_statusstringfalse状态,1启用,0禁用
acc_propobjectfalse扩展属性
+ + +#### enableAccount(param) + +启用应用子账号 + +POST /v1/applications/{app_id}/accounts/{id}/enable + +##### param properties + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
名称类型是否必须描述
app_idtrue应用id
idstringtrue子账号id
idstringtrue
+ + +#### disableAccount(param) + +禁用应用子账号 + +POST /v1/applications/{app_id}/accounts/{id}/disable + +##### param properties + + + + + + + + + + + + + + + + + + + + + + + + + + + +
名称类型是否必须描述
app_idtrue应用id
idstringtrue子账号id
+ + +#### deleteAccount(param) + +删除应用子账号 + +DELETE /v1/applications/{app_id}/accounts/{id} + +##### param properties + + + + + + + + + + + + + + + + + + + + + + + + + + + +
名称类型是否必须描述
app_idtrue应用id
idstringtrue子账号id
+ + +#### getAccountsByApp(param) + +按 APP ID 查询应用子账号列表 + +GET /v1/applications/{app_id}/accounts + +##### param properties + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
名称类型是否必须描述
app_idstringtrue应用id
user_idstringfalse用户id
acc_statusstringfalse账号状态 1-活跃 0-冻结
acc_namestringfalse账号名称
page_numintegerfalse页数
page_sizeintegerfalse页大小
page_sortstringfalse排序字段
+ + +#### getAccounts(param) + +查询应用子账号列表 + +GET /v1/application-accounts + +##### param properties + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
名称类型是否必须描述
app_idstringfalse应用id
user_idstringfalse用户id
acc_statusstringfalse账号状态 1-活跃 0-冻结
acc_namestringfalse账号名称
page_numintegerfalse页数
page_sizeintegerfalse页大小
page_sortstringfalse排序字段
+ + +#### getAccount(param) + +按 ID 查询应用子账号 + +GET /v1/applications/{app_id}/accounts/{id} + +##### param properties + + + + + + + + + + + + + + + + + + + + + + + + + + + +
名称类型是否必须描述
app_idstringtrue应用id
idstringtrue子账号id
+ +### permission + +#### getPrivileges(param) + +获取权限列表 + +GET /v1/privileges + +##### param properties + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
名称类型是否必须描述
identity_idstringfalse主体id
identity_typestringfalse主体类型
identity_namestringfalse主体名称
application_idstringtrue应用id
object_typestringfalse对象类型(可选值: data, api, ui, res_set, app)
object_codestringfalse对象代码
affectstringfalse作用方式(affect,deny)
page_numstringfalse起始页,默认1
page_sizestringfalse页大小,默认20
page_sortstringfalse排序方式,格式:字段[排序方式]
+ + +#### getAuthUnits(param) + +获取授权单元列表 + +GET /v1/auth-units + +##### param properties + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
名称类型是否必须描述
identity_idstringfalse主体id
identity_typestringfalse主体类型
identity_namestringfalse主体名称
page_numstringfalse起始页,默认1
page_sizestringfalse页大小,默认20
page_sortstringfalse排序方式,格式:字段[排序方式]
+ + +#### getAuthUnit(param) + +按 ID 查询授权单元 + +GET /v1/auth-units/{id} + +##### param properties + + + + + + + + + + + + + + + + + + + + + +
名称类型是否必须描述
idstringtrueau id
+ + +#### createAuthUnitRules(param) + +批量创建授权规则 + +POST /v1/batch/auth-unit-rules + +##### param properties + + + + + + + + + + + + + + + + + + + + + + + + + + + +
名称类型是否必须描述
identitiesarrayfalse
rulesarrayfalse
+ + +#### modifyAuthUnit(param) + +更新授权规则 + +PUT /v1/auth-units/{rid}/rules/{tid} + +##### param properties + + + + + + + + + + + + + + + + + + + + + + + + + + + +
名称类型是否必须描述
ridstringtrueAU id
tidstringtrue规则id
+ + +#### getAuthUnitsRules(param) + +查询授权单元下的授权规则列表 + +GET /v1/auth-units/{rid}/rules + +##### param properties + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
名称类型是否必须描述
ridstringtrueAU id
application_idstringfalse应用id
typestringfalse规则类型
codestringfalse资源或资源集合code
self_onlystringfalse只查询指定主体下的授权
resource_idstringfalse资源id,当type=api,ui,data时有效
resource_match_all_resourcesstringfalse匹配所有资源,当type=res时有效
resource_match_all_actionsstringfalse匹配所有资源操作,当type=res时有效
resource_set_idstringfalse资源集合id,当type=res_set
+ + +#### queryAuthUnitsRules(param) + +查询授权规则列表 + +GET /v1/auth-unit-rules + +##### param properties + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
名称类型是否必须描述
application_idstringfalse应用id
typestringfalse规则类型
codestringfalse资源或资源集合code
identity_idstringtrue主体id
identity_typestringtrue主体类型
identity_namestringfalse主体名称
self_onlystringfalse只查询指定主体下的授权
resource_idstringfalse资源id,当type=api,ui,data时有效
resource_match_all_resourcesstringfalse匹配所有资源,当type=res时有效
resource_match_all_actionsstringfalse匹配所有资源操作,当type=res时有效
resource_set_idstringfalse资源集合id,当type=res_set
+ + +#### deleteAuthUnitRules(param) + +批量删除授权规则 + +DELETE /v1/batch/auth-unit-rules + +##### param properties + + + + + + + + + + + + + + + + + + + + + +
名称类型是否必须描述
idsarraytrue
+ + +#### createResource(param) + +创建资源 + +POST /v1/resources + +##### param properties + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
名称类型是否必须描述
descriptionstringfalse描述
codestringfalse资源代码
application_idnumberfalse应用id
typestringfalse资源类型,data/api/ui
uristringfalse资源URI, 当type=api/ui 时有效
actionsarrayfalse
+ + +#### modifyResource(param) + +更新资源 + +PUT /v1/resources/{id} + +##### param properties + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
名称类型是否必须描述
idstringtrue资源id
descriptionstringfalse描述
uristringfalse资源URI, 当type=api/ui 时有效
actionsarrayfalse
+ + +#### getResources(param) + +查询资源列表 + +GET /v1/resources + +##### param properties + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
名称类型是否必须描述
application_idstringtrue应用id
typestringfalse资源类型
codestringfalse资源代码
include_globalstringfalse是否查询包含全局资源
page_numstringfalse起始页,默认1
page_sizestringfalse页大小,默认20
page_sortstringfalse排序方式,格式:字段[排序方式]
+ + +#### getResource(param) + +按 ID 查询资源 + +GET /v1/resources/{id} + +##### param properties + + + + + + + + + + + + + + + + + + + + + + + + + + + +
名称类型是否必须描述
idstringtrue资源id
application_idstringtrue应用id
+ + +#### deleteResources(param) + +删除资源 + +DELETE /v1/batch/resources + +##### param properties + + + + + + + + + + + + + + + + + + + + + +
名称类型是否必须描述
idsarraytrue
+ + +#### createResourceSet(param) + +创建资源集合 + +POST /v1/resource-sets + +##### param properties + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
名称类型是否必须描述
codestringfalse集合代码
descriptionstringfalse描述
application_idstringfalse应用id
+ + +#### modifyResourceSet(param) + +更新资源集合 + +PUT /v1/resource-sets/{id} + +##### param properties + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
名称类型是否必须描述
idstringtrue集合id
codestringfalse集合代码
descriptionstringfalse描述
+ + +#### getResourceSets(param) + +查询资源集合列表 + +GET /v1/resource-sets + +##### param properties + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
名称类型是否必须描述
codestringfalse集合代码
application_idstringtrue应用id
include_globalstringfalse查询是否包含全局资源集合
page_numstringfalse起始页,默认1
page_sizestringfalse页大小,默认20
page_sortstringfalse排序方式,格式:字段[排序方式]
+ + +#### getResourceSet(param) + +按 ID 查询资源集合 + +GET /v1/resource-sets/{id} + +##### param properties + + + + + + + + + + + + + + + + + + + + + +
名称类型是否必须描述
idstringtrue资源集合id
+ + +#### createResourceSetMember(param) + +创建资源集合成员 + +POST /v1/resource-sets/{id}/members + +##### param properties + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
名称类型是否必须描述
idstringtrue集合id
resource_idnumberfalse
resource_scopestringfalse
resource_actionsarrayfalse
match_all_actionsbooleanfalse
+ + +#### modifyResourceSetMember(param) + +更新资源集合成员 + +PUT /v1/resource-sets/{sid}/members/{mid} + +##### param properties + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
名称类型是否必须描述
sidstringtrue资源集合id
midstringtrue资源集合成员id
resource_idnumberfalse
resource_scopestringfalse
ResourceActionsarrayfalse
match_all_actionsbooleanfalse
+ + +#### getResourceMembers(param) + +查询资源集合成员列表 + +GET /v1/resource-sets/{sid}/members + +##### param properties + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
名称类型是否必须描述
sidstringtrue资源集合id
resource_codestringfalse资源代码
resource_typestringfalse资源类型
page_numstringfalse起始页,默认1
page_sizestringfalse页大小,默认20
page_sortstringfalse排序方式,格式:字段[排序方式]
+ + +#### getResourceMember(param) + +按 ID 查询资源集合成员 + +GET /v1/resource-sets/{sid}/members/{mid} + +##### param properties + + + + + + + + + + + + + + + + + + + + + + + + + + + +
名称类型是否必须描述
sidstringtrue资源集合id
midstringtrue成员id
+ + +#### authorizeApplications(param) + +授权应用 + +POST /v1/batch/authz-apps + +##### param properties + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
名称类型是否必须描述
identitiesarrayfalse
application_idstringfalse
affectstringfalseallow, deny
+ + +#### listAuthorizedApplications(param) + +查询已授权应用列表 + +GET /v1/authz-apps + +##### param properties + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
名称类型是否必须描述
identity_idstringtrue授权主体 id
identity_typestringtrue授权主体类型
typestringfalse应用类型: 0-默认应用 1-自建应用 2-模板应用 3-组件应用
+ +### organization + +#### createOrganization(param) + +创建组织关系 + +POST /v1/core-objects + +##### param properties + + + + + + + + + + + + + + + +
名称类型是否必须描述
+ + +#### getNodeParent(param) + +查询父节点 + +GET /v1/tree-nodes/{id}/parent + +##### param properties + + + + + + + + + + + + + + + + + + + + + +
名称类型是否必须描述
idstringtrue
+ + +#### deleteNode(param) + +删除节点 + +DELETE /v1/tree-nodes/{id} + +##### param properties + + + + + + + + + + + + + + + + + + + + + + + + + + + +
名称类型是否必须描述
idstringtrue
object_codestringtrue树对象code
+ + +#### getOrganizations(param) + +获取组织关系列表 + +GET /v1/core-objects + +##### param properties + + + + + + + + + + + + + + + +
名称类型是否必须描述
+ + +#### updateOrganization(param) + +修改组织关系基本信息 + +PATCH /v1/core-objects/{id} + +##### param properties + + + + + + + + + + + + + + + + + + + + + +
名称类型是否必须描述
idstringtrue
+ + +#### getOrganization(param) + +获取组织关系基本信息 + +GET /v1/core-objects/{id} + +##### param properties + + + + + + + + + + + + + + + + + + + + + + + + + + + +
名称类型是否必须描述
idstringtrue
codestringtrue
+ + +#### deleteOrganization(param) + +删除组织关系 + +DELETE /v1/core-objects/{id} + +##### param properties + + + + + + + + + + + + + + + + + + + + + +
名称类型是否必须描述
idstringtrue
+ + +#### addUserToNode(param) + +添加用户到节点 + +POST /v1/tree-users + +##### param properties + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
名称类型是否必须描述
relation_datastringfalse关联扩展信息
relation_typestringfalse用于区分多重关联
is_defaultstringfalse1是,0否
node_idstringfalse
user_idsarrayfalse
+ + +#### updateMember(param) + +更新用户节点 + +PATCH /v1/tree-users/{id} + +##### param properties + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
名称类型是否必须描述
idtrue
is_defaultstringfalse1是,0否
actionstringtrue移动节点move, 设置为默认关系as-default
source_node_idstringfalse移动前节点ID
dest_node_idstringfalse移动后节点ID
+ + +#### getMembers(param) + +获取与用户关联的组织关系列表 + +GET /v1/tree-users + +##### param properties + + + + + + + + + + + + + + + + + + + + + +
名称类型是否必须描述
user_idstringtrue用户ID
+ + +#### getNodeMembers(param) + +获取成员信息列表 + +GET /v1/tree-nodes/{id}/tree-users + +##### param properties + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
名称类型是否必须描述
idstringtruenode id
relation_typestringfalse关联类型,用于区分多重关联
is_defaultstringfalse是否默认关系 1是,0否
display_namestringfalse用户显示名
usernamestringfalse用户名,支持模糊搜索(仅前缀)
modestringfalse// mode - 低->高 bit +// 第1位:是否获得指针节点所对应的真实结点,1-是,0-否 +// 第2位:是否展开WeakNode,即节点中类型不同的节点,1-展开,0-不展开 +// 第3位:是否递归地展开节点(不建议)
page_numintegerfalse起始页,默认1
page_sizeintegerfalse页大小,默认10
page_sortstringfalse排序方式,格式:字段[排序方式]
+ + +#### deleteNodeMembers(param) + +批量从组织关系中移除用户-内部使用 + +DELETE /v1/tree-nodes/{node_id}/tree-users + +##### param properties + + + + + + + + + + + + + + + + + + + + + + + + + + + +
名称类型是否必须描述
node_idstringtruenode id
idsarraytrue
+ + +#### deleteMember(param) + +从组织关系中移除用户-内部使用 + +DELETE /v1/tree-users/{id} + +##### param properties + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
名称类型是否必须描述
idstringtrue用户节点ID
idsarrayfalse用户与组织的关系ID
node_idstringfalse节点ID
user_idstringfalse用户原始ID
+ + +#### deleteMembers(param) + +从节点移除用户 + +DELETE /v1/tree-users + +##### param properties + + + + + + + + + + + + + + + + + + + + + + + + + + + +
名称类型是否必须描述
node_idstringfalse节点ID
user_idstringfalse用户原始ID
+ + +#### createNode(param) + +创建节点 + +POST /v1/tree-nodes + +##### param properties + + + + + + + + + + + + + + + +
名称类型是否必须描述
+ + +#### updateNode(param) + +编辑节点 + +PATCH /v1/tree-nodes/{id} + +##### param properties + + + + + + + + + + + + + + + + + + + + + +
名称类型是否必须描述
idstringtrue更新树节点
+ + +#### deleteChildrenNodes(param) + +删除节点 + +DELETE /v1/tree-nodes/{id}/children + +##### param properties + + + + + + + + + + + + + + + + + + + + + + + + + + + +
名称类型是否必须描述
idstringtrue
object_codestringtrue树对象code
+ + +#### getNodes(param) + +查询节点信息列表 + +GET /v1/tree-nodes + +##### param properties + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
名称类型是否必须描述
object_codestringtrue创建树时的object_code
namestringfalse名字,支持前缀搜索
codestringfalse编号
tagstringfalse标签
+ + +#### getNode(param) + +查询节点信息 + +GET /v1/tree-nodes/{id} + +##### param properties + + + + + + + + + + + + + + + + + + + + + +
名称类型是否必须描述
idstringtrue
+ + +#### getChildrenNodes(param) + +获取子节点列表 + +GET /v1/tree-nodes/{id}/children + +##### param properties + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
名称类型是否必须描述
idstringtrue
modestringtrue// mode - 低->高 bit +// 第1位:是否获得指针节点所对应的真实结点,1-是,0-否 +// 第2位:是否展开WeakNode,即节点中类型不同的节点,1-展开,0-不展开 +// 第3位:是否递归地展开节点(不建议)
object_codestringtrue当id = 0时必填,创建树时的object_code