# IDaasApi
[toc]
## init(ak, sk)
初始化
* ak accessKey 编程者账号key
* sk secretKey 编程者账号密钥
## api
### user
#### create(param)
创建用户
POST /v1/users
##### param properties
名称 |
类型 |
是否必须 |
描述 |
username |
string |
false |
用户名,唯一,不传后台自动生成 |
password |
string |
false |
密码,不传后台生成默认密码 |
display_name |
string |
false |
显示名称 |
firstname |
string |
false |
名 |
lastname |
string |
false |
姓 |
realname |
string |
false |
真实姓名 |
pinyin |
string |
false |
拼音 |
nickname |
string |
false |
昵称 |
user_type |
string |
false |
用户类型,不传后台设置系统默认类型 |
mobile |
string |
false |
手机 |
email |
string |
false |
邮箱 |
gender |
string |
false |
性别 |
cert_type |
string |
false |
证件类型 |
cert_number |
string |
false |
证件号 |
region |
string |
false |
区域 |
work_time |
string |
false |
加入时间 |
work_title |
string |
false |
职位 |
ext_prop |
json |
false |
扩展信息,json对象{"age": 18, "love": "足球"} |
status |
string |
false |
状态:1正常,0禁用,后期扩展:离职、休假、借调。 |
password_status |
string |
false |
密码状态(valid/invalid) |
idp_config_id |
number |
false |
身份源ID,作为创建时记录,不做更新 |
is_notify |
boolean |
false |
是否通知:默认不传false不通知,true通知 |
#### disable(param)
锁定用户
PATCH /v1/users/{id}/disable
##### param properties
名称 |
类型 |
是否必须 |
描述 |
id |
string |
true |
|
#### enable(param)
解锁用户
PATCH /v1/users/{id}/enable
##### param properties
名称 |
类型 |
是否必须 |
描述 |
id |
string |
true |
|
#### batchDisable(param)
批量锁定用户
POST /v1/jobs/users-disable
##### param properties
名称 |
类型 |
是否必须 |
描述 |
ids |
array |
true |
|
#### batchEnable(param)
批量解锁用户
POST /v1/jobs/users-enable
##### param properties
名称 |
类型 |
是否必须 |
描述 |
ids |
array |
true |
|
#### modify(param)
编辑用户
PATCH /v1/users/{id}
##### param properties
名称 |
类型 |
是否必须 |
描述 |
id |
string |
true |
|
username |
string |
false |
用户名,验证唯一 |
display_name |
string |
false |
显示名称 |
firstname |
string |
false |
名 |
lastname |
string |
false |
姓 |
realname |
string |
false |
真实姓名 |
pinyin |
string |
false |
拼音 |
nickname |
string |
false |
昵称 |
mobile |
string |
false |
手机 |
email |
string |
false |
邮箱 |
gender |
string |
false |
性别:1男,0女 |
cert_type |
string |
false |
证件类型 |
cert_number |
string |
false |
证件号 |
region |
string |
false |
区域 |
work_time |
string |
false |
加入时间 |
work_title |
string |
false |
职位 |
ext_prop |
json |
false |
扩展信息,json对象{"age": 18, "love": "足球"} |
last_login_ipaddr |
string |
false |
上次登录IP |
last_login_time |
string |
false |
上次登录时间 |
#### delete(param)
删除用户
DELETE /v1/users/{id}
##### param properties
名称 |
类型 |
是否必须 |
描述 |
id |
string |
true |
|
#### batchDelete(param)
批量删除用户
DELETE /v1/users
##### param properties
名称 |
类型 |
是否必须 |
描述 |
ids |
array |
true |
|
#### list(param)
查询用户列表
GET /v1/users
##### param properties
名称 |
类型 |
是否必须 |
描述 |
page_size |
integer |
false |
|
page_num |
integer |
false |
|
search_type |
string |
false |
默认按用户字段搜索,当值为:generic时,全文检索 |
keyword |
string |
false |
检索值 |
#### get(param)
查询用户详情
GET /v1/users/{id}
##### param properties
名称 |
类型 |
是否必须 |
描述 |
id |
string |
true |
|
#### modifyPassword(param)
修改密码
PATCH /v1/users/{id}/passwords
##### param properties
名称 |
类型 |
是否必须 |
描述 |
id |
string |
true |
|
old_password |
string |
false |
|
new_password |
string |
false |
|
#### getStoredCredentials(param)
查询用户存储凭证列表
GET /v1/user-stored-credentials
##### param properties
名称 |
类型 |
是否必须 |
描述 |
user_id |
number |
false |
用户id标识 |
provider_code |
string |
false |
社会化登录提供者的code |
idp_config_id |
number |
false |
社会化登录配置的ID |
id1 |
string |
false |
社会化身份标识1,约定此字段保存用户唯一标识,如openid |
id2 |
string |
false |
社会化身份标识2,如unionid |
metadata |
string |
false |
更多社会化身份标识 |
status |
string |
false |
状态 |
username |
string |
false |
用户名 |
display_name |
string |
false |
显示名 |
page_size |
integer |
false |
|
page_num |
integer |
false |
|
#### createStoreCredential(param)
创建用户存储凭证
POST /v1/user-stored-credentials
##### param properties
名称 |
类型 |
是否必须 |
描述 |
provider_code |
string |
false |
社会化身份源code |
id1 |
string |
false |
社会化身份标识1,如openid |
id2 |
string |
false |
社会化身份标识2,如unionid |
metadata |
string |
false |
更多社会化身份标识 |
status |
string |
false |
状态 |
nickname |
string |
false |
昵称 |
avatar |
string |
false |
头像 |
id_provider_connection |
string |
false |
|
idp_config_id |
number |
false |
社会化登录配置的ID |
realname |
string |
false |
真实姓名 |
mobile |
string |
false |
手机 |
email |
string |
false |
邮箱 |
gender |
string |
false |
性别 |
### authentication
### app
#### create(param)
创建应用
POST /v1/applications
##### param properties
名称 |
类型 |
是否必须 |
描述 |
name |
string |
false |
应用名称 |
type |
string |
false |
应用类型1,自建应用,2模板应用(市场应用) |
template_id |
string |
false |
模板id,不填写则代表自建应用 |
category |
string |
false |
应用分类,1 标准web应用,2单页web应用,3客户端应用,4后端服务 |
descr |
string |
false |
应用描述 |
logo |
string |
false |
logo路径,格式为:http://ip:port/logo.png |
login_url |
string |
false |
登录路径 |
redirect_url |
string |
false |
重定向路径 |
logout_url |
string |
false |
登出路径 |
sub_account_policy |
string |
false |
子账号策略,1启用,0不启用,启用后单点登录返回 |
prop |
object |
false |
kv字典数据 |
protocol_type |
string |
false |
如果不传默认是oidc |
protocol_prop |
object |
false |
单点登录协议属性,如果不存在则为oidc的配置 |
config_prop |
object |
false |
应用配置属性 |
domain_sn |
string |
false |
域名 |
#### modify(param)
更新应用基本信息
PATCH /v1/applications/{id}
##### param properties
名称 |
类型 |
是否必须 |
描述 |
id |
string |
true |
|
name |
string |
false |
应用名称 |
type |
string |
false |
应用类型,1自建应用,2市场应用 |
app_id |
string |
false |
应用key |
app_secret |
string |
false |
应用secret,拥有管理员权限时返回 |
category |
string |
false |
应用分类 |
descr |
string |
false |
应用描述 |
logo |
null |
false |
logo路径 |
login_url |
string |
false |
登录路径 |
redirect_url |
string |
false |
重定向路径 |
logout_url |
string |
false |
登出路径 |
sub_account_policy |
string |
false |
子账号策略 |
prop |
object |
false |
扩展属性 |
status |
string |
false |
状态,0禁用,1启用 |
domain_sn |
string |
false |
应用 Domain SN |
#### getTemplate(param)
查询应用模板列表
GET /v1/application-templates
##### param properties
名称 |
类型 |
是否必须 |
描述 |
name |
string |
true |
应用名称 |
#### list(param)
查询应用列表
GET /v1/applications
##### param properties
名称 |
类型 |
是否必须 |
描述 |
name |
string |
false |
应用名称 |
type |
string |
false |
应用类型 |
page_sort |
string |
false |
排序,格式:字段名[顺序] |
types |
string |
false |
应用类型列表,逗号分隔 |
#### getByDomain(param)
按条件查询应用
GET /v1/application
##### param properties
名称 |
类型 |
是否必须 |
描述 |
domain |
string |
false |
域名 |
domain_sn |
string |
false |
域名简写 |
#### get(param)
按 ID 查询应用
GET /v1/applications/{id}
##### param properties
名称 |
类型 |
是否必须 |
描述 |
id |
string |
true |
唯一标识 |
#### enable(param)
启用应用
POST /v1/applications/{id}/enable
##### param properties
名称 |
类型 |
是否必须 |
描述 |
id |
string |
true |
应用标识 |
#### disable(param)
禁用应用
POST /v1/applications/{id}/disable
##### param properties
名称 |
类型 |
是否必须 |
描述 |
id |
string |
true |
应用标识 |
#### delete(param)
删除应用
DELETE /v1/applications/{id}
##### param properties
名称 |
类型 |
是否必须 |
描述 |
id |
string |
true |
|
#### createSecrets(param)
刷新应用安全码
POST /v1/applications/{id}/secrets
##### param properties
名称 |
类型 |
是否必须 |
描述 |
id |
string |
true |
|
#### getConfig(param)
查询应用配置信息
GET /v1/applications/{id}/configs
##### param properties
名称 |
类型 |
是否必须 |
描述 |
id |
string |
true |
应用ID |
#### modifyConfig(param)
更新应用配置
PATCH /v1/applications/{id}/configs
##### param properties
名称 |
类型 |
是否必须 |
描述 |
id |
string |
true |
|
allowed_login_method |
string |
false |
允许的登录方式,格式为:["password", "vercode"] |
default_login_method |
string |
false |
默认登录方式,格式为:password |
allowed_reg_method |
string |
false |
允许注册方式,格式为:["mobile", "email"] |
default_reg_method |
string |
false |
默认注册方式,格式为:mobile |
default_protocol |
string |
false |
默认登录协议 |
access_policy |
string |
false |
应用级访问控制权限,all: 所有人可访问 permitted: 拒绝未授权访问 |
reg_policy |
string |
false |
新用户注册策略(是否允许自动注册,注册验证方式等),1是,2否, |
#### disableSSO(param)
禁用应用单点登录
POST /v1/applications/{id}/sso/disable
##### param properties
名称 |
类型 |
是否必须 |
描述 |
id |
string |
true |
应用标识 |
#### enableSSO(param)
启用应用单点登录
POST /v1/applications/{id}/sso/enable
##### param properties
名称 |
类型 |
是否必须 |
描述 |
id |
string |
true |
应用标识 |
#### createMFA(param)
创建应用多因素认证配置
POST /v1/applications/{id}/mfa
##### param properties
名称 |
类型 |
是否必须 |
描述 |
id |
|
true |
应用id |
config_id |
string |
true |
已配置的idp conn id |
#### deleteMFA(param)
删除应用多因素认证配置
DELETE /v1/applications/{app_id}/mfa/{config_id}
##### param properties
名称 |
类型 |
是否必须 |
描述 |
app_id |
string |
true |
应用id |
config_id |
|
true |
|
#### createIDP(param)
创建应用认证源
POST /v1/applications/{id}/idp
##### param properties
名称 |
类型 |
是否必须 |
描述 |
id |
|
true |
应用id |
config_id |
string |
true |
已配置的idp conn id |
#### deleteIDPConfig(param)
删除应用认证源
DELETE /v1/applications/{app_id}/idp/{config_id}
##### param properties
名称 |
类型 |
是否必须 |
描述 |
app_id |
string |
true |
应用id |
config_id |
|
true |
|
#### enableProtocol(param)
启用应用认证协议
POST /v1/applications/{app_id}/protocols/{protocol_type}/enable
##### param properties
名称 |
类型 |
是否必须 |
描述 |
app_id |
|
true |
应用 id |
protocol_type |
|
true |
协议名称,如 oidc |
#### disableProtocol(param)
禁用应用认证协议
POST /v1/applications/{app_id}/protocols/{protocol_type}/disable
##### param properties
名称 |
类型 |
是否必须 |
描述 |
app_id |
|
true |
应用 id |
protocol_type |
|
true |
协议名称,如 oidc |
#### getProtocols(param)
查询应用认证协议列表
GET /v1/applications/{id}/protocols
##### param properties
名称 |
类型 |
是否必须 |
描述 |
id |
string |
true |
应用唯一标识ID |
status |
string |
false |
启用状态 1, 0 |
#### getProtocol(param)
查询应用认证协议
GET /v1/applications/{app_id}/protocols/{protocol_type}
##### param properties
名称 |
类型 |
是否必须 |
描述 |
app_id |
|
true |
应用id |
protocol_type |
|
true |
单点类型,cas、oauth2、saml、oidc、sxp |
#### modifyProtocol(param)
更新应用认证协议
PUT /v1/applications/{app_id}/protocols/{protocol_type}
##### param properties
名称 |
类型 |
是否必须 |
描述 |
app_id |
|
true |
应用id |
protocol_type |
|
true |
单点类型,cas、oauth2、saml、oidc、sxp |
config_content |
object |
false |
配置参数 |
#### createAccount(param)
创建应用子账号
POST /v1/applications/{id}/accounts
##### param properties
名称 |
类型 |
是否必须 |
描述 |
id |
|
true |
应用id |
user_id |
string |
false |
用户唯一标识 |
app_id |
string |
false |
应用唯一标识 |
acc_name |
string |
false |
帐号名 |
acc_name_displayed |
string |
false |
显示名 |
acc_source |
string |
false |
帐号来源 |
acc_password |
string |
false |
帐号密码 |
acc_status |
string |
false |
帐号状态,1启用,0禁用 |
acc_prop |
object |
false |
扩展属性 |
usernmae |
string |
false |
用户名称 |
#### modifyAccount(param)
更新应用子账号
PUT /v1/applications/{app_id}/accounts/{id}
##### param properties
名称 |
类型 |
是否必须 |
描述 |
app_id |
string |
true |
应用id |
id |
|
true |
子账号id |
user_id |
string |
false |
用户唯一标识 |
app_id |
string |
false |
应用唯一标识 |
acc_name |
string |
false |
帐号名 |
acc_name_displayed |
string |
false |
显示名 |
acc_source |
string |
false |
帐号来源 |
acc_password |
string |
false |
密码 |
acc_status |
string |
false |
状态,1启用,0禁用 |
acc_prop |
object |
false |
扩展属性 |
#### enableAccount(param)
启用应用子账号
POST /v1/applications/{app_id}/accounts/{id}/enable
##### param properties
名称 |
类型 |
是否必须 |
描述 |
app_id |
|
true |
应用id |
id |
string |
true |
子账号id |
id |
string |
true |
|
#### disableAccount(param)
禁用应用子账号
POST /v1/applications/{app_id}/accounts/{id}/disable
##### param properties
名称 |
类型 |
是否必须 |
描述 |
app_id |
|
true |
应用id |
id |
string |
true |
子账号id |
#### deleteAccount(param)
删除应用子账号
DELETE /v1/applications/{app_id}/accounts/{id}
##### param properties
名称 |
类型 |
是否必须 |
描述 |
app_id |
|
true |
应用id |
id |
string |
true |
子账号id |
#### getAccountsByApp(param)
按 APP ID 查询应用子账号列表
GET /v1/applications/{app_id}/accounts
##### param properties
名称 |
类型 |
是否必须 |
描述 |
app_id |
string |
true |
应用id |
user_id |
string |
false |
用户id |
acc_status |
string |
false |
账号状态 1-活跃 0-冻结 |
acc_name |
string |
false |
账号名称 |
page_num |
integer |
false |
页数 |
page_size |
integer |
false |
页大小 |
page_sort |
string |
false |
排序字段 |
#### getAccounts(param)
查询应用子账号列表
GET /v1/application-accounts
##### param properties
名称 |
类型 |
是否必须 |
描述 |
app_id |
string |
false |
应用id |
user_id |
string |
false |
用户id |
acc_status |
string |
false |
账号状态 1-活跃 0-冻结 |
acc_name |
string |
false |
账号名称 |
page_num |
integer |
false |
页数 |
page_size |
integer |
false |
页大小 |
page_sort |
string |
false |
排序字段 |
#### getAccount(param)
按 ID 查询应用子账号
GET /v1/applications/{app_id}/accounts/{id}
##### param properties
名称 |
类型 |
是否必须 |
描述 |
app_id |
string |
true |
应用id |
id |
string |
true |
子账号id |
### permission
#### getPrivileges(param)
获取权限列表
GET /v1/privileges
##### param properties
名称 |
类型 |
是否必须 |
描述 |
identity_id |
string |
false |
主体id |
identity_type |
string |
false |
主体类型 |
identity_name |
string |
false |
主体名称 |
application_id |
string |
true |
应用id |
object_type |
string |
false |
对象类型(可选值: data, api, ui, res_set, app) |
object_code |
string |
false |
对象代码 |
affect |
string |
false |
作用方式(affect,deny) |
page_num |
string |
false |
起始页,默认1 |
page_size |
string |
false |
页大小,默认20 |
page_sort |
string |
false |
排序方式,格式:字段[排序方式] |
#### getAuthUnits(param)
获取授权单元列表
GET /v1/auth-units
##### param properties
名称 |
类型 |
是否必须 |
描述 |
identity_id |
string |
false |
主体id |
identity_type |
string |
false |
主体类型 |
identity_name |
string |
false |
主体名称 |
page_num |
string |
false |
起始页,默认1 |
page_size |
string |
false |
页大小,默认20 |
page_sort |
string |
false |
排序方式,格式:字段[排序方式] |
#### getAuthUnit(param)
按 ID 查询授权单元
GET /v1/auth-units/{id}
##### param properties
名称 |
类型 |
是否必须 |
描述 |
id |
string |
true |
au id |
#### createAuthUnitRules(param)
批量创建授权规则
POST /v1/batch/auth-unit-rules
##### param properties
名称 |
类型 |
是否必须 |
描述 |
identities |
array |
false |
|
rules |
array |
false |
|
#### modifyAuthUnit(param)
更新授权规则
PUT /v1/auth-units/{rid}/rules/{tid}
##### param properties
名称 |
类型 |
是否必须 |
描述 |
rid |
string |
true |
AU id |
tid |
string |
true |
规则id |
#### getAuthUnitsRules(param)
查询授权单元下的授权规则列表
GET /v1/auth-units/{rid}/rules
##### param properties
名称 |
类型 |
是否必须 |
描述 |
rid |
string |
true |
AU id |
application_id |
string |
false |
应用id |
type |
string |
false |
规则类型 |
code |
string |
false |
资源或资源集合code |
self_only |
string |
false |
只查询指定主体下的授权 |
resource_id |
string |
false |
资源id,当type=api,ui,data时有效 |
resource_match_all_resources |
string |
false |
匹配所有资源,当type=res时有效 |
resource_match_all_actions |
string |
false |
匹配所有资源操作,当type=res时有效 |
resource_set_id |
string |
false |
资源集合id,当type=res_set |
#### queryAuthUnitsRules(param)
查询授权规则列表
GET /v1/auth-unit-rules
##### param properties
名称 |
类型 |
是否必须 |
描述 |
application_id |
string |
false |
应用id |
type |
string |
false |
规则类型 |
code |
string |
false |
资源或资源集合code |
identity_id |
string |
true |
主体id |
identity_type |
string |
true |
主体类型 |
identity_name |
string |
false |
主体名称 |
self_only |
string |
false |
只查询指定主体下的授权 |
resource_id |
string |
false |
资源id,当type=api,ui,data时有效 |
resource_match_all_resources |
string |
false |
匹配所有资源,当type=res时有效 |
resource_match_all_actions |
string |
false |
匹配所有资源操作,当type=res时有效 |
resource_set_id |
string |
false |
资源集合id,当type=res_set |
#### deleteAuthUnitRules(param)
批量删除授权规则
DELETE /v1/batch/auth-unit-rules
##### param properties
名称 |
类型 |
是否必须 |
描述 |
ids |
array |
true |
|
#### createResource(param)
创建资源
POST /v1/resources
##### param properties
名称 |
类型 |
是否必须 |
描述 |
description |
string |
false |
描述 |
code |
string |
false |
资源代码 |
application_id |
number |
false |
应用id |
type |
string |
false |
资源类型,data/api/ui |
uri |
string |
false |
资源URI, 当type=api/ui 时有效 |
actions |
array |
false |
|
#### modifyResource(param)
更新资源
PUT /v1/resources/{id}
##### param properties
名称 |
类型 |
是否必须 |
描述 |
id |
string |
true |
资源id |
description |
string |
false |
描述 |
uri |
string |
false |
资源URI, 当type=api/ui 时有效 |
actions |
array |
false |
|
#### getResources(param)
查询资源列表
GET /v1/resources
##### param properties
名称 |
类型 |
是否必须 |
描述 |
application_id |
string |
true |
应用id |
type |
string |
false |
资源类型 |
code |
string |
false |
资源代码 |
include_global |
string |
false |
是否查询包含全局资源 |
page_num |
string |
false |
起始页,默认1 |
page_size |
string |
false |
页大小,默认20 |
page_sort |
string |
false |
排序方式,格式:字段[排序方式] |
#### getResource(param)
按 ID 查询资源
GET /v1/resources/{id}
##### param properties
名称 |
类型 |
是否必须 |
描述 |
id |
string |
true |
资源id |
application_id |
string |
true |
应用id |
#### deleteResources(param)
删除资源
DELETE /v1/batch/resources
##### param properties
名称 |
类型 |
是否必须 |
描述 |
ids |
array |
true |
|
#### createResourceSet(param)
创建资源集合
POST /v1/resource-sets
##### param properties
名称 |
类型 |
是否必须 |
描述 |
code |
string |
false |
集合代码 |
description |
string |
false |
描述 |
application_id |
string |
false |
应用id |
#### modifyResourceSet(param)
更新资源集合
PUT /v1/resource-sets/{id}
##### param properties
名称 |
类型 |
是否必须 |
描述 |
id |
string |
true |
集合id |
code |
string |
false |
集合代码 |
description |
string |
false |
描述 |
#### getResourceSets(param)
查询资源集合列表
GET /v1/resource-sets
##### param properties
名称 |
类型 |
是否必须 |
描述 |
code |
string |
false |
集合代码 |
application_id |
string |
true |
应用id |
include_global |
string |
false |
查询是否包含全局资源集合 |
page_num |
string |
false |
起始页,默认1 |
page_size |
string |
false |
页大小,默认20 |
page_sort |
string |
false |
排序方式,格式:字段[排序方式] |
#### getResourceSet(param)
按 ID 查询资源集合
GET /v1/resource-sets/{id}
##### param properties
名称 |
类型 |
是否必须 |
描述 |
id |
string |
true |
资源集合id |
#### createResourceSetMember(param)
创建资源集合成员
POST /v1/resource-sets/{id}/members
##### param properties
名称 |
类型 |
是否必须 |
描述 |
id |
string |
true |
集合id |
resource_id |
number |
false |
|
resource_scope |
string |
false |
|
resource_actions |
array |
false |
|
match_all_actions |
boolean |
false |
|
#### modifyResourceSetMember(param)
更新资源集合成员
PUT /v1/resource-sets/{sid}/members/{mid}
##### param properties
名称 |
类型 |
是否必须 |
描述 |
sid |
string |
true |
资源集合id |
mid |
string |
true |
资源集合成员id |
resource_id |
number |
false |
|
resource_scope |
string |
false |
|
ResourceActions |
array |
false |
|
match_all_actions |
boolean |
false |
|
#### getResourceMembers(param)
查询资源集合成员列表
GET /v1/resource-sets/{sid}/members
##### param properties
名称 |
类型 |
是否必须 |
描述 |
sid |
string |
true |
资源集合id |
resource_code |
string |
false |
资源代码 |
resource_type |
string |
false |
资源类型 |
page_num |
string |
false |
起始页,默认1 |
page_size |
string |
false |
页大小,默认20 |
page_sort |
string |
false |
排序方式,格式:字段[排序方式] |
#### getResourceMember(param)
按 ID 查询资源集合成员
GET /v1/resource-sets/{sid}/members/{mid}
##### param properties
名称 |
类型 |
是否必须 |
描述 |
sid |
string |
true |
资源集合id |
mid |
string |
true |
成员id |
#### authorizeApplications(param)
授权应用
POST /v1/batch/authz-apps
##### param properties
名称 |
类型 |
是否必须 |
描述 |
identities |
array |
false |
|
application_id |
string |
false |
|
affect |
string |
false |
allow, deny |
#### listAuthorizedApplications(param)
查询已授权应用列表
GET /v1/authz-apps
##### param properties
名称 |
类型 |
是否必须 |
描述 |
identity_id |
string |
true |
授权主体 id |
identity_type |
string |
true |
授权主体类型 |
type |
string |
false |
应用类型: 0-默认应用 1-自建应用 2-模板应用 3-组件应用 |
### organization
#### createOrganization(param)
创建组织关系
POST /v1/core-objects
##### param properties
#### getNodeParent(param)
查询父节点
GET /v1/tree-nodes/{id}/parent
##### param properties
名称 |
类型 |
是否必须 |
描述 |
id |
string |
true |
|
#### deleteNode(param)
删除节点
DELETE /v1/tree-nodes/{id}
##### param properties
名称 |
类型 |
是否必须 |
描述 |
id |
string |
true |
|
object_code |
string |
true |
树对象code |
#### getOrganizations(param)
获取组织关系列表
GET /v1/core-objects
##### param properties
#### updateOrganization(param)
修改组织关系基本信息
PATCH /v1/core-objects/{id}
##### param properties
名称 |
类型 |
是否必须 |
描述 |
id |
string |
true |
|
#### getOrganization(param)
获取组织关系基本信息
GET /v1/core-objects/{id}
##### param properties
名称 |
类型 |
是否必须 |
描述 |
id |
string |
true |
|
code |
string |
true |
|
#### deleteOrganization(param)
删除组织关系
DELETE /v1/core-objects/{id}
##### param properties
名称 |
类型 |
是否必须 |
描述 |
id |
string |
true |
|
#### addUserToNode(param)
添加用户到节点
POST /v1/tree-users
##### param properties
名称 |
类型 |
是否必须 |
描述 |
relation_data |
string |
false |
关联扩展信息 |
relation_type |
string |
false |
用于区分多重关联 |
is_default |
string |
false |
1是,0否 |
node_id |
string |
false |
|
user_ids |
array |
false |
|
#### updateMember(param)
更新用户节点
PATCH /v1/tree-users/{id}
##### param properties
名称 |
类型 |
是否必须 |
描述 |
id |
|
true |
|
is_default |
string |
false |
1是,0否 |
action |
string |
true |
移动节点move, 设置为默认关系as-default |
source_node_id |
string |
false |
移动前节点ID |
dest_node_id |
string |
false |
移动后节点ID |
#### getMembers(param)
获取与用户关联的组织关系列表
GET /v1/tree-users
##### param properties
名称 |
类型 |
是否必须 |
描述 |
user_id |
string |
true |
用户ID |
#### getNodeMembers(param)
获取成员信息列表
GET /v1/tree-nodes/{id}/tree-users
##### param properties
名称 |
类型 |
是否必须 |
描述 |
id |
string |
true |
node id |
relation_type |
string |
false |
关联类型,用于区分多重关联 |
is_default |
string |
false |
是否默认关系 1是,0否 |
display_name |
string |
false |
用户显示名 |
username |
string |
false |
用户名,支持模糊搜索(仅前缀) |
mode |
string |
false |
// mode - 低->高 bit
// 第1位:是否获得指针节点所对应的真实结点,1-是,0-否
// 第2位:是否展开WeakNode,即节点中类型不同的节点,1-展开,0-不展开
// 第3位:是否递归地展开节点(不建议) |
page_num |
integer |
false |
起始页,默认1 |
page_size |
integer |
false |
页大小,默认10 |
page_sort |
string |
false |
排序方式,格式:字段[排序方式] |
#### deleteNodeMembers(param)
批量从组织关系中移除用户-内部使用
DELETE /v1/tree-nodes/{node_id}/tree-users
##### param properties
名称 |
类型 |
是否必须 |
描述 |
node_id |
string |
true |
node id |
ids |
array |
true |
|
#### deleteMember(param)
从组织关系中移除用户-内部使用
DELETE /v1/tree-users/{id}
##### param properties
名称 |
类型 |
是否必须 |
描述 |
id |
string |
true |
用户节点ID |
ids |
array |
false |
用户与组织的关系ID |
node_id |
string |
false |
节点ID |
user_id |
string |
false |
用户原始ID |
#### deleteMembers(param)
从节点移除用户
DELETE /v1/tree-users
##### param properties
名称 |
类型 |
是否必须 |
描述 |
node_id |
string |
false |
节点ID |
user_id |
string |
false |
用户原始ID |
#### createNode(param)
创建节点
POST /v1/tree-nodes
##### param properties
#### updateNode(param)
编辑节点
PATCH /v1/tree-nodes/{id}
##### param properties
名称 |
类型 |
是否必须 |
描述 |
id |
string |
true |
更新树节点 |
#### deleteChildrenNodes(param)
删除节点
DELETE /v1/tree-nodes/{id}/children
##### param properties
名称 |
类型 |
是否必须 |
描述 |
id |
string |
true |
|
object_code |
string |
true |
树对象code |
#### getNodes(param)
查询节点信息列表
GET /v1/tree-nodes
##### param properties
名称 |
类型 |
是否必须 |
描述 |
object_code |
string |
true |
创建树时的object_code |
name |
string |
false |
名字,支持前缀搜索 |
code |
string |
false |
编号 |
tag |
string |
false |
标签 |
#### getNode(param)
查询节点信息
GET /v1/tree-nodes/{id}
##### param properties
名称 |
类型 |
是否必须 |
描述 |
id |
string |
true |
|
#### getChildrenNodes(param)
获取子节点列表
GET /v1/tree-nodes/{id}/children
##### param properties
名称 |
类型 |
是否必须 |
描述 |
id |
string |
true |
|
mode |
string |
true |
// mode - 低->高 bit
// 第1位:是否获得指针节点所对应的真实结点,1-是,0-否
// 第2位:是否展开WeakNode,即节点中类型不同的节点,1-展开,0-不展开
// 第3位:是否递归地展开节点(不建议) |
object_code |
string |
true |
当id = 0时必填,创建树时的object_code |