ThingsKit物联网平台API文档-系统管理(账号管理)

修改用户信息

接口地址:/api/yt/user

请求方式:PUT

请求数据类型:application/x-www-form-urlencoded,application/json

响应数据类型:*/*

请求示例:

{
  "accountExpireTime": "",
  "activateToken": "",
  "avatar": "",
  "createTime": "",
  "creator": "",
  "customerId": "",
  "email": "",
  "enabled": false,
  "hasPassword": false,
  "id": "",
  "level": 0,
  "organizationIds": [],
  "password": "",
  "phoneNumber": "",
  "realName": "",
  "remark": "",
  "roleIds": [],
  "roles": [
    {
      "roleId": "",
      "roleName": ""
    }
  ],
  "tbUser": "",
  "tenantId": "",
  "tenantName": "",
  "updateTime": "",
  "updater": "",
  "userStatusEnum": "",
  "username": ""
}

请求参数:

参数名称参数说明请求类型是否必须数据类型
userDTOUserDTObodytrueUserDTO

响应参数:

参数名称参数说明类型
accountExpireTime账号失效时间string(date-time)
activateToken激活tokenstring
avatar头像string
createTime创建时间string(date-time)
creator创建用户string
customerId客户IDstring
email邮箱string
enabled账号状态boolean
hasPassword是否已重置密码boolean
idIDstring
level角色级别:0:超级管理员;1:平台管理员 2:租户账号 3:租户下的账号integer(int32)
organizationIds所辖组织idsarray
password密码string
phoneNumber电话号码string
realName真实名称string
remark备注string
roleIds角色idsarray
roles角色信息列表array
roleId角色IDstring
roleName角色名称string
tbUserTB的UserIdstring
tenantId租户IDstring
tenantName租户名称string
updateTime更新时间string(date-time)
updater更新用户string
userStatusEnum用户状态,可用值:DISABLED,EXPIRED,NORMALstring
username用户名string

响应示例:

{
	"accountExpireTime": "",
	"activateToken": "",
	"avatar": "",
	"createTime": "",
	"creator": "",
	"customerId": "",
	"email": "",
	"enabled": false,
	"hasPassword": false,
	"id": "",
	"level": 0,
	"organizationIds": [],
	"password": "",
	"phoneNumber": "",
	"realName": "",
	"remark": "",
	"roleIds": [],
	"roles": [
		{
			"roleId": "",
			"roleName": ""
		}
	],
	"tbUser": "",
	"tenantId": "",
	"tenantName": "",
	"updateTime": "",
	"updater": "",
	"userStatusEnum": "",
	"username": ""
}

删除用户信息

接口地址:/api/yt/user

请求方式:DELETE

请求数据类型:application/x-www-form-urlencoded,application/json

响应数据类型:*/*

请求示例:

{
  "ids": [],
  "tenantId": ""
}

请求参数:

参数名称参数说明请求类型是否必须数据类型
deleteDTODeleteDTObodytrueDeleteDTO
ids删除ID列表truearray

响应参数:

参数名称参数说明类型
errorCodePlatform error code:\n2 – General error (HTTP: 500 – Internal Server Error)\n\n10 – Authentication failed (HTTP: 401 – Unauthorized)\n\n11 – JWT token expired (HTTP: 401 – Unauthorized)\n\n15 – Credentials expired (HTTP: 401 – Unauthorized)\n\n20 – Permission denied (HTTP: 403 – Forbidden)\n\n30 – Invalid arguments (HTTP: 400 – Bad Request)\n\n31 – Bad request params (HTTP: 400 – Bad Request)\n\n32 – Item not found (HTTP: 404 – Not Found)\n\n33 – Too many requests (HTTP: 429 – Too Many Requests)\n\n34 – Too many updates (Too many updates over Websocket session)\n\n* 40 – Subscription violation (HTTP: 403 – Forbidden)object
messageError messagestring
statusHTTP Response Status Codeinteger(int32)
timestampTimestampstring(date-time)

响应示例:

{}

查询用户名是否存在

接口地址:/api/yt/user/account_exist/{username}

请求方式:GET

请求数据类型:application/x-www-form-urlencoded

响应数据类型:*/*

请求参数:

参数名称参数说明请求类型是否必须数据类型
usernameusernamepathtruestring

响应参数:

参数名称参数说明类型
codeinteger(int32)
dataUserDTO
accountExpireTime账号失效时间string(date-time)
activateToken激活tokenstring
avatar头像string
createTime创建时间string(date-time)
creator创建用户string
customerId客户IDstring
email邮箱string
enabled账号状态boolean
hasPassword是否已重置密码boolean
idIDstring
level角色级别:0:超级管理员;1:平台管理员 2:租户账号 3:租户下的账号integer(int32)
organizationIds所辖组织idsarray
password密码string
phoneNumber电话号码string
realName真实名称string
remark备注string
roleIds角色idsarray
roles角色信息列表array
roleId角色IDstring
roleName角色名称string
tbUserTB的UserIdstring
tenantId租户IDstring
tenantName租户名称string
updateTime更新时间string(date-time)
updater更新用户string
userStatusEnum用户状态,可用值:DISABLED,EXPIRED,NORMALstring
username用户名string
messagestring

响应示例:

{
	"code": 0,
	"data": {
		"accountExpireTime": "",
		"activateToken": "",
		"avatar": "",
		"createTime": "",
		"creator": "",
		"customerId": "",
		"email": "",
		"enabled": false,
		"hasPassword": false,
		"id": "",
		"level": 0,
		"organizationIds": [],
		"password": "",
		"phoneNumber": "",
		"realName": "",
		"remark": "",
		"roleIds": [],
		"roles": [
			{
				"roleId": "",
				"roleName": ""
			}
		],
		"tbUser": "",
		"tenantId": "",
		"tenantName": "",
		"updateTime": "",
		"updater": "",
		"userStatusEnum": "",
		"username": ""
	},
	"message": ""
}

修改个人中心

接口地址:/api/yt/user/center

请求方式:PUT

请求数据类型:application/x-www-form-urlencoded,application/json

响应数据类型:*/*

请求示例:

{
  "accountExpireTime": "",
  "activateToken": "",
  "avatar": "",
  "createTime": "",
  "creator": "",
  "customerId": "",
  "email": "",
  "enabled": false,
  "hasPassword": false,
  "id": "",
  "level": 0,
  "organizationIds": [],
  "password": "",
  "phoneNumber": "",
  "realName": "",
  "remark": "",
  "roleIds": [],
  "roles": [
    {
      "roleId": "",
      "roleName": ""
    }
  ],
  "tbUser": "",
  "tenantId": "",
  "tenantName": "",
  "updateTime": "",
  "updater": "",
  "userStatusEnum": "",
  "username": ""
}

请求参数:

参数名称参数说明请求类型是否必须数据类型
userDTOUserDTObodytrueUserDTO

响应参数:

参数名称参数说明类型
accountExpireTime过期时间string(date-time)
avatar头像string
createTime创建时间string(date-time)
email邮箱string
homePath主页地址string
needSetPwd是否需要重置密码boolean
phoneNumber手机string
plainRoles角色信息array
roleId角色IDstring
roleName角色名称string
realName姓名string
roles角色IDarray
tenantId租户IDstring
tenantName租户名称string
userId用户IDstring
username用户名string

响应示例:

{
	"accountExpireTime": "",
	"avatar": "",
	"createTime": "",
	"email": "",
	"homePath": "",
	"needSetPwd": false,
	"phoneNumber": "",
	"plainRoles": [
		{
			"roleId": "",
			"roleName": ""
		}
	],
	"realName": "",
	"roles": [],
	"tenantId": "",
	"tenantName": "",
	"userId": "",
	"username": ""
}

获取租户下对应组织的所有客户

接口地址:/api/yt/user/customers/{organizationId}

请求方式:GET

请求数据类型:application/x-www-form-urlencoded

响应数据类型:*/*

请求参数:

参数名称参数说明请求类型是否必须数据类型
organizationIdorganizationIdpathtruestring

响应参数:

参数名称参数说明类型
accountExpireTime账号失效时间string(date-time)
activateToken激活tokenstring
avatar头像string
createTime创建时间string(date-time)
creator创建用户string
customerId客户IDstring
email邮箱string
enabled账号状态boolean
hasPassword是否已重置密码boolean
idIDstring
level角色级别:0:超级管理员;1:平台管理员 2:租户账号 3:租户下的账号integer(int32)
organizationIds所辖组织idsarray
password密码string
phoneNumber电话号码string
realName真实名称string
remark备注string
roleIds角色idsarray
roles角色信息列表array
roleId角色IDstring
roleName角色名称string
tbUserTB的UserIdstring
tenantId租户IDstring
tenantName租户名称string
updateTime更新时间string(date-time)
updater更新用户string
userStatusEnum用户状态,可用值:DISABLED,EXPIRED,NORMALstring
username用户名string

响应示例:

[
	{
		"accountExpireTime": "",
		"activateToken": "",
		"avatar": "",
		"createTime": "",
		"creator": "",
		"customerId": "",
		"email": "",
		"enabled": false,
		"hasPassword": false,
		"id": "",
		"level": 0,
		"organizationIds": [],
		"password": "",
		"phoneNumber": "",
		"realName": "",
		"remark": "",
		"roleIds": [],
		"roles": [
			{
				"roleId": "",
				"roleName": ""
			}
		],
		"tbUser": "",
		"tenantId": "",
		"tenantName": "",
		"updateTime": "",
		"updater": "",
		"userStatusEnum": "",
		"username": ""
	}
]

判断电话是否重复

接口地址:/api/yt/user/get_user/{phoneNumber}

请求方式:GET

请求数据类型:application/x-www-form-urlencoded

响应数据类型:*/*

请求参数:

参数名称参数说明请求类型是否必须数据类型
phoneNumberphoneNumberpathtruestring

响应参数:

参数名称参数说明类型
codeinteger(int32)
dataUserDTO
accountExpireTime账号失效时间string(date-time)
activateToken激活tokenstring
avatar头像string
createTime创建时间string(date-time)
creator创建用户string
customerId客户IDstring
email邮箱string
enabled账号状态boolean
hasPassword是否已重置密码boolean
idIDstring
level角色级别:0:超级管理员;1:平台管理员 2:租户账号 3:租户下的账号integer(int32)
organizationIds所辖组织idsarray
password密码string
phoneNumber电话号码string
realName真实名称string
remark备注string
roleIds角色idsarray
roles角色信息列表array
roleId角色IDstring
roleName角色名称string
tbUserTB的UserIdstring
tenantId租户IDstring
tenantName租户名称string
updateTime更新时间string(date-time)
updater更新用户string
userStatusEnum用户状态,可用值:DISABLED,EXPIRED,NORMALstring
username用户名string
messagestring

响应示例:

{
	"code": 0,
	"data": {
		"accountExpireTime": "",
		"activateToken": "",
		"avatar": "",
		"createTime": "",
		"creator": "",
		"customerId": "",
		"email": "",
		"enabled": false,
		"hasPassword": false,
		"id": "",
		"level": 0,
		"organizationIds": [],
		"password": "",
		"phoneNumber": "",
		"realName": "",
		"remark": "",
		"roleIds": [],
		"roles": [
			{
				"roleId": "",
				"roleName": ""
			}
		],
		"tbUser": "",
		"tenantId": "",
		"tenantName": "",
		"updateTime": "",
		"updater": "",
		"userStatusEnum": "",
		"username": ""
	},
	"message": ""
}

获取当前用户信息

接口地址:/api/yt/user/me/info

请求方式:GET

请求数据类型:application/x-www-form-urlencoded

响应数据类型:*/*

请求参数:

暂无

响应参数:

参数名称参数说明类型
accountExpireTime过期时间string(date-time)
avatar头像string
createTime创建时间string(date-time)
email邮箱string
homePath主页地址string
needSetPwd是否需要重置密码boolean
phoneNumber手机string
plainRoles角色信息array
roleId角色IDstring
roleName角色名称string
realName姓名string
roles角色IDarray
tenantId租户IDstring
tenantName租户名称string
userId用户IDstring
username用户名string

响应示例:

{
	"accountExpireTime": "",
	"avatar": "",
	"createTime": "",
	"email": "",
	"homePath": "",
	"needSetPwd": false,
	"phoneNumber": "",
	"plainRoles": [
		{
			"roleId": "",
			"roleName": ""
		}
	],
	"realName": "",
	"roles": [],
	"tenantId": "",
	"tenantName": "",
	"userId": "",
	"username": ""
}

获取用户分页数据

接口地址:/api/yt/user/page{?orderFiled,orderType,organizationId,page,pageSize,realName,roleType,tenantId,username}

请求方式:GET

请求数据类型:application/x-www-form-urlencoded

响应数据类型:*/*

请求参数:

参数名称参数说明是否必须数据类型
pagepagetrueint
pageSizepageSizetrueint

响应参数:

参数名称参数说明类型
itemsarray
accountExpireTime账号失效时间string(date-time)
activateToken激活tokenstring
avatar头像string
createTime创建时间string(date-time)
creator创建用户string
customerId客户IDstring
email邮箱string
enabled账号状态boolean
hasPassword是否已重置密码boolean
idIDstring
level角色级别:0:超级管理员;1:平台管理员 2:租户账号 3:租户下的账号integer(int32)
organizationIds所辖组织idsarray
password密码string
phoneNumber电话号码string
realName真实名称string
remark备注string
roleIds角色idsarray
roles角色信息列表array
roleId角色IDstring
roleName角色名称string
tbUserTB的UserIdstring
tenantId租户IDstring
tenantName租户名称string
updateTime更新时间string(date-time)
updater更新用户string
userStatusEnum用户状态,可用值:DISABLED,EXPIRED,NORMALstring
username用户名string
totalinteger(int32)

响应示例:

{
	"items": [
		{
			"accountExpireTime": "",
			"activateToken": "",
			"avatar": "",
			"createTime": "",
			"creator": "",
			"customerId": "",
			"email": "",
			"enabled": false,
			"hasPassword": false,
			"id": "",
			"level": 0,
			"organizationIds": [],
			"password": "",
			"phoneNumber": "",
			"realName": "",
			"remark": "",
			"roleIds": [],
			"roles": [
				{
					"roleId": "",
					"roleName": ""
				}
			],
			"tbUser": "",
			"tenantId": "",
			"tenantName": "",
			"updateTime": "",
			"updater": "",
			"userStatusEnum": "",
			"username": ""
		}
	],
	"total": 0
}

修改密码

接口地址:/api/yt/user/reset

请求方式:POST

请求数据类型:application/x-www-form-urlencoded,application/json

响应数据类型:*/*

接口描述:

请求示例:

{
  "password": "",
  "resetPassword": "",
  "userId": ""
}

请求参数:

参数名称参数说明请求类型是否必须数据类型
密码修改密码修改bodytrue密码修改
resetPassword新密码truestring
userId用户IDtruestring

响应参数:

参数名称参数说明类型
codeinteger(int32)
databoolean
messagestring

响应示例:

{
	"code": 0,
	"data": true,
	"message": ""
}

新增和编辑租户管理员

接口地址:/api/yt/user/save_tenant_admin

请求方式:POST

请求数据类型:application/x-www-form-urlencoded,application/json

响应数据类型:*/*

接口描述:

请求示例:

{
  "accountExpireTime": "",
  "activateToken": "",
  "avatar": "",
  "createTime": "",
  "creator": "",
  "customerId": "",
  "email": "",
  "enabled": false,
  "hasPassword": false,
  "id": "",
  "level": 0,
  "organizationIds": [],
  "password": "",
  "phoneNumber": "",
  "realName": "",
  "remark": "",
  "roleIds": [],
  "roles": [
    {
      "roleId": "",
      "roleName": ""
    }
  ],
  "tbUser": "",
  "tenantId": "",
  "tenantName": "",
  "updateTime": "",
  "updater": "",
  "userStatusEnum": "",
  "username": ""
}

请求参数:

参数名称参数说明请求类型是否必须数据类型
userDTOUserDTObodytrueUserDTO

响应参数:

参数名称参数说明类型
accountExpireTime账号失效时间string(date-time)
activateToken激活tokenstring
avatar头像string
createTime创建时间string(date-time)
creator创建用户string
customerId客户IDstring
email邮箱string
enabled账号状态boolean
hasPassword是否已重置密码boolean
idIDstring
level角色级别:0:超级管理员;1:平台管理员 2:租户账号 3:租户下的账号integer(int32)
organizationIds所辖组织idsarray
password密码string
phoneNumber电话号码string
realName真实名称string
remark备注string
roleIds角色idsarray
roles角色信息列表array
roleId角色IDstring
roleName角色名称string
tbUserTB的UserIdstring
tenantId租户IDstring
tenantName租户名称string
updateTime更新时间string(date-time)
updater更新用户string
userStatusEnum用户状态,可用值:DISABLED,EXPIRED,NORMALstring
username用户名string

响应示例:

{
	"accountExpireTime": "",
	"activateToken": "",
	"avatar": "",
	"createTime": "",
	"creator": "",
	"customerId": "",
	"email": "",
	"enabled": false,
	"hasPassword": false,
	"id": "",
	"level": 0,
	"organizationIds": [],
	"password": "",
	"phoneNumber": "",
	"realName": "",
	"remark": "",
	"roleIds": [],
	"roles": [
		{
			"roleId": "",
			"roleName": ""
		}
	],
	"tbUser": "",
	"tenantId": "",
	"tenantName": "",
	"updateTime": "",
	"updater": "",
	"userStatusEnum": "",
	"username": ""
}

获取租户管理员分页数据

接口地址:/api/yt/user/tenant/page{?orderFiled,orderType,page,pageSize,tenantId}

请求方式:GET

请求数据类型:application/x-www-form-urlencoded

响应数据类型:*/*

请求参数:

参数名称参数说明是否必须数据类型
pagepagetrueint
pageSizepageSizetrueint
tenantIdtenantIdtruestring

响应参数:

参数名称参数说明类型
itemsarray
accountExpireTime账号失效时间string(date-time)
activateToken激活tokenstring
avatar头像string
createTime创建时间string(date-time)
creator创建用户string
customerId客户IDstring
email邮箱string
enabled账号状态boolean
hasPassword是否已重置密码boolean
idIDstring
level角色级别:0:超级管理员;1:平台管理员 2:租户账号 3:租户下的账号integer(int32)
organizationIds所辖组织idsarray
password密码string
phoneNumber电话号码string
realName真实名称string
remark备注string
roleIds角色idsarray
roles角色信息列表array
roleId角色IDstring
roleName角色名称string
tbUserTB的UserIdstring
tenantId租户IDstring
tenantName租户名称string
updateTime更新时间string(date-time)
updater更新用户string
userStatusEnum用户状态,可用值:DISABLED,EXPIRED,NORMALstring
username用户名string
totalinteger(int32)

响应示例:

{
	"items": [
		{
			"accountExpireTime": "",
			"activateToken": "",
			"avatar": "",
			"createTime": "",
			"creator": "",
			"customerId": "",
			"email": "",
			"enabled": false,
			"hasPassword": false,
			"id": "",
			"level": 0,
			"organizationIds": [],
			"password": "",
			"phoneNumber": "",
			"realName": "",
			"remark": "",
			"roleIds": [],
			"roles": [
				{
					"roleId": "",
					"roleName": ""
				}
			],
			"tbUser": "",
			"tenantId": "",
			"tenantName": "",
			"updateTime": "",
			"updater": "",
			"userStatusEnum": "",
			"username": ""
		}
	],
	"total": 0
}

用户详情

接口地址:/api/yt/user/{userId}

请求方式:GET

请求数据类型:application/x-www-form-urlencoded

响应数据类型:*/*

请求参数:

参数名称参数说明请求类型是否必须数据类型
userIduserIdpathtruestring

响应参数:

参数名称参数说明类型
accountExpireTime账号失效时间string(date-time)
activateToken激活tokenstring
avatar头像string
createTime创建时间string(date-time)
creator创建用户string
customerId客户IDstring
email邮箱string
enabled账号状态boolean
hasPassword是否已重置密码boolean
idIDstring
level角色级别:0:超级管理员;1:平台管理员 2:租户账号 3:租户下的账号integer(int32)
organizationIds所辖组织idsarray
password密码string
phoneNumber电话号码string
realName真实名称string
remark备注string
roleIds角色idsarray
roles角色信息列表array
roleId角色IDstring
roleName角色名称string
tbUserTB的UserIdstring
tenantId租户IDstring
tenantName租户名称string
updateTime更新时间string(date-time)
updater更新用户string
userStatusEnum用户状态,可用值:DISABLED,EXPIRED,NORMALstring
username用户名string

响应示例:

{
	"accountExpireTime": "",
	"activateToken": "",
	"avatar": "",
	"createTime": "",
	"creator": "",
	"customerId": "",
	"email": "",
	"enabled": false,
	"hasPassword": false,
	"id": "",
	"level": 0,
	"organizationIds": [],
	"password": "",
	"phoneNumber": "",
	"realName": "",
	"remark": "",
	"roleIds": [],
	"roles": [
		{
			"roleId": "",
			"roleName": ""
		}
	],
	"tbUser": "",
	"tenantId": "",
	"tenantName": "",
	"updateTime": "",
	"updater": "",
	"userStatusEnum": "",
	"username": ""
}

新增用户

接口地址:/api/yt/user{?sendEmail,sendMsg}

请求方式:POST

请求数据类型:application/x-www-form-urlencoded,application/json

响应数据类型:*/*

接口描述:

请求示例:

{
  "accountExpireTime": "",
  "activateToken": "",
  "avatar": "",
  "createTime": "",
  "creator": "",
  "customerId": "",
  "email": "",
  "enabled": false,
  "hasPassword": false,
  "id": "",
  "level": 0,
  "organizationIds": [],
  "password": "",
  "phoneNumber": "",
  "realName": "",
  "remark": "",
  "roleIds": [],
  "roles": [
    {
      "roleId": "",
      "roleName": ""
    }
  ],
  "tbUser": "",
  "tenantId": "",
  "tenantName": "",
  "updateTime": "",
  "updater": "",
  "userStatusEnum": "",
  "username": ""
}

请求参数:

参数名称参数说明请求类型是否必须数据类型
userDTOUserDTObodytrueUserDTO

响应参数:

参数名称参数说明类型
accountExpireTime账号失效时间string(date-time)
activateToken激活tokenstring
avatar头像string
createTime创建时间string(date-time)
creator创建用户string
customerId客户IDstring
email邮箱string
enabled账号状态boolean
hasPassword是否已重置密码boolean
idIDstring
level角色级别:0:超级管理员;1:平台管理员 2:租户账号 3:租户下的账号integer(int32)
organizationIds所辖组织idsarray
password密码string
phoneNumber电话号码string
realName真实名称string
remark备注string
roleIds角色idsarray
roles角色信息列表array
roleId角色IDstring
roleName角色名称string
tbUserTB的UserIdstring
tenantId租户IDstring
tenantName租户名称string
updateTime更新时间string(date-time)
updater更新用户string
userStatusEnum用户状态,可用值:DISABLED,EXPIRED,NORMALstring
username用户名string

响应示例:

{
	"accountExpireTime": "",
	"activateToken": "",
	"avatar": "",
	"createTime": "",
	"creator": "",
	"customerId": "",
	"email": "",
	"enabled": false,
	"hasPassword": false,
	"id": "",
	"level": 0,
	"organizationIds": [],
	"password": "",
	"phoneNumber": "",
	"realName": "",
	"remark": "",
	"roleIds": [],
	"roles": [
		{
			"roleId": "",
			"roleName": ""
		}
	],
	"tbUser": "",
	"tenantId": "",
	"tenantName": "",
	"updateTime": "",
	"updater": "",
	"userStatusEnum": "",
	"username": ""
}

getGroupUserByGroupId(待翻译)

接口地址:/api/yt/user/get_group_user/{groupId}

请求方式:GET

请求数据类型:application/x-www-form-urlencoded

响应数据类型:*/*

请求参数:

参数名称参数说明请求类型是否必须数据类型
groupIdgroupIdpathtruestring

响应参数:

参数名称参数说明类型
accountExpireTime账号失效时间string(date-time)
activateToken激活tokenstring
avatar头像string
createTime创建时间string(date-time)
creator创建用户string
customerId客户IDstring
email邮箱string
enabled账号状态boolean
hasPassword是否已重置密码boolean
idIDstring
level角色级别:0:超级管理员;1:平台管理员 2:租户账号 3:租户下的账号integer(int32)
organizationIds所辖组织idsarray
password密码string
phoneNumber电话号码string
realName真实名称string
remark备注string
roleIds角色idsarray
roles角色信息列表array
roleId角色IDstring
roleName角色名称string
tbUserTB的UserIdstring
tenantId租户IDstring
tenantName租户名称string
updateTime更新时间string(date-time)
updater更新用户string
userStatusEnum用户状态,可用值:DISABLED,EXPIRED,NORMALstring
username用户名string

响应示例:

[
	{
		"accountExpireTime": "",
		"activateToken": "",
		"avatar": "",
		"createTime": "",
		"creator": "",
		"customerId": "",
		"email": "",
		"enabled": false,
		"hasPassword": false,
		"id": "",
		"level": 0,
		"organizationIds": [],
		"password": "",
		"phoneNumber": "",
		"realName": "",
		"remark": "",
		"roleIds": [],
		"roles": [
			{
				"roleId": "",
				"roleName": ""
			}
		],
		"tbUser": "",
		"tenantId": "",
		"tenantName": "",
		"updateTime": "",
		"updater": "",
		"userStatusEnum": "",
		"username": ""
	}
]

获取用户角色和组织

接口地址:/api/yt/user/relation

请求方式:POST

请求数据类型:application/x-www-form-urlencoded,application/json

响应数据类型:*/*

接口描述:

请求示例:

{
  "id": "",
  "queryOrganization": true,
  "queryRole": true,
  "userId": ""
}

请求参数:

参数名称参数说明请求类型是否必须数据类型
roleOrOrganizationReqDTORoleOrOrganizationReqDTObodytrueRoleOrOrganizationReqDTO

响应参数:

参数名称参数说明类型
errorCodePlatform error code:\n2 – General error (HTTP: 500 – Internal Server Error)\n\n10 – Authentication failed (HTTP: 401 – Unauthorized)\n\n11 – JWT token expired (HTTP: 401 – Unauthorized)\n\n15 – Credentials expired (HTTP: 401 – Unauthorized)\n\n20 – Permission denied (HTTP: 403 – Forbidden)\n\n30 – Invalid arguments (HTTP: 400 – Bad Request)\n\n31 – Bad request params (HTTP: 400 – Bad Request)\n\n32 – Item not found (HTTP: 404 – Not Found)\n\n33 – Too many requests (HTTP: 429 – Too Many Requests)\n\n34 – Too many updates (Too many updates over Websocket session)\n\n* 40 – Subscription violation (HTTP: 403 – Forbidden)object
messageError messagestring
statusHTTP Response Status Codeinteger(int32)
timestampTimestampstring(date-time)

响应示例:

[
	{
]