Last Updated on : 2025-05-30 01:56:03download
Construction staff management. The construction staff can log in the Smart Engineering APP or the construction SDK to carry out construction, equipment distribution network, equipment maintenance and other operations in the room.
Request method | API | description |
---|---|---|
GET | /v1.0/osaas/construction/workers | API for Querying the Construction Worker List. |
POST | /v1.0/osaas/construction/worker | API for Adding a Construction Worker. |
DELETE | /v1.0/osaas/construction/workers/{worker_id} | API for Deleting a Construction Worker. |
You can use this API to query the construction worker list.
GET /v1.0/osaas/construction/workers
Parameter | Type | Position | Description | Mandatory |
---|---|---|---|---|
page_no | Integer | URL | Page number. The default value is 1. | No |
page_size | Integer | URL | Number of records on a page, which is greater than 0 and less than 100. If this parameter is not set, the number is 20 by default. | No |
Parameter | Type | Description |
---|---|---|
code | Integer | Response code.Null indicates success. |
success | Boolean | Request result. true: success false: failure |
msg | String | Exception message.It is null when the request result is success. |
t | Long | Response time, which is a 13-digit timestamp. |
result | Object | Result object. |
Parameters in result
Parameter | Type | Description |
---|---|---|
total | Integer | Total number of records. |
page_no | Integer | Page number. |
page_size | Integer | Number of records on a page. |
tasks | Arrays | Worker list. |
Parameters in workers
Parameter | Type | Description |
---|---|---|
worker_id | String | Unique ID of a worker. |
username | String | Worker username. |
nickname | String | Worker nickname. |
GET {url}/v1.0/osaas/construction/workers?page_no=1&page_size=20
{
"result": {
"total": 1,
"page_no": 1,
"page_size": 20,
"workers": [
{
"worker_id": "130641181272348xxxx",
"username": "test@tuya.com",
"nickname": "Test worker"
}
]
},
"success": true,
"t": 1572936751228
}
{
"code": 500,
"msg": "system error,please contact the admin",
"success": false,
"t": 1561378856383
}
You can use this API to add a construction worker.
POST /v1.0/osaas/construction/worker
Parameter | Type | Position | Description | Mandatory |
---|---|---|---|---|
country_code | String | BODY | Country code. 86: China | Yes |
username | String | BODY | Worker username. | Yes |
nickname | String | BODY | Worker nickname. | Yes |
Parameter | Type | Description |
---|---|---|
code | Integer | Response code.Null indicates success. |
success | Boolean | Request result. true: success false: failure |
msg | String | Exception message.It is null when the request result is success. |
t | Long | Response time, which is a 13-digit timestamp. |
result | String | Unique ID of worker. |
POST {url}/v1.0/osaas/construction/worker
{
"country_code": "86",
"username": "test@tuya.com",
"nickname": "Test worker"
}
{
"success": true,
"result": "1112382396505******",
"t": 1566053034624
}
{
"code": 500,
"msg": "system error,please contact the admin",
"success": false,
"t": 1561378856383
}
You can use this API to delete a construction worker.
DELETE /v1.0/osaas/construction/workers/{worker_id}
Parameter | Type | Position | Description | Mandatory |
---|---|---|---|---|
worker_id | String | URI | Unique ID of an worker. | Yes |
Parameter | Type | Description |
---|---|---|
code | Integer | Response code.Null indicates success. |
success | Boolean | Request result. true: success false: failure |
msg | String | Exception message.It is null when the request result is success. |
t | Long | Response time, which is a 13-digit timestamp. |
result | Boolean | Operation result. |
DELETE {url}/v1.0/osaas/construction/workers/13064118127******
{
"success": true,
"result": true,
"t": 1566053034624
}
{
"code": 500,
"msg": "system error,please contact the admin",
"success": false,
"t": 1561378856383
}
The following are common business exceptions for this interface. For more exception errors, see Global Error Codes.
error code | explain |
---|---|
500 | system error |
Is this page helpful?
YesFeedbackIs this page helpful?
YesFeedback