Position management

Create a position

  • API intent: config.position.create
  • Description: This interface is used to create a (space) location, a tree structure, and can support up to 10 levels.
  • Request parameters
Name Type Is required? Description
positionName String Yes Position name
description int No Position Description
parentPositionId int No Parent position id, is empty when creating top-level location
  • Request Demo
{
  "intent": "config.position.create",
  "data": {
    "positionName": "test room"
  }
}
  • Response parameters
Name Type Description
positionId String Position id
  • Response demo
{
  "code": 0,
  "message": "Success",
  "msgDetails": "",
  "requestId": "",
  "result": {
    "positionId": "real1.836663300479156224"
  }
}

Update position information

  • API intent: config.position.update
  • Description: This interface is used to modify the name and description of the specified (space) location.
  • Request parameters
Name Type Is required? Description
positionId String Yes Position id
positionName String Yes Position Name
description String No Position Description
  • Request Demo
{
  "intent": "config.position.update",
  "data": {
    "positionId": "real1.836663300479156224",
    "positionName": "room"
  }
}
  • Response parameters: NA

  • Response demo

{
  "code": 0,
  "message": "Success",
  "msgDetails": "",
  "requestId": "",
  "result": ""
}

Delete position

  • API intent: config.position.delete
  • Description: This interface is used to delete the specified (space) location. The precondition for deletion: there is no device, multiple-conditions, automation and scene in the current space.
  • Request parameters
Name Type Is required? Description
positionId String Yes Position id
  • Request Demo
{
  "intent": "config.position.delete",
  "data": {
    "positionId": "real1.836663300479156224"
  }
}
  • Response parameters: NA

  • Response demo

{
  "code": 0,
  "message": "Success",
  "msgDetails": "",
  "requestId": "",
  "result": ""
}

Update position timezone

  • API intent: config.position.timeZone
  • Description: This interface is used to set the time zone of the top-level location. After the time zone is set, the timing and time period functions of all device, automation, and scenes under the location tree are executed with the time zone. Only Aqara Account Authorization and Virtual Account Authorization support this function.
  • Request parameters
Name Type Is required? Description
positionId String No Top-level position ID
timeZone String No Time zone, format: GMT+08:00
  • Request Demo
{
  "intent": "config.position.timeZone",
  "data": {
    "positionId":"real1.768799734012641280",
    "timeZone": "GMT+08:00"
  }
}
  • Response parameters: NA

  • Response demo

{
  "code": 0,
  "message": "Success",
  "msgDetails": null,
  "requestId": "",
  "result": ""
}

Query the subordinate position information

  • API intent: query.position.info
  • Description: This interface is used to query the subordinate location information of the specified location.
  • Request parameters
Name Type Is required? Description
parentPositionId String No Parent position ID. When empty, query all positions under the user/project.
pageNum int No Page number, default value is 1. The minimum value is 1.
pageSize int No Number of items per page, default value is 30.
  • Request parameters
{
  "intent": "query.position.info",
  "data": {
    "parentPositionId": "real1.768799734012641280",
    "pageNum": 1,
    "pageSize": 5
  }
}
  • Response parameters
Name Type Description
parentPositionId String Parent position id
positionId String Position id
positionName String Position Name
description String Position Description
createTime String Create time
  • Response demo
{
  "code": 0,
  "message": "Success",
  "msgDetails": "",
  "requestId": "",
  "result": {
    "data": [
      {
        "positionName": "default room",
        "positionId": "real2.768799734306242560",
        "createTime": 1603337732360,
        "description": "",
        "parentPositionId": "real1.768799734012641280"
      }
    ],
    "totalCount": 1
  }
}

Query position details

  • API intent: query.position.detail
  • Description: This interface is used to query the detailed information of the specified location, supports batch query, and supports querying up to 50 locations at the same time.
  • Request parameters
Name Type Is required? Description
positionIds Array(String) Yes Position id array, maximum is 50.
  • Request Demo
{
  "intent": "query.position.detail",
  "data": {
    "positionIds": ["real2.788499435001516032"]
  }
}
  • Response parameters
Name Type Description
parentPositionId String Parent position id
positionId String Position id
positionName String Position name
description String Position description
createTime String Create time
  • Response demo
{
    "code": 0,
    "requestId": "5687.29.16261618415596403",
    "message": "Success",
    "msgDetails": null,
    "result": [
        {
            "positionName": "room",
            "positionId": "real2.788499435001516032",
            "createTime": 1608034514920,
            "description": "",
            "parentPositionId": "real1.788499434967961600"
        }
    ]
}
Copyright © 2023 Lumi United Technology Co., Ltd. all right reserved,powered by GitbookFile Modify: 2024-09-27 21:51:47

results matching ""

    No results matching ""