Locations

Get Full List of Locations

Support requests: GET & POST

Request Example:

GET SERVER_URL/locations/getAll?userHash={userHash}

Returns the full list of locations for the selected user.

Request Parameters

Parameter Value
{userHash} Hash of the registered user

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
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
    {
       "response":"ok",
       "locations":[
              {
                     "id":1403,
                     "title":"ggggg",
                     "description":"",
                     "is_public":false,
                     "sub_locations":[
                            {
                               "zoneId":2580,
                               "id":2580,
                               "title":"g1",
                               "map_id":1403,
                               "w":"27.00000",
                               "h":"27.00000",
                               "lat":"0.000000000000",
                               "lon":"0.000000000000",
                               "hor":"0.00000",
                               "pw":"2078.00000",
                               "ph":"2081.00000"
                            }
                     ]
              },
              {
                     "id":1404,
                     "title":"434",
                     "description":"",
                     "is_public":false,
                     "sub_locations":[
                            {
                               "zoneId":2581,
                               "id":2581,
                               "title":"4343",
                               "map_id":1404,
                               "w":"27.00000",
                               "h":"14.00000",
                               "lat":"0.000000000000",
                               "lon":"0.000000000000",
                               "hor":"0.00000",
                               "pw":"295.00000",
                               "ph":"160.00000"
                            }
                     ]
              },
              {
                     "id":1407,
                     "title":"5333",
                     "description":"",
                     "is_public":false,
                     "sub_locations":[

                     ]
              },
              {
                     "id":1408,
                     "title":"4545454",
                     "description":"",
                     "is_public":false,
                     "sub_locations":[
                            {
                               "zoneId":2589,
                               "id":2589,
                               "title":"4324324324",
                               "map_id":1408,
                               "w":"27.00000",
                               "h":"11.00000",
                               "lat":"53.900000000000",
                               "lon":"27.566700000000",
                               "hor":"0.00000",
                               "pw":"7000.00000",
                               "ph":"2916.00000"
                            }
                     ]
              },
              {
                     "id":1433,
                     "title":"testYYY",
                     "description":"sdsadasdasdasd",
                     "is_public":false,
                     "sub_locations":[

                     ]
              },
              {
                     "id":1434,
                     "title":"zzd3sa",
                     "description":"23",
                     "is_public":false,
                     "sub_locations":[

                     ]
              },
              {
                     "id":1263,
                     "title":"venue",
                     "description":"",
                     "is_public":false,
                     "sub_locations":[
                            {
                               "zoneId":2384,
                               "id":2384,
                               "title":"1",
                               "map_id":1263,
                               "w":"438.10023",
                               "h":"533.41911",
                               "lat":"0.000000000000",
                               "lon":"0.000000000000",
                               "hor":"1.00000",
                               "pw":"956.00000",
                               "ph":"1164.00000"
                            },
                            {
                               "zoneId":2389,
                               "id":2389,
                               "title":"2",
                               "map_id":1263,
                               "w":"513.26963",
                               "h":"624.94335",
                               "lat":"0.000000000000",
                               "lon":"0.000000000000",
                               "hor":"1.00000",
                               "pw":"900.00000",
                               "ph":"2900.00000"
                            }
                     ]
              },
              {
                     "id":1240,
                     "title":"test_barrier",
                     "description":"",
                     "is_public":false,
                     "sub_locations":[
                            {
                               "zoneId":2331,
                               "id":2331,
                               "title":"1",
                               "map_id":1240,
                               "w":"603.14289",
                               "h":"604.01365",
                               "lat":"0.000000000000",
                               "lon":"0.000000000000",
                               "hor":"1.00000",
                               "pw":"2078.00000",
                               "ph":"2081.00000"
                            },
                            {
                               "zoneId":2338,
                               "id":2338,
                               "title":"2",
                               "map_id":1240,
                               "w":"480.15282",
                               "h":"584.62122",
                               "lat":"0.000000000000",
                               "lon":"0.000000000000",
                               "hor":"0.00000",
                               "pw":"956.00000",
                               "ph":"1164.00000"
                            }
                     ]
              },
              {
                     "id":1197,
                     "title":"\u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u043a\u0430\u0440\u0442\u044b",
                     "description":"",
                     "is_public":false,
                     "sub_locations":[
                            {
                               "zoneId":2219,
                               "id":2219,
                               "title":"\u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u0437\u043e\u043d\u044b",
                               "map_id":1197,
                               "w":"27.00000",
                               "h":"27.00000",
                               "lat":"0.000000000000",
                               "lon":"0.000000000000",
                               "hor":"1.00000",
                               "pw":"2078.00000",
                               "ph":"2081.00000"
                            }
                     ]
              },
              {
                     "id":1090,
                     "title":"test",
                     "description":"",
                     "is_public":true,
                     "sub_locations":[
                            {
                               "zoneId":2094,
                               "id":2094,
                               "title":"1",
                               "map_id":1090,
                               "w":"30.06591",
                               "h":"30.10931",
                               "lat":"0.000000000000",
                               "lon":"0.000000000000",
                               "hor":"0.00000",
                               "pw":"0.00000",
                               "ph":"0.00000"
                            },
                            {
                               "zoneId":2125,
                               "id":2125,
                               "title":"2",
                               "map_id":1090,
                               "w":"46.26708",
                               "h":"46.33388",
                               "lat":"0.000000000000",
                               "lon":"0.000000000000",
                               "hor":"1.00000",
                               "pw":"2078.00000",
                               "ph":"2081.00000"
                            }
                     ]
              },
              {
                     "id":1340,
                     "title":"testApi",
                     "description":"",
                     "is_public":false,
                     "sub_locations":[
                            {
                               "zoneId":2490,
                               "id":2490,
                               "title":"1",
                               "map_id":1340,
                               "w":"27.00000",
                               "h":"32.00000",
                               "lat":"53.000000000000",
                               "lon":"27.000000000000",
                               "hor":"0.00000",
                               "pw":"956.00000",
                               "ph":"1164.00000"
                            },
                            {
                               "zoneId":2640,
                               "id":2640,
                               "title":"testapi1",
                               "map_id":1340,
                               "w":"0.00000",
                               "h":"0.00000",
                               "lat":"32.000000000000",
                               "lon":"34.000000000000",
                               "hor":"45.00000",
                               "pw":"0.00000",
                               "ph":"0.00000"
                            },
                            {
                               "zoneId":2641,
                               "id":2641,
                               "title":"testapi2",
                               "map_id":1340,
                               "w":"0.00000",
                               "h":"0.00000",
                               "lat":"32.000000000000",
                               "lon":"34.000000000000",
                               "hor":"45.00000",
                               "pw":"0.00000",
                               "ph":"0.00000"
                            },
                            {
                               "zoneId":2642,
                               "id":2642,
                               "title":"testapi4",
                               "map_id":1340,
                               "w":"0.00000",
                               "h":"0.00000",
                               "lat":"32.000000000000",
                               "lon":"34.000000000000",
                               "hor":"45.00000",
                               "pw":"0.00000",
                               "ph":"0.00000"
                            },
                            {
                               "zoneId":2643,
                               "id":2643,
                               "title":"testapi5",
                               "map_id":1340,
                               "w":"526.00000",
                               "h":"233.00000",
                               "lat":"32.000000000000",
                               "lon":"34.000000000000",
                               "hor":"45.00000",
                               "pw":"526.00000",
                               "ph":"233.00000"
                            },
                            {
                               "zoneId":2644,
                               "id":2644,
                               "title":"testapi6",
                               "map_id":1340,
                               "w":"526.00000",
                               "h":"233.00000",
                               "lat":"32.000000000000",
                               "lon":"34.000000000000",
                               "hor":"45.00000",
                               "pw":"526.00000",
                               "ph":"233.00000"
                            }
                     ]
              }
       ]
    }

Get Info about Location

Returns information about the location for the selected user. Support requests: GET & POST

Request Example:

GET SERVER_URL/locations/get?userHash={userHash}&locationId={locationId}

Request Parameters

Parameter Value
{userHash} Hash of the registered user
{locationId} ID of the location

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
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
    {
       "response":"ok",
       "id":1340,
       "title":"testApi",
       "description":"",
       "is_public":false,
       "sub_locations":[
              {
                     "zoneId":2490,
                     "id":2490,
                     "title":"1",
                     "map_id":1340,
                     "w":"27.00000",
                     "h":"32.00000",
                     "lat":"53.000000000000",
                     "lon":"27.000000000000",
                     "hor":"0.00000",
                     "pw":"956.00000",
                     "ph":"1164.00000"
              },
              {
                     "zoneId":2640,
                     "id":2640,
                     "title":"testapi1",
                     "map_id":1340,
                     "w":"0.00000",
                     "h":"0.00000",
                     "lat":"32.000000000000",
                     "lon":"34.000000000000",
                     "hor":"45.00000",
                     "pw":"0.00000",
                     "ph":"0.00000"
              },
              {
                     "zoneId":2641,
                     "id":2641,
                     "title":"testapi2",
                     "map_id":1340,
                     "w":"0.00000",
                     "h":"0.00000",
                     "lat":"32.000000000000",
                     "lon":"34.000000000000",
                     "hor":"45.00000",
                     "pw":"0.00000",
                     "ph":"0.00000"
              },
              {
                     "zoneId":2642,
                     "id":2642,
                     "title":"testapi4",
                     "map_id":1340,
                     "w":"0.00000",
                     "h":"0.00000",
                     "lat":"32.000000000000",
                     "lon":"34.000000000000",
                     "hor":"45.00000",
                     "pw":"0.00000",
                     "ph":"0.00000"
              },
              {
                     "zoneId":2643,
                     "id":2643,
                     "title":"testapi5",
                     "map_id":1340,
                     "w":"526.00000",
                     "h":"233.00000",
                     "lat":"32.000000000000",
                     "lon":"34.000000000000",
                     "hor":"45.00000",
                     "pw":"526.00000",
                     "ph":"233.00000"
              },
              {
                     "zoneId":2644,
                     "id":2644,
                     "title":"testapi6",
                     "map_id":1340,
                     "w":"526.00000",
                     "h":"233.00000",
                     "lat":"32.000000000000",
                     "lon":"34.000000000000",
                     "hor":"45.00000",
                     "pw":"526.00000",
                     "ph":"233.00000"
              }
       ]
    }

Creating Locations

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

POST SERVER_URL/locations/add?userHash={userHash}

Request parameters

Parameter Value
{userHash} Hash of the registered user

Body form-data parameters

Parameter Value
{title} Name of the location that you want to create
{description} New location description
{publicLocation}

Takes one of the following input values:

1 - if you want to make the location public 0 - if you don't want to make the location public

JSON Request Example

1
2
3
4
5
    {
       "title":"title",
       "description": "description",
       "publicLocation": "1",
    }

JSON Response Example

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
    {
        "response": "ok",
        "id": 2300,
        "title": "test_api",
        "description": "test_description",
        "sort": 0,
        "state": false,
        "is_public": false,
        "userRoleId": null,
        "userPermissionId": null
    }

Editing Locations

Enables to edit an existing location. Support requests: only POST;

POST SERVER_URL/locations/edit?userHash={userHash}&locationId={locationId}

Request parameters

Parameter Value
{userHash} Hash of the registered user
{locationId} Id of the location that you want to modify.

Body form-data parameters

Parameter Value
{title} Name of the location that you want to create
{description} New location description
{locationId} Id of the location that you want to modify.
{publicLocation}

Takes one of the following input values:

1 - if you want to make the location public 0 - if you don't want to make the location public

JSON Body Request Example

1
2
3
4
5
6
    {
       "title":"new_title",
       "description": "new_description",
       "locationId": 0000,
       "publicLocation": "0",
    }

JSON Response Example

1
2
3
4
5
6
7
    {
       "response":"ok",
       "id":1439,
       "title":"testapi1_2",
       "description":"4sdsadsdsadsds",
       "is_public":true
    }

Deleting a Location

Enables to remove selected location.

POST SERVER_URL/locations/delete?userHash={userHash}&locationId={locationId}

Request Parameters

Parameter Value
{userHash} Hash of the registered user
{locationId} Id of the location that you want to delete.

JSON Response Example

1
2
3
    {
       "response":"ok"
    }