Документация предоставляет всю информацию, необходимую вам для работы с нашим API.
Для аутентификации запросов передайте Authorization заголовок со значением "Bearer {YOUR_AUTH_KEY}".
Все аутентифицированные конечные точки помечены как requires authentication в документации ниже.
Принимается JWT токен, выданный сервисом пользователей.
Вы можете получить токен пользователя с помощью этого метода.
Если используется сервисный токен, также необходимо передать заголовок X-User-ID с ID пользователя.
(последние 500 точек)
Требуемые разрешения: users:positions
Идентификатор (UUID)
curl --request GET \
--get "https://positioning.stage.odinn.cloud/api/v1/positions/user/7680261c-ce29-3185-a9c0-e31ca37ca72d" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" cache-control
: no-cache, private
content-type
: application/json
access-control-allow-origin
: *
{
"message": "Unauthorized"
}
(последние 500 точек)
curl --request GET \
--get "https://positioning.stage.odinn.cloud/api/v1/positions/current" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" cache-control
: no-cache, private
content-type
: application/json
access-control-allow-origin
: *
{
"message": "Unauthorized"
}
Требуемые разрешения: spaces:list
Номер страницы.
Количество элементов, возвращаемых на странице. По умолчанию 50.
curl --request GET \
--get "https://positioning.stage.odinn.cloud/api/v1/spaces?page=1&page-size=50" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" cache-control
: no-cache, private
content-type
: application/json
access-control-allow-origin
: *
{
"message": "Unauthorized"
}
Требуемые разрешения: spaces:create
curl --request POST \
"https://positioning.stage.odinn.cloud/api/v1/spaces" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"name\": \"bf\",
\"width\": 72,
\"height\": 77,
\"image_offset_x\": 4379.7,
\"image_offset_y\": 1.299751187,
\"image_scale\": 45,
\"notes\": \"zlsmiysehyvpjntngdvud\"
}"
{
"message": "User does not have any of permissions: spaces:create"
}
Требуемые разрешения: spaces:update
Идентификатор (UUID)
curl --request PUT \
"https://positioning.stage.odinn.cloud/api/v1/spaces/e73f6942-77f6-3485-99b6-7a5b419656a9" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"name\": \"vyqqrq\",
\"width\": 89,
\"height\": 73,
\"image_offset_x\": 39.818,
\"image_offset_y\": 12751817.2068311,
\"image_scale\": 49,
\"notes\": \"xcoiyvywfryirewaegl\"
}"
{
"message": "User does not have any of permissions: spaces:update"
}
Требуемые разрешения: spaces:list
Идентификатор (UUID)
curl --request GET \
--get "https://positioning.stage.odinn.cloud/api/v1/spaces/88b35852-6778-3b80-b78a-510d22ce592d" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" cache-control
: no-cache, private
content-type
: application/json
access-control-allow-origin
: *
{
"message": "Unauthorized"
}
Требуемые разрешения: spaces:delete
Идентификатор (UUID)
curl --request DELETE \
"https://positioning.stage.odinn.cloud/api/v1/spaces/e8b4d1e1-f81c-3b1e-b459-4f2c309bb665" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" {
"message": "User does not have any of permissions: spaces:delete"
}
Идентификатор (UUID)
curl --request POST \
"https://positioning.stage.odinn.cloud/api/v1/spaces/6eb24a32-834e-35b2-b21a-19f15ee85fca/image" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
Координаты измеряются в безарзмерных единицах от помещения (не от зоны). Зона находится автоматически по переданным координатам и границам зон (включительно).
Идентификатор (UUID)
curl --request POST \
"https://positioning.stage.odinn.cloud/api/v1/spaces/18790e0e-0b66-3236-a009-8542d579067b/position" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"x\": 15,
\"y\": 30,
\"z\": 81,
\"lat\": 58,
\"long\": 36
}"
Идентификатор (UUID)
curl --request DELETE \
"https://positioning.stage.odinn.cloud/api/v1/spaces/490e267c-f0e0-3563-85b7-8e2585efdfb0/image" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" Требуемые разрешения: zones:list
Номер страницы.
Количество элементов, возвращаемых на странице. По умолчанию 50.
curl --request GET \
--get "https://positioning.stage.odinn.cloud/api/v1/zones?page=1&page-size=50" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" cache-control
: no-cache, private
content-type
: application/json
access-control-allow-origin
: *
{
"message": "Unauthorized"
}
Требуемые разрешения: zones:create
curl --request POST \
"https://positioning.stage.odinn.cloud/api/v1/zones" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"name\": \"dmlhheawfjsiubw\",
\"space\": {
\"id\": \"95b1b967-998d-37fa-b0f3-85762f275cd0\"
},
\"is_wifi_available\": true,
\"ssid\": \"mxqnafuvm\",
\"wifi_password\": \"yxhqjsccaawltbj\",
\"points\": [
{
\"x\": 63,
\"y\": 37,
\"z\": 66
}
],
\"color\": \"vf\",
\"notes\": \"oxqaqeqrmkqpumg\",
\"denied_duties\": [
{
\"id\": \"d565f195-f84e-34fd-9dd8-bcf7232c48df\"
}
],
\"allowed_duties\": [
{
\"id\": \"8d1bae79-663a-3171-bab7-b40f812d07a8\"
}
]
}"
{
"message": "User does not have any of permissions: zones:create"
}
Требуемые разрешения: zones:update
Идентификатор (UUID)
curl --request PUT \
"https://positioning.stage.odinn.cloud/api/v1/zones/b3f22223-9947-3e58-a735-1de6b7145fd4" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"name\": \"nraafcrlpiomkk\",
\"space\": {
\"id\": \"d9786f92-18ee-360b-8ccb-ec532a223d6a\"
},
\"is_wifi_available\": true,
\"ssid\": \"ztiebsvycloywht\",
\"wifi_password\": \"bixbtprw\",
\"points\": [
{
\"x\": 7,
\"y\": 21,
\"z\": 13
}
],
\"color\": \"emdaxia\",
\"notes\": \"nhzrlxqgoavvn\",
\"denied_duties\": [
{
\"id\": \"201e8c25-2561-38de-a6af-e125d74f733a\"
}
],
\"allowed_duties\": [
{
\"id\": \"645068a9-dc86-30a7-aa0a-076a99f18300\"
}
]
}"
{
"message": "User does not have any of permissions: zones:update"
}
Требуемые разрешения: zones:list
Идентификатор (UUID)
curl --request GET \
--get "https://positioning.stage.odinn.cloud/api/v1/zones/f3d6e87f-b211-3a8a-bed4-b45e0661ffc4" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" cache-control
: no-cache, private
content-type
: application/json
access-control-allow-origin
: *
{
"message": "Unauthorized"
}
Требуемые разрешения: zones:delete
Идентификатор (UUID)
curl --request DELETE \
"https://positioning.stage.odinn.cloud/api/v1/zones/6edc3a20-89fc-3214-89f7-3b56e0152f22" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" {
"message": "User does not have any of permissions: zones:delete"
}
Требуемые разрешения: beacons:list
Номер страницы.
Количество элементов, возвращаемых на странице. По умолчанию 50.
curl --request GET \
--get "https://positioning.stage.odinn.cloud/api/v1/beacons?page=1&page-size=50" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" cache-control
: no-cache, private
content-type
: application/json
access-control-allow-origin
: *
{
"message": "Unauthorized"
}
Требуемые разрешения: beacons:create
curl --request POST \
"https://positioning.stage.odinn.cloud/api/v1/beacons" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"mac\": \"vgywokhgeaaxkitoe\",
\"name\": \"usfmbddiuesgghvue\",
\"x\": 25.5,
\"y\": 143330.8546,
\"z\": 3901.43,
\"is_mobile\": true,
\"color\": \"qal\",
\"space\": {
\"id\": \"2d363916-19b8-3e3e-90e1-42e415195496\"
}
}"
{
"message": "User does not have any of permissions: beacons:create"
}
Требуемые разрешения: beacons:update
Идентификатор (UUID)
curl --request PUT \
"https://positioning.stage.odinn.cloud/api/v1/beacons/2954b67a-b44b-32f9-bed9-f37ddcec3f13" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"mac\": \"sqzhmcmdfegyfbgkp\",
\"name\": \"ipo\",
\"x\": 24030.778303259,
\"y\": 13660438.57728,
\"z\": 0,
\"is_mobile\": true,
\"color\": \"ytwuahf\",
\"space\": {
\"id\": \"e6c84ce4-ed06-374a-90b5-ddf6aa8c7357\"
}
}"
{
"message": "User does not have any of permissions: beacons:update"
}
Требуемые разрешения: beacons:list | beacons:show
Идентификатор (UUID)
curl --request GET \
--get "https://positioning.stage.odinn.cloud/api/v1/beacons/76d1ccb9-c6d8-3444-9fa5-c9b572dac60f" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" cache-control
: no-cache, private
content-type
: application/json
access-control-allow-origin
: *
{
"message": "Unauthorized"
}
Требуемые разрешения: beacons:delete
Идентификатор (UUID)
curl --request DELETE \
"https://positioning.stage.odinn.cloud/api/v1/beacons/082cbfe0-46e7-3f66-acf4-121f9fa6c178" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" {
"message": "User does not have any of permissions: beacons:delete"
}
Требуемые разрешения: walls:list
Идентификатор (UUID)
Номер страницы.
Количество элементов, возвращаемых на странице. По умолчанию 50.
curl --request GET \
--get "https://positioning.stage.odinn.cloud/api/v1/positioning/walls/3e2fd214-dce8-3796-a5bb-8acd3be02eab?page=1&page-size=50" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" cache-control
: no-cache, private
content-type
: application/json
access-control-allow-origin
: *
{
"message": "Unauthorized"
}
Требуемые разрешения: space:list | walls:list
curl --request GET \
--get "https://positioning.stage.odinn.cloud/api/v1/positioning/walls/space/6d22f802-6937-3761-8033-3743d929cd0e" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" cache-control
: no-cache, private
content-type
: application/json
access-control-allow-origin
: *
{
"message": "Unauthorized"
}
Требуемые разрешения: space:list | walls:list
curl --request GET \
--get "https://positioning.stage.odinn.cloud/api/v1/positioning/walls/wall/a800dc9b-3432-32ae-89b3-0f015e104380" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" cache-control
: no-cache, private
content-type
: application/json
access-control-allow-origin
: *
{
"message": "Unauthorized"
}
Требуемые разрешения: walls:delete
curl --request DELETE \
"https://positioning.stage.odinn.cloud/api/v1/positioning/walls/wall/8a1fc72b-0dd1-3452-b04a-c5ec4b7c05e0" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" {
"message": "User does not have any of permissions: walls:delete"
}
Требуемые разрешения: walls:create
curl --request POST \
"https://positioning.stage.odinn.cloud/api/v1/positioning/walls" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"space\": {
\"id\": \"ba268747-25f2-31eb-ba2e-5c1bf41b0133\"
},
\"lines\": [
1086073.661295717
],
\"isolated\": \"1\",
\"thickness\": 11489975.7803019,
\"color\": \"re\"
}"
{
"message": "User does not have any of permissions: walls:create"
}
Требуемые разрешения: walls:update
curl --request PUT \
"https://positioning.stage.odinn.cloud/api/v1/positioning/walls/075662df-517c-3e28-b2d3-b4f16f847594" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"segments\": [],
\"lines\": [
25766.236
],
\"isolated\": \"1\",
\"thickness\": 649140,
\"color\": \"zgauevdgb\"
}"
{
"message": "User does not have any of permissions: walls:update"
}