Location Service Coverage
Use the location service coverage API to:
- Get all existing location service coverage areas in your project
- Get location service coverage from a specific sublocation
- Get a single coverage area with a specified coverage UID
| Current Term | Former Term | Definition |
|---|---|---|
| location service coverage | -- | A zone where positioning is specified. |
HTTP Headers
The HTTP headers used to access all RTLS APIs are listed below. Before submitting requests to the Zones API, set the following headers:
| Header Name | Example Value | Description |
|---|---|---|
| X-User-Email | admin@example.com | Email of the user performing HTTP requests to the API. |
| X-User-Token | Drv3yU7PdyqUMtr89erZ | Token allowing user access to the API. |
| X-User-Project | OfOgUA4kTs2HrmYYlFw6Jg | Project identifier. Value of the project.uid field. |
Set header X-USER-EMAIL
Send a request to log in using POST api/auth/log_in.json described in the Auth API. Using the email address returned in the response, set:
X-USER-EMAIL = data.email
Set header X-USER-TOKEN
Send a request to log in using POST api/auth/log_in.json described in the Auth API. Using the authentication token returned in the response, set:
X-USER-TOKEN = data.token
Set header X-USER-PROJECT
Send a request to get projects using GET api/projects/ described in the Projects API. You must send this request with headers X-USER-EMAIL and X-USER-TOKEN already set. Using the project UID returned in the response, set:
X-USER-PROJECT = projects[i].uid
Location service coverage Endpoints
| Functionality | Method | Endpoint |
|---|---|---|
| get all location service coverage | GET | api/location_service_coverage |
| get location service coverage from sublocations | GET | api/location_service_coverage/sublocation/:sublocation_uid |
| get single location service coverage | GET | api/location_service_coverage/{uid} |
Endpoints
Get all location service coverage
GET api/location_service_coverage
Get all existing location service coverage areas in your project.
Response Fields
| Field | Description |
|---|---|
| uid | The unique identifier for the coverage area. |
| sublocation_uid | The identifier of the area in the context of the server. |
| type | The shape type:
|
| exclusion | Attribute defines whether the graphically depicted shapes is inclusive or exclusive. |
| geometry | Item geometry. |
| geometry.shape | The shape of the coverage item.
|
| geometry.radius | The radius of the "CIRCLE" shape. |
| geometry.margin | The margin of the "POLYLINE" shape. |
| geometry.positions | The x, y coordinates of the shape vertice(s)/point(s).
|
| geometry.positions[].x | Point coordinates. |
| geometry.positions[].y | Point coordinates. |
Example Response
{
"location_service_coverage": [
{
"uid": "sdwsFT8fT1OVkaZCTXU0TA",
"sublocation_uid": "GmmsFT8fT1OVkaZCTXU0TA",
"type": "0D",
"exclusion": false,
"geometry": {
"shape": "CIRCLE",
"radius": 2000,
"positions": [
{ "x": 5000, "y": 5000 }
]
}
},
{
"uid": "vdrT8fT1OVkaZCTXU0TA",
"sublocation_uid": "GmmsFT8fT1OVkaZCTXU0TA",
"type": "1D",
"exclusion": false,
"geometry": {
"shape": "POLYLINE",
"margin": 1000,
"positions": [
{ "x": 5000, "y": 1000 },
{ "x": 7000, "y": 4000 },
{ "x": 9000, "y": 8000 }
]
}
},
{
"uid": "axdFT8fT1OVkaZCTXU0TA",
"sublocation_uid": "mdTsFT8fT1OVkaZCTXU0TA",
"type": "2D",
"exclusion": true,
"geometry": {
"shape": "POLYGON",
"positions": [
{ "x": 1000, "y": 2000 },
{ "x": 3000, "y": 4000 },
{ "x": 5000, "y": 6000 },
{ "x": 7000, "y": 8000 },
{ "x": 9000, "y": 1000 }
]
}
}
]
}
Get location service coverage from sublocations
GET api/location_service_coverage/sublocation/:sublocation_uid
Get a location service coverage area from a specific sublocation.
Response Fields
| Field | Description |
|---|---|
| uid | The unique identifier for the coverage area. |
| sublocation_uid | The identifier of the area in the context of the server. |
| type | The shape type:
|
| exclusion | Attribute defines whether the graphically depicted shapes is inclusive or exclusive. |
| geometry | Item geometry. |
| geometry.shape | The shape of the coverage item.
|
| geometry.radius | The radius of the "CIRCLE" shape. |
| geometry.margin | The margin of the "POLYLINE" shape. |
| geometry.positions | The x, y coordinates of the shape vertice(s)/point(s).
|
| geometry.positions[].x | Point coordinates. |
| geometry.positions[].y | Point coordinates. |
Example Response
Using GET api/location_service_coverage/sublocation/GmmsFT8fT1OVkaZCTXU0TA:
{
"location_service_coverage": [
{
"uid": "sdwsFT8fT1OVkaZCTXU0TA",
"sublocation_uid": "GmmsFT8fT1OVkaZCTXU0TA",
"type": "0D",
"exclusion": false,
"geometry": {
"shape": "CIRCLE",
"radius": 2000,
"positions": [
{ "x": 5000, "y": 5000 }
]
}
},
{
"uid": "vdrT8fT1OVkaZCTXU0TA",
"sublocation_uid": "GmmsFT8fT1OVkaZCTXU0TA",
"type": "1D",
"exclusion": false,
"geometry": {
"shape": "POLYLINE",
"margin": 1000,
"positions": [
{ "x": 5000, "y": 1000 },
{ "x": 7000, "y": 4000 },
{ "x": 9000, "y": 8000 }
]
}
}
]
}
Get single location service coverage
GET api/location_service_coverage/{uid}
Get a single coverage area with a specified coverage UID.
Response Fields
| Field | Description |
|---|---|
| uid | The unique identifier for the coverage area. |
| sublocation_uid | The identifier of the area in the context of the server. |
| type | The shape type:
|
| exclusion | Attribute defines whether the graphically depicted shapes is inclusive or exclusive. |
| geometry | Item geometry. |
| geometry.shape | The shape of the coverage item.
|
| geometry.radius | The radius of the "CIRCLE" shape. |
| geometry.margin | The margin of the "POLYLINE" shape. |
| geometry.positions | The x, y coordinates of the shape vertice(s)/point(s).
|
| geometry.positions[].x | Point coordinates. |
| geometry.positions[].y | Point coordinates. |
Example Response
Using GET api/location_service_coverage/sdwsFT8fT1OVkaZCTXU0TA:
{
"location_service_coverage": [
{
"uid": "sdwsFT8fT1OVkaZCTXU0TA",
"sublocation_uid": "GmmsFT8fT1OVkaZCTXU0TA",
"type": "0D",
"exclusion": false,
"geometry": {
"shape": "CIRCLE",
"radius": 2000,
"positions": [
{ "x": 5000, "y": 5000 }
]
}
}
]
}