Loop public object apis
Knowledge Base > Products > Software > Loop Local > Loop Public Object APIs
The Loop Local Public API is a HTTP REST based API. Currently the only publicly accessible API call is Get Object(s). This call allows a developer to access individual objects, or a list of objects based on the API query. The documentation goes in detail on how to use this API function and what data is available. In general Objects are relevant items to your environment like assets, place, person. If you need assistance beyond this API guide, please contact BlueCats Support.
Table of Contents
Get Object(s)
Overview
This endpoint provides access to a listing or individual loop objects as long as the loop objects have been marked as AllowAnonymousAccess in the schema they will be authorized to be returned from this API endpoint.
API REquest Overview
Endpoint |
http://LOOPLOCALIP:PORT/public/objects |
Method |
GET |
Pagination Type |
limit, offset |
Description |
Gets an individual object or list of objects based on query |
Headers |
|
Example Query |
|
Request Parameters
Key |
Attributes |
Description |
limit |
Optional |
Maximum number of results to return |
offset |
Optional |
Offset results when paging |
stereotype |
Optional String (enumeration device, asset, person, place)
|
Type super type of the requested object type(s). |
objectTypeId |
Optional String (uuid) |
Unique Object ID |
Example Response Body
{"offset": 0,"limit": 100,"total": 7,"items": [{"id": "d6257d3a-54c6-45cd-8e9b-2201678450df","objectTypeId": "00000000-0000-0000-0000-a1beb5b30000","title": "BlueCats Hospitality","description": "BCHC","updatedAt": "2021-08-25T04:12:17.6479083+00:00","zonePerimeter": {"value": {"coordinates": [[[153.88082225378226, -34.9593413470999],[153.88097848917512, -34.9593413470999],[153.88088770374437, -34.959821167791645],[153.8807356909302, -34.95977563747791]]],"type": "Polygon"},"updatedAt": "2021-08-25T04:12:17.6479083+00:00"},"externalIdentifier": {"value": "BCH","updatedAt": "2021-08-25T04:12:17.6479083+00:00"},"pointOfInterest": {"value": {"coordinates": [152.8128750360102, -34.95553747851229, 0.0]},"updatedAt": "2021-08-25T04:12:17.6479083+00:00"},"name": {"value": "BlueCats Hospitality","updatedAt": "2021-08-25T04:12:17.6479083+00:00"}}, {"id": "551089b9-ed0e-459d-ad68-77aaf530cf29","objectTypeId": "00000000-0000-0000-0000-a1beb5b30003","title": "floorplan1","description": "floorplan1","updatedAt": "2021-08-25T04:12:17.6479083+00:00","zonePerimeter": {"value": {"coordinates": [[[153.8506805766409, -34.9594201545262],[153.85074272234342, -34.959430028072056],[153.85073078206323, -34.95948077934949],[153.85066938276247, -34.95947138253159]]],"type": "Polygon"},"updatedAt": "2021-08-25T04:12:17.6479083+00:00"},"map": {"value": {"metersPerPixel": {"x": 0.0014648853664381146,"y": 0.0014648853664381144},"origin": {"coordinates": [2.8239145280183173, 2.8534843136520176, 0.0]},"bounds": {"coordinates": [[[0.0, 0.0],[7492.0, 0.0],[7492.0, -7499.0],[0.0, -7499.0]]],"type": "Polygon"},"resourceId": "53575423-fd24-47a9-8632-1f7bad011ba7","rotation": 0.0},"updatedAt": "2021-08-25T04:12:17.6479083+00:00","changedAt": "2021-07-15T07:43:57.9645561+00:00"},"pointOfInterest": {"value": {"coordinates": [153.8656700347562, -34.923470861962835, 0.0]},"updatedAt": "2021-08-25T04:12:17.6479083+00:00"},"order": {"updatedAt": "2021-08-25T04:12:17.6479083+00:00"},"name": {"value": "floorplan1","updatedAt": "2021-08-25T04:12:17.6479083+00:00","changedAt": "2021-07-15T07:43:57.9645561+00:00"},"locatedInPlace": {"value": "af84ed83-ffb6-46a6-b074-23809599383e","updatedAt": "2021-08-25T04:12:17.6479083+00:00"},"externalIdentifier": {"value": "floorplan1","updatedAt": "2021-08-25T04:12:17.6479083+00:00","changedAt": "2021-07-15T07:43:57.9645561+00:00"}}, {"id": "af84ed83-ffb6-46a6-b074-23809599383e","objectTypeId": "00000000-0000-0000-0000-a1beb5b30002","title": "Garage","description": "Garage","updatedAt": "2021-08-25T04:12:17.6479083+00:00","name": {"value": "Garage","updatedAt": "2021-08-25T04:12:17.6479083+00:00"},"coordinateSystem": {"value": {"origin": {"coordinates": [153.4506700347562, -34.921470861962835, 0.0]},"rotation": -10.581670900461788},"updatedAt": "2021-08-25T04:12:17.6479083+00:00"},"pointOfInterest": {"value": {"coordinates": [151.21071898383392, -34.599532313017326, 0.0]},"updatedAt": "2021-08-25T04:12:17.6479083+00:00"},"externalIdentifier": {"value": "Garage","updatedAt": "2021-08-25T04:12:17.6479083+00:00"},"zonePerimeter": {"value": {"coordinates": [[[152.81226805766409, -32.9594201545262],[152.81064073714147, -32.959602477221786],[152.81076235245616, -32.95962247762122],[152.81080463824123, -32.95943986510715]]],"type": "Polygon"},"updatedAt": "2021-08-25T04:12:17.6479083+00:00"},"locatedInPlace": {"value": "d6257d3a-54c6-45cd-8e9b-2201678450df","updatedAt": "2021-08-25T04:12:17.6479083+00:00"}}, {"id": "496863ac-d6a3-4ca4-aa49-2d60c128eeab","objectTypeId": "00000000-0000-0000-0000-a1beb5b30001","title": "Zone 1","description": "Zone 1","updatedAt": "2021-08-25T04:12:17.6479083+00:00","zonePerimeter": {"value": {"coordinates": [[[0.1359065740455252, 5.589492409660037],[0.1359065740455252, 3.024903392349262],[3.0159150961592314, 3.024903392349262],[3.0159150961592314, 5.589492409660037]]],"type": "Polygon"},"updatedAt": "2021-08-25T04:12:17.6479083+00:00"},"name": {"value": "Zone 1","updatedAt": "2021-08-25T04:12:17.6479083+00:00"},"color": {"value": "#22B14C","updatedAt": "2021-08-25T04:12:17.6479083+00:00"},"locatedInPlace": {"value": "551089b9-ed0e-459d-ad68-77aaf530cf29","updatedAt": "2021-08-25T04:12:17.6479083+00:00"},"externalIdentifier": {"value": "Zone 1","updatedAt": "2021-08-25T04:12:17.6479083+00:00"}}, {"id": "f0e2f9a6-14b4-4c24-bc37-8b47cb19716c","objectTypeId": "00000000-0000-0000-0000-a1beb5b30001","title": "Zone 2","description": "Zone 2","updatedAt": "2021-08-25T04:12:17.6479083+00:00","zonePerimeter": {"value": {"coordinates": [[[3.0159150961592314, 5.589492409660037],[3.0159150961592314, 3.024903392349262],[5.539351134582668, 3.024903392349262],[5.539351134582668, 5.589492409660037]]],"type": "Polygon"},"updatedAt": "2021-08-25T04:12:17.6479083+00:00"},"name": {"value": "Zone 2","updatedAt": "2021-08-25T04:12:17.6479083+00:00"},"color": {"value": "#FF7F27","updatedAt": "2021-08-25T04:12:17.6479083+00:00"},"locatedInPlace": {"value": "551089b9-ed0e-459d-ad68-77aaf530cf29","updatedAt": "2021-08-25T04:12:17.6479083+00:00"},"externalIdentifier": {"value": "Zone 2","updatedAt": "2021-08-25T04:12:17.6479083+00:00"}}, {"id": "30224e54-e001-468e-a992-ca8299cb4410","objectTypeId": "00000000-0000-0000-0000-a1beb5b30001","title": "Zone 3","description": "Zone 3","updatedAt": "2021-08-25T04:12:17.6479083+00:00","zonePerimeter": {"value": {"coordinates": [[[0.1359065740455252, 3.0111890125775465],[0.1359065740455252, 0.14489487023555636],[2.9884864435676715, 0.14489487023555636],[2.9884864435676715, 3.0111890125775465]]],"type": "Polygon"},"updatedAt": "2021-08-25T04:12:17.6479083+00:00"},"name": {"value": "Zone 3","updatedAt": "2021-08-25T04:12:17.6479083+00:00"},"color": {"value": "#06caf4","updatedAt": "2021-08-25T04:12:17.6479083+00:00"},"locatedInPlace": {"value": "551089b9-ed0e-459d-ad68-77aaf530cf29","updatedAt": "2021-08-25T04:12:17.6479083+00:00"},"externalIdentifier": {"value": "Zone 3","updatedAt": "2021-08-25T04:12:17.6479083+00:00"}}, {"id": "ba7cdb8a-3aad-4bae-97be-447101e2b2b9","objectTypeId": "00000000-0000-0000-0000-a1beb5b30001","title": "Zone 4","description": "Zone 4","updatedAt": "2021-08-25T04:12:17.6479083+00:00","zonePerimeter": {"value": {"coordinates": [[[3.0159150961592314, 3.052332151892693],[3.0159150961592314, 0.14489487023555636],[5.607922766061566, 0.14489487023555636],[5.607922766061566, 3.052332151892693]]],"type": "Polygon"},"updatedAt": "2021-08-25T04:12:17.6479083+00:00"},"name": {"value": "Zone 4","updatedAt": "2021-08-25T04:12:17.6479083+00:00"},"color": {"value": "#ffc500","updatedAt": "2021-08-25T04:12:17.6479083+00:00"},"locatedInPlace": {"value": "551089b9-ed0e-459d-ad68-77aaf530cf29","updatedAt": "2021-08-25T04:12:17.6479083+00:00"},"externalIdentifier": {"value": "Zone 4","updatedAt": "2021-08-25T04:12:17.6479083+00:00"}}]
}
Get Resources
Overview
Some Loop Objects have image resources link to them, in the above example the floorplan1 has a mapping object that has an resource link (floorplan image) specified "resourceId": "53575423-fd24-47a9-8632-1f7bad011ba7"
this can be queried via the below API to get the resource data.
API Request Overview
Endpoint | http://LOOPLOCALIP:PORT/public/objects/resources/{id}/data |
Method |
GET |
Pagination Type |
NA |
Description |
Returns the resource for the specified resource id, the content will be specified in the response Content-Type header field. |
Headers |
|
Example Query |
|
Request Parameters
Key |
Attributes |
Description |
id |
Required |
The unique id of an resource object to get |
Search Objects
Overview
Using the below API we can search for objects
API Request Overview
Endpoint | http://LOOPLOCALIP:PORT/public/objects/distinctProperty/values |
Method |
GET |
Pagination Type |
limit, offset |
Description |
List objects by type |
Headers |
|
Example Query |
|
Request Parameters
The following request parameters can be used to list all devices of a requested type.
Key |
Attributes |
Description |
objectTypeId |
Required |
The unique id of an object type. This is the objectTypeId field. |
property |
Required |
The property of the loop object to search on
|
value |
Required |
String value to search on |
Example Response Body
{"id": "8aae8c62-2916-4d93-bf98-3db648f134a6","objectTypeId": "00000000-0000-0000-0000-a1beb5b30030","title": "100","description": "3100C4A8","updatedAt": "2021-08-25T04:12:17.6479083+00:00","monitoredBatteryVoltage": {"value": 2800.0,"updatedAt": "2021-08-25T04:35:58.1270812+00:00","observedAt": "2021-08-25T04:35:58.1270349+00:00","changedAt": "2021-07-15T07:44:59.2280752+00:00"},"mac": {"value": "3100C4A8","updatedAt": "2021-08-25T04:12:17.6479083+00:00"},"trackedPosition": {"value": {"coordinates": [1.8074830431655498, 1.9247061823204559, 0.0],"coordinateSystemId": "551089b9-ed0e-459d-ad68-77aaf530cf29"},"updatedAt": "2021-08-25T04:35:59.0512694+00:00","observedAt": "2021-08-25T04:35:59.0511806+00:00","changedAt": "2021-08-25T04:35:59.0511806+00:00"},"trackedPlace": {"value": "30224e54-e001-468e-a992-ca8299cb4410","updatedAt": "2021-08-25T04:35:59.051854+00:00","observedAt": "2021-08-25T04:35:59.0511806+00:00","changedAt": "2021-08-25T04:35:55.4546234+00:00"},"externalIdentifier": {"value": "100","updatedAt": "2021-08-25T04:12:17.6479083+00:00"},"monitoredBatteryPercentage": {"value": 27.0,"updatedAt": "2021-08-25T04:35:58.1272454+00:00","observedAt": "2021-08-25T04:35:58.1270349+00:00","changedAt": "2021-08-25T04:12:31.1331017+00:00"}
}