- system
- access
- app
- common
- data
- dict
- log
- module
- ops
- role
- tenant
- user
- notify
- area
- project
- slot
- dept
- job
- open
- data
添加租户
POST
/api/v1/system/tenant/info/create
system/tenant/infosystemTenantInfo
请求参数
Header 参数
Ithings-Project-Id
string
可选
默认值:
{{Ithings-Project-Id}}
Ithings-Token
string
可选
默认值:
{{iThings-token}}
app-code
string
可选
默认值:
{{appCode}}
device-id
string
可选
Body 参数application/json
info
object (TenantInfo)
必需
id
integer <int64>
接口编号
code
string
应用编号
name
string
接口名称
adminUserID
string
可选
adminRoleID
integer <int64>
可选
desc
string
备注
defaultProjectID
integer <int64>
可选
backgroundColour
string
可选
backgroundDesc
string
可选
backgroundImg
string
可选
footer
string
页尾
isUpdateBackgroundImg
boolean
可选
logoImg
string
可选
isUpdateLogoImg
boolean
可选
title
string
可选
titleEn
string
可选
createdTime
string
创建时间
status
integer <int64>
可选
userCount
integer <int64>
租户下的用户统计
adminUserInfo
object (UserCore)
可选
defaultProject
object (ProjectInfo)
可选
adminUserInfo
object (UserInfo)
必需
userID
string
用户id
userName
string
用户名(唯一)
password
string
登录密码
email
string
邮箱
phone
string
手机号
lastIP
string
最后登录ip
regIP
string
注册ip
nickName
string
用户的昵称
city
string
用户所在城市
country
string
用户所在国家
province
string
用户所在省份
language
string
可选
headImg
string
用户头像
isUpdateHeadImg
boolean
用户头像
deviceCount
integer <int64>
可选
createdTime
string
创建时间
role
integer <int64>
用户角色默认
sex
integer <int64>
可选
isAllData
integer <int64>
可选
deptIDs
array[string]
部门ID列表
status
integer <int64>
可选
tags
object
标签对象
messageNotRead
object
可选
roles
array[object (RoleInfo) {6}]
可选
tenant
object (TenantInfo)
可选
projects
array[object (ProjectInfo) {18}]
项目列表
depts
array[object (DeptInfo) {11}]
可选
示例
{
"info": {
"id": 0,
"code": "string",
"name": "string",
"adminUserID": "string",
"adminRoleID": 0,
"desc": "string",
"defaultProjectID": 0,
"backgroundColour": "string",
"backgroundDesc": "string",
"backgroundImg": "string",
"footer": "string",
"isUpdateBackgroundImg": true,
"logoImg": "string",
"isUpdateLogoImg": true,
"title": "string",
"titleEn": "string",
"createdTime": "string",
"status": 0,
"userCount": 0,
"adminUserInfo": {
"userID": "string",
"userName": "string",
"email": "string",
"phone": "string",
"lastIP": "string",
"regIP": "string",
"nickName": "string",
"headImg": "string",
"tags": {},
"createdTime": "string"
},
"defaultProject": {
"createdTime": "string",
"projectID": "string",
"projectName": "string",
"adminUserID": "string",
"position": {
"longitude": 180,
"latitude": 90
},
"address": "string",
"projectImg": "string",
"isSysCreated": 0,
"isUpdateProjectImg": true,
"desc": "string",
"tags": {},
"areaCount": 0,
"userCount": 0,
"deviceCount": 0,
"ppsm": 0,
"area": 0,
"adminUser": {
"userID": "string",
"userName": "string",
"email": "string",
"phone": "string",
"lastIP": "string",
"regIP": "string",
"nickName": "string",
"headImg": "string",
"tags": {},
"createdTime": "string"
},
"areas": [
{
"createdTime": "string",
"projectID": "string",
"areaID": "string",
"parentAreaID": "string",
"areaName": "string",
"position": {
"longitude": 180,
"latitude": 90
},
"desc": "string",
"tags": {},
"lowerLevelCount": 0,
"deviceCount": 0,
"groupCount": 0,
"useBy": "string",
"isLeaf": 0,
"isSysCreated": 0,
"areaIDPath": "string",
"areaNamePath": "string",
"areaImg": "string",
"isUpdateAreaImg": true,
"configFile": "string",
"isUpdateConfigFile": true,
"children": [
{}
]
}
]
}
},
"adminUserInfo": {
"userID": "string",
"userName": "string",
"password": "string",
"email": "string",
"phone": "string",
"lastIP": "string",
"regIP": "string",
"nickName": "string",
"city": "string",
"country": "string",
"province": "string",
"language": "string",
"headImg": "string",
"isUpdateHeadImg": true,
"deviceCount": 0,
"createdTime": "string",
"role": 0,
"sex": 0,
"isAllData": 0,
"deptIDs": [
"string"
],
"status": 0,
"tags": {},
"messageNotRead": {},
"roles": [
{
"id": 0,
"name": "string",
"desc": "string",
"createdTime": 0,
"status": 0,
"code": "string"
}
],
"tenant": {
"id": 0,
"code": "string",
"name": "string",
"adminUserID": "string",
"adminRoleID": 0,
"desc": "string",
"defaultProjectID": 0,
"backgroundColour": "string",
"backgroundDesc": "string",
"backgroundImg": "string",
"footer": "string",
"isUpdateBackgroundImg": true,
"logoImg": "string",
"isUpdateLogoImg": true,
"title": "string",
"titleEn": "string",
"createdTime": "string",
"status": 0,
"userCount": 0,
"adminUserInfo": {
"userID": "string",
"userName": "string",
"email": "string",
"phone": "string",
"lastIP": "string",
"regIP": "string",
"nickName": "string",
"headImg": "string",
"tags": {},
"createdTime": "string"
},
"defaultProject": {
"createdTime": "string",
"projectID": "string",
"projectName": "string",
"adminUserID": "string",
"position": {
"longitude": 180,
"latitude": 90
},
"address": "string",
"projectImg": "string",
"isSysCreated": 0,
"isUpdateProjectImg": true,
"desc": "string",
"tags": {},
"areaCount": 0,
"userCount": 0,
"deviceCount": 0,
"ppsm": 0,
"area": 0,
"adminUser": {
"userID": "string",
"userName": "string",
"email": "string",
"phone": "string",
"lastIP": "string",
"regIP": "string",
"nickName": "string",
"headImg": "string",
"tags": {},
"createdTime": "string"
},
"areas": [
{
"createdTime": "string",
"projectID": "string",
"areaID": "string",
"parentAreaID": "string",
"areaName": "string",
"position": {
"longitude": 180,
"latitude": 90
},
"desc": "string",
"tags": {},
"lowerLevelCount": 0,
"deviceCount": 0,
"groupCount": 0,
"useBy": "string",
"isLeaf": 0,
"isSysCreated": 0,
"areaIDPath": "string",
"areaNamePath": "string",
"areaImg": "string",
"isUpdateAreaImg": true,
"configFile": "string",
"isUpdateConfigFile": true,
"children": [
{}
]
}
]
}
},
"projects": [
{
"createdTime": "string",
"projectID": "string",
"projectName": "string",
"adminUserID": "string",
"position": {
"longitude": 180,
"latitude": 90
},
"address": "string",
"projectImg": "string",
"isSysCreated": 0,
"isUpdateProjectImg": true,
"desc": "string",
"tags": {},
"areaCount": 0,
"userCount": 0,
"deviceCount": 0,
"ppsm": 0,
"area": 0,
"adminUser": {
"userID": "string",
"userName": "string",
"email": "string",
"phone": "string",
"lastIP": "string",
"regIP": "string",
"nickName": "string",
"headImg": "string",
"tags": {},
"createdTime": "string"
},
"areas": [
{
"createdTime": "string",
"projectID": "string",
"areaID": "string",
"parentAreaID": "string",
"areaName": "string",
"position": {
"longitude": 180,
"latitude": 90
},
"desc": "string",
"tags": {},
"lowerLevelCount": 0,
"deviceCount": 0,
"groupCount": 0,
"useBy": "string",
"isLeaf": 0,
"isSysCreated": 0,
"areaIDPath": "string",
"areaNamePath": "string",
"areaImg": "string",
"isUpdateAreaImg": true,
"configFile": "string",
"isUpdateConfigFile": true,
"children": [
{}
]
}
]
}
],
"depts": [
{
"id": "string",
"parentID": "string",
"idPath": "string",
"name": "string",
"sort": 0,
"desc": "string",
"userCount": 0,
"status": 0,
"dingTalkID": "string",
"parent": {},
"children": [
{}
]
}
]
}
}
示例代码
Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
请求示例请求示例
Shell
JavaScript
Java
Swift
curl --location --request POST '/api/v1/system/tenant/info/create' \
--header 'Ithings-Project-Id: {{Ithings-Project-Id}}' \
--header 'Ithings-Token: {{iThings-token}}' \
--header 'app-code: {{appCode}}' \
--header 'device-id;' \
--header 'Content-Type: application/json' \
--data-raw ''
返回响应
🟢200成功
application/json
Body
code
integer
返回code
默认值:
200
msg
string
返回的消息
data
object (WithID)
可选
id
integer <int64>
id
示例
{
"code": "200",
"msg": "string",
"data": {
"id": 0
}
}
修改于 2025-03-25 09:32:22