Create device group

POST
{host}/create_group
create a new device group, you can only create up to 50 groups.

Request

Body Parameters
name
(required)
string
custom group name

Response

Name Description
group_name Group name
group_uuid Device group unique identification

Example request

curl --request POST \
     --url '{host}/create_group' \
     --user '<username>:<password>' \
     --header 'content-type: application/x-www-form-urlencoded' \
     --data '{"name":"device group name"}' \
     --include

{
    "code": "0",
    "data": {
        "group_name": "test group",
        "group_uuid": "478ED9E2A290F401"
    }
}

History version

version description
Sensecap V1 Maintenance stopped, not recommended

Update device group information

POST
{host}/update_group
update the device group name

Request

Body Parameters
group_uuid
(required)
string
the group unique identification
name
(required)
string
the new name of device group

Example request

curl --request POST \
     --url '{host}/update_group' \
     --user '<username>:<password>' \
     --header 'content-type: application/x-www-form-urlencoded' \
     --data '{"group_uuid":"259B1906C3B38481", "name":"new name of the device group"}' \
     --include

{
    "code": "0",
    "data": {}
}

Delete a device group

POST
{host}/delete_group
delete a device group and the devices will be moved to the Default group.

Request

Query Parameters
group_uuid
(required)
string
the group unique identification

Example request

curl --request POST \
     --url '{host}/delete_group?group_uuid=0C32119F38C89C31' \
     --user '<username>:<password>' \
     --header 'content-type: application/json' \
     --include
     
{
    "code": "0",
    "data": {}
}

List device group

GET
{host}/list_groups
get the list of all groups

Response

Name Description
group_name Group name
group_uuid Device group unique identification

Example request

curl --request GET \
     --url '{host}/list_groups' \
     --user '<username>:<password>' \
     --include
     
{
    "code": "0",
    "data": [
        {
            "group_name": "Default",
            "group_uuid": ""
        },
        {
            "group_name": "test group",
            "group_uuid": "80523B280630E611"
        },
        {
            "group_name": "demo",
            "group_uuid": "EBAD5387C4FC8711"
        }
    ]
}

History version

version description
Sensecap V1 Maintenance stopped, not recommended

Move device to other group

DELETE
{host}/move_devices_to

Request

Path Parameters
group_uuid
(required)
string
the group unique identification
which the devices will be moved to
Body Parameters
devices
(required)
array
device EUI

Example request

curl --request POST \
     --url '{host}/move_devices_to' \
     --user '<username>:<password>' \
     --header 'content-type: application/x-www-form-urlencoded' \
     --data '{"devices":["2CF7F12004100001","2CF7F12004100002"], "group_uuid": "0BC724D9F32AD934"}' \
     --include

{
    "code": "0",
    "data": {}
}