跳到主要内容

ta-wekey2/api API (1.0)

Download OpenAPI specification:Download

This is a sample server celler server.

超级管理员

以用户身份登录

以用户身份登录

query Parameters
email
string
phone_number
string
username
string
zone_slug
required
string

Responses

Response samples

Content type
application/json
{
  • "code": null,
  • "data": null,
  • "error": "string"
}

应用管理

获取app列表

获取app列表

query Parameters
name
string

名字

Responses

Response samples

Content type
application/json
{
  • "code": null,
  • "data": [
    ],
  • "error": "string"
}

添加应用

添加应用

Request Body schema: application/json

add app

name
required
string

app名字

type
required
string

类型 原生Native,单页SPA,传统Traditional,后端服务MachineToMachine

Responses

Request samples

Content type
application/json
{
  • "name": "string",
  • "type": "string"
}

Response samples

Content type
application/json
{
  • "code": null,
  • "data": null,
  • "error": "string"
}

应用详情

应用详情

Responses

Response samples

Content type
application/json
{
  • "code": null,
  • "data": {
    },
  • "error": "string"
}

删除APP

删除APP

Responses

Response samples

Content type
application/json
{
  • "code": null,
  • "data": null,
  • "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

Content type
application/json
{
  • "grant_types": [
    ],
  • "sign_algo": "string"
}

Response samples

Content type
application/json
{
  • "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

Content type
application/json
{
  • "description": "string",
  • "logo": "string",
  • "name": "string"
}

Response samples

Content type
application/json
{
  • "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

Content type
application/json
{
  • "appID": "string",
  • "identifier": "string",
  • "provider": "string"
}

Response samples

Content type
application/json
{
  • "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

Content type
application/json
{
  • "access_token_expires": 0,
  • "id_token_expires": 0,
  • "login_url": "string",
  • "refresh_token_expires": 0,
  • "sign_in_callback_urls": [
    ],
  • "sign_out_callback_urls": [
    ]
}

Response samples

Content type
application/json
{
  • "code": null,
  • "data": null,
  • "error": "string"
}

应用身份源列表

应用身份源列表

Responses

Response samples

Content type
application/json
{
  • "code": null,
  • "data": [
    ],
  • "error": "string"
}

应用资源组列表

应用资源组列表

Responses

Response samples

Content type
application/json
{
  • "code": null,
  • "data": [
    ],
  • "error": "string"
}

关闭应用资源组

关闭应用资源组

Responses

Response samples

Content type
application/json
{
  • "code": null,
  • "data": null,
  • "error": "string"
}

开启应用资源组

开启应用资源组

Responses

Response samples

Content type
application/json
{
  • "code": null,
  • "data": null,
  • "error": "string"
}

轮换密钥

轮换密钥

Responses

Response samples

Content type
application/json
{
  • "code": null,
  • "data": null,
  • "error": "string"
}

查询权限

查询权限

query Parameters
resourceID
required
string

资源组id

scope
string

权限

Responses

Response samples

Content type
application/json
{
  • "code": null,
  • "data": [
    ],
  • "error": "string"
}

添加权限

添加权限

Request Body schema: application/json

add permission

description
required
string

描述

resource_id
required
string

资源组id

scope
required
string

权限

Responses

Request samples

Content type
application/json
{
  • "description": "string",
  • "resource_id": "string",
  • "scope": "string"
}

Response samples

Content type
application/json
{
  • "code": null,
  • "data": null,
  • "error": "string"
}

删除权限

删除权限

Responses

Response samples

Content type
application/json
{
  • "code": null,
  • "data": null,
  • "error": "string"
}

查询资源组

查询资源组

query Parameters
name
string

名字

Responses

Response samples

Content type
application/json
{
  • "code": null,
  • "data": [
    ],
  • "error": "string"
}

添加资源组

添加资源组

Request Body schema: application/json

add resource

audience
required
string

'资源组地址,当前空间唯一'

name
required
string

名字

Responses

Request samples

Content type
application/json
{
  • "audience": "string",
  • "name": "string"
}

Response samples

Content type
application/json
{
  • "code": null,
  • "data": null,
  • "error": "string"
}

资源组的APP列表

资源组的APP列表

Responses

Response samples

Content type
application/json
{
  • "code": null,
  • "data": [
    ],
  • "error": "string"
}

资源组详情

资源组详情

Responses

Response samples

Content type
application/json
{
  • "code": null,
  • "data": {
    },
  • "error": "string"
}

修改资源组

修改资源组

Request Body schema: application/json

edit resource

name
required
string

名字

Responses

Request samples

Content type
application/json
{
  • "name": "string"
}

Response samples

Content type
application/json
{
  • "code": null,
  • "data": null,
  • "error": "string"
}

删除资源组

删除资源组

Responses

Response samples

Content type
application/json
{
  • "code": null,
  • "data": null,
  • "error": "string"
}

关闭资源组应用

关闭资源组应用

Responses

Response samples

Content type
application/json
{
  • "code": null,
  • "data": null,
  • "error": "string"
}

开启资源组应用

开启资源组应用

Responses

Response samples

Content type
application/json
{
  • "code": null,
  • "data": null,
  • "error": "string"
}

连接源管理

获取已配置身份源列表

获取已配置身份源列表,此接口不支持分页

query Parameters
type
required
string

类型database social enterprise passwordless webauthn

Responses

Response samples

Content type
application/json
{
  • "code": null,
  • "data": [
    ],
  • "error": "string"
}

添加身份源

添加身份源,所有的身份源都是这个接口添加,只是参数可能不同

Request Body schema: application/json

add 身份源

property name*
additional property
any

Responses

Request samples

Content type
application/json
{ }

Response samples

Content type
application/json
{
  • "code": null,
  • "data": null,
  • "error": "string"
}

编辑身份源信息

编辑身份源信息

Request Body schema: application/json

编辑 身份源

property name*
additional property
any

Responses

Request samples

Content type
application/json
{ }

Response samples

Content type
application/json
{
  • "code": null,
  • "data": null,
  • "error": "string"
}

删除身份源

删除身份源

Responses

Response samples

Content type
application/json
{
  • "code": null,
  • "data": null,
  • "error": "string"
}

获取应用源关联app状态

获取应用源关联app状态

Responses

Response samples

Content type
application/json
{
  • "code": null,
  • "data": [
    ],
  • "error": "string"
}

关闭应用身份源

关闭应用身份源

Request Body schema: application/json

关闭 身份源

appID
required
string
identifier
required
string

配置id

provider
required
string

身份源/github/ldap/saml/...

Responses

Request samples

Content type
application/json
{
  • "appID": "string",
  • "identifier": "string",
  • "provider": "string"
}

Response samples

Content type
application/json
{
  • "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

Content type
application/json
{
  • "appID": "string",
  • "identifier": "string",
  • "provider": "string"
}

Response samples

Content type
application/json
{
  • "code": null,
  • "data": null,
  • "error": "string"
}

身份源配置详情

身份源配置详情

Responses

Response samples

Content type
application/json
{
  • "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

Content type
application/json
{
  • "password_dic": [
    ],
  • "password_dic_enable": true
}

Response samples

Content type
application/json
{
  • "code": null,
  • "data": null,
  • "error": "string"
}

编辑数据库身份源的密码强度

编辑数据库身份源的密码强度

Request Body schema: application/json

编辑数据库身份源的密码强度

password_length
required
integer

密码长度

password_policy
required
string

密码策略

Responses

Request samples

Content type
application/json
{
  • "password_length": 0,
  • "password_policy": "string"
}

Response samples

Content type
application/json
{
  • "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

Content type
application/json
{
  • "connectable": true,
  • "contact": "string",
  • "content": "string",
  • "images": [
    ],
  • "type": "string"
}

Response samples

Content type
application/json
{
  • "code": null,
  • "data": null,
  • "error": "string"
}

用户管理

查询角色

查询角色

query Parameters
name
string

名字

Responses

Response samples

Content type
application/json
{
  • "code": null,
  • "data": [
    ],
  • "error": "string"
}

添加角色

添加角色

Request Body schema: application/json

add role

description
required
string

描述

name
required
string

名字

Responses

Request samples

Content type
application/json
{
  • "description": "string",
  • "name": "string"
}

Response samples

Content type
application/json
{
  • "code": null,
  • "data": null,
  • "error": "string"
}

角色详情

角色详情

Responses

Response samples

Content type
application/json
{
  • "code": null,
  • "data": {
    },
  • "error": "string"
}

修改角色

修改角色

Request Body schema: application/json

edit role

description
required
string

描述

name
required
string

名字

Responses

Request samples

Content type
application/json
{
  • "description": "string",
  • "name": "string"
}

Response samples

Content type
application/json
{
  • "code": null,
  • "data": null,
  • "error": "string"
}

删除角色

删除角色

Responses

Response samples

Content type
application/json
{
  • "code": null,
  • "data": null,
  • "error": "string"
}

查询角色权限

查询角色权限

Responses

Response samples

Content type
application/json
{
  • "code": null,
  • "data": [
    ],
  • "error": "string"
}

为角色添加权限

为角色添加权限

Request Body schema: application/json

add role permission

permission_ids
required
Array of strings

权限ids

Responses

Request samples

Content type
application/json
{
  • "permission_ids": [
    ]
}

Response samples

Content type
application/json
{
  • "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

Content type
application/json
{
  • "permissionID": "string",
  • "roleID": "string"
}

Response samples

Content type
application/json
{
  • "code": null,
  • "data": null,
  • "error": "string"
}

查询角色可添加的权限

查询角色可添加的权限

query Parameters
resourceID
required
string

资源组id

scope
string

权限

Responses

Response samples

Content type
application/json
{
  • "code": null,
  • "data": [
    ],
  • "error": "string"
}

查询资源组

查询资源组

query Parameters
name
string

名字

Responses

Response samples

Content type
application/json
{
  • "code": null,
  • "data": [
    ],
  • "error": "string"
}

查询角色可添加的用户

查询角色可添加的用户

query Parameters
search
string

Responses

Response samples

Content type
application/json
{
  • "code": null,
  • "data": [
    ],
  • "error": "string"
}

查询角色用户

查询角色用户

Responses

Response samples

Content type
application/json
{
  • "code": null,
  • "data": {
    },
  • "error": "string"
}

为角色添加用户

为角色添加用户

path Parameters
id
required
string

用户ID

Request Body schema: application/json

add user

user_ids
required
Array of strings

Responses

Request samples

Content type
application/json
{
  • "user_ids": [
    ]
}

Response samples

Content type
application/json
{
  • "code": null,
  • "data": null,
  • "error": "string"
}

查询用户列表

查询用户列表

query Parameters
page
required
integer
search
string
size
required
integer

size

Responses

Response samples

Content type
application/json
{
  • "code": null,
  • "data": {
    },
  • "error": "string"
}

添加用户

添加用户

Request Body schema: application/json

add user

email
string

邮箱

idp_id
string

connections

password
required
string

密码,加密之后的密码

phone_number
string

手机号

username
string

用户名

Responses

Request samples

Content type
application/json
{
  • "email": "string",
  • "idp_id": "string",
  • "password": "string",
  • "phone_number": "string",
  • "username": "string"
}

用户详情

用户详情

path Parameters
id
required
string

用户ID

Responses

Response samples

Content type
application/json
{
  • "code": null,
  • "data": {
    },
  • "error": "string"
}

删除用户

删除用户

path Parameters
id
required
string

用户ID

Responses

Response samples

Content type
application/json
{
  • "code": null,
  • "data": null,
  • "error": "string"
}

查询用户授权应用

查询用户授权应用

path Parameters
id
required
string

用户id

Responses

Response samples

Content type
application/json
{
  • "code": null,
  • "data": {
    },
  • "error": "string"
}

撤销用户授权的应用

撤销用户授权的应用

path Parameters
id
required
string

用户ID

aid
required
string

应用id

Responses

Response samples

Content type
application/json
{
  • "code": null,
  • "data": null,
  • "error": "string"
}

封禁用户

封禁用户

path Parameters
id
required
string

用户ID

Responses

Response samples

Content type
application/json
{
  • "code": null,
  • "data": null,
  • "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

Content type
application/json
{
  • "app_metadata": null,
  • "user_metadata": null
}

Response samples

Content type
application/json
{
  • "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

Content type
application/json
{
  • "password": "string"
}

Response samples

Content type
application/json
{
  • "code": null,
  • "data": null,
  • "error": "string"
}

更新用户头像

更新用户头像

path Parameters
id
required
string

用户ID

Request Body schema: application/json

更新用户头像

picture
required
string

头像

Responses

Request samples

Content type
application/json
{
  • "picture": "string"
}

Response samples

Content type
application/json
{
  • "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

Content type
application/json
{
  • "email": "string",
  • "nickname": "string",
  • "phone_number": "string"
}

Response samples

Content type
application/json
{
  • "code": null,
  • "data": null,
  • "error": "string"
}

查询用户可添加角色

查询用户可添加角色

query Parameters
name
string

名字

Responses

Response samples

Content type
application/json
{
  • "code": null,
  • "data": [
    ],
  • "error": "string"
}

查询用户已添加的角色

查询用户已添加的角色

path Parameters
id
required
string

用户id

Responses

Response samples

Content type
application/json
{
  • "code": null,
  • "data": {
    },
  • "error": "string"
}

添加用户角色

添加用户角色

path Parameters
id
required
string

用户ID

Request Body schema: application/json

add user

role_ids
required
Array of strings

Responses

Request samples

Content type
application/json
{
  • "role_ids": [
    ]
}

Response samples

Content type
application/json
{
  • "code": null,
  • "data": null,
  • "error": "string"
}

删除用户角色

删除用户角色

path Parameters
id
required
string

用户ID

rid
required
string

角色ID

Responses

Response samples

Content type
application/json
{
  • "code": null,
  • "data": null,
  • "error": "string"
}

解封用户

解封用户

path Parameters
id
required
string

用户ID

Responses

Response samples

Content type
application/json
{
  • "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

Content type
application/json
{
  • "code": null,
  • "data": {
    },
  • "error": "string"
}

空间zone

获取用户空间列表

获取空间列表

Responses

Response samples

Content type
application/json
{
  • "code": null,
  • "data": [
    ],
  • "error": "string"
}

创建空间

创建空间

Request Body schema: application/json

创建应用

description
string
slug
required
string

Responses

Request samples

Content type
application/json
{
  • "description": "string",
  • "slug": "string"
}

Response samples

Content type
application/json
{
  • "code": null,
  • "data": null,
  • "error": "string"
}

获取空间基本信息

获取空间基本信息

Responses

Response samples

Content type
application/json
{
  • "code": null,
  • "data": {
    },
  • "error": "string"
}

编辑空间基础信息

编辑空间基础信息

Request Body schema: application/json

编辑空间基本信息

description
string
logo
required
string

logo

name
required
string

别名

Responses

Request samples

Content type
application/json
{
  • "description": "string",
  • "logo": "string",
  • "name": "string"
}

Response samples

Content type
application/json
{
  • "code": null,
  • "data": null,
  • "error": "string"
}

设置默认空间

设置默认空间

Responses

Response samples

Content type
application/json
{
  • "code": null,
  • "data": null,
  • "error": "string"
}

检测空间是否存在

检测空间是否存在

Request Body schema: application/json

检测空间是否存在

slug
required
string

Responses

Request samples

Content type
application/json
{
  • "slug": "string"
}

Response samples

Content type
application/json
{
  • "code": null,
  • "data": {
    },
  • "error": "string"
}

获取空间成员信息

获取空间成员信息

Responses

Response samples

Content type
application/json
{
  • "code": null,
  • "data": [
    ],
  • "error": "string"
}

获取空间密钥

获取空间密钥

Responses

Response samples

Content type
application/json
{
  • "code": null,
  • "data": {
    },
  • "error": "string"
}

撤销空间secret

撤销空间secret

Responses

Response samples

Content type
application/json
{
  • "code": null,
  • "data": null,
  • "error": "string"
}

空间状态

空间状态信息

Responses

Response samples

Content type
application/json
{
  • "code": null,
  • "data": {
    },
  • "error": "string"
}