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

角色分页

接口地址:/api/yt/role{?orderFiled,orderType,page,pageSize,roleName,status}

请求方式:GET

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

响应数据类型:*/*

请求参数:

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

响应参数:

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

响应示例:

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

删除和批量删除角色

接口地址:/api/yt/role

请求方式:DELETE

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

响应数据类型:*/*

请求示例:

[]

请求参数:

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

响应参数:

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

响应示例:

{}

findRoleInfoList(待翻译)

接口地址:/api/yt/role/find/list

请求方式:POST

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

响应数据类型:*/*

请求示例:

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

请求参数:

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

响应参数:

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

响应示例:

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

获取角色权限列表

接口地址:/api/yt/role/me/permissions

请求方式:GET

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

响应数据类型:*/*

请求参数:暂无

响应参数:

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

请求方式:POST

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

响应数据类型:*/*

请求示例:

{
  "id": "",
  "menu": [],
  "name": "",
  "remark": "",
  "roleType": "",
  "status": 0
}

请求参数:

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

响应参数:

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

响应示例:

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

pageTenantRole(待翻译)

接口地址:/api/yt/role/tenant{?orderFiled,orderType,page,pageSize,roleName,status}

请求方式:GET

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

响应数据类型:*/*

请求参数:

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

响应参数:

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

响应示例:

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

修改角色状态

接口地址:/api/yt/role/update_status/{roleId}/{status}

请求方式:PUT

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

响应数据类型:*/*

请求参数:

参数名称参数说明请求类型是否必须数据类型
roleIdroleIdpathtruestring
statusstatuspathtrueinteger(int32)

响应参数:

暂无

响应示例: