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

getMyMenus(待翻译)

接口地址:/api/yt/admin/me/menus{?needButton}

请求方式:GET

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

响应数据类型:*/*

请求参数:

响应参数:

参数名称参数说明类型
caseSensitive区分大小写boolean
children子节点array
caseSensitive区分大小写boolean
children子节点array
component组件路径string
createTime创建时间string(date-time)
creator创建用户string
idIDstring
meta元数据JsonNode
name菜单名称string
parentId上级IDstring
path路由地址string
permission权限标识string
redirect重定向地址string
sort排序字段integer(int32)
type菜单类型,可用值:CUSTOM,SYSADMINstring
updateTime更新时间string(date-time)
updater更新用户string
component组件路径string
createTime创建时间string(date-time)
creator创建用户string
idIDstring
meta元数据JsonNode
name菜单名称string
parentId上级IDstring
path路由地址string
permission权限标识string
redirect重定向地址string
sort排序字段integer(int32)
type菜单类型,可用值:CUSTOM,SYSADMINstring
updateTime更新时间string(date-time)
updater更新用户string

响应示例:

[
	{
		"caseSensitive": false,
		"children": [
			{
				"caseSensitive": false,
				"children": [],
				"component": "",
				"createTime": "",
				"creator": "",
				"id": "",
				"meta": "",
				"name": "",
				"parentId": "",
				"path": "",
				"permission": "",
				"redirect": "",
				"sort": 0,
				"type": "",
				"updateTime": "",
				"updater": ""
			}
		],
		"component": "",
		"createTime": "",
		"creator": "",
		"id": "",
		"meta": {},
		"name": "",
		"parentId": "",
		"path": "",
		"permission": "",
		"redirect": "",
		"sort": 0,
		"type": "",
		"updateTime": "",
		"updater": ""
	}
]

assignMenuToTenant(待翻译)

接口地址:/api/yt/admin/menu/assign/{tenantId}

请求方式:PUT

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

响应数据类型:*/*

接口描述:

请求示例:

[]

请求参数:

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

响应参数:

暂无

响应示例:

getMenus(待翻译)

接口地址:/api/yt/admin/menu/getAll

请求方式:GET

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

响应数据类型:*/*

请求参数:

暂无

响应参数:

参数名称参数说明类型
caseSensitive区分大小写boolean
children子节点array
caseSensitive区分大小写boolean
children子节点array
component组件路径string
createTime创建时间string(date-time)
creator创建用户string
idIDstring
meta元数据JsonNode
name菜单名称string
parentId上级IDstring
path路由地址string
permission权限标识string
redirect重定向地址string
sort排序字段integer(int32)
type菜单类型,可用值:CUSTOM,SYSADMINstring
updateTime更新时间string(date-time)
updater更新用户string
component组件路径string
createTime创建时间string(date-time)
creator创建用户string
idIDstring
meta元数据JsonNode
name菜单名称string
parentId上级IDstring
path路由地址string
permission权限标识string
redirect重定向地址string
sort排序字段integer(int32)
type菜单类型,可用值:CUSTOM,SYSADMINstring
updateTime更新时间string(date-time)
updater更新用户string

响应示例:

[
	{
		"caseSensitive": false,
		"children": [
			{
				"caseSensitive": false,
				"children": [],
				"component": "",
				"createTime": "",
				"creator": "",
				"id": "",
				"meta": "",
				"name": "",
				"parentId": "",
				"path": "",
				"permission": "",
				"redirect": "",
				"sort": 0,
				"type": "",
				"updateTime": "",
				"updater": ""
			}
		],
		"component": "",
		"createTime": "",
		"creator": "",
		"id": "",
		"meta": {},
		"name": "",
		"parentId": "",
		"path": "",
		"permission": "",
		"redirect": "",
		"sort": 0,
		"type": "",
		"updateTime": "",
		"updater": ""
	}
]

updateTenant(待翻译)

接口地址:/api/yt/admin/tenant

请求方式:PUT

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

响应数据类型:*/*

请求示例:

{
  "createTime": "",
  "creator": "",
  "defaultConfig": "",
  "description": "",
  "enabled": false,
  "icon": "",
  "id": "",
  "name": "",
  "roleIds": [],
  "tenantExpireTime": "",
  "tenantId": "",
  "tenantProfileId": "",
  "tenantStatus": "",
  "updateTime": "",
  "updater": ""
}

请求参数:

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

响应参数:

参数名称参数说明类型
createTime创建时间string(date-time)
creator创建用户string
defaultConfig租户默认配置string
description租户描述string
enabled租户状态:启用/禁用boolean
icon租户图标string
idIDstring
name租户名称string
roleIds租户角色列表array
tenantExpireTime租户到期时间string(date-time)
tenantId租户IDstring
tenantProfileId租户配置string
tenantStatus可用值:DISABLED,EXPIRED,NORMALstring
updateTime更新时间string(date-time)
updater更新用户string

响应示例:

{
	"createTime": "",
	"creator": "",
	"defaultConfig": "",
	"description": "",
	"enabled": false,
	"icon": "",
	"id": "",
	"name": "",
	"roleIds": [],
	"tenantExpireTime": "",
	"tenantId": "",
	"tenantProfileId": "",
	"tenantStatus": "",
	"updateTime": "",
	"updater": ""
}

deleteTenant(待翻译)

接口地址:/api/yt/admin/tenant

请求方式: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)

响应示例:

{}

createTenantAdmin(待翻译)

接口地址:/api/yt/admin/tenant/adminUser{?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": ""
}

getTenant(待翻译)

接口地址:/api/yt/admin/tenant/getById/{id}

请求方式:GET

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

响应数据类型:*/*

请求参数:

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

响应参数:

参数名称参数说明类型
createTime创建时间string(date-time)
creator创建用户string
defaultConfig租户默认配置string
description租户描述string
enabled租户状态:启用/禁用boolean
icon租户图标string
idIDstring
name租户名称string
roleIds租户角色列表array
tenantExpireTime租户到期时间string(date-time)
tenantId租户IDstring
tenantProfileId租户配置string
tenantStatus可用值:DISABLED,EXPIRED,NORMALstring
updateTime更新时间string(date-time)
updater更新用户string

响应示例:

{
	"createTime": "",
	"creator": "",
	"defaultConfig": "",
	"description": "",
	"enabled": false,
	"icon": "",
	"id": "",
	"name": "",
	"roleIds": [],
	"tenantExpireTime": "",
	"tenantId": "",
	"tenantProfileId": "",
	"tenantStatus": "",
	"updateTime": "",
	"updater": ""
}

pageUser(待翻译)

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

请求方式:GET

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

响应数据类型:*/*

请求参数:

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

响应参数:

参数名称参数说明类型
itemsarray
createTime创建时间string(date-time)
creator创建用户string
defaultConfig租户默认配置string
description租户描述string
enabled租户状态:启用/禁用boolean
icon租户图标string
idIDstring
name租户名称string
roleIds租户角色列表array
tenantExpireTime租户到期时间string(date-time)
tenantId租户IDstring
tenantProfileId租户配置string
tenantStatus可用值:DISABLED,EXPIRED,NORMALstring
updateTime更新时间string(date-time)
updater更新用户string
totalinteger(int32)

响应示例:

{
	"items": [
		{
			"createTime": "",
			"creator": "",
			"defaultConfig": "",
			"description": "",
			"enabled": false,
			"icon": "",
			"id": "",
			"name": "",
			"roleIds": [],
			"tenantExpireTime": "",
			"tenantId": "",
			"tenantProfileId": "",
			"tenantStatus": "",
			"updateTime": "",
			"updater": ""
		}
	],
	"total": 0
}

getTenantRolesByTenantId(待翻译)

接口地址:/api/yt/admin/tenant/roles/{tenantId}

请求方式:GET

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

响应数据类型:*/*

请求参数:

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

响应参数:

参数名称参数说明类型
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)

响应示例:

[
	{}
]

updateOrCreateTenant(待翻译)

接口地址:/api/yt/admin/tenant/updateOrCreateTenant

请求方式:POST

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

响应数据类型:*/*

请求示例:

{
  "defaultConfig": "",
  "description": "",
  "enabled": true,
  "icon": "",
  "id": "",
  "name": "",
  "roleIds": [],
  "tenantExpireTime": "",
  "tenantId": "",
  "tenantProfileId": {
    "entityType": "TENANT_PROFILE",
    "id": "784f394c-42b6-435a-983c-b7beff2784f9"
  },
  "tenantStatus": ""
}

请求参数:

参数名称参数说明请求类型是否必须数据类型
tenantReqDTOTenantReqDTObodytrueTenantReqDTO
nametruestring
roleIdstruearray
entityTypestring,可用值:TENANT_PROFILEtruestring
idID of the entity, time-based UUID v1truestring

响应参数:

参数名称参数说明类型
createTime创建时间string(date-time)
creator创建用户string
defaultConfig租户默认配置string
description租户描述string
enabled租户状态:启用/禁用boolean
icon租户图标string
idIDstring
name租户名称string
roleIds租户角色列表array
tenantExpireTime租户到期时间string(date-time)
tenantId租户IDstring
tenantProfileId租户配置string
tenantStatus可用值:DISABLED,EXPIRED,NORMALstring
updateTime更新时间string(date-time)
updater更新用户string

响应示例:

{
	"createTime": "",
	"creator": "",
	"defaultConfig": "",
	"description": "",
	"enabled": false,
	"icon": "",
	"id": "",
	"name": "",
	"roleIds": [],
	"tenantExpireTime": "",
	"tenantId": "",
	"tenantProfileId": "",
	"tenantStatus": "",
	"updateTime": "",
	"updater": ""
}

deleteTenantAdmin(待翻译)

接口地址:/api/yt/admin/user/deleteTenantAdmin

请求方式: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)

响应示例:

{}