Locators

Get all locators

Enables you to get all locators. Support requests: GET & POST;

POST SERVER_URL/locator/getAll?userHash={userHash}

Request Parameters

Parameter Value
{userHash}

hash of a registered user

0000-0000-0000-0000 - for maps with the public_location flag

JSON Response Example

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
{
        "locators": [
            {
                "id": 65,
                "zoneId": 135,
                "kx": "0.10000000",
                "ky": "0.10000000",
                "name": "Mostsvettorg Kutuzovskaya",
                "uuid": "24B733C8-BCE4-305F-53DF-B827EB199D2E",
                "realX": 50.2,
                "realY": 50.2,
                "x": 50.2,
                "y": 50.2,
                "ip": null,
                "version": null,
                "diskSpace": null,
                "lastActive": null,
                "isProduction": false,
                "objectType": 10
            }
        ]
    }
1

Creating New Locators

Enables you to create a new locator. Support requests: only POST;

POST SERVER_URL/locator/add?userHash={userHash}&sublocationId={sublocationId}

Request Parameters

Parameter Value
{userHash}

hash of a registered user

0000-0000-0000-0000 - for maps with the public_location flag

{sublocationId} ID of a specific location (map), for which you want to create a new locator

JSON body Example

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
{
    "id": 0, // ID of the locator
    "type":"locator", // Object type. "locator" in this case
    "x":"326.7", // X coordinate in the sublocation
    "y":"489.7", // Y coordinate in the sublocation
    "geo":{ // GPS coordinates
        "lat":"12.2342",
        "long":"72.1273"
    },
    "uuid":"32132143-2546-3453-2423-432543645654", // UUID of the locator. Find it either on the locator itself or in the locator configuration software
    "name":"test" // Specify the name for the locator
}

JSON Response Example

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
{
    "response": "ok", // Locator creation result - successful or not
    "id": 4, // ID of the locator
    "type": "locator", // Object type. "locator" in this case
    "x": 326.6999984, // X coordinate in the sublocation
    "y": 489.70000308, // Y coordinate in the sublocation
    "geo": { // GPS coordinates
        "lat": "",
        "long": ""
    },
    "uuid": null, // UUID of the locator
    "name": "test" // Locator's name in the system
}

Removing Locators

Enables you to remove a locator. Support requests: only POST;

POST SERVER_URL/locator/delete?userHash={userHash}

Request Parameters

Parameter Value
{userHash}

hash of a registered user

0000-0000-0000-0000 - for maps with the public_location flag

Body form-data parameters

Parameter Value
{id} ID of the locator that you want to remove.

JSON Request Example

1
2
3
{
    "id": "5"
}

JSON Response Example

1
2
3
4
5
{
    "response": "ok",
    "type": "locator",
    "msg": "the locator deleted"
}