ta-wekey2/api API (1.0)
Download OpenAPI specification:Download
This is a sample server celler server.
添加应用
添加应用
Request Body schema: application/json
add app
| name required | string app名字 |
| type required | string 类型 原生Native,单页SPA,传统Traditional,后端服务MachineToMachine |
Responses
Request samples
- Payload
{- "name": "string",
- "type": "string"
}Response samples
- 200
{- "code": null,
- "data": null,
- "error": "string"
}Response samples
- 200
{- "code": null,
- "data": {
- "access_token_expires": 0,
- "app_id": "string",
- "cert_pem": "string",
- "cert_pem_id": "string",
- "client_secret": "string",
- "description": "string",
- "grant_types": [
- "string"
], - "id_token_expires": 0,
- "json_web_key": "string",
- "login_callback_urls": [
- "string"
], - "login_url": "string",
- "logo": "string",
- "logout_callback_urls": [
- "string"
], - "name": "string",
- "oauth_authorize": "string",
- "oauth_token": "string",
- "oauth_user_info": "string",
- "openid_config": "string",
- "refresh_token_expires": 0,
- "saml_protocol": "string",
- "sign_algo": "string",
- "smal_metadata": "string"
}, - "error": "string"
}编辑app高级设置
编辑app高级设置
Request Body schema: application/json
edit app advance
| grant_types required | Array of strings 授权类型 |
| sign_algo required | string 签名算法HS256 RS256 |
Responses
Request samples
- Payload
{- "grant_types": [
- "string"
], - "sign_algo": "string"
}Response samples
- 200
{- "code": null,
- "data": null,
- "error": "string"
}编辑app基本信息
编辑app基本信息
Request Body schema: application/json
edit app basic
| description | string app描述 |
| logo required | string app的logo |
| name required | string app名字 |
Responses
Request samples
- Payload
{- "description": "string",
- "logo": "string",
- "name": "string"
}Response samples
- 200
{- "code": null,
- "data": null,
- "error": "string"
}关闭应用身份源
关闭应用身份源
Request Body schema: application/json
add 身份源
| appID required | string |
| identifier required | string 配置id |
| provider required | string 身份源/github/ldap/saml/... |
Responses
Request samples
- Payload
{- "appID": "string",
- "identifier": "string",
- "provider": "string"
}Response samples
- 200
{- "code": null,
- "data": null,
- "error": "string"
}编辑app授权信息
编辑app授权信息
Request Body schema: application/json
edit app grant
| access_token_expires required | integer access_token 过期时间 |
| id_token_expires required | integer ID Token 过期时间 |
| login_url required | string 发起登录uri |
| refresh_token_expires required | integer refresh token 过期时间 |
| sign_in_callback_urls | Array of strings 登录回调urls |
| sign_out_callback_urls | Array of strings 登出回调urls |
Responses
Request samples
- Payload
{- "access_token_expires": 0,
- "id_token_expires": 0,
- "login_url": "string",
- "refresh_token_expires": 0,
- "sign_in_callback_urls": [
- "string"
], - "sign_out_callback_urls": [
- "string"
]
}Response samples
- 200
{- "code": null,
- "data": null,
- "error": "string"
}添加权限
添加权限
Request Body schema: application/json
add permission
| description required | string 描述 |
| resource_id required | string 资源组id |
| scope required | string 权限 |
Responses
Request samples
- Payload
{- "description": "string",
- "resource_id": "string",
- "scope": "string"
}Response samples
- 200
{- "code": null,
- "data": null,
- "error": "string"
}添加资源组
添加资源组
Request Body schema: application/json
add resource
| audience required | string '资源组地址,当前空间唯一' |
| name required | string 名字 |
Responses
Request samples
- Payload
{- "audience": "string",
- "name": "string"
}Response samples
- 200
{- "code": null,
- "data": null,
- "error": "string"
}获取已配置身份源列表
获取已配置身份源列表,此接口不支持分页
query Parameters
| type required | string 类型database social enterprise passwordless webauthn |
Responses
Response samples
- 200
{- "code": null,
- "data": [
- {
- "description": "string",
- "enabled_app_count": 0,
- "id": "string",
- "identifier": "string",
- "logo": "string",
- "name": "string",
- "provider": "string"
}
], - "error": "string"
}关闭应用身份源
关闭应用身份源
Request Body schema: application/json
关闭 身份源
| appID required | string |
| identifier required | string 配置id |
| provider required | string 身份源/github/ldap/saml/... |
Responses
Request samples
- Payload
{- "appID": "string",
- "identifier": "string",
- "provider": "string"
}Response samples
- 200
{- "code": null,
- "data": null,
- "error": "string"
}开启应用身份源
开启应用身份源
Request Body schema: application/json
add 身份源
| appID required | string |
| identifier required | string 配置id |
| provider required | string 身份源/github/ldap/saml/... |
Responses
Request samples
- Payload
{- "appID": "string",
- "identifier": "string",
- "provider": "string"
}Response samples
- 200
{- "code": null,
- "data": null,
- "error": "string"
}编辑数据库身份源的密码轮换
编辑数据库身份源的密码轮换
Request Body schema: application/json
编辑数据库身份源的密码轮换
| password_dic required | Array of strings 密码字典 |
| password_dic_enable required | boolean 密码字典开关 |
Responses
Request samples
- Payload
{- "password_dic": [
- "string"
], - "password_dic_enable": true
}Response samples
- 200
{- "code": null,
- "data": null,
- "error": "string"
}编辑数据库身份源的密码强度
编辑数据库身份源的密码强度
Request Body schema: application/json
编辑数据库身份源的密码强度
| password_length required | integer 密码长度 |
| password_policy required | string 密码策略 |
Responses
Request samples
- Payload
{- "password_length": 0,
- "password_policy": "string"
}Response samples
- 200
{- "code": null,
- "data": null,
- "error": "string"
}添加反馈
添加反馈
Request Body schema: application/json
添加反馈
| connectable required | boolean |
| contact | string |
| content required | string |
| images required | Array of strings |
| type required | string 类型product support other |
Responses
Request samples
- Payload
{- "connectable": true,
- "contact": "string",
- "content": "string",
- "images": [
- "string"
], - "type": "string"
}Response samples
- 200
{- "code": null,
- "data": null,
- "error": "string"
}添加角色
添加角色
Request Body schema: application/json
add role
| description required | string 描述 |
| name required | string 名字 |
Responses
Request samples
- Payload
{- "description": "string",
- "name": "string"
}Response samples
- 200
{- "code": null,
- "data": null,
- "error": "string"
}修改角色
修改角色
Request Body schema: application/json
edit role
| description required | string 描述 |
| name required | string 名字 |
Responses
Request samples
- Payload
{- "description": "string",
- "name": "string"
}Response samples
- 200
{- "code": null,
- "data": null,
- "error": "string"
}为角色添加权限
为角色添加权限
Request Body schema: application/json
add role permission
| permission_ids required | Array of strings 权限ids |
Responses
Request samples
- Payload
{- "permission_ids": [
- "string"
]
}Response samples
- 200
{- "code": null,
- "data": null,
- "error": "string"
}删除角色权限
删除角色权限
Request Body schema: application/json
del role permission
| permissionID required | string 权限id |
| roleID required | string 角色id |
Responses
Request samples
- Payload
{- "permissionID": "string",
- "roleID": "string"
}Response samples
- 200
{- "code": null,
- "data": null,
- "error": "string"
}为角色添加用户
为角色添加用户
path Parameters
| id required | string 用户ID |
Request Body schema: application/json
add user
| user_ids required | Array of strings |
Responses
Request samples
- Payload
{- "user_ids": [
- "string"
]
}Response samples
- 200
{- "code": null,
- "data": null,
- "error": "string"
}Response samples
- 200
{- "code": null,
- "data": {
- "list": [
- {
- "email": "string",
- "id": "string",
- "idp_id": "string",
- "idp_identifier": "string",
- "idp_name": "string",
- "idp_provider": "string",
- "last_login_at": "string",
- "login_count": 0,
- "phone_number": "string",
- "picture": "string",
- "status": 0,
- "username": "string"
}
], - "total": 0
}, - "error": "string"
}添加用户
添加用户
Request Body schema: application/json
add user
string 邮箱 | |
| idp_id | string connections |
| password required | string 密码,加密之后的密码 |
| phone_number | string 手机号 |
| username | string 用户名 |
Responses
Request samples
- Payload
{- "email": "string",
- "idp_id": "string",
- "password": "string",
- "phone_number": "string",
- "username": "string"
}Response samples
- 200
{- "code": null,
- "data": {
- "address": "string",
- "app_metadata": [
- 0
], - "birthdate": "string",
- "created_at": "string",
- "email": "string",
- "email_verified": true,
- "family_name": "string",
- "gender": 0,
- "given_name": "string",
- "id": "string",
- "idp_name": "string",
- "last_login_at": "string",
- "last_login_ip": "string",
- "locale": "string",
- "login_count": 0,
- "name": "string",
- "nickname": "string",
- "phone_number": "string",
- "phone_number_verified": true,
- "picture": "string",
- "profile": "string",
- "status": 0,
- "time_zone": "string",
- "user_metadata": [
- 0
], - "username": "string",
- "website": "string"
}, - "error": "string"
}编辑用户metadata
编辑用户metadata
path Parameters
| id required | string 用户ID |
Request Body schema: application/json
edit user metadata
| app_metadata required | any 应用metadata |
| user_metadata required | any 用户metadata |
Responses
Request samples
- Payload
{- "app_metadata": null,
- "user_metadata": null
}Response samples
- 200
{- "code": null,
- "data": null,
- "error": "string"
}修改用户密码
修改用户密码
path Parameters
| id required | string 用户ID |
Request Body schema: application/json
edit user password
| password required | string 密码,最少6位,后续会修改位加密传输 |
Responses
Request samples
- Payload
{- "password": "string"
}Response samples
- 200
{- "code": null,
- "data": null,
- "error": "string"
}更新用户基础信息
更新用户基础信息
path Parameters
| id required | string 用户ID |
Request Body schema: application/json
更新用户基础信息
| email required | string 邮箱 |
| nickname required | string 昵称 |
| phone_number required | string 电话号码 |
Responses
Request samples
- Payload
{- "email": "string",
- "nickname": "string",
- "phone_number": "string"
}Response samples
- 200
{- "code": null,
- "data": null,
- "error": "string"
}添加用户角色
添加用户角色
path Parameters
| id required | string 用户ID |
Request Body schema: application/json
add user
| role_ids required | Array of strings |
Responses
Request samples
- Payload
{- "role_ids": [
- "string"
]
}Response samples
- 200
{- "code": null,
- "data": null,
- "error": "string"
}上传文件
上传文件
Request Body schema: multipart/form-data
| type required | string 类型:zone/user/app/conn |
| file_type required | string 文件类型:img/text/other |
| class required | string 种类:avatar/logo/other |
| file required | string <binary> 文件 |
Responses
Response samples
- 200
{- "code": null,
- "data": {
- "key": "string",
- "url": "string"
}, - "error": "string"
}编辑空间基础信息
编辑空间基础信息
Request Body schema: application/json
编辑空间基本信息
| description | string |
| logo required | string logo |
| name required | string 别名 |
Responses
Request samples
- Payload
{- "description": "string",
- "logo": "string",
- "name": "string"
}Response samples
- 200
{- "code": null,
- "data": null,
- "error": "string"
}