RadioCloud Application Platform API Reference NAV Navbar
Cognosos primary yellow
shell

Introduction

RadioCloud Application Platform is a multi-tenant platform for configuring and hosting a variety of Sensor based IOT applications. It provides services such as device management, application configuration, complex event processing, as well as ingestion, storage, analysis, and integration of device data. It also includes a rich set of API for Asset Tracking application.

Inventory Integration

Introduction

Cognosos RadioTrax customers frequently wish to import the list of Assets and their details shown in RadioTrax from a Dealer or Auction Management System or other external source.

This section explains the import process, the application model, and other details required to implement this process.

Application Model

Every organization using RadioTrax is represented by a Customer entity. Each Customer may have multiple Applications, representing separate sites or business activities. Among other details, each Application has an Application Code that serves as an abbreviated name and uniquely represents it. This Application Code, and a corresponding Username and Password must be supplied to identify the Application for all RadioTrax API operations.

For each Application, Cognosos customer support or the end user will define a set of Custom Fields; in the automotive space, these are frequently named Make, Model, Year, Stock Number, etc.

The RadioTrax application maintains a list of Assets. For each Asset and each Custom Field, a Custom Field Value may be present, and the set of Custom Field Values represents most of the non-location data available in the RadioTrax application for informational and search purposes.

This list of Assets and their Custom Field Values may be imported in bulk via our asset inventory integration endpoints.

API Endpoint

The Bulk Update endpoint (for periodic automated updates) is located at:

https://cy668x8c9a.execute-api.us-east-1.amazonaws.com/prod/node/updateNodes

This endpoint accepts an HTTP POST with a JSON body, containing a list of all assets that are to be updated. The Application Code must be appended to the API endpoint URL with a query string:

.../prod/node/updateNodes?application_code=<application code>

Access Pattern

If possible, we recommend updating RadioTrax immediately upon changes to any given Asset in the source database. This reduces the total system load as records need not be queried, sent, and written for unchanged Assets, and satisfies the need for up-to-date information being present across all systems as soon as possible. We support update rates of several posts per second in this model, to accommodate many simultaneous users performing ongoing operations in the source data system.

Alternatively, you may post update batches containing many hundreds or thousands of Asset records. We will queue these updates and perform them in the background, so changes may take a couple of minutes to be visible in the case of very large batches. Our recommended update frequency for large batches is no more frequently than once every 15 minutes.

We do not expect the entire history (containing every Asset that has ever traversed the customer’s facility) to be sent. We recommend filtering out any vehicles that have been sold or otherwise disposed of, so that batch size represents only active assets. The same endpoint is used for both update patterns.

Upon update, Assets and Custom Field Values that do not exist are created, and existing values are overwritten if they are present in the inbound JSON data.

Authentication

All requests to the Cognosos RadioTrax API must carry an Authorization header encoding the Username and Password for a specific Application user.

This header is standard HTTP Basic authentication, in the form:

Authorization: Basic <base64 encoded 'username:password' pair>

In addition, an API Key must be present for calls to the bulk update endpoint. This key will be assigned to the customer by the Cognosos support team upon request. The API key is sent as a header in the form:

x-api-key: <api key value>

Data Format

Inventory data updates should be contained in an HTTP POST with a JSON body containing a JSON array, and each array element being a JSON object carrying the information for a single asset. An attribute named asset_identifier must be included in all records, and the remaining fields are optional and will update the Asset only if a corresponding Custom Field has been defined for the Application.

The following snippet represents acceptable JSON data:

[
        {
            "asset_identifier": "12506",
            "make": "Ford",
            "model": "F-150",
            "VIN": "1FM5K8F0GGA69101",
            ...
},
        {
            "asset_identifier": "13763",
            "make": "Acura",
            "model": "MDX",
            "VIN": "JH4TB2H26CC000000",
            ...
},
...
]

RadioTrax treats all Custom Field Values as strings. For numeric data, please send the same format that is displayed to the user, without leading zeros or other assumptions about numeric interpretation. For dates, we recommend ISO-8601 formatting such as YYYY-MM-DD.

Customer

Customer is at the root of the hierarchy. It can represent an entire organization, or a department within an organization. Customer has unique Name and ID.

Properties Description
name Name of the Customer
zipcode Zip Code
email_address Email ID of the Customer

Customer has many Applications and Zonal Activators

Delete

curl -u username:password
  -request DELETE
  "https://api.cognosos.net/customer”

HTTP Request

DELETE https://api.cognosos.net/customer/

Request Body

Field Required Type
name true String
zipcode false String
email_address false String
dateCreated false Date
icon false String

Response Body

200 OK

Index

curl -u username:password
  -request GET
  "https://api.cognosos.net/customer”

HTTP Request

GET https://api.cognosos.net/customer

Request Body

Field Required Type
max false Integer
name false String

Response Body

200 OK

Content-Type: application/json

Field Type Description
id Integer
guid String
name String

Save

curl -u username:password
  -request POST
  "https://api.cognosos.net/customer”

HTTP Request

POST https://api.cognosos.net/customer

Request Body

Field Required Type
name true String
zipcode false String
email_address false String
dateCreated false Date
icon false String

Response Body

201 CREATED

Content-Type: application/json

Field Type Description
id Integer
guid String
name String

Update

curl -u username:password
  -request PUT
  "https://api.cognosos.net/customer”

HTTP Request

PUT https://api.cognosos.net/customer/

Request Body

Field Required Type
name true String
zipcode false String
email_address false String
dateCreated false Date
icon false String

Response Body

200 OK

Content-Type: application/json

Field Type Description
id Integer
guid String
name String

Person

A person represents an individual user of the system. A Customer can have 1 or more Users.

Properties Description
username Unique name accross the system
password Password
clientID Autogenerated Client ID for using services like ActiveMQ.
authority
ROLE_ADMIN
Manages applications, zones, users, devices and attaches/detaches Nodes to devices.
ROLE_USER
Has read-only access. Can attach/detach
ROLE_SERVICE_LEVEL
This role is an auto generated role for each Customer. It can be used for processes such as the ActiveMQ message listeners.

Create

curl -u username:password
  -H "Content-Type: application/json"
  -X POST -d
  '{
    "username":"test_user",
    "password":"test_password",
    "authority":"ROLE_USER"
  }' 
  "https://api.cognosos.net/person"

The above command returns JSON structured like this:

{
    "accountExpired": false,
    "accountLocked": false,
    "clientID": null,
    "enabled": true,
    "passwordExpired": false,
    "username": "test_user"
}

This endpoint creates a new person.

HTTP Request

POST https://api.cognosos.net/person

Headers

Content-Type: application/json

Request Body

Field Required Type Description
username true String Unique Username
password true String Password
authority true Enum = [ROLE_USER, ROLE_ADMIN, ROLE_SERVICE_LEVEL] Authority for the new user

Response Body

201 CREATED

Content-Type: application/json

Field Description
username String
clientID String
enabled boolean
accountExpired boolean
accountLocked boolean
passwordExpired boolean

Update

curl -u username:password
  -H "Content-Type: application/json"
  -X PUT -d
  '{
    "password":"test_password",
    "accountLocked":true
  }' 
  "https://api.cognosos.net/person/1"

The above command returns JSON structured like this:

{
    "accountExpired": true,
    "accountLocked": false,
    "clientID": null,
    "enabled": true,
    "passwordExpired": false,
    "username": "test_user"
}

This endpoint can be used to update password of the person or to lock a person.

HTTP Request

PUT https://api.cognosos.net/person/{id}

Headers

Content-Type: application/json

Request Body

Field Required Type Description
accountLocked false Boolean To Lock a user
password false String New Password
email false String
phone false String
authority false String
scopeFilter false Filter
id false Long

Response Body

200 OK

Content-Type: application/json

Field Type Description
username String Username
clientID String Client ID for ROLE_SERVICE_LEVEL users
enabled boolean Enabled
accountExpired boolean Account Expired
accountLocked boolean Account Locked
passwordExpired boolean Password Expired

Check Access

curl -u username:password
  --request GET
  "https://api.cognosos.net/person/checkAccess/cognosos_office
  ?username=cognosos_office”

The above command returns JSON structured like this:

{
    "authority": "ROLE_ADMIN",
    "person": 89,
    "email": null,
    "phone": null,
    "customer": 13,
    "icon": null,
    "scopeFilter": {},
    "applications": [
        "YOUR_APPLICATION_CODE",
        "YOUR_APPLICATION_CODE_2"
    ]
}

HTTP Request

GET https://api.cognosos.net/person/checkAccess

Request Body

Field Required Type
username true String

Response Body

200 OK

Content-Type: application/json

Field Type Description
authority String
person int
email String
phone String
customer int
icon String
scopeFilter Object
application list

Delete User

curl -u username:password
  --request DELETE
  "https://api.cognosos.net/person
  ?username=new_test_user&password=new_test_password”

The above command returns JSON structured like this:

[
    {
        "id": 1064,
        "accountExpired": false,
        "accountLocked": false,
        "clientID": null,
        "enabled": true,
        "email": null,
        "phone": null,
        "passwordExpired": false,
        "username": "new_test_user",
        "scopeFilter": {},
        "authorities": [
            "ROLE_USER"
        ],
        "customer": {
            "id": 13,
            "name": "Your_Application"
        }
    }
]

HTTP Request

DELETE https://api.cognosos.net/person

Request Body

Field Required Type
username true String
password true String
email false String
phone false String
enabled false boolean
accountExpired false boolean
accountLocked false boolean
passwordExpired false boolean
clientID false String

Response Body

200 OK

Content-Type: application/json

Field Type Description
id int
accountExpired boolean Account Expired
accountLocked boolean Account Locked
clientID String Client ID for ROLE_SERVICE_LEVEL users
enabled boolean Enabled
email String
phone String
passwordExpired boolean Password Expired
username String Username
scopeFilter Object
authorities list
customer Object id and name

Index

curl -u username:password
  --request GET
  "https://api.cognosos.net/person”

The above command returns JSON structured like this:

[
    {
        "id": 89,
        "accountExpired": false,
        "accountLocked": false,
        "clientID": null,
        "enabled": true,
        "email": null,
        "phone": null,
        "passwordExpired": false,
        "username": "test_user",
        "scopeFilter": {},
        "authorities": [
            "ROLE_ADMIN"
        ],
        "customer": {
            "id": 13,
            "name": "Your_Application"
        }
    }
]

HTTP Request

GET https://api.cognosos.net/person

Request Body

Field Required Type
max false Integer
username false String
email false String
phone false String
format false String
accountLocked false boolean
authority false enum

Response Body

200 OK

Content-Type: application/json

Field Type Description
id int
accountExpired boolean Account Expired
accountLocked boolean Account Locked
clientID String Client ID for ROLE_SERVICE_LEVEL users
enabled boolean Enabled
email String
phone String
passwordExpired boolean Password Expired
username String Username
scopeFilter Object
authorities list
customer Object id and name

Reset Password

Request Body

Field Required Type
userId false Long
username false String

Save

curl -u cognosos_office:cognosos_office
  -H "Content-Type: application/json"
  -X POST -d
  '{
    "username":"new_test_user",
    "password":"new_test_password",
    "authority":"ROLE_USER"
  }'
  "https://api.cognosos.net/person"

The above command returns JSON structured like this:

{
    "accountExpired": false,
    "accountLocked": false,
    "clientID": null,
    "email": null,
    "enabled": true,
    "passwordExpired": false,
    "phone": null,
    "username": "new_test_user"
}

HTTP Request

POST https://api.cognosos.net/person

Request Body

Field Required Type
username true String
password true String
authority true enum

Response Body

201 CREATED

Content-Type: application/json

Field Type Description
accountExpired boolean Account Expired
accountLocked boolean Account Locked
clientID String Client ID for ROLE_SERVICE_LEVEL users
email String
enabled boolean Enabled
passwordExpired boolean Password Expired
phone String
username String Username

Update Pass

Request Body

Field Required Type
password true String

Response Body

200 OK

Content-Type: application/json

Field Type Description
username String Username
password String
email String
phone String
enabled boolean Enabled
accountExpired boolean Account Expired
accountLocked boolean Account Locked
passwordExpired boolean Password Expired
clientID String Client ID for ROLE_SERVICE_LEVEL users

Person (V2)

A person represents an individual user of the system. A Customer can have 1 or more Users.

Properties Description
username Unique name accross the system (for new users must be a valid email address)
password Password
clientID Autogenerated Client ID for using services like ActiveMQ.
authority
ROLE_ADMIN
Manages applications, zones, users, devices and attaches/detaches Nodes to devices.
ROLE_USER
Has read-only access. Can attach/detach
ROLE_SERVICE_LEVEL
This role is an auto generated role for each Customer. It can be used for processes such as the ActiveMQ message listeners.

Create

curl 
  -H "Authorization: Bearer [JWT Access/ID Token - Base64 Encoded]"
  -H "Content-Type: application/json"
  -X POST -d
  '{
    "username":"joe@exampledomain.com",
    "authority":"ROLE_USER",
    "email:"joe@exampledomain.com",
    "phone:"+14043344421"
  }' 
  "https://api.cognosos.net/person/v2"

The above command returns JSON structured like this:

{
    "accountExpired": false,
    "accountLocked": false,
    "clientID": null,
    "email": "joe@exampledomain.com",
    "enabled": true,
    "passwordExpired": false,
    "phone": "+14043344421"
    "username": "joe@exampledomain.com"
}

This endpoint creates a new person.

HTTP Request

POST https://api.cognosos.net/person/v2

Headers

Content-Type: application/json Authorization: Bearer [JWT Access/ID Token - Base64 Encoded]

Request Body

Field Required Type Description
username true String Unique Username - required to be a valid email address
authority true Enum = [ROLE_USER, ROLE_ADMIN, ROLE_SERVICE_LEVEL] Authority for the new user
email false String User Email
phone false String User Phone - should be in international format - e.g. for US phone numbers +1NNNNNNNNNN

Response Body

201 CREATED

Content-Type: application/json

Field Description
accountExpired boolean
accountLocked boolean
clientID String
email String
enabled boolean
passwordExpired boolean
phone String
username String

Reset Password

curl 
  -H "Authorization: Bearer [JWT Access/ID Token - Base64 Encoded]"
  -H "Content-Type: application/json"
  -X PUT 
  "https://api.cognosos.net/person/v2/1/resetPass"

The above command returns JSON structured like this:

{
    "id": 1,
    "username": "joe@exampledomain.com",
  "newPassword": "F11abc!df"
}

This endpoint resets the password for the specified person. If the user has been migrated to Cognito - then this password is a temporary password which can be used to log in and establish their new password. If the user has not been migrated to Cognito then this will establish a new permanent password. In all cases - the previous password is lost and not revertible. Once migration to Cognito is complete - then this user must exist in Cognito in order to be able to reset his/her password.

HTTP Request

PUT https://api.cognosos.net/person/v2/{id}/resetPass

Headers

Content-Type: application/json Authorization: Bearer [JWT Access/ID Token - Base64 Encoded]

Resource Identifier

Field Required Type
id true Long

Response Body

200 Success

Content-Type: application/json

Field Description
id long
username String
newPassword String

Restore

curl 
  -H "Authorization: Bearer [JWT Access/ID Token - Base64 Encoded]"
  -H "Content-Type: application/json"
  -X PUT 
  "https://api.cognosos.net/person/v2/1/restore"

The above command returns JSON structured like this:

{
    "id": 1,
    "username": "joe@exampledomain.com",
}

This endpoint will restore a previously deleted/disabled user.

HTTP Request

PUT https://api.cognosos.net/person/v2/{id}/restore

Headers

Content-Type: application/json Authorization: Bearer [JWT Access/ID Token - Base64 Encoded]

Resource Identifier

Field Required Type
id true Long

Response Body

200 Success

Content-Type: application/json

Field Description
id long
username String

Reset Password

curl 
  -H "Authorization: Bearer [JWT Access/ID Token - Base64 Encoded]"
  -H "Content-Type: application/json"
  -X PUT 
  "https://api.cognosos.net/person/v2/1/resetPass"

The above command returns JSON structured like this:

{
    "id": 1,
    "username": "joe@exampledomain.com",
  "newPassword": "F11abc!df"
}

This endpoint resets the password for the specified person. If the user has been migrated to Cognito - then this password is a temporary password which can be used to log in and establish their new password. If the user has not been migrated to Cognito then this will establish a new permanent password. In all cases - the previous password is lost and not revertible. Once migration to Cognito is complete - then this user must exist in Cognito in order to be able to reset his/her password.

HTTP Request

PUT https://api.cognosos.net/person/v2/{id}/resetPass

Headers

Content-Type: application/json Authorization: Bearer [JWT Access/ID Token - Base64 Encoded]

Resource Identifier

Field Required Type
id true Long

Response Body

200 Success

Content-Type: application/json

Field Description
id long
username String
newPassword String

Update

curl 
  -H "Authorization: Bearer [JWT Access/ID Token - Base64 Encoded]"  
  -H "Content-Type: application/json"
  -X PUT -d
  '{
    "authority":"ROLE_USER",
    "accountLocked":true,
    "phone":"+14043344421",
  "email":"joe@exampledomain.com",
    "password":"newpassword",
    "scopeFilter":Filter{}
  }' 
  "https://api.cognosos.net/person/v2/1"

The above command returns JSON structured like this:

{
    "accountExpired": false,
    "accountLocked": true,
    "clientID": null,
    "email": "joe@exampledomain.com",
    "enabled": true,
    "passwordExpired": false,
    "phone": "+14043344421",
    "username": "joe@exampledomain.com"
}

This endpoint can be used to update the scope filter, authority, password, email address, or phone number of the person, or to lock a person’s account.

HTTP Request

PUT https://api.cognosos.net/person/v2/{id}

Headers

Content-Type: application/json Authorization: Bearer [JWT Access/ID Token - Base64 Encoded]

Request Body

Field Required Type Description
accountLocked false Boolean Lock a user’s account
phone false String
email false String
password false String
authority false Enum = [ROLE_USER, ROLE_ADMIN, ROLE_SERVICE_LEVEL] Authority for the new user
scopeFilter false Filter

Resource Identifier

id | true | Long

Response Body

200 OK

Content-Type: application/json

Field Type Description
accountExpired boolean Account Expired
accountLocked boolean Account Locked
clientID String Client ID for ROLE_SERVICE_LEVEL users
email String User Email
enabled boolean Enabled
passwordExpired boolean Password Expired
phone String User Phone - should be in international format - e.g. for US phone numbers +1NNNNNNNNNN
username String Username

Check Access

curl 
  -H "Authorization: Bearer [JWT Access/ID Token - Base64 Encoded]"
  --request GET
  "https://api.cognosos.net/person/v2/checkAccess?username=joe@exampledomain.com

The above command returns JSON structured like this:

{
    "authority": "ROLE_ADMIN",
    "person": 89,
    "email": joe@exampledomain.com,
    "phone": "+14043344421",
    "customer": 13,
    "icon": null,
    "scopeFilter": {},
    "applications": [
        "YOUR_APPLICATION_CODE",
        "YOUR_APPLICATION_CODE_2"
    ]
}

HTTP Request

GET https://api.cognosos.net/person/v2/checkAccess

Request Params

Field Required Type
username true String
restrictedAppsOnly false Boolean

Response Body

200 OK

Content-Type: application/json

Field Type Description
authority String User Authority
person int User Identity
email String User Email
phone String User Phone
customer int Associated Customer Identity
icon String
scopeFilter Filter{}
application String list List of associated applications (or restricted set only if restrictedAppsOnly param is specfied)

Index

curl
  -H "Authorization: Bearer [JWT Access/ID Token - Base64 Encoded]"
  --request GET
  "https://api.cognosos.net/person/v2”

The above command returns JSON structured like this:

[
    {
        "id": 89,
        "accountExpired": false,
        "accountLocked": false,
        "clientID": null,
        "enabled": true,
        "email": "joe@exampledomain.com",
        "phone": "+14043344421",
        "passwordExpired": false,
        "username": "joe@exampledomain.com",
        "scopeFilter": {},
        "authorities": [
            "ROLE_ADMIN"
        ],
        "customer": {
            "id": 13,
            "name": "Customer Name"
        }
    }
]

HTTP Request

GET https://api.cognosos.net/person/v2

Request Params

Field Required Type
max false Integer - maximum number of rows to be returned in the result
username false String
email false String
phone false String
format false String - defaults to json; can also be set to csv
accountLocked false boolean
authority false enum

Response Body

200 OK

Content-Type: application/json

Field Type Description
id int
accountExpired boolean Account Expired
accountLocked boolean Account Locked
clientID String Client ID for ROLE_SERVICE_LEVEL users
enabled boolean Enabled
email String User Email
phone String User Phone - should be in international format - e.g. for US phone numbers +1NNNNNNNNNN
passwordExpired boolean Password Expired
username String Username
scopeFilter Object
authorities String ist
customer Object id and name

Application

Application is the highest level entity when deploying a RadioCloud based IOT service.

Application has Nodes, Custom Fields, Sites, Devices, Zonal Activators, and Subscriptions.

Application belongs to Customer and has a type

A Customer can define 1 or more instance of an Application as necessary.
For example, if a car dealers has multiple locations, an Application can be created for each location.

Application Type defines the behaviour of an application. For example, an Asset Tracker application keeps track of the location of the assets being tracked, as well as its historical movements. A Parking application keeps track of the status of a parking spot, as well as its usage details.

Properties Type Description
name String Display Name for the application
code String Unique Customer managed application Code across the system.
latitude String The latitude of the home location of the application
longitude String The longitude of the home location of the application
gps_granularity Double Any location change of less than this granularity/distance (in meters) is ignored. If this is 0.0, the default of 6m is used. Checkin messages require double this distance.
status Enum = [0, 1] Application Status
0 - ARCHIVED
1 - ACTIVE
activeMQ_publish_severity_level Enum = [1, 2, 3, 4] ActiveMQ severity level
1 - INFO
2 - HIGH
3 - CRITICAL
4 - NONE
non_responsive_detection_frequency Integer
total_devices Integer Total Number of devices belonging to the application

Get

curl -u username:password
     --request GET
     "https://api.cognosos.net/application"

The above command returns JSON structured like this:

[
  {
    "id": 23,
    "application_type": {
        "name": "Asset Tracker"
    },
    "code": "YOUR_APP_CODE",
    "gps_granularity": 0.0,
    "latitude": "33.7847897",
    "longitude": "-84.3897265",
    "placeId": "ChIJAYrPilwE9YgRT5TFRzdgb8Y",
    "address": "1110 West Peachtree Street Northwest, Atlanta, GA, USA",
    "name": "Cognosos Office",
    "non_responsive_detection_frequency": 2,
    "status": 1,
    "total_devices": 100,
    "date_created": "2018-04-04T14:14:51Z",
    "stats": {
        "nodes": 296,
        "node_stats": {
            "0": 198,
            "1": 17,
            "3": 81
        },
        "devices": 129,
        "custom_fields": 6
    }
  }
]

Get all applications belonging to a customer

HTTP Request

GET https://api.cognosos.net/application

Request Parameters

Field Required Type Description
name false String Filter list by name
code false String Filter list by Application code
status false Integer Filter list by status (Archived or Active)
activeMQ_publish_severity_level false Integer Filter list by ActiveMQ Severity Level

Response Body

200 OK

Content-Type: application/json

Field Type Description
id int
application_type.name String Name of the Application type
code String Application Code
gps_granularity Double GPS Granularity
latitude String Application Latitude
longitude String Application Longitude
placeId String
address String
name String Application Name
non_responsive_detection_frequency Integer
status Integer Archived or Active
total_devices Integer Total Number of Devices
dateCreated String
stats Object nodes, node_stats, devices and custom_fields

Application Types

curl -u username:password
  --request GET
  "https://api.cognosos.net/application/applicationTypes"

The above command returns JSON structured like this:

[
    {
        "id": 1,
        "name": "Asset Tracker",
        "sensor_type": [
            {
                "id": 2,
                "name": "Internal Temperature",
                "datatype": 2,
                "max": 110.0,
                "min": -40.0,
                "max_threshold": 95.0,
                "min_threshold": -20.0,
                "max_critical_threshold": 100.0,
                "min_critical_threshold": -20.0
            },
            {
                "id": 4,
                "name": "Battery Level",
                "datatype": 2,
                "max": 100.0,
                "min": 0.0,
                "max_threshold": 100.0,
                "min_threshold": 25.0,
                "max_critical_threshold": 100.0,
                "min_critical_threshold": 25.0
            },
            {
                "id": 13,
                "name": "GPS Location",
                "datatype": 3,
                "max": 0.0,
                "min": 0.0,
                "max_threshold": 0.0,
                "min_threshold": 0.0,
                "max_critical_threshold": 0.0,
                "min_critical_threshold": 0.0
            }
        ]
    },
    {
        "id": 2,
        "name": "Asset Tracker - Healthcare",
        "sensor_type": []
    }
]

HTTP Request

GET https://api.cognosos.net/application/applicationTypes

Request Parameters

Field Required Type
max false Integer
name false String

Response Body

200 OK

Content-Type: application/json

Field Type Description
id int
name String
sensor_type list id, name, datatype, max, min, max_threshold, min_threshold, max_critical_threshold, min_critical_threshold
id int
name String
datatype int
max float
min float
max_threshold float
min_threshold float
max_critical_threshold float
min_critical_threshold float

Create Application

curl -u username:password
  --request POST
  "https://api.cognosos.net/application/createApplication
  ?code=YOUR_APP_CODEF&application_type_id=1&name=GPS%20Location
  &latitude=99.99999&longitude=-99.99999"

The above command returns JSON structured like this:

[
    {
      "id": 107,
      "address": null,
      "application_type": {
          "id": 1,
          "name": "Asset Tracker"
      },
      "code": "YOUR_APP_CODEF",
      "dateCreated": "2020-05-21T12:54:59Z",
      "gps_granularity": 0.0,
      "latitude": "99.99999",
      "longitude": "-99.99999",
      "name": "GPS Location",
      "non_responsive_detection_frequency": 2,
      "placeId": null,
      "status": 1,
      "total_devices": 0
    }
]

HTTP Request

POST https://api.cognosos.net/application/createApplication

Request Parameters

Field Required Type
application_type_id true int
name true String
latitude true String
longitude true String
code true String
gps_granularity false double
non_responsive_detection_frequency false Integer
total_devices false long
address false String
placeId false String
perimeter false String
sensorTypeList false String

Response Body

201 Created

Content-Type: application/json

Field Type Description
id int
address String
application_type Object id and name
code String
dateCreated String
gps_granularity float
latitude String
longitude String
name String
non_responsive_detection_frequency int
placeId String
status int
total_devices int

Delete

curl -u username:password
  --request DELETE
  "https://api.cognosos.net/application
  ?code=YOUR_APP_CODEF&name=GPS%20Location&latitude=99.99999&longitude=-99.99999"

The above command returns JSON structured like this:

[
    {
        "id": 107,
        "application_type": {
            "name": "Asset Tracker"
        },
        "code": "YOUR_APP_CODEF",
        "gps_granularity": 0.0,
        "latitude": "99.99999",
        "longitude": "-99.99999",
        "placeId": null,
        "address": null,
        "name": "GPS Location",
        "non_responsive_detection_frequency": 2,
        "status": 1,
        "total_devices": 0,
        "date_created": "2020-05-21T12:55:00Z",
        "stats": {
            "nodes": 0,
            "node_stats": {},
            "devices": 0,
            "custom_fields": 0
        }
    }
]

HTTP Request

DELETE https://api.cognosos.net/application

Request Parameters

Field Required Type
name true String
code true String
dateCreated false Date
latitude true String
longitude true String
placeId false String
address false String
gps_granularity false double
status false Integer
non_responsive_detection_frequency false Integer
total_devices false long
noc_topic false String
noc_topic_arn false String
configuration_flags false String
ble_rtls_enabled false boolean
ble_rtls_provider false String
ble_rtls_customerId false String
ble_rtls_siteId false int
timezone false String
locale false String

Response Body

200 OK

Content-Type: application/json

Field Type Description
id int
application_type Object
code String
gps_granularity float
latitude String
longitude String
placeId String
address String
name String
non_responsive_detection_frequency int
status int
total_devices int
date_created String
stats Object nodes, node_stats, devices, custom_fields

Index

curl -u username:password
  --request GET
  "https://api.cognosos.net//application”

The above command returns JSON structured like this:

[
    {
        "id": 23,
        "application_type": {
            "name": "Asset Tracker"
        },
        "code": "YOUR_APP_CODE",
        "gps_granularity": 0.0,
        "latitude": "33.7847897",
        "longitude": "-84.3897265",
        "placeId": null,
        "address": null,
        "name": "Cognosos Office",
        "non_responsive_detection_frequency": 2,
        "status": 1,
        "total_devices": 100,
        "date_created": "2018-04-04T14:14:51Z",
        "stats": {
            "nodes": 257,
            "node_stats": {
                "0": 128,
                "1": 37,
                "3": 92
            },
            "devices": 146,
            "custom_fields": 5
        }
    },
    {
        "id": 100,
        "application_type": {
            "name": "Asset Tracker"
        },
        "code": "COGNOSOS_OFFICE_NEW_APPLICATION_TEST",
        "gps_granularity": 0.0,
        "latitude": "93.7847897",
        "longitude": "-54.3897265",
        "placeId": "AbCdEfG-XyZ,
        "address": "1100 Spring Street Northwest, Atlanta, GA, USA",
        "name": "New Application Test",
        "non_responsive_detection_frequency": 2,
        "status": 1,
        "total_devices": 0,
        "date_created": "2020-03-09T20:31:07Z",
        "stats": {
            "nodes": 0,
            "node_stats": {},
            "devices": 0,
            "custom_fields": 4
        }
    }
]

HTTP Request

GET https://api.cognosos.net/application

Request Parameters

Field Required Type
max false Integer
name false String
status false Integer
code false String

Response Body

200 OK

Content-Type: application/json

Field Type Description
id int
application_type Object
code String
gps_granularity float
latitude String
longitude String
placeId String
address String
name String
non_responsive_detection_frequency int
status int
total_devices int
date_created String
stats Object nodes, node_stats, devices, custom_fields

Node Count By Zone

curl -u username:password
  --request GET
  "https://api.cognosos.net/application/nodeCountByZone?
  application_code=YOUR_APP_CODE”

The above command returns JSON structured like this:

[
    {
        "id": 640.0,
        "count": 93
    },
    {
        "id": 1923.0,
        "count": 31
    },
    {
        "id": 2177.0,
        "count": 8
    },
    {
        "id": -1,
        "count": 59
    }
]

HTTP Request

GET https://api.cognosos.net/application/nodeCountByZone

Request Parameters

Field Required Type
application_code true String

Response Body

200 OK

Content-Type: application/json

Field Type Description
id float
count int

Save

curl -u username:password
  --request POST
  "https://api.cognosos.net/application
  ?application_type_id=1&name=New%20Application%20Test2
  &latitude=33.7847897&longitude=-85
  &address=1100%20Spring%20Street%20Northwest,%20Atlanta,%20GA,%20USA”

The above command returns JSON structured like this:

{
    "id": 110,
    "address": "1100 Spring Street Northwest, Atlanta, GA, USA",
    "application_type": {
        "id": 1,
        "name": "Asset Tracker"
    },
    "code": "COGNOSOS_OFFICE_NEW_APPLICATION_TEST2",
    "dateCreated": "2020-05-21T15:43:47Z",
    "gps_granularity": 0.0,
    "latitude": "33.7847897",
    "longitude": "-85",
    "name": "New Application Test2",
    "non_responsive_detection_frequency": 2,
    "placeId": null,
    "status": 1,
    "total_devices": 0
}

HTTP Request

POST https://api.cognosos.net/application

Request Parameters

Field Required Type
name true String
latitude true String
longitude true String
address true String
placeId false String
application_type_id true int
ble_rtls_enabled false boolean
ble_rtls_provider false String
ble_rtls_customerId false String
ble_rtls_siteId false int
timezone false String
locale false String
dateCreated false Date
code false String
status false int

Response Body

201 Created

Content-Type: application/json

Field Type Description
id int
address String
application_type Object id and name
code String
dateCreated String
gps_granularity float
latitude String
longitude String
name String
non_responsive_detection_frequency int
placeId String
status int
total_devices int
curl -u username:password
  --request GET
  "https://api.cognosos.net/application/search?q=COG”

The above command returns JSON structured like this:

[
    {
        "type": "asset",
        "application": {
            "code": "YOUR_APP_CODE",
            "name": "Cognosos Office"
        },
        "id": 166260,
        "name": "tag3201",
        "latitude": "33.7848",
        "longitude": "-84.389953",
        "match": [
            "Patriot",
            "Jeep",
            "Blue",
            "2015",
            "The best car in Cognosos."
        ]
    }
]

HTTP Request

GET https://api.cognosos.net/application/search

Request Parameters

Field Required Type
max false Integer
q true String
application_code false String
hint false String

Response Body

200 OK

Content-Type: application/json

Field Type Description
type String
application Object id and name
latitude String
longitude String
match list

Update

curl -u username:password
  --request PUT
  "https://api.cognosos.net/application/update?
  code=COGNOSOS_OFFICE_NEW_APPLICATION_TEST2”

The above command returns JSON structured like this:

{
    "id": 110,
    "address": "1100 Spring Street Northwest, Atlanta, GA, USA",
    "application_type": {
        "id": 1,
        "name": "Asset Tracker"
    },
    "code": "COGNOSOS_OFFICE_NEW_APPLICATION_TEST2",
    "dateCreated": "2020-05-21T15:43:47Z",
    "gps_granularity": 0.0,
    "latitude": "33.7847897",
    "longitude": "-85",
    "name": "New Application Test2",
    "non_responsive_detection_frequency": 2,
    "placeId": null,
    "status": 1,
    "total_devices": 0
}

HTTP Request

PUT https://api.cognosos.net/application/update

Request Parameters

Field Required Type
code true String

Response Body

200 OK

Content-Type: application/json

Field Type Description
id int
address String
application_type Object id and name
code String
dateCreated String
gps_granularity float
latitude String
longitude String
name String
non_responsive_detection_frequency int
placeId String
status int
total_devices int

Custom Field

A Custom Field belongs to an Application and a Node would define the value for this field.
For example, a parking lot application tracking cars can have custom fields for car attributes such as Color, Make, Model, etc.

Properties Type Description
name String Name of the Custom Field

Create Custom Field

curl -u username:password
  --request POST
  "https://api.cognosos.net/CustomField/createCustomField?
  application_code=YOUR_APP_CODE&name=custom"

The above command returns JSON structured like this:

{
    "id": 852,
    "isCategorical": true,
    "isVisibleToGuest": true,
    "name": "custom",
    "rank": 1
}

HTTP Request

POST https://api.cognosos.net/CustomField/createCustomField

Request Body

Field Required Type
application_code true String
name true String

Response Body

201 Created

Content-Type: application/json

Field Type Description
id int
isCategorical boolean
isVisibleToGuest boolean
name String
rank int

Delete

curl -u username:password
  --request DELETE
  "https://api.cognosos.net/CustomField?
  application_code=YOUR_APP_CODE&name=custom”

The above command returns JSON structured like this:

[
    {
        "id": 852,
        "isCategorical": true,
        "isVisibleToGuest": true,
        "name": "custom",
        "rank": 1
    }
]

HTTP Request

DELETE https://api.cognosos.net/CustomField

Request Body

Field Required Type
name true String
isBatchDeletable false boolean
rank false int
isCategorical false boolean
isVisibleToGuest false boolean
application_code true String

Response Body

200 OK

Content-Type: application/json

Field Type Description
id int
isCategorical boolean
isVisibleToGuest boolean
name String
rank int

Index

curl -u username:password
  --request GET
  "https://api.cognosos.net/CustomField?application_code=YOUR_APP_CODE”

The above command returns JSON structured like this:

[
    {
        "id": 110,
        "isCategorical": true,
        "isVisibleToGuest": true,
        "name": "Color",
        "rank": 1
    },
    {
        "id": 852,
        "isCategorical": true,
        "isVisibleToGuest": true,
        "name": "custom",
        "rank": 1
    }
]

HTTP Request

GET https://api.cognosos.net/CustomField

Request Body

Field Required Type
max false Integer
application_code true String
name false String

Response Body

200 OK

Content-Type: application/json

Field Type Description
id int
isCategorical boolean
isVisibleToGuest boolean
name String
rank int

Save

curl -u username:password
  --request POST
  "https://api.cognosos.net/CustomField?
  application_code=YOUR_APP_CODE&name=custom”

The above command returns JSON structured like this:

[
    {
        "id": 852,
        "isCategorical": true,
        "isVisibleToGuest": true,
        "name": "custom",
        "rank": 1
    }
]

HTTP Request

POST https://api.cognosos.net/CustomField

Request Body

Field Required Type
name true String
isBatchDeletable false boolean
rank false int
isCategorical false boolean
isVisibleToGuest false boolean
application_code true String

Response Body

200 OK

Content-Type: application/json

Field Type Description
id int
isCategorical boolean
isVisibleToGuest boolean
name String
rank int

Update

curl -u username:password
  --request PUT
  "https://api.cognosos.net/CustomField?
  application_code=YOUR_APP_CODE&name=custom”

The above command returns JSON structured like this:

[
    {
        "id": 852,
        "isCategorical": true,
        "isVisibleToGuest": true,
        "name": "custom",
        "rank": 1
    }
]

HTTP Request

PUT https://api.cognosos.net/CustomField

Request Body

Field Required Type
name true String
isBatchDeletable false boolean
rank false int
isCategorical false boolean
isVisibleToGuest false boolean
application_code true String

Response Body

200 OK

Content-Type: application/json

Field Type Description
id int
isCategorical boolean
isVisibleToGuest boolean
name String
rank int

Custom Field Value

Custom Field Value belongs to a node and is the value for the Custom Field defined while creating an Application.

Properties Type Description
value String Value of the Custom Field

Batch Save

Request Body

Field Required Type
application_code true String
filecsv true

Response Body

[message: ‘Process to upload Custom Field Values started’]

Batch Update

Request Body

Field Required Type
application_code true String
custom_field_name true String
filecsv true

Response Body

[message: ‘Process to upload Custom Field Values started’]

Delete

curl -u username:password
  --request DELETE
  "https://api.cognosos.net/customFieldValue?
  application_code=YOUR_APP_CODE&custom_field_name=COLOR”

The above command returns JSON structured like this:

[
    {
        "value": "red"
    },
    {
        "value": "grey"
    }
]

HTTP Request

DELETE https://api.cognosos.net/customFieldValue

Request Body

Field Required Type
application_code true String
node_id or asset_identifier or custom_field_name true long or String or String

Response Body

200 OK

Content-Type: application/json

Field Type Description
value String

Distinct

curl -u username:password
  --request GET
  "https://api.cognosos.net/customFieldValue/distinct?
  application_code=YOUR_APP_CODE”

The above command returns JSON structured like this:

[
    {
        "customField": "Model",
        "values": [
            "--",
            "3",
            "328i",
            "A3",
            "abc",
            "accord",
            "Backpack",
            "C",
            "Caucasian",
            "Civic",
            "Diverge E5",
            "e",
            "G35",
            "Grand Cherokee",
            "gx470",
            "i"
        ]
    }
]

HTTP Request

GET https://api.cognosos.net/customFieldValue/distinct

Request Body

Field Required Type
application_code true String
q false String
max false int
customField false String
status false String

Response Body

200 OK

Content-Type: application/json

Field Type Description
customField String
values list

Index

curl -u username:password
  --request GET
  "https://api.cognosos.net/customFieldValue?
  application_code=YOUR_APP_CODE&custom_field_name=COLOR"

The above command returns JSON structured like this:

[
    {
        "value": "red"
    },
    {
        "value": "grey"
    },
    {
        "value": "Pink"
    }
]

HTTP Request

GET https://api.cognosos.net/customFieldValue

Request Body

Field Required Type
max false Integer
application_code true String
node_id or asset_identifier or custom_field_name true long or String or String

Response Body

200 OK

Content-Type: application/json

Field Type Description
value String

Save

curl -u username:password
  --request POST
  "https://api.cognosos.net/customFieldValue?
  application_code=YOUR_APP_CODE&custom_field_name=COLOR”

The above command returns JSON structured like this:

[
    {
        "value": "red"
    },
    {
        "value": "grey"
    },
    {
        "value": "Pink"
    }
]

HTTP Request

POST https://api.cognosos.net/custom_field_values

Request Body

Field Required Type
application_code true String
node_id or asset_identifier or custom_field_name true long or String or String

Response Body

200 OK

Content-Type: application/json

Field Type Description
value String

Update

curl -u username:password
  --request PUT
  "https://api.cognosos.net/customFieldValue?
  application_code=YOUR_APP_CODE&custom_field_name=COLOR”

The above command returns JSON structured like this:

[
    {
        "value": "red"
    },
    {
        "value": "grey"
    },
    {
        "value": "Pink"
    }
]

HTTP Request

PUT https://api.cognosos.net/custom_field_values

Request Body

Field Required Type
application_code true String
node_id or asset_identifier or custom_field_name true long or String or String

Response Body

200 OK

Content-Type: application/json

Field Type Description
value String

Node

Node corresponds to a physical asset/thing being tracked. Node belongs to an Application and has a unique asset_identifier accross application. Node can be attached/detached to/from a Device belonging to same application. Node is considered Active when it is attached to a Device and Inactive when it is not.

Properties Type Description
asset_identifier String The value that uniquely identifies this asset accross application. For example, in case of an automobile, this would be the VIN number
device_id Long The ID of the device attached to this Asset/Node. If device_id is 0 or null, then Node is not attached to any device.
latitude String The latitude of the current location of this Node/Asset
longitude String The longitude of the current location of this Node/Asset
location_url String Google maps url for the location
current_zone String Name of the current zone, if the Node is inside one. Semi-colon separated list if node is in multiple zones.
status Enum = [0,1,2] The status of the Node/Asset.
0 - Inactive
1 - Active
2 - Not Responding

Node has many Sensors, Custom Field Values

Attach

curl -u username:password
  --request GET
  "https://api.cognosos.net/node/attach?
  application_code=AAC&device_id=2201&asset_identifier=car&color=red"

The above command returns JSON structured like this:

{
  "id": 17,
  "application": {
    "id": 4,
    "code": "AAC",
    "name": "AT 3"
  },
  "asset_identifier": "car",
  "current_zone": null,
  "device_id": 2201,
  "latitude": null,
  "longitude": null,
  "location_url": null,
  "status": 1,
  "custom_field_values": [
    {
      "custom_field": "color",
      "value": "red",
      "id":1
    }
  ],
  "battery_level": 255,
  "battery_status": 0,
  "internal_temperature": 255,
  "signal_strength": null
}

If an error is encountered, a 4xx series response in the following form will be returned. The error attribute is deprecated, New clients should use the information returned in the status object.

{
  "error": "Application Code (String) and (Asset Identifier (String) or Device ID (long)) are required",
  "version": 2,
  "status": {
    "httpcode": 400,
    "title": "Tracker Detachment Failed",
    "shortmsg": "More information is needed to complete the detachment.",
    "longmsg": "Make sure to insert a tracker ID and an asset ID in the designated fields."
  }
}

This endpoint attaches a Device specified by device_id to the Node specified by the asset_identifier. If the Node is already attached to another Device, it will automatically be detached from that Device. If the Device corresponding to device_id is attached to another Node, that association will also be detached.

If the Node doesn’t exist in the system, it will be added. While adding a new node to the system, values for Custom Field can also be specified as request parameters. Sensors with default thresholds will be created for the new node.

HTTP Request

GET https://api.cognosos.net/node/attach

Request Parameters

Parameter Required Description
asset_identifier true Unique Identifier for the Node
device_id true ID of the Device
application_code true Application Code
custom_field_name false Custom Field defined while creating Application

Response Body

200 OK If Node already exist in the system.

201 CREATED If new Node is created.

Content-Type: application/json

Field Type Description
id Long Node ID
asset_identifier String Unique identifier for the Node
current_zone String null if new Node
custom_field_values Array Custom Field Values
device_id Long ID of the Device
latitude String null if new Node
longitude String null if new Node
location_url String null if new Node
status Integer Node Status

Detach

curl -u username:password
  --request GET
  "https://api.cognosos.net/node/detach?
  application_code=AAC&asset_identifier=car"

The above command returns JSON structured like this:

{
  "id": 17,
  "application": {
    "id": 4,
    "code": "AAC",
    "name": "AT 3"
  },
  "asset_identifier": "car",
  "current_zone": null,
  "device_id": 0,
  "latitude": null,
  "longitude": null,
  "location_url": null,
  "status": 0,
  "custom_field_values": [
    {
      "custom_field": "color",
      "value": "red",
      "id":1
    }
  ]
}

Detaches the Node identified by asset_identifier from the attached Device, if it is attached to one. An event is published to the topic, if so.

HTTP Request

GET https://api.cognosos.net/node/detach

URL Parameters

Parameter Required Type Description
asset_identifier or device_id true Unique Identifier for the Node or Device ID
application_code true Application Code

Response Body

200 OK

Content-Type: application/json

Field Type Description
id Long Node ID
asset_identifier String Unique identifier for the Node
current_zone String null if new Node
custom_field_values Array Custom Field Values
device_id Long ID of the Device
latitude String null if new Node
longitude String null if new Node
location_url String null if new Node
status Integer Node Status

Get

curl -u username:password
  --request GET
  "https://api.cognosos.net/node?application_code=AAA"

The above command returns JSON structured like this:

[
  {
    "id": 1,
    "application": {
      "id": 1,
      "code": "AAA",
      "name": "Asset Tracker"
    },
    "asset_identifier": "test_asset_2201",
    "current_zone": "1;2",
    "current_zone_text": "Office - Floor1; Room 32",
    "device_id": 2201,
    "latitude": "33.69605",
    "longitude": "-84.62221",
    "location_url": "https://www.google.com/maps?q=33.69605 -84.62221",
    "status": 1
  },
  {
    "id": 2,
    "application": {
      "id": 1,
      "code": "AAA",
      "name": "Asset Tracker"
    },
    "asset_identifier": "test_asset_2202",
    "current_zone": "",
    "device_id": 2202,
    "latitude": "33.69615",
    "longitude": "-84.62227",
    "location_url": "https://www.google.com/maps?q=33.69615 -84.62227",
    "status": 1
  },
  {
    "id": 3,
    "application": {
      "id": 1,
      "code": "AAA",
      "name": "Asset Tracker"
    },
    "asset_identifier": "test_asset_2203",
    "current_zone": "",
    "device_id": 2203,
    "latitude": "33.6963",
    "longitude": "-84.62236",
    "location_url": "https://www.google.com/maps?q=33.6963 -84.62236",
    "status": 1
  }
]

Get list of Nodes for an Application

HTTP Request

GET https://api.cognosos.net/node

Request Parameter

Field Required Type Description
application_code true String Filter list by Application
asset_identifier false String Filter list by Asset Identifier
status false Integer Filter list by status
device_id false Long Filter list by Device ID
current_zone false String Filter list by current zone.
no_current_zone false String If specified, returns list of Nodes that are not in any zone
max false Integer Max number of Nodes that are returned. Defaults to 200, max 20,000
battery_threshold false Float Returns Node whose attached device has battery level less than the specified value
signal_threhsold false Float Returns Node whose attached device has signal strength less than the specified value

Response Body

200 OK

Content-Type: application/json

Field Type Description
id Integer Node ID
application Object Application Code, ID and Name
asset_identifier String Asset Identifier
current_zone String Semi-colon separated list of Zone ID
current_zone_text String Semi-colon separate list of Zone names
device_id Long ID of the device attached, if any
latitude String current Latitude
longitude String current Longitude
location_url String Google maps url for the location
status Integer Status

Get Node Details

curl -u username:password
  --request GET
  "https://api.cognosos.net/node"

The above command returns JSON structured like this:

{
  "id": 17,
  "application": {
    "id": 4,
    "code": "AAC",
    "name": "AT 3"
  },
  "asset_identifier": "car",
  "current_zone": null,
  "device_id": 2201,
  "latitude": null,
  "longitude": null,
  "location_url": null,
  "status": 1,
  "custom_field_values": [
    {
      "custom_field": "color",
      "value": "red",
      "id":1
    }
  ],
  "battery_level": 255,
  "battery_status": 0,
  "internal_temperature": 255,
  "signal_strength": null
}

Get Details of the Node

HTTP Request

GET https://api.cognosos.net/node/details

Request Parameter

Field Required Type Description
node_id true Long Node ID

Response Body

200 OK

Content-Type: application/json

Field Type Description
id Integer Node ID
application String Application
asset_identifier String Asset Identifier
current_zone String Semi-colon separated list of Zone ID
latitude String current Latitude
longitude String current Longitude
device_id Long ID of the device attached, if any
status Integer Status
location_url String Google maps url for the location
custom_field_values Object Custom Field Values
battery_level Float Battery Value of Device attached
battery_status Float Battery Status of Device attached
internal_temperature Float Internal Temperature of Device attached
signal_strength Float Signal Strength of Device attached

Active Node Status

curl -u username:password
  --request GET
  "https://api.cognosos.net/node/activeNodeStatus
  ?application_code=YOUR_APP_CODE”

The above command returns JSON structured like this:

[
    {
        "application": {
            "name": "Cognosos Office",
            "code": "YOUR_APP_CODE"
        },
        "id": 71273,
        "asset_identifier": "0000101199",
        "current_zone": "",
        "current_zone_text": "",
        "latitude": null,
        "longitude": null,
        "location_url": null,
        "battery_level": null,
        "battery_status": null,
        "device_id": 0,
        "last_message_date": "2018-04-04T21:46:44Z",
        "date_attached": "2018-04-04T21:46:44Z",
        "unresponsive_since": 777,
        "status": 0,
        "last_gps_message_date": null,
        "status_text": "Inactive",
        "battery_status_text": "",
        "custom_field_values": []
    }
]

HTTP Request

GET https://api.cognosos.net/node/activeNodeStatus

Request Body

Field Required Type
application_code true String
start_last_message_date false long
end_last_message_date false long
start_gps_date false long
end_gps_date false long
order false String
max false Integer
status false String
asset_identifier false String
offset false Integer
sort false String
custom_field_value false String
format false String
search false String
battery_status false Integer
device_id false Long

Response Body

200 OK

Content-Type: application/json

Field Type Description
id Integer Node ID
application String Application
asset_identifier String Asset Identifier
current_zone String Semi-colon separated list of Zone ID
current_zone_text String
latitude String current Latitude
longitude String current Longitude
device_id Long ID of the device attached, if any
status Integer Status
location_url String Google maps url for the location
custom_field_values Object Custom Field Values
battery_level Float Battery Value of Device attached
battery_status Float Battery Status of Device attached
last_message_date String
date_attached String
unresponsive_since int
status int
last_gps_message_date String
status_text String
battery_status_text String
custom_field_values list
curl -u username:password
  --request GET
  "https://api.cognosos.net/node/advancedSearch
  ?application_code=YOUR_APP_CODE”

The above command returns JSON structured like this:

[
    {
        "id": 807055,
        "asset_identifier": "0000200038",
        "latitude": "33.78485",
        "longitude": "-84.389987",
        "device_id": 200038,
        "status": 3
    },
    {
        "id": 579700,
        "asset_identifier": "000810",
        "latitude": "33.838232",
        "longitude": "-84.3809",
        "device_id": 1000065,
        "status": 3
    }
]

HTTP Request

GET https://api.cognosos.net/node/advancedSearch

Request Body

Field Required Type
zone false String
application_code true String
max false int
noZone false boolean
customFieldName false String
Internal Temperature_min false Float
Internal Temperature_max false Float
Battery Level_min false Float
Battery Level_max false Float
GPS Location_min false Float
GPS Location_max false Float

Response Body

200 OK

Content-Type: application/json

Field Type Description
id Long Node ID
asset_identifier String Unique identifier for the Node
device_id Long ID of the Device
latitude String null if new Node
longitude String null if new Node
status Integer Node Status

Batch Save

curl -u username:password
  --request POST
  "https://api.cognosos.net/node/batchSave
  ?custom_fields=COLOR&application_code=YOUR_APP_CODE”

The above command returns JSON structured like this:


HTTP Request

POST https://api.cognosos.net/node/batchSave

Request Body

Field Required Type
application_code true String
custom_fields true String

Response Body

[message: ‘Process to save Nodes started’]

Check For Unresponsive Nodes

Count

curl -u username:password
  --request GET
  "https://api.cognosos.net/node/count?application_code=YOUR_APP_CODE”

The above command returns JSON structured like this:

{
    "application": {
        "name": "Cognosos Office",
        "code": "YOUR_APP_CODE"
    },
    "count": 257
}

HTTP Request

GET https://api.cognosos.net/node/count

Request Body

Field Required Type
application_code true String
start_last_message_date false long
end_last_message_date false long
asset_identifier false String
status false String
custom_field_value false String
search false String
battery_status false Integer
device_id false Long

Response Body

200 OK

Content-Type: application/json

Field Type Description
application Object name and code
count int

Count Matching

Request Body

Field Required Type
filter false Filter
filterDefinition false FilterDefinition
onSpotDefinition false OnSpotDefinition
filteredOnSpotStatus false List
application_code true String
max false Integer
offset false Integer
search false String
searchAllFields false Boolean
sort false String
order false String
partial false Boolean
separators false List

Response Body

Field Type Description
count int

Ensure Valid Search Command

curl -u username:password
  --request GET
  "https://api.cognosos.net/node/ensureValidSearchCommand?application_code=YOUR_APP_CODE”

The above command returns JSON structured like this:


HTTP Request

GET https://api.cognosos.net/node/ensureValidSearchCommand

Request Body

Field Required Type
filter false Filter
filterDefinition false FilterDefinition
onSpotDefinition false OnSpotDefinition
filteredOnSpotStatus false List
application_code true String
max false Integer
offset false Integer
search false String
searchAllFields false Boolean
sort false String
order false String
partial false Boolean
separators false List
format false String

Index

curl -u username:password
  --request GET
  "https://api.cognosos.net/node”

The above command returns JSON structured like this:

[
    {
        "id": 807055,
        "application": {
            "id": 23,
            "code": "YOUR_APP_CODE",
            "name": "Cognosos Office"
        },
        "asset_identifier": "0000200038",
        "current_zone": "640;1923",
        "device_id": 200038,
        "latitude": "33.78485",
        "longitude": "-84.389987",
        "location_url": "https://www.google.com/maps?q=33.78485 -84.389987",
        "status": 3
    }
]

HTTP Request

GET https://api.cognosos.net/node

Request Body

Field Required Type
max false Integer
application_code true String
id false long
status false Integer
device_id false long
asset_identifier false String
current_zone false String
no_current_zone false String
battery_threshold false Float
signal_threshold false Float

Response Body

200 OK

Content-Type: application/json

Field Type Description
id Integer Node ID
application String Application
asset_identifier String Asset Identifier
current_zone String Semi-colon separated list of Zone ID
latitude String current Latitude
longitude String current Longitude
device_id Long ID of the device attached, if any
status Integer Status
location_url String Google maps url for the location

On Spot Counts By Mapping

curl -u username:password
  --request POST
  "https://api.cognosos.net/node/onSpotCounts_byMapping
  ?application_code=YOUR_APP_CODE”

The above command returns JSON structured like this:


HTTP Request

POST https://api.cognosos.net/node/onSpotCounts_byMapping

Request Body

Field Required Type
filter false Filter
json false String
type false String
name false String
latitude false String
longitude false String
address false String
placeId false String
application_type_id false int
ble_rtls_enabled false boolean
ble_rtls_provider false String
ble_rtls_customerId false String
ble_rtls_siteId false int
timezone false String
locale false String
dateCreated false Date
filteredOnSpotStatus false List
application_code true String
max false Integer
offset false Integer
search false String
searchAllFields false Boolean
sort false String
order false String
partial false Boolean
separators false List

Response Body

Content-Type: application/json

Save

curl -u username:password
  --request POST
  "https://api.cognosos.net/node”

The above command returns JSON structured like this:


HTTP Request

POST https://api.cognosos.net/node

Request Body

Field Required Type
device_id false long
asset_identifier false String
address false String
latitude true String
longitude true String
status true Integer
location_url false String
current_zone false String
structure false long
date_attached false Date
last_message_date false Date
last_gps_message_date false Date

Response Body

201 CREATED

Content-Type: application/json

Field Type Description
device_id long ID of the device attached, if any
asset_identifier String Asset Identifier
address String
latitude String current Latitude
longitude String current Longitude
status Integer Status
location_url String Google maps url for the location
current_zone String Semi-colon separated list of Zone ID
structure long
date_attached Date
last_message_date Date
last_gps_message_date Date
curl -u username:password
  --request POST
  "https://api.cognosos.net/node/search”

The above command returns JSON structured like this:

[
    {
        "id": 93750,
        "asset_identifier": "test_121113",
        "latitude": "33.784862",
        "longitude": "-84.389983",
        "device_id": 121113,
        "status": 1,
        "current_zone": "640;1923",
        "onSpotStatus": null,
        "onSpotMatchReasons": null,
        "matchedTerms": null
    },
    {
        "id": 136853,
        "asset_identifier": "jims_aspen_one",
        "latitude": "35.398312",
        "longitude": "-83.096545",
        "device_id": 3314,
        "status": 1,
        "current_zone": "2177",
        "onSpotStatus": null,
        "onSpotMatchReasons": null,
        "matchedTerms": null
    }
]

HTTP Request

POST https://api.cognosos.net/node/search

Request Body

Field Required Type
filter false Filter
json false String
type false String
name false String
latitude false String
longitude false String
address false String
placeId false String
application_type_id false int
ble_rtls_enabled false boolean
ble_rtls_provider false String
ble_rtls_customerId false String
ble_rtls_siteId false int
timezone false String
locale false String
dateCreated false Date
filteredOnSpotStatus false List
application_code true String
max false Integer
offset false Integer
search false String
searchAllFields false Boolean
sort false String
order false String
partial false Boolean
separators false List
format false String

Response Body

200 OK

Content-Type: application/json

Field Type Description
id int
asset_identifier String Asset Identifier
latitude String current Latitude
longitude String current Longitude
device_id long The ID of the device attached to this Asset/Node. If device_id is 0 or null, then Node is not attached to any device.
status Integer Status
current_zone String Semi-colon separated list of Zone ID
onSpotStatus List
onSpotMatchReasons List
matchedTerms List

Search V2

curl -u username:password
  --request POST
  "https://api.cognosos.net/node/searchV2”

The above command returns JSON structured like this:

{
    "version": 2,
    "results": [
        {
            "id": 93750,
            "asset_identifier": "test_121113",
            "latitude": "33.784862",
            "longitude": "-84.389983",
            "device_id": 121113,
            "status": 1,
            "current_zone": "640;1923",
            "onSpotStatus": null,
            "onSpotMatchReasons": null,
            "matchedTerms": null
        },
        {
            "id": 136853,
            "asset_identifier": "jims_aspen_one",
            "latitude": "35.398312",
            "longitude": "-83.096545",
            "device_id": 3314,
            "status": 1,
            "current_zone": "2177",
            "onSpotStatus": null,
            "onSpotMatchReasons": null,
            "matchedTerms": null
        }
    ]
}

HTTP Request

POST https://api.cognosos.net/node/searchV2

Request Body

Field Required Type
filter false Filter
json false String
type false String
name false String
latitude false String
longitude false String
address false String
placeId false String
application_type_id false int
ble_rtls_enabled false boolean
ble_rtls_provider false String
ble_rtls_customerId false String
ble_rtls_siteId false int
timezone false String
locale false String
dateCreated false Date
filteredOnSpotStatus false List
application_code true String
max false Integer
offset false Integer
search false String
searchAllFields false Boolean
sort false String
order false String
partial false Boolean
separators false List
format String

Response Body

200 OK

Content-Type: application/json

Field Type Description
version int
results list

Search Detailed

curl -u username:password
  --request POST
  "https://api.cognosos.net/node/searchDetailed
  ?application_code=YOUR_APP_CODE”

The above command returns JSON structured like this:

[
    {
        "id": 93750,
        "application": {
            "id": 23,
            "code": "YOUR_APP_CODE",
            "name": "Cognosos Office"
        },
        "asset_identifier": "test_121113",
        "current_zone": "640;1923",
        "current_zone_text": "office;abc",
        "device_id": 121113,
        "latitude": "33.784862",
        "longitude": "-84.389983",
        "location_url": "https://www.google.com/maps?q=33.784862 -84.389983",
        "last_message_date": "2020-05-21T20:03:05Z",
        "last_gps_message_date": "2019-07-08T20:04:48Z",
        "date_attached": "2018-06-14T21:11:39Z",
        "status": 1,
        "custom_field_values": [],
        "battery_level": 71.87,
        "battery_status": 0,
        "internal_temperature": 25.0,
        "signal_strength": null
    }
]

HTTP Request

POST https://api.cognosos.net/node/searchDetailed

Request Body

Field Required Type
filter false Filter
json false String
type false String
name false String
latitude false String
longitude false String
address false String
placeId false String
application_type_id false int
ble_rtls_enabled false boolean
ble_rtls_provider false String
ble_rtls_customerId false String
ble_rtls_siteId false int
timezone false String
locale false String
dateCreated false Date
filteredOnSpotStatus false List
application_code true String
max false Integer
offset false Integer
search false String
searchAllFields false Boolean
sort false String
order false String
partial false Boolean
separators false List
format false String

Response Body

200 OK

Content-Type: application/json

Field Type Description
id Integer Node ID
application String Application
asset_identifier String Asset Identifier
current_zone String Semi-colon separated list of Zone ID
current_zone_text String
latitude String current Latitude
longitude String current Longitude
device_id Long ID of the device attached, if any
status Integer Status
location_url String Google maps url for the location
last_message_date String
last_gps_message_date String
date_attached String
custom_field_values Object Custom Field Values
battery_level Float Battery Value of Device attached
battery_status Float Battery Status of Device attached
internal_temperature Float Internal Temperature of Device attached
signal_strength Float Signal Strength of Device attached

Search Detailed V2

curl -u username:password
  --request POST
  "https://api.cognosos.net/node/searchDetailedV2
  ?application_code=YOUR_APP_CODE”

The above command returns JSON structured like this:

{
    "result": [
        {
            "id": 93750,
            "application": {
                "id": 23,
                "code": "YOUR_APP_CODE",
                "name": "Cognosos Office"
            },
            "asset_identifier": "test_121113",
            "current_zone": "640;1923",
            "current_zone_text": "office;abc",
            "device_id": 121113,
            "latitude": "33.784862",
            "longitude": "-84.389983",
            "location_url": "https://www.google.com/maps?q=33.784862 -84.389983",
            "last_message_date": "2020-05-21T20:03:05Z",
            "last_gps_message_date": "2019-07-08T20:04:48Z",
            "date_attached": "2018-06-14T21:11:39Z",
            "status": 1,
            "custom_field_values": []
        }
    ]
}

HTTP Request

POST https://api.cognosos.net/node/searchDetailedV2

Request Body

Field Required Type
filter false Filter
json false String
type false String
name false String
latitude false String
longitude false String
address false String
placeId false String
application_type_id false int
ble_rtls_enabled false boolean
ble_rtls_provider false String
ble_rtls_customerId false String
ble_rtls_siteId false int
timezone false String
locale false String
dateCreated false Date
filteredOnSpotStatus false List
application_code true String
max false Integer
offset false Integer
search false String
searchAllFields false Boolean
sort false String
order false String
partial false Boolean
separators false List
format false String

Response Body

200 OK

Content-Type: application/json

Field Type Description
result list

Update

curl -u username:password
  --request PUT
  "https://api.cognosos.net/node/{id}”

The above command returns JSON structured like this:

[
    {
        "id": 807055,
        "application": {
            "id": 23,
            "code": "YOUR_APP_CODE",
            "name": "Cognosos Office"
        },
        "asset_identifier": "0000200038",
        "current_zone": "640;1923",
        "device_id": 200038,
        "latitude": "33.78485",
        "longitude": "-84.389987",
        "location_url": "https://www.google.com/maps?q=33.78485 -84.389987",
        "status": 3
    },
    {
        "id": 579700,
        "application": {
            "id": 23,
            "code": "YOUR_APP_CODE",
            "name": "Cognosos Office"
        },
        "asset_identifier": "000810",
        "current_zone": "",
        "device_id": 1000065,
        "latitude": "33.838232",
        "longitude": "-84.3809",
        "location_url": "https://www.google.com/maps?q=33.838232 -84.3809",
        "status": 3
    }
]

HTTP Request

PUT https://api.cognosos.net/node/{id}

Request Body

Field Required Type
device_id false long
asset_identifier false String
address false String
latitude true String
longitude true String
status true Integer
location_url false String
current_zone false String
structure false long
date_attached false Date
last_message_date false Date
last_gps_message_date false Date

Response Body

200 OK

Content-Type: application/json

Field Type Description
id Integer Node ID
application String Application
asset_identifier String Asset Identifier
current_zone String Semi-colon separated list of Zone ID
latitude String current Latitude
longitude String current Longitude
device_id Long ID of the device attached, if any
status Integer Status
location_url String Google maps url for the location

Update Nodes

curl -u username:password
  --request POST
  "https://api.cognosos.net/node/updateNodes
  ?application_code=YOUR_APP_CODE”

The above command returns JSON structured like this:

{
    "result": "success",
    "message": "Update batch submitted with 0 items",
    "threadId": []
}

HTTP Request

POST https://api.cognosos.net/node

Request Body

Field Required Type
application_code true String

Response Body

200 OK

Content-Type: application/json

Field Type Description
result String
message String
threadId list

Delete

curl -u username:password
  --request DELETE
  "https://api.cognosos.net/node/{id}”

HTTP Request

DELETE https://api.cognosos.net/node/{id}

Response Body

204 NO_CONTENT

Batch Delete

curl -u username:password
  --request POST
  "https://api.cognosos.net/node/batchDelete”

HTTP Request

POST https://api.cognosos.net/node/batchDelete

Request Body

Field Required Type
nodeIds true Array[Long]
application_code true String

Response Body

200 OK

Zone

A Zone is a contiguous area that belongs to an Application. This is generally used for geo-fencing. If a Node enters or leaves a zone, an Event will be triggered.

Properties Type Description
name String The Name of the Zone
site_id Long ID of Site to which Zone belongs
latitude String
longitude String
perimeter String The lat/long co-ordinates of the Zone
area Double Area of the Zone.
max_count_threshold String The maximum number of nodes that should ideally be in this Zone. If the count crosses this maximum value, an Event is triggered. However, the system doesn’t prevent from more nodes being added to this Zone
min_count_threshold String The minimum Nodes that should ideally be in this Zone. If the count falls below this manimum value, an Event is triggered.
node_count Long Number of Nodes in this Zone
capacity Long Capacity of the Zone
status Enum = [-1,1] The status of the Zone.
(-1) - ARCHIVED
1 - IN_USE

Create

curl -u username:password
  -H "Content-Type: application/json"
  -X POST -d
  '{
    "name":"test_zone",
    "perimeter":"33.4554 64.23432,33.7832 65.42342,33.4534 65.324242,33.4554 64.23432",
    "latitude":"33.4554",
    "longitude":"64.23432",
    "area":120.12,
    "capacity": 100
  }' 
  "https://api.cognosos.net/zones?application_code=AAA"

The above command returns JSON structured like this:

{
    "id": 162,
    "dateCreated": "2017-12-14T15:43:34Z",
    "area":120.12,
    "capacity":100,
    "latitude": "33.4554",
    "longitude": "64.23432",
    "max_count_threshold": null,
    "min_count_threshold": null,
    "name": "test_zone",
    "node_count": null,
    "perimeter": "33.4554 64.23432,33.7832 65.42342,33.4534 65.324242,33.4554 64.23432",
    "site_id": 0,
    "status": 1
}

This endpoint creates a new zone.

HTTP Request

POST https://api.cognosos.net/zones?application_code={code}

Headers

Content-Type: application/json

Request Body

Field Required Type Description
name true String The Name of the Zone
latitude false String
longitude false String
perimeter true String The lat/long co-ordinates of the Zone
area false Double Area of the Zone.
max_count_threshold false String The maximum number of nodes that should ideally be in this Zone. If the count crosses this maximum value, an Event is triggered. However, the system doesn’t prevent from more nodes being added to this Zone
min_count_threshold false String The minimum Nodes that should ideally be in this Zone. If the count falls below this manimum value, an Event is triggered.
capacity false Long Capacity of the Zone

Response Body

201 CREATED

Content-Type: application/json

Field Type Description
name String The Name of the Zone
site_id int ID of Site to which Zone belongs
latitude String
longitude String
perimeter String The lat/long co-ordinates of the Zone
area Float Area of the Zone.
max_count_threshold Float The maximum number of nodes that should ideally be in this Zone. If the count crosses this maximum value, an Event is triggered. However, the system doesn’t prevent from more nodes being added to this Zone
min_count_threshold Float The minimum Nodes that should ideally be in this Zone. If the count falls below this manimum value, an Event is triggered.
node_count long Number of Nodes in this Zone
status int The status of the Zone.
(-1) - ARCHIVED
1 - IN_USE
capacity long Capacity of the Zone

Update

curl -u username:password
  -H "Content-Type: application/json"
  -X PUT -d
  '{
    "name":"test_zone A"
  }' 
  "https://api.cognosos.net/zones/162"

The above command returns JSON structured like this:

{
    "id": 162,
    "dateCreated": "2017-12-14T15:43:34Z",
    "area":120.12,
    "capacity":100,
    "latitude": "33.4554",
    "longitude": "64.23432",
    "max_count_threshold": null,
    "min_count_threshold": null,
    "name": "test_zone A",
    "node_count": null,
    "perimeter": "33.4554 64.23432,33.7832 65.42342,33.4534 65.324242,33.4554 64.23432",
    "site_id": 0,
    "status": 1
}

This endpoint updates a zone.

HTTP Request

PUT https://api.cognosos.net/zones/{id}

Headers

Content-Type: application/json

Request Body

Field Required Type Description
name true String The Name of the Zone
latitude false String
longitude false String
perimeter true String The lat/long co-ordinates of the Zone
area false Double Area of the Zone.
max_count_threshold false Float The maximum number of nodes that should ideally be in this Zone. If the count crosses this maximum value, an Event is triggered. However, the system doesn’t prevent from more nodes being added to this Zone
min_count_threshold false Float The minimum Nodes that should ideally be in this Zone. If the count falls below this manimum value, an Event is triggered.
capacity false Long Capacity of the Zone
dateCreated false Date
site_id false long
node_count false Long
type false String
layout false String
level false Integer
location_provider_floorId false String
location_provider_buildingId false String
status false Integer

Response Body

200 OK

Content-Type: application/json

Field | Type | Description ——— | ———– name | String | The Name of the Zone site_id | int | ID of Site to which Zone belongs latitude | String longitude | String perimeter | String | The lat/long co-ordinates of the Zone area | Float | Area of the Zone. max_count_threshold | Float | The maximum number of nodes that should ideally be in this Zone. If the count crosses this maximum value, an Event is triggered. However, the system doesn’t prevent from more nodes being added to this Zone min_count_threshold | Float | The minimum Nodes that should ideally be in this Zone. If the count falls below this manimum value, an Event is triggered. node_count | long | Number of Nodes in this Zone status | int | The status of the Zone.
(-1) - ARCHIVED
1 - IN_USE capacity | long | Capacity of the Zone

Count

curl -u username:password
  --request GET
  "https://api.cognosos.net/zone/count
  ?application_code=YOUR_APP_CODE”

The above command returns JSON structured like this:

{
    "count": 3
}

HTTP Request

GET https://api.cognosos.net/zone/count

Request Body

Field Required Type
application_code true String
status false Integer
name false String
site_name false String
type false String

Response Body

200 OK

Content-Type: application/json

Field Type Description
count int

Delete

curl -u username:password
  --request DELETE
  "https://api.cognosos.net/zones”

The above command returns JSON structured like this:

HTTP Request

DELETE https://api.cognosos.net/zones/

Request Body

Field Required Type
name true String
dateCreated false Date
site_id false long
latitude false String
longitude false String
perimeter true String
max_count_threshold false Float
min_count_threshold false Float
area false Double
node_count false Long
capacity false Long
type false String
layout false String
level false Integer
location_provider_floorId false String
location_provider_buildingId false String
status false Integer

Response Body

204 NO_CONTENT

Index

curl -u username:password
  --request GET
  "https://api.cognosos.net/zones?application_code=YOUR_APP_CODE”

The above command returns JSON structured like this:

[
    {
        "id": 640,
        "abbreviation": null,
        "area": 4866.032058108687,
        "capacity": null,
        "dateCreated": "2018-05-11T20:51:31Z",
        "latitude": "33.7849877233899",
        "layout": null,
        "longitude": "-84.39045795787433",
        "max_count_threshold": 1000.0,
        "min_count_threshold": 0.0,
        "name": "office",
        "node_count": 54,
        "overlayImage": null,
        "parentZone": null,
        "perimeter": "33.7849877233899 -84.39045795787433,33.7849877233899 -84.38945749391178,33.784508430093204 -84.38947090495685,33.78452403503346 -84.39047405112842,33.7849877233899 -84.39045795787433",
        "site_id": 1,
        "status": 1,
        "type": "OUTDOOR_LOT",
        "z_ordering": 0
    }
]

HTTP Request

GET https://api.cognosos.net/zones

Request Body

Field Required Type
max false Integer
application_code true String
format false String
status false Integer
name false String
site_name false String
type false String
exactMatch false Boolean
parentZoneId false Integer
customerZoneTypeId false Integer

Response Body

200 OK

Content-Type: application/json

Field | Type | Description ——— | ———– id | long abbreviation | String area | Float | Area of the Zone. capacity | long | Capacity of the Zone dateCreated | String latitude | String layout | String longitude | String max_count_threshold | Float | The maximum number of nodes that should ideally be in this Zone. If the count crosses this maximum value, an Event is triggered. However, the system doesn’t prevent from more nodes being added to this Zone min_count_threshold | Float | The minimum Nodes that should ideally be in this Zone. If the count falls below this manimum value, an Event is triggered. name | String | The Name of the Zone node_count | long | Number of Nodes in this Zone overlayImage | Object parentZone | Object perimeter | String | The lat/long co-ordinates of the Zone site_id | int | ID of Site to which Zone belongs status | int | The status of the Zone.
(-1) - ARCHIVED
1 - IN_USE type | String z_ordering | int

Save

curl -u username:password
  --request POST
  "https://api.cognosos.net/zones
  ?application_code=YOUR_APP_CODE&name=Cognosos Office
  &perimeter=33.4554 64.23432,33.7832 65.42342,33.4534 65.324242,33.4554 64.23432”

The above command returns JSON structured like this:

{
    "id": 2160,
    "abbreviation": null,
    "area": 0.0,
    "capacity": 1,
    "dateCreated": "2020-05-22T20:28:40Z",
    "latitude": null,
    "layout": null,
    "longitude": null,
    "max_count_threshold": null,
    "min_count_threshold": null,
    "name": "Cognosos Office",
    "node_count": null,
    "overlayImage": null,
    "parentZone": null,
    "perimeter": "33.4554 64.23432,33.7832 65.42342,33.4534 65.324242,33.4554 64.23432",
    "site_id": 0,
    "status": 1,
    "type": "OUTDOOR_LOT",
    "z_ordering": 0
}

HTTP Request

POST https://api.cognosos.net/zones

Request Body

Field Required Type
name true String
dateCreated false Date
site_id false long
latitude false String
longitude false String
perimeter true String
max_count_threshold false Float
min_count_threshold false Float
area false Double
node_count false Long
capacity false Long
type false String
layout false String
level false Integer
location_provider_floorId false String
location_provider_buildingId false String
status false Integer
application_code true String

Response Body

201 Created

Content-Type: application/json

Field | Type | Description ——— | ———– id | long abbreviation | String area | Float | Area of the Zone. capacity | long | Capacity of the Zone dateCreated | String latitude | String layout | String longitude | String max_count_threshold | Float | The maximum number of nodes that should ideally be in this Zone. If the count crosses this maximum value, an Event is triggered. However, the system doesn’t prevent from more nodes being added to this Zone min_count_threshold | Float | The minimum Nodes that should ideally be in this Zone. If the count falls below this manimum value, an Event is triggered. name | String | The Name of the Zone node_count | long | Number of Nodes in this Zone overlayImage | Object parentZone | Object perimeter | String | The lat/long co-ordinates of the Zone site_id | int | ID of Site to which Zone belongs status | int | The status of the Zone.
(-1) - ARCHIVED
1 - IN_USE type | String z_ordering | int

Zonal Activator

Check For Unresponsive

Response Body

[message: ‘Process to Publish unresponsive ZA Events Started’]

Delete

curl -u username:password
  --request DELETE
  "https://api.cognosos.net/zonalActivator”

HTTP Request

DELETE https://api.cognosos.net/zonalActivator

Request Body

Field Required Type
name false String
description false String
zonal_activator_id true long
luid false int
latitude false String
longitude false String
status true Integer
coverage false Integer
type false Integer
last_message_date false Date

Response Body

204 NO_CONTENT

Deregister

curl -u username:password
  --request GET
  "https://api.cognosos.net/zonalActivator/deregister
  ?zonal_activator_id=1&application_code=YOUR_APP_CODE"

The above command returns JSON structured like this:

HTTP Request

GET https://api.cognosos.net/zonalActivator

Request Body

Field Required Type
application_code true String
zonal_activator_id true long

Response Body

200 OK

Content-Type: application/json

Field Type Description
name String
description String
zonal_activator_id long
luid int
latitude String
longitude String
status Integer
coverage Integer
type Integer
last_message_date Date
application_code String

File Upload

Response Body

200 OK

Content-Type: application/json

Index

curl -u username:password
  --request GET
  "https://api.cognosos.net/zonalActivator”

The above command returns JSON structured like this:

[]

HTTP Request

GET https://api.cognosos.net/zonalActivator

Request Body

Field Required Type
max false Integer
application_code false String
type false Integer
status false Integer
name false String

Response Body

200 OK

Content-Type: application/json

Field Required Type
name false String
description false String
zonal_activator_id true long
luid false int
latitude false String
longitude false String
status true Integer
coverage false Integer
type false Integer
last_message_date false Date
application_code true String

Register

curl -u username:password
  --request GET
  "https://api.cognosos.net/zonalActivator/register”

The above command returns JSON structured like this:

HTTP Request

GET https://api.cognosos.net/zonalActivator/register

Request Body

Field Required Type
application_code true String
zonal_activator_id true long
name false String
latitude true String
longitude true String
coverage false Integer
type false Integer
description false String

Response Body

200 OK

Content-Type: application/json

Field Required Type
name false String
description false String
zonal_activator_id true long
luid false int
latitude false String
longitude false String
status true Integer
coverage false Integer
type false Integer
last_message_date false Date
application_code true String

Save

curl -u username:password
  --request POST
  "https://api.cognosos.net/zonalActivator/save?application_code={appCode}&zone_id={zoneId}”

The above command returns JSON structured like this:

HTTP Request

POST https://api.cognosos.net/zonalActivator/save?application_code={appCode}&zone_id={zoneId}

Request Parameters

Field Required Type
application_code true String
zone_id false Integer

Request Body

Field Required Type
name false String
description false String
zonal_activator_id true long
luid false int
latitude false String
longitude false String
status true Integer
coverage false Integer
type false Integer
last_message_date false Date

Response Body

201 Created

Content-Type: application/json

Field Required Type
name false String
description false String
zonal_activator_id true long
luid false int
latitude false String
longitude false String
status true Integer
coverage false Integer
type false Integer
last_message_date false Date
application_code true String

Update

curl -u username:password
  --request PUT
  "https://api.cognosos.net/zonalActivator”

The above command returns JSON structured like this:

HTTP Request

PUT https://api.cognosos.net/zonalActivator

Request Body

Field Required Type
name false String
description false String
zonal_activator_id true long
luid false int
latitude false String
longitude false String
status true Integer
coverage false Integer
type false Integer
last_message_date false Date

Response Body

200 OK

Content-Type: application/json

Field Required Type
name false String
description false String
zonal_activator_id true long
luid false int
latitude false String
longitude false String
status true Integer
coverage false Integer
type false Integer
last_message_date false Date
application_code true String

Device

Device is a Tag that is attached to the Node being monitored. A Device belongs to a customer and can be moved among applications.

A Device has four stages and each stage is represented by the status property.

Properties Type Description
device_id Long The Unique ID of the Device
application_code String The code of Application to which Device belongs
node_id Long The ID of Node to which Device is attached, if any.
strapping_config String The type of Device
manufacturer String Device Manufacturer
firmware_version String Firmware Version
build_config String Hardware ID
product_id String
status Enum = [0,1,2,3] The status of the Device.
0 - NOT_IN_USE
1 - IN_USE
2 - AVAILABLE_FOR_USE
3 - IN_MANUFACTURING
signal_strength Float Signal Strength of the last message received from Device
battery_level Float Current Battery Level of the Device
battery_status Enum = [0,1,2] Current Battery Status of the Device.
0 - GOOD
1 - WARN
2 - BAD
internal_temperature Float Current Internal Temperature of the Device

Get

curl -u username:password
  --request GET
  "https://api.cognosos.net/device?customer_id=1"

The above command returns JSON structured like this:

[
  {
        "id": 82,
        "device_id": 908,
        "strapping_config": "Asset Tracker",
        "firmware_version": "1.5.1.0",
        "build_config": null,
        "product_id": null,
        "date_device_available": "2017-02-17T20:27:56Z",
        "date_created": "2017-02-17T20:27:56Z",
        "manufacturer": "cognosos",
        "application_code": "MCT",
        "node_id": 30293,
        "asset_identifier": "car_8",
        "battery_level": 8,
        "internal_temperature": 8,
        "signal_strength": null,
        "status": 1,
        "battery_status": 0
    },
    {
        "id": 83,
        "device_id": 909,
        "strapping_config": "Asset Tracker",
        "firmware_version": "1.5.1.0",
        "build_config": null,
        "product_id": null,
        "date_device_available": "2017-02-17T20:27:56Z",
        "date_created": "2017-02-17T20:27:56Z",
        "manufacturer": "cognosos",
        "application_code": "2",
        "node_id": 33,
        "asset_identifier": "test_asset_909",
        "battery_level": 9,
        "internal_temperature": 9,
        "signal_strength": null,
        "status": 1,
        "battery_status": 0
    }
]

Get list of Devices for a Customer

HTTP Request

GET https://api.cognosos.net/device

Request Parameters

Field Required Type Description
customer_id true String Customer ID
application_code false String Filter list by Application
status false Integer Filter list by status
strapping_config false Long Filter list by type
battery_status false Integer Filter list by Battery Status
max false Integer Max number of Devices that are returned. Defaults to 200, max 20,000

Response Body

200 OK

Content-Type: application/json

Field Type Description
id Integer ID
device_id Long Device ID
strapping_config String Device Type
manufacturer String Device Manufacturer
firmware_version String Firmware Version
asset_identifier String Asset Identifier of the attached Node, is any
application_code String Application Code
build_config String Hardware ID
product_id String
node_id Long ID of the attached Node, if any
status Integer Status
signal_strength Float Signal Strength of the last message received from Device
battery_level Float Current Battery Level of the Device
battery_status Enum = [0,1,2] Current Battery Status of the Device.
0 - GOOD
1 - WARN
2 - BAD
internal_temperature Float Current Internal Temperature of the Device

Count

curl -u username:password
  --request GET
  "https://api.cognosos.net/device/count”

The above command returns JSON structured like this:

{
    "total": 267,
    "provisioned": 130
}

HTTP Request

GET https://api.cognosos.net/device/count

Request Body

Field Required Type
customer_id false long
strapping_config false String
status false Integer
application_code false String
device_id false long
build_config false String
firmware_version false String
product_id false String
battery_status false int
is_quiet false boolean

Response Body

200 OK

Content-Type: application/json

Field Type Description
total int
provisioned int

Delete

curl -u username:password
  --request GET
  "https://api.cognosos.net/device”

HTTP Request

DELETE https://api.cognosos.net/device/update/

Request Body

Field Required Type
device_id true long
application_code true String
node_id false long
dateCreated false Date
manufacturer false String
firmware_version false String
build_config false String
strapping_config false String
product_id false String
status false Integer
signal_strength false Float
battery_level false Float
internal_temperature false Float
battery_lifetime false int
battery_status false int
gps_time false int
gps_adjustment false int
date_device_available false Date
date_unit_test false Date
date_board_test false Date
last_message_date false Date
latitude false String
longitude false String
isQuiet false Boolean

Response Body

204 NO_CONTENT

Detach

Request Body

Field Required Type
device_id true long

Response Body

Field | Type | Description id | int | node id application | Object | id, code and name asset_identifier | String current_zone | String current_zone_text | String device_id | long | 0 latitude | String longitude | String location_url | String “last_message_date” | String last_gps_message_date | Date “date_attached” | String status | enum | INACTIVE custom_field_values | Object | custom_field, value, id, rank and isVisibleToGuest

File Upload

Response Body

200 OK

Find By Device ID

Request Body

Field Required Type
device_id true long

Response Body

200 OK

Content-Type: application/json

Field Type Description
device_id long
application_code String
node_id long
dateCreated Date
manufacturer String
firmware_version String
build_config String
strapping_config String
product_id String
status Integer
signal_strength Float
battery_level Float
internal_temperature Float
battery_lifetime int
battery_status int
gps_time int
gps_adjustment int
date_device_available Date
date_unit_test Date
date_board_test Date
last_message_date Date
latitude String
longitude String
isQuiet Boolean

Index

curl -u username:password
  --request GET
  "https://api.cognosos.net/device”

The above command returns JSON structured like this:

[
    {
        "id": 16002,
        "device_id": 2402,
        "customer_id": 13,
        "customer_name": "Your_Application",
        "strapping_config": "TRACKER",
        "firmware_version": "0.5.7.0",
        "build_config": "0xAB01",
        "product_id": "0xCD01",
        "date_device_available": null,
        "date_created": "2017-03-22T22:40:12Z",
        "last_message_date": "2020-05-21T02:41:26Z",
        "manufacturer": null,
        "application_code": "YOUR_APP_CODE",
        "node_id": 0,
        "asset_identifier": null,
        "battery_level": 14.37,
        "internal_temperature": 25.0,
        "signal_strength": null,
        "status": 10,
        "battery_status": 2,
        "latitude": "33.784857",
        "longitude": "-84.389953",
        "is_quiet": false
    }
]

HTTP Request

GET https://api.cognosos.net/device

Request Body

Field Required Type
max false Integer
customer_id false long
format false String
application_code false

Response Body

200 OK

Content-Type: application/json

Field Type Description
id int
device_id long
customer_id int
customer_name String
strapping_config String
firmware_version String
build_config String
product_id String
date_device_available String
date_created String
last_message_date String
manufacturer String
application_code String
node_id int
asset_identifier String
battery_level float
internal_temperature float
signal_strength Float
status int
battery_status int
latitude String
longitude String
is_quiet boolean

Save

curl -u username:password
  --request POST
  "https://api.cognosos.net/device/update”

HTTP Request

POST https://api.cognosos.net/device/update/

Request Body

Field Required Type
device_id true long
application_code true String
node_id false long
dateCreated false Date
manufacturer false String
firmware_version false String
build_config false String
strapping_config false String
product_id false String
status false Integer
signal_strength false Float
battery_level false Float
internal_temperature false Float
battery_lifetime false int
battery_status false int
gps_time false int
gps_adjustment false int
date_device_available false Date
date_unit_test false Date
date_board_test false Date
last_message_date false Date
latitude false String
longitude false String
isQuiet false Boolean

Response Body

201 CREATED

Content-Type: application/json

Field Type Description
device_id long
application_code String
node_id long
dateCreated Date
manufacturer String
firmware_version String
build_config String
strapping_config String
product_id String
status Integer
signal_strength Float
battery_level Float
internal_temperature Float
battery_lifetime int
battery_status int
gps_time int
gps_adjustment int
date_device_available Date
date_unit_test Date
date_board_test Date
last_message_date Date
latitude String
longitude String
isQuiet Boolean

Update

curl -u username:password
  --request PUT
  "https://api.cognosos.net/device/update”

HTTP Request

PUT https://api.cognosos.net/device/update/

Request Body

Field Required Type
device_id false long

Response Body

200 OK

Content-Type: application/json

Field Type Description
device_id long
application_code String
node_id long
dateCreated Date
manufacturer String
firmware_version String
build_config String
strapping_config String
product_id String
status Integer
signal_strength Float
battery_level Float
internal_temperature Float
battery_lifetime int
battery_status int
gps_time int
gps_adjustment int
date_device_available Date
date_unit_test Date
date_board_test Date
last_message_date Date
latitude String
longitude String
isQuiet Boolean

Device Firmware

Each Cognosos tracker device has a specific version of firmware installed on it from the factory. From time to time, Cognosos issues new firmware versions, and devices in the field must be updated with the new version. Devices are updated either when returned to Cognosos, or by the user with an update tool or mobile app provided by Cognosos.

The Cognosos backend maintains a list of all shipped devices and their current firmware version. Users may requesat that a device be upgraded to a new (target) firmware version. Once this request is recorded, the firmware update tool will act on as soon as the device is recognized via BLE advertisement.

The update tool must:

Querying known firmware versions

The list of known firmware versions may be retrieved. For each one, a pre-signed binary image url will be provided. This URL will be valid for one hour from the time of the request. It’s expected that the update tool will fetch a copy of the firmware soon after querying for the list.

GET /device/listFirmwareAndProfileVersions

The request will return a response of the format:

{
    "version": 1,
    "deviceProfiles": [],
    "firmwareVersions": [
        {
          "s3key": "ota_full_SnowDome_vafa0.2.10-signed-encrypted.gbl",
          "binarySizeBytes": 345208,
          "firstCompatibleSerialNumber": 0,
          "versionName": "vafa0.2.10",
          "deviceType": "RT-300",
          "binarySha256": "ec640b19fd0cf7d6efe199b60044063becbb490644811e4bf6493878e925fe46",
          "lastCompatibleSerialNumber": 9999999999,
          "s3bucket": "cognosos-firmware",
          "releaseDate": "2020-02-26T00:00:00Z",
          "url": "https://cognosos-firmware.s3.amazonaws.com/ota_full_SnowDome_vafa0.2.10-signed-encrypted.gbl?X-Amz-Security-Token=XXXX"
        }

    ]
}

Fetch a list of devices that require update, along with the metadata about the require firmware images.

GET /device/getDeviceUpdateList

{
    "version": 1,
    "devices": [
       {
         "device_id": 2001570,
         "battery_level": 100.0,
         "battery_status": 0,
         "build_config": null,
         "currentFirmwareVersion": "vafa0.2.9",
         "currentProfile": null,
         "date_created": "2019-11-24T14:24:20Z",
         "firmwareUpdated": "2020-04-20T21:10:53Z",
         "last_message_date": "2020-04-21T10:11:11Z",
         "product_id": null,
         "profileUpdated": null,
         "status": 10,
         "targetFirmwareVersion": "vafa0.2.10",
         "targetProfile": null,
         "updatePriority": 0
       }
     ],
    "deviceProfiles": [],
    "firmwareVersions": {
        "vafa0.2.10": {
              "s3key": "ota_full_SnowDome_vafa0.2.10-signed-encrypted.gbl",
              "firstCompatibleSerialNumber": 0,
              "versionName": "vafa0.2.10",
              "binarySha256": "ec640b19fd0cf7d6efe199b60044063becbb490644811e4bf6493878e925fe46",
              "deviceType": "RT-300",
              "binarySizeBytes": 345208,
              "lastCompatibleSerialNumber": 9999999999,
              "s3bucket": "cognosos-firmware",
              "releaseDate": "2020-02-26T00:00:00Z",
              "url": "https://cognosos-firmware.s3.amazonaws.com/ota_full_SnowDome_vafa0.2.10-signed-encrypted.gbl?X-Amz-Security-Token=IQoJb3JpZ2luX2VjEAMaCXVzLWVhc3QtMSJHMEUCICeZ62sThtao8gh2b20co8i6clGaynw4CUuU0satharrAiEAnL01j9DytQZrv4JIcG9ESGRLGDH1EBaN4RxiiRMTjQEqmQMILBAAGgw1NzQ0OTAxNDE2NDQiDCbU7ZHz2d5ojoiDuyr2AjxBUJ31pg9TE1aVRrnmkIsAjBHgmQtxwNvaKaoh2qKGLRopLzZ4ma2ADipWtIZEoaXdYlO7lSR2BpQxGVIiI7jGGOepll91vmIEr8Vm%2BM0z1gpQer%2BI6ovWvf8Q5Zlet08qcqiiPmr10B2vR1kAxHLhezHoF52vGec0tgW1vQQxwWkLu4%2B358LlnnOmt%2BDJy%2FHCitq15Ek2fDmTgvtAloaif6ub2pD5OTMVYO%2FvjX8VLYQtIaQUlbWmXWWBPfj%2Bh0Ws090qY%2FP8KcaB%2F0tiRSbCiF4aV6eKH7Rgaix5hUO4sysgiioKG0GTSeXnW2gJQWshMDOm605omJVo3taSbIOp1Os46YI9Gy2wcv8PEdmAQzohNSvYre8urvSXWjV4N1dgCR8pmh7dlecoQdpBIe0AM53Vk%2F2Ljerlau5hY609prfD1kbcQZ6KG73iOal1UCroLy6zvW3iOEfywbleC2JfWv1KhB%2FedTVTouc24sqRcQLlbxyZMNyZ%2B%2FQFOusBZ9yYbDdTy1%2BsPOECu1pbGmq%2B9jlszjV%2B%2FZFPjKfjbb7sLU7pT4%2Fchn7Lfuu5cP7ubJGHYk8HX9MZKsQ4Fkx9PkRtjLjqygY1YW1nzIpOoj6xvLvMvW4Esg5JGvWKsVrYI4AuwTsyyc4bWiU1SUfiilvBLzVYzd6FsllkKo8KJ%2FlQGkSjlfPZOZg1SDHulQpKkneFTrUEw1Yg2oHe49k0CtorNbHw90yHFjjzt91U%2BMZXIdp6Q65IW9Tb3F0sZ0vLKkO9%2F1yz1h2P21W0wefVC8DKm1NvMmrUxnlLuNF8mu6t%2B%2BML4O3bEwJKxA%3D%3D&X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Date=20200421T112543Z&X-Amz-SignedHeaders=host&X-Amz-Expires=3599&X-Amz-Credential=ASIAYLQSH4PGE36LY2JQ%2F20200421%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Signature=80c972e8d9ee2016f58eae130eb1fe382c8c00f708f58327423189c2910f5649"
            }
    }
}

Record that a new firmware version has been successfully written to a given device.

POST /device/recordDeviceUpdate?device_id=<integer>&versionName=<string>&profileName=<string>

Indicate that a new firmware version should be applied to a device.

POST /device/setDeviceUpdateTarget?device_id=<integer>&versionName=<string>&profileName=<string>

Possible Errors:

{
    "error": "Invalid Device ID",
    "version": 2,
    "status":{
        "httpcode": 400,
        "title": "Unknown Tracker ID",
        "shortmsg": "The tracker ID entered was not found.",
        "longmsg": "Check entered tracker ID for errors."
    }
}
{
    "error": "Invalid Device ID",
    "version": 2,
    "status":{
        "httpcode": 400,
        "title": "Invalid Tracker ID",
        "shortmsg": "The tracker ID entered is not associated with this customer.",
        "longmsg": "Check entered tracker ID for errors and ensure the tracker has been provisioned."
    }
}
{
    "error": "Invalid Firmware Version",
    "version": 2,
    "status":{
        "httpcode": 400,
        "title": "Invalid Firmware Version",
        "shortmsg": "The firmware version specified wasn't found.",
        "longmsg": "Reload the application to update the list of available firmware versions."
    }
}

Sensor

Sensor belongs to a Node and has a type. Sensors are used to set thresholds for the corresponding Node. Sensors are created when a new Node is created in the system.

Cognosos currently supports following Sensor types

Properties Type Description
sensorType_id Integer ID of the Sensor Type
min_value_threshold Float MIN_THRESHOLD_BREACHED Event is triggered if the corresponding sensor value for node is below this value
max_value_threshold Float MAX_THRESHOLD_BREACHED Event is triggered if the corresponding sensor value for node is above this value
min_critical_threshold Float MIN_CRITICAL_THRESHOLD_BREACHED Event is triggered if the corresponding sensor value for node is below this value
max_critical_threshold Float MAX_CRITICAL_THRESHOLD_BREACHED Event is triggered if the corresponding sensor value for node is above this value

Delete

curl -u username:password
  --request DELETE
  "https://api.cognosos.net/sensors”

HTTP Request

DELETE https://api.cognosos.net/sensors/

Request Body

Field Required Type
sensorType_id true Integer
updateInterval false Integer
max_value_threshold false Float
min_value_threshold false Float
min_critical_threshold false Float
max_critical_threshold false Float

Response Body

200 OK

Index

curl -u username:password
  --request GET
  "https://api.cognosos.net/sensors”

HTTP Request

GET https://api.cognosos.net/sensors

Request Body

Field Required Type
max false Integer
device_id false long
asset_identifier false String
address false String
latitude false String
longitude false String
status false Integer
location_url false String
current_zone false String
structure false long
date_attached false Date
last_message_date false Date
last_gps_message_date false Date
node_id false long
sensorType_id false Integer

Response Body

200 OK

Content-Type: application/json

Field Type Description
sensorType_id Integer
updateInterval Integer
max_value_threshold Float
min_value_threshold Float
min_critical_threshold Float
max_critical_threshold Float

Save

curl -u username:password
  --request POST
  "https://api.cognosos.net/sensors”

HTTP Request

POST https://api.cognosos.net/sensors

Request Body

Field Required Type
sensorType_id true Integer
updateInterval false Integer
max_value_threshold false Float
min_value_threshold false Float
min_critical_threshold false Float
max_critical_threshold false Float

Response Body

201 CREATED

Content-Type: application/json

Field Type Description
sensorType_id Integer
updateInterval Integer
max_value_threshold Float
min_value_threshold Float
min_critical_threshold Float
max_critical_threshold Float

Update

curl -u username:password
  --request PUT
  "https://api.cognosos.net/sensors”

HTTP Request

PUT https://api.cognosos.net/sensors/

Request Body

Field Required Type
sensorType_id true Integer
updateInterval false Integer
max_value_threshold false Float
min_value_threshold false Float
min_critical_threshold false Float
max_critical_threshold false Float

Response Body

200 OK

Content-Type: application/json

Field Type Description
sensorType_id Integer
updateInterval Integer
max_value_threshold Float
min_value_threshold Float
min_critical_threshold Float
max_critical_threshold Float

Sensor Data

Index

Sensor Type

Delete

curl -u username:password
  --request DELETE
  "https://api.cognosos.net/sensorType”

HTTP Request

DELETE https://api.cognosos.net/sensorType

Request Body

Field Required Type
id false Integer
name true String
datatype false int
min false Float
max false Float
max_threshold false Float
min_threshold false Float
min_critical_threshold false Float
max_critical_threshold false Float

Response Body

201 NO_CONTENT

Index

curl -u username:password
  --request GET
  "https://api.cognosos.net/sensorType”

The above command returns JSON structured like this:

[
    {
        "datatype": 2,
        "id": 2,
        "max": 110.0,
        "max_critical_threshold": 100.0,
        "max_threshold": 95.0,
        "min": -40.0,
        "min_critical_threshold": -20.0,
        "min_threshold": -20.0,
        "name": "Internal Temperature"
    },
    {
        "datatype": 2,
        "id": 4,
        "max": 100.0,
        "max_critical_threshold": 100.0,
        "max_threshold": 100.0,
        "min": 0.0,
        "min_critical_threshold": 25.0,
        "min_threshold": 25.0,
        "name": "Battery Level"
    },
    {
        "datatype": 3,
        "id": 13,
        "max": 0.0,
        "max_critical_threshold": 0.0,
        "max_threshold": 0.0,
        "min": 0.0,
        "min_critical_threshold": 0.0,
        "min_threshold": 0.0,
        "name": "GPS Location"
    }
]

HTTP Request

GET https://api.cognosos.net/sensorType

Request Body

Field Required Type
max false Integer
node_id false long

Response Body

200 OK

Content-Type: application/json

Field Type Description
datatype int
id Integer
max Float
max_critical_threshold Float
max_threshold Float
min Float
min_critical_threshold Float
min_threshold Float
name String

Save

curl -u username:password
  --request POST
  "https://api.cognosos.net/sensorType”

HTTP Request

POST https://api.cognosos.net/sensorType

Request Body

Field Required Type
id false Integer
name true String
datatype false int
min false Float
max false Float
max_threshold false Float
min_threshold false Float
min_critical_threshold false Float
max_critical_threshold false Float

Response Body

201 CREATED

Content-Type: application/json

Field Type Description
datatype int
id Integer
max Float
max_critical_threshold Float
max_threshold Float
min Float
min_critical_threshold Float
min_threshold Float
name String

Update

curl -u username:password
  --request PUT
  "https://api.cognosos.net/sensorType”

HTTP Request

PUT https://api.cognosos.net/sensorType

Request Body

Field Required Type
id false Integer
name true String
datatype false int
min false Float
max false Float
max_threshold false Float
min_threshold false Float
min_critical_threshold false Float
max_critical_threshold false Float

Response Body

200 OK

Content-Type: application/json

Field Type Description
datatype int
id Integer
max Float
max_critical_threshold Float
max_threshold Float
min Float
min_critical_threshold Float
min_threshold Float
name String

Latest Sensor Value

Delete

curl -u username:password
  --request DELETE
  "https://api.cognosos.net/latestSensorValue”

The above command returns JSON structured like this:

[
    {
        "dateCreated": "2017-03-19T02:25:59Z",
        "id": 2872953,
        "node": {
            "address": null,
            "application": {
                "id": 2,
                "address": null,
                "application_type": {
                    "id": 1,
                    "name": "Asset Tracker"
                },
                "code": "AAB",
                "dateCreated": "2017-02-17T19:54:29Z",
                "gps_granularity": 0.0,
                "latitude": "33.6944454",
                "longitude": "-84.62286799999998",
                "name": "Test Customer",
                "non_responsive_detection_frequency": 3000,
                "placeId": null,
                "status": 1,
                "total_devices": 16000
            },
            "asset_identifier": "car_2000002001",
            "attached": true,
            "current_zone": "60",
            "custom_field_values": [],
            "date_attached": null,
            "device_id": 0,
            "dirty": false,
            "dirtyPropertyNames": [],
            "handler": {
                "class": "org.codehaus.groovy.grails.orm.hibernate.proxy.GroovyAwareJavassistLazyInitializer",
                "entityName": "com.cognosos.radiocloudappserver.Node",
                "identifier": 2,
                "implementation": {
                    "address": null,
                    "application": {
                        "id": 2,
                        "address": null,
                        "application_type": {
                            "id": 1,
                            "name": "Asset Tracker"
                        },
                        "code": "AAB",
                        "dateCreated": "2017-02-17T19:54:29Z",
                        "gps_granularity": 0.0,
                        "latitude": "33.6944454",
                        "longitude": "-84.62286799999998",
                        "name": "Test Customer",
                        "non_responsive_detection_frequency": 3000,
                        "placeId": null,
                        "status": 1,
                        "total_devices": 16000
                    },
                    "asset_identifier": "car_2000002001",
                    "current_zone": "60",
                    "custom_field_values": [],
                    "date_attached": null,
                    "device_id": 0,
                    "id": 2,
                    "last_gps_message_date": null,
                    "last_message_date": "2017-03-19T02:25:59Z",
                    "latitude": "33.69345",
                    "location_url": "https://www.google.com/maps?q=33.69345 -84.62212",
                    "longitude": "-84.62212",
                    "sensors": [
                        {
                            "id": 6,
                            "max_critical_threshold": null,
                            "max_value_threshold": null,
                            "min_critical_threshold": null,
                            "min_value_threshold": null,
                            "node": {
                                "_ref": "../../../..",
                                "class": "com.cognosos.radiocloudappserver.Node_$$_javassist_57"
                            },
                            "sensorType_id": 4,
                            "updateInterval": null
                        },
                        {
                            "id": 5,
                            "max_critical_threshold": null,
                            "max_value_threshold": null,
                            "min_critical_threshold": null,
                            "min_value_threshold": null,
                            "node": {
                                "_ref": "../../../..",
                                "class": "com.cognosos.radiocloudappserver.Node_$$_javassist_57"
                            },
                            "sensorType_id": 2,
                            "updateInterval": null
                        },
                        {
                            "id": 7,
                            "max_critical_threshold": null,
                            "max_value_threshold": null,
                            "min_critical_threshold": null,
                            "min_value_threshold": null,
                            "node": {
                                "_ref": "../../../..",
                                "class": "com.cognosos.radiocloudappserver.Node_$$_javassist_57"
                            },
                            "sensorType_id": 8,
                            "updateInterval": null
                        },
                        {
                            "attached": true,
                            "dirty": false,
                            "dirtyPropertyNames": [],
                            "handler": {
                                "class": "org.codehaus.groovy.grails.orm.hibernate.proxy.GroovyAwareJavassistLazyInitializer",
                                "entityName": "com.cognosos.radiocloudappserver.Sensor",
                                "identifier": 8,
                                "implementation": {
                                    "id": 8,
                                    "max_critical_threshold": null,
                                    "max_value_threshold": null,
                                    "min_critical_threshold": null,
                                    "min_value_threshold": null,
                                    "node": {
                                        "_ref": "../../../../../..",
                                        "class": "com.cognosos.radiocloudappserver.Node_$$_javassist_57"
                                    },
                                    "sensorType_id": 13,
                                    "updateInterval": null
                                },
                                "persistentClass": "com.cognosos.radiocloudappserver.Sensor",
                                "readOnly": false,
                                "readOnlySettingAvailable": true,
                                "session": {
                                    "actionQueue": {
                                        "class": "org.hibernate.engine.spi.ActionQueue",
                                        "transactionCompletionProcesses": {
                                            "class": "org.hibernate.engine.spi.ActionQueue$TransactionCompletionProcesses"
                                        }
                                    },
                                    "autoCloseSessionEnabled": false,
                                    "cacheMode": {
                                        "enumType": "org.hibernate.CacheMode",
                                        "name": "NORMAL"
                                    },
                                    "class": "org.hibernate.internal.SessionImpl",
                                    "closed": false,
                                    "connected": true,
                                    "connectionReleaseMode": {
                                        "enumType": "org.hibernate.ConnectionReleaseMode",
                                        "name": "ON_CLOSE"
                                    },
                                    "defaultReadOnly": false,
                                    "dirty": false,
                                    "dontFlushFromFind": 0,
                                    "enabledFilters": {
                                        "dynamicFilterEnabler": {
                                            "class": "org.hibernate.internal.FilterImpl",
                                            "filterDefinition": {
                                                "class": "org.hibernate.engine.spi.FilterDefinition",
                                                "defaultFilterCondition": "1=1",
                                                "filterName": "dynamicFilterEnabler",
                                                "parameterNames": [],
                                                "parameterTypes": {}
                                            },
                                            "name": "dynamicFilterEnabler",
                                            "parameters": {}
                                        }
                                    },
                                    "eventListenerManager": {
                                        "class": "org.hibernate.engine.internal.SessionEventListenerManagerImpl"
                                    },
                                    "eventSource": true,
                                    "factory": {
                                        "SQLExceptionConverter": {
                                            "class": "org.hibernate.exception.internal.StandardSQLExceptionConverter"
                                        },
                                        "SQLExceptionHelper": {
                                            "class": "org.hibernate.engine.jdbc.spi.SqlExceptionHelper",
                                            "sqlExceptionConverter": {
                                                "class": "org.hibernate.exception.internal.StandardSQLExceptionConverter"
                                            }
                                        },
                                        "allClassMetadata": {
                                            "com.cognosos.radiocloudappserver.LocationProviderConfig": {
                                                "abstract": false,
                                                "attributes": [
                                                    {
                                                        "cascadeStyle": {
                                                            "class": "org.hibernate.engine.spi.CascadeStyles$12"
                                                        },
                                                        "class": "org.hibernate.tuple.entity.VersionProperty",
                                                        "dirtyCheckable": true,
                                                        "fetchMode": null,
                                                        "insertable": true,
                                                        "lazy": false,
                                                        "name": "version",
                                                        "node": null,
                                                        "nullable": false,
                                                        "source": {
                                                            "_ref": "../..",
                                                            "class": "org.codehaus.groovy.grails.orm.hibernate.persister.entity.GroovyAwareSingleTableEntityPersister"
                                                        },
                                                        "type": {
                                                            "XMLElement": false,
                                                            "anyType": false,
                                                            "associationType": false,
                                                            "class": "org.hibernate.type.LongType",
                                                            "collectionType": false,
                                                            "comparator": {
                                                                "class": "org.hibernate.internal.util.compare.ComparableComparator"
                                                            },
                                                            "componentType": false,
                                                            "defaultValue": 0,
                                                            "entityType": false,
                                                            "javaTypeDescriptor": {
                                                                "class": "org.hibernate.type.descriptor.java.LongTypeDescriptor",
                                                                "comparator": {
                                                                    "class": "org.hibernate.internal.util.compare.ComparableComparator"
                                                                },
                                                                "javaTypeClass": "java.lang.Long",
                                                                "mutabilityPlan": {
                                                                    "class": "org.hibernate.type.descriptor.java.ImmutableMutabilityPlan",
                                                                    "mutable": false
                                                                }
                                                            },
                                                            "mutable": false,
                                                            "name": "long",
                                                            "primitiveClass": "long",
                                                            "registrationKeys": [
                                                                "long",
                                                                "long",
                                                                "java.lang.Long"
                                                            ],
                                                            "returnedClass": "java.lang.Long",
                                                            "sqlTypeDescriptor": {
                                                                "class": "org.hibernate.type.descriptor.sql.BigIntTypeDescriptor",
                                                                "sqlType": -5
                                                            }
                                                        },
                                                        "unsavedValue": {
                                                            "class": "org.hibernate.engine.spi.VersionValue$2"
                                                        },
                                                        "updateable": true,
                                                        "valueGenerationStrategy": null,
                                                        "versionable": true
                                                    }
                                                ]
                                            }
                                        }
                                    }
                                }
                            }
                        }
                    ]
                }
            }
        }
    }
]

HTTP Request

DELETE https://api.cognosos.net/latestSensorValue

Request Body

Field Required Type
dateCreated false Date
value false String

Response Body

200 OK

Content-Type: application/json

Field Type Description
dateCreated String
id int
node Object

Index

curl -u username:password
  --request GET
  "https://api.cognosos.net/latestSensorValue”

The above command returns JSON structured like this:

[
    {
        "dateCreated": "2017-03-19T02:25:59Z",
        "id": 2872953,
        "node": {
            "address": null,
            "application": {
                "id": 2,
                "address": null,
                "application_type": {
                    "id": 1,
                    "name": "Asset Tracker"
                },
                "code": "AAB",
                "dateCreated": "2017-02-17T19:54:29Z",
                "gps_granularity": 0.0,
                "latitude": "33.6944454",
                "longitude": "-84.62286799999998",
                "name": "Test Customer",
                "non_responsive_detection_frequency": 3000,
                "placeId": null,
                "status": 1,
                "total_devices": 16000
            },
            "asset_identifier": "car_2000002001",
            "attached": true,
            "current_zone": "60",
            "custom_field_values": [],
            "date_attached": null,
            "device_id": 0,
            "dirty": false,
            "dirtyPropertyNames": [],
            "handler": {
                "class": "org.codehaus.groovy.grails.orm.hibernate.proxy.GroovyAwareJavassistLazyInitializer",
                "entityName": "com.cognosos.radiocloudappserver.Node",
                "identifier": 2,
                "implementation": {
                    "address": null,
                    "application": {
                        "id": 2,
                        "address": null,
                        "application_type": {
                            "id": 1,
                            "name": "Asset Tracker"
                        },
                        "code": "AAB",
                        "dateCreated": "2017-02-17T19:54:29Z",
                        "gps_granularity": 0.0,
                        "latitude": "33.6944454",
                        "longitude": "-84.62286799999998",
                        "name": "Test Customer",
                        "non_responsive_detection_frequency": 3000,
                        "placeId": null,
                        "status": 1,
                        "total_devices": 16000
                    },
                    "asset_identifier": "car_2000002001",
                    "current_zone": "60",
                    "custom_field_values": [],
                    "date_attached": null,
                    "device_id": 0,
                    "id": 2,
                    "last_gps_message_date": null,
                    "last_message_date": "2017-03-19T02:25:59Z",
                    "latitude": "33.69345",
                    "location_url": "https://www.google.com/maps?q=33.69345 -84.62212",
                    "longitude": "-84.62212",
                    "sensors": [
                        {
                            "id": 6,
                            "max_critical_threshold": null,
                            "max_value_threshold": null,
                            "min_critical_threshold": null,
                            "min_value_threshold": null,
                            "node": {
                                "_ref": "../../../..",
                                "class": "com.cognosos.radiocloudappserver.Node_$$_javassist_57"
                            },
                            "sensorType_id": 4,
                            "updateInterval": null
                        },
                        {
                            "id": 5,
                            "max_critical_threshold": null,
                            "max_value_threshold": null,
                            "min_critical_threshold": null,
                            "min_value_threshold": null,
                            "node": {
                                "_ref": "../../../..",
                                "class": "com.cognosos.radiocloudappserver.Node_$$_javassist_57"
                            },
                            "sensorType_id": 2,
                            "updateInterval": null
                        },
                        {
                            "id": 7,
                            "max_critical_threshold": null,
                            "max_value_threshold": null,
                            "min_critical_threshold": null,
                            "min_value_threshold": null,
                            "node": {
                                "_ref": "../../../..",
                                "class": "com.cognosos.radiocloudappserver.Node_$$_javassist_57"
                            },
                            "sensorType_id": 8,
                            "updateInterval": null
                        },
                        {
                            "attached": true,
                            "dirty": false,
                            "dirtyPropertyNames": [],
                            "handler": {
                                "class": "org.codehaus.groovy.grails.orm.hibernate.proxy.GroovyAwareJavassistLazyInitializer",
                                "entityName": "com.cognosos.radiocloudappserver.Sensor",
                                "identifier": 8,
                                "implementation": {
                                    "id": 8,
                                    "max_critical_threshold": null,
                                    "max_value_threshold": null,
                                    "min_critical_threshold": null,
                                    "min_value_threshold": null,
                                    "node": {
                                        "_ref": "../../../../../..",
                                        "class": "com.cognosos.radiocloudappserver.Node_$$_javassist_57"
                                    },
                                    "sensorType_id": 13,
                                    "updateInterval": null
                                },
                                "persistentClass": "com.cognosos.radiocloudappserver.Sensor",
                                "readOnly": false,
                                "readOnlySettingAvailable": true,
                                "session": {
                                    "actionQueue": {
                                        "class": "org.hibernate.engine.spi.ActionQueue",
                                        "transactionCompletionProcesses": {
                                            "class": "org.hibernate.engine.spi.ActionQueue$TransactionCompletionProcesses"
                                        }
                                    },
                                    "autoCloseSessionEnabled": false,
                                    "cacheMode": {
                                        "enumType": "org.hibernate.CacheMode",
                                        "name": "NORMAL"
                                    },
                                    "class": "org.hibernate.internal.SessionImpl",
                                    "closed": false,
                                    "connected": true,
                                    "connectionReleaseMode": {
                                        "enumType": "org.hibernate.ConnectionReleaseMode",
                                        "name": "ON_CLOSE"
                                    },
                                    "defaultReadOnly": false,
                                    "dirty": false,
                                    "dontFlushFromFind": 0,
                                    "enabledFilters": {
                                        "dynamicFilterEnabler": {
                                            "class": "org.hibernate.internal.FilterImpl",
                                            "filterDefinition": {
                                                "class": "org.hibernate.engine.spi.FilterDefinition",
                                                "defaultFilterCondition": "1=1",
                                                "filterName": "dynamicFilterEnabler",
                                                "parameterNames": [],
                                                "parameterTypes": {}
                                            },
                                            "name": "dynamicFilterEnabler",
                                            "parameters": {}
                                        }
                                    },
                                    "eventListenerManager": {
                                        "class": "org.hibernate.engine.internal.SessionEventListenerManagerImpl"
                                    },
                                    "eventSource": true,
                                    "factory": {
                                        "SQLExceptionConverter": {
                                            "class": "org.hibernate.exception.internal.StandardSQLExceptionConverter"
                                        },
                                        "SQLExceptionHelper": {
                                            "class": "org.hibernate.engine.jdbc.spi.SqlExceptionHelper",
                                            "sqlExceptionConverter": {
                                                "class": "org.hibernate.exception.internal.StandardSQLExceptionConverter"
                                            }
                                        },
                                        "allClassMetadata": {
                                            "com.cognosos.radiocloudappserver.LocationProviderConfig": {
                                                "abstract": false,
                                                "attributes": [
                                                    {
                                                        "cascadeStyle": {
                                                            "class": "org.hibernate.engine.spi.CascadeStyles$12"
                                                        },
                                                        "class": "org.hibernate.tuple.entity.VersionProperty",
                                                        "dirtyCheckable": true,
                                                        "fetchMode": null,
                                                        "insertable": true,
                                                        "lazy": false,
                                                        "name": "version",
                                                        "node": null,
                                                        "nullable": false,
                                                        "source": {
                                                            "_ref": "../..",
                                                            "class": "org.codehaus.groovy.grails.orm.hibernate.persister.entity.GroovyAwareSingleTableEntityPersister"
                                                        },
                                                        "type": {
                                                            "XMLElement": false,
                                                            "anyType": false,
                                                            "associationType": false,
                                                            "class": "org.hibernate.type.LongType",
                                                            "collectionType": false,
                                                            "comparator": {
                                                                "class": "org.hibernate.internal.util.compare.ComparableComparator"
                                                            },
                                                            "componentType": false,
                                                            "defaultValue": 0,
                                                            "entityType": false,
                                                            "javaTypeDescriptor": {
                                                                "class": "org.hibernate.type.descriptor.java.LongTypeDescriptor",
                                                                "comparator": {
                                                                    "class": "org.hibernate.internal.util.compare.ComparableComparator"
                                                                },
                                                                "javaTypeClass": "java.lang.Long",
                                                                "mutabilityPlan": {
                                                                    "class": "org.hibernate.type.descriptor.java.ImmutableMutabilityPlan",
                                                                    "mutable": false
                                                                }
                                                            },
                                                            "mutable": false,
                                                            "name": "long",
                                                            "primitiveClass": "long",
                                                            "registrationKeys": [
                                                                "long",
                                                                "long",
                                                                "java.lang.Long"
                                                            ],
                                                            "returnedClass": "java.lang.Long",
                                                            "sqlTypeDescriptor": {
                                                                "class": "org.hibernate.type.descriptor.sql.BigIntTypeDescriptor",
                                                                "sqlType": -5
                                                            }
                                                        },
                                                        "unsavedValue": {
                                                            "class": "org.hibernate.engine.spi.VersionValue$2"
                                                        },
                                                        "updateable": true,
                                                        "valueGenerationStrategy": null,
                                                        "versionable": true
                                                    }
                                                ]
                                            }
                                        }
                                    }
                                }
                            }
                        }
                    ]
                }
            }
        }
    }
]

HTTP Request

GET https://api.cognosos.net/latestSensorValue

Request Body

Field Required Type
max false Integer
node_id false long

Response Body

200 OK

Content-Type: application/json

Field Type Description
dateCreated String
id int
node Object

Save

curl -u username:password
  --request POST
  "https://api.cognosos.net/latestSensorValue”

The above command returns JSON structured like this:


HTTP Request

POST https://api.cognosos.net/latestSensorValue

Request Body

Field Required Type
dateCreated true Date
value false String

Response Body

200 OK

Content-Type: application/json

Field Type Description
dateCreated Date
value String

Update

curl -u username:password
  --request PUT
  "https://api.cognosos.net/latestSensorValue”

The above command returns JSON structured like this:

[
    {
        "dateCreated": "2017-03-19T02:25:59Z",
        "id": 2872953,
        "node": {
            "address": null,
            "application": {
                "id": 2,
                "address": null,
                "application_type": {
                    "id": 1,
                    "name": "Asset Tracker"
                },
                "code": "AAB",
                "dateCreated": "2017-02-17T19:54:29Z",
                "gps_granularity": 0.0,
                "latitude": "33.6944454",
                "longitude": "-84.62286799999998",
                "name": "Test Customer",
                "non_responsive_detection_frequency": 3000,
                "placeId": null,
                "status": 1,
                "total_devices": 16000
            },
            "asset_identifier": "car_2000002001",
            "attached": true,
            "current_zone": "60",
            "custom_field_values": [],
            "date_attached": null,
            "device_id": 0,
            "dirty": false,
            "dirtyPropertyNames": [],
            "handler": {
                "class": "org.codehaus.groovy.grails.orm.hibernate.proxy.GroovyAwareJavassistLazyInitializer",
                "entityName": "com.cognosos.radiocloudappserver.Node",
                "identifier": 2,
                "implementation": {
                    "address": null,
                    "application": {
                        "id": 2,
                        "address": null,
                        "application_type": {
                            "id": 1,
                            "name": "Asset Tracker"
                        },
                        "code": "AAB",
                        "dateCreated": "2017-02-17T19:54:29Z",
                        "gps_granularity": 0.0,
                        "latitude": "33.6944454",
                        "longitude": "-84.62286799999998",
                        "name": "Test Customer",
                        "non_responsive_detection_frequency": 3000,
                        "placeId": null,
                        "status": 1,
                        "total_devices": 16000
                    },
                    "asset_identifier": "car_2000002001",
                    "current_zone": "60",
                    "custom_field_values": [],
                    "date_attached": null,
                    "device_id": 0,
                    "id": 2,
                    "last_gps_message_date": null,
                    "last_message_date": "2017-03-19T02:25:59Z",
                    "latitude": "33.69345",
                    "location_url": "https://www.google.com/maps?q=33.69345 -84.62212",
                    "longitude": "-84.62212",
                    "sensors": [
                        {
                            "id": 6,
                            "max_critical_threshold": null,
                            "max_value_threshold": null,
                            "min_critical_threshold": null,
                            "min_value_threshold": null,
                            "node": {
                                "_ref": "../../../..",
                                "class": "com.cognosos.radiocloudappserver.Node_$$_javassist_57"
                            },
                            "sensorType_id": 4,
                            "updateInterval": null
                        },
                        {
                            "id": 5,
                            "max_critical_threshold": null,
                            "max_value_threshold": null,
                            "min_critical_threshold": null,
                            "min_value_threshold": null,
                            "node": {
                                "_ref": "../../../..",
                                "class": "com.cognosos.radiocloudappserver.Node_$$_javassist_57"
                            },
                            "sensorType_id": 2,
                            "updateInterval": null
                        },
                        {
                            "id": 7,
                            "max_critical_threshold": null,
                            "max_value_threshold": null,
                            "min_critical_threshold": null,
                            "min_value_threshold": null,
                            "node": {
                                "_ref": "../../../..",
                                "class": "com.cognosos.radiocloudappserver.Node_$$_javassist_57"
                            },
                            "sensorType_id": 8,
                            "updateInterval": null
                        },
                        {
                            "attached": true,
                            "dirty": false,
                            "dirtyPropertyNames": [],
                            "handler": {
                                "class": "org.codehaus.groovy.grails.orm.hibernate.proxy.GroovyAwareJavassistLazyInitializer",
                                "entityName": "com.cognosos.radiocloudappserver.Sensor",
                                "identifier": 8,
                                "implementation": {
                                    "id": 8,
                                    "max_critical_threshold": null,
                                    "max_value_threshold": null,
                                    "min_critical_threshold": null,
                                    "min_value_threshold": null,
                                    "node": {
                                        "_ref": "../../../../../..",
                                        "class": "com.cognosos.radiocloudappserver.Node_$$_javassist_57"
                                    },
                                    "sensorType_id": 13,
                                    "updateInterval": null
                                },
                                "persistentClass": "com.cognosos.radiocloudappserver.Sensor",
                                "readOnly": false,
                                "readOnlySettingAvailable": true,
                                "session": {
                                    "actionQueue": {
                                        "class": "org.hibernate.engine.spi.ActionQueue",
                                        "transactionCompletionProcesses": {
                                            "class": "org.hibernate.engine.spi.ActionQueue$TransactionCompletionProcesses"
                                        }
                                    },
                                    "autoCloseSessionEnabled": false,
                                    "cacheMode": {
                                        "enumType": "org.hibernate.CacheMode",
                                        "name": "NORMAL"
                                    },
                                    "class": "org.hibernate.internal.SessionImpl",
                                    "closed": false,
                                    "connected": true,
                                    "connectionReleaseMode": {
                                        "enumType": "org.hibernate.ConnectionReleaseMode",
                                        "name": "ON_CLOSE"
                                    },
                                    "defaultReadOnly": false,
                                    "dirty": false,
                                    "dontFlushFromFind": 0,
                                    "enabledFilters": {
                                        "dynamicFilterEnabler": {
                                            "class": "org.hibernate.internal.FilterImpl",
                                            "filterDefinition": {
                                                "class": "org.hibernate.engine.spi.FilterDefinition",
                                                "defaultFilterCondition": "1=1",
                                                "filterName": "dynamicFilterEnabler",
                                                "parameterNames": [],
                                                "parameterTypes": {}
                                            },
                                            "name": "dynamicFilterEnabler",
                                            "parameters": {}
                                        }
                                    },
                                    "eventListenerManager": {
                                        "class": "org.hibernate.engine.internal.SessionEventListenerManagerImpl"
                                    },
                                    "eventSource": true,
                                    "factory": {
                                        "SQLExceptionConverter": {
                                            "class": "org.hibernate.exception.internal.StandardSQLExceptionConverter"
                                        },
                                        "SQLExceptionHelper": {
                                            "class": "org.hibernate.engine.jdbc.spi.SqlExceptionHelper",
                                            "sqlExceptionConverter": {
                                                "class": "org.hibernate.exception.internal.StandardSQLExceptionConverter"
                                            }
                                        },
                                        "allClassMetadata": {
                                            "com.cognosos.radiocloudappserver.LocationProviderConfig": {
                                                "abstract": false,
                                                "attributes": [
                                                    {
                                                        "cascadeStyle": {
                                                            "class": "org.hibernate.engine.spi.CascadeStyles$12"
                                                        },
                                                        "class": "org.hibernate.tuple.entity.VersionProperty",
                                                        "dirtyCheckable": true,
                                                        "fetchMode": null,
                                                        "insertable": true,
                                                        "lazy": false,
                                                        "name": "version",
                                                        "node": null,
                                                        "nullable": false,
                                                        "source": {
                                                            "_ref": "../..",
                                                            "class": "org.codehaus.groovy.grails.orm.hibernate.persister.entity.GroovyAwareSingleTableEntityPersister"
                                                        },
                                                        "type": {
                                                            "XMLElement": false,
                                                            "anyType": false,
                                                            "associationType": false,
                                                            "class": "org.hibernate.type.LongType",
                                                            "collectionType": false,
                                                            "comparator": {
                                                                "class": "org.hibernate.internal.util.compare.ComparableComparator"
                                                            },
                                                            "componentType": false,
                                                            "defaultValue": 0,
                                                            "entityType": false,
                                                            "javaTypeDescriptor": {
                                                                "class": "org.hibernate.type.descriptor.java.LongTypeDescriptor",
                                                                "comparator": {
                                                                    "class": "org.hibernate.internal.util.compare.ComparableComparator"
                                                                },
                                                                "javaTypeClass": "java.lang.Long",
                                                                "mutabilityPlan": {
                                                                    "class": "org.hibernate.type.descriptor.java.ImmutableMutabilityPlan",
                                                                    "mutable": false
                                                                }
                                                            },
                                                            "mutable": false,
                                                            "name": "long",
                                                            "primitiveClass": "long",
                                                            "registrationKeys": [
                                                                "long",
                                                                "long",
                                                                "java.lang.Long"
                                                            ],
                                                            "returnedClass": "java.lang.Long",
                                                            "sqlTypeDescriptor": {
                                                                "class": "org.hibernate.type.descriptor.sql.BigIntTypeDescriptor",
                                                                "sqlType": -5
                                                            }
                                                        },
                                                        "unsavedValue": {
                                                            "class": "org.hibernate.engine.spi.VersionValue$2"
                                                        },
                                                        "updateable": true,
                                                        "valueGenerationStrategy": null,
                                                        "versionable": true
                                                    }
                                                ]
                                            }
                                        }
                                    }
                                }
                            }
                        }
                    ]
                }
            }
        }
    }
]

HTTP Request

PUT https://api.cognosos.net/latestSensorValue

Request Body

Field Required Type
dateCreated false Date
value false String

Response Body

200 OK

Content-Type: application/json

Field Type Description
dateCreated String
id int
node Object

Event

Events are triggered by entities in the system. Events are published to ActiveMQ broker and can also be accessed via API.

Properties Type Description
origin Object Origin of the Event
application Object id and code
customer Object id and name
date Date UTC time
message String Text Message
data Object Additional Information based on Event Type

Event Origin

Properties Type Description
id Long ID of the origin
type Enum : [
SYSTEM,
APPLICATION,
NODE,
SENSOR,
GATEWAY,
ZONE,
SITE
]
Type of the origin
name String name (Asset Identifier in case of Node)

Event Properties

Properties Type Description
LEVEL Enum: [
APPLICATION
]
Level of the Event
SEVERITY Enum : [
CRITICAL,
HIGH,
INFO
]
Severity of the Event
CATEGORY Enum : [
SENSOR_DATA,
ALERT,
GEOFENCE,
PROVISIONING
]
Category of the Event
STATUS Enum: [
PENDING,
HANDLED
]
Status of the Event
TYPE Enum Event Type

Following chart shows the hierarchy of events.

Event Hierarchy

Get

curl -u username:password
  --request GET
  "https://api.cognosos.net/event
  ?application_code=AAC&size=2"

The above command returns JSON structured like this:

[
    {
        "application": {
            "code": "AAC",
            "id": 3
        },
        "customer": {
            "id": 1,
            "name": "cognosos"
        },
        "data": {
            "device_id": 2206,
            "latitude": "33.6973",
            "longitude": "-84.62338",
            "current_zones": [
                {
                    "id": "42",
                    "name": "800"
                },
                {
                    "id": "44",
                    "name": "801"
                }
            ]
        },
        "date": "2017-03-13T18:59:02+0000",
        "event": {
            "category": "GEOFENCE",
            "level": "APPLICATION",
            "severity": "INFO",
            "status": "PENDING",
            "type": "LOCATION_CHANGE"
        },
        "id": "AVrJgre1LC4J8UaRDA_2",
        "message": "https://www.google.com/maps?q=33.6973 -84.62338",
        "origin": {
            "id": 22,
            "name": "car_2206",
            "type": "NODE"
        }
    },
    {
        "application": {
            "code": "AAC",
            "id": 3
        },
        "customer": {
            "id": 1,
            "name": "cognosos"
        },
        "data": {
            "device_id": 2206,
            "latitude": "33.6973",
            "longitude": "-84.62338",
            "current_zones": []
        },
        "date": "2017-03-13T18:59:02+0000",
        "event": {
            "category": "GEOFENCE",
            "level": "APPLICATION",
            "severity": "INFO",
            "status": "PENDING",
            "type": "LOCATION_CHANGE"
        },
        "id": "AVrJCcSFLC4J8UaRDA_g",
        "message": "https://www.google.com/maps?q=33.6973 -84.62338",
        "origin": {
            "id": 22,
            "name": "car_2206",
            "type": "NODE"
        }
    }
]

Get List of Events belonging to an Application

HTTP Request

GET https://api.cognosos.net/event

Request Parameters

Field Required Type Description
application_code true String Returns Events for this Application
size false Integer Limit to max events. Cannot be greater than 10000. Default 200
origin_id false Long Filter events by origin id.
origin_type false String Filter events by origin type.
event_level false String Filter events by event level.
event_severity false String Filter events by event severity.
event_category false String Filter events by event category.
event_status false String Filter events by event status.
event_type false String Filter events by event type.
start_date false Timestamp Filter events after this Date.
end_Date false Timestamp Filter events before this Date.

Response Body

200 OK

Content-Type: application/json

Field Type Description
origin Object Origin of the Event
application Object id and code
customer Object id and name
date Date UTC time
message String Text Message
data Object Additional Information based on Event Type
id String Event ID
event Object category, level, severity, status and type

Update

curl -u username:password 
    -H "Content-Type: application/json" 
    -X PUT -d
    '{ 
        "event_id":"AVrI9gnuLC4J8UaRDAE",
        "event_type":"ASSET_DETACHED", 
        "event_status":"HANDLED"
    }' 
    "https://api.cognosos.net/event/update"

The above command returns JSON structured like this:

{
    "status": "Updated"
}

Update status of Event

HTTP Request

PUT https://api.cognosos.net/event/update

Headers

Content-Type: application/json

Request Body

Field Required Type Description
event_id true String Event ID
event_type true String Type of the Event
event_status true Enum = [PENDING, HANDLED] Status

Response Body

200 OK

Content-Type: application/json

Field Description
status Returns Updated

Count

curl -u username:password
  --request GET
  "https://api.cognosos.net/event/count?application_code=YOUR_APP_CODE”

The above command returns JSON structured like this:

{
    "application": {
        "name": "Cognosos Office",
        "code": "YOUR_APP_CODE"
    },
    "count": 119956
}

HTTP Request

GET https://api.cognosos.net/event/count

Request Body

Field Required Type
application_code true String
search false String
origin_id false Long
origin_name false String
origin_type false String
event_level false String
event_severity false String
event_category false String
event_status false String
event_type false String
start_date false long
end_date false long

Response Body

200 OK

Content-Type: application/json

Field Type Description
application Object name and code
count int

Index

curl -u username:password
  --request GET
  "https://api.cognosos.net/event/index”

The above command returns JSON structured like this:

[
    {
        "origin": {
            "id": 938352,
            "type": "NODE",
            "name": "brian_400_2"
        },
        "application": {
            "id": 23,
            "code": "YOUR_APP_CODE"
        },
        "customer": {
            "id": 13,
            "name": "Your_Application"
        },
        "date": "2020-05-21T19:07:05+0000",
        "message": "https://www.google.com/maps?q=35.04718 -89.937318",
        "raw_value": {
            "GPS_ON_TIME": 48,
            "LONGITUDE": -89.937318,
            "ALTITUDE": 90,
            "LATITUDE": 35.04718
        },
        "data": {
            "current_zones": [],
            "device_id": 114430,
            "latitude": "35.04718",
            "longitude": "-89.937318"
        },
        "event": {
            "level": "APPLICATION",
            "category": "GEOFENCE",
            "type": "LOCATION_CHANGE",
            "severity": "INFO",
            "status": "PENDING"
        },
        "id": "AXI4oc3Hl_0pm73upFLx"
    }
]

HTTP Request

GET https://api.cognosos.net/event/index

Request Body

Field Required Type
size false int
from false int
application_code true String
sort false String
order false String
search false String
origin_id false Long
origin_name false String
origin_type false String
event_level false String
event_severity false String
event_category false String
event_status false String
event_type false String
start_date false long
end_date false long
format false String

Response Body

200 OK

Content-Type: application/json

Field Type Description
origin Object Origin of the Event
application Object id and code
customer Object id and name
date String UTC time
message String Text Message
raw_value Object GPS_ON_TIME, LONGITUDE, ALTITUDE and LATITUDE
data Object Additional Information based on Event Type
id String Event ID
event Object category, level, severity, status and type

Errors

Message body looks like this

{"error": "Valid Username is required"}
HTTP Status Code Meaning
400 - Bad Request Invalid request. Check error message body for more details
401 - Unauthorized Invalid or no Credentials provided
403 - Forbidden Access Denied. User doesn’t have authority to access resource.
404 - Not Found Resource not found
406 - Not Acceptable Incomplete Parameters
500 - Internal Server Error We had a problem with our server. Try again later.

Bad Credentials

Response Body

Content-Type: application/json

[error: ‘Access Denied’]

Forbidden

Response Body

Content-Type: application/json

[error: ‘We had a problem with our server. Try again later.’]

Internal

Response Body

Content-Type: application/json

[error: ‘Resource was not found’]

Not Found

Response Body

Content-Type: application/json

[error: ‘Bad Credentials’]

Analytics

Average Cycle Time

curl -u username:password
     --request GET
     'https://api.cognosos.net/analytics/avgCycleTime?application_code=YOUR_APP_CODE'

The above command returns JSON structured like this:

{
    "zones": {
        "buckets": [
            {
                "key": 604.0,
                "doc_count": 24,
                "parent_intervals": {
                    "buckets": [
                        {
                            "key_as_string": "2018-05-01T00:00:00.000Z",
                            "key": 1525132800000,
                            "doc_count": 7,
                            "intervals": {
                                "buckets": [
                                    {
                                        "key_as_string": "2018-05-14T00:00:00.000Z",
                                        "key": 1526256000000,
                                        "doc_count": 5,
                                        "avg_time_spent": {
                                            "value": 2194008.4
                                        }
                                    },
                                    {
                                        "key_as_string": "2018-05-21T00:00:00.000Z",
                                        "key": 1526860800000,
                                        "doc_count": 2,
                                        "avg_time_spent": {
                                            "value": 162847.0
                                        }
                                    }
                                ]
                            }
                        }
                    ]
                }
            }
        ]
    }
}

A Cycle Time is defined as the total time an asset spends from the time it enters a zone, to the time it leaves.

HTTP Request

GET https://api.cognosos.net/analytics/avgCycleTime

Request Parameters

Field Required
application_code true
node_id false
start_date false
end_date false

Response Body

200 OK

Content-Type: application/json

Field Type Description
zones Object key, doc_count, parent_intervals
key float
doc_count int
parent_intervals Object key_as_string, key, doc_count, intervals
key_as_string String date left
key long
doc_count int
avg_time_spent Object value
value float

Asset Density

curl -u username:password
     --request GET
     'https://api.cognosos.net/analytics/assetDensity?application_code=YOUR_APP_CODE'

The above command returns JSON structured like this:

{
    "zones": [
        {
            "zone": 640,
            "entered": [
                [
                    1526083200000,
                    3
                ],
                [
                    1526169600000,
                    0
                ]
            ],
            "left": [
                [
                    1526083200000,
                    0
                ],
                [
                    1526169600000,
                    0
                ]
            ]
        }
    ]
}

Number of assets entered/left zones by hour/day/month/week/quarter/year

HTTP Request

GET https://api.cognosos.net/analytics/assetDensity

Request Parameters

Field Required
application_code true
start_date false
end_date false

Response Body

200 OK

Content-Type: application/json

Field Type Description
zones list zone, entered, left
zone int
entered list
left list

Aging GPS

curl -u username:password
     --request GET
     "https://api.cognosos.net/analytics/agingGPS?application_code=YOUR_APP_CODE”

The above command returns JSON structured like this:

[
    {
        "bucket": 0,
        "count": 15
    },
    {
        "bucket": 10,
        "count": 5
    }
]

HTTP Request

GET https://api.cognosos.net/analytics/agingGPS

Request Parameters

Field Required Type
application_code true String

Response Body

200 OK

Content-Type: application/json

Field Type Description
bucket int
count int

Asset Distribution

curl -u username:password
     --request GET
     "https://api.cognosos.net/analytics/assetDistribution?
     application_code=YOUR_APP_CODE”

The above command returns JSON structured like this:

[
    {
        "date": "5/15/20",
        "null": 129
    },
    {
        "date": "5/16/20",
        "null": 129
    },
    {
        "date": "5/17/20",
        "null": 129
    }
]

HTTP Request

GET https://api.cognosos.net/analytics/assetDistribution

Request Parameters

Field Required Type
application_code true String
custom_field false String
start_date false long
end_date false long

Response Body

200 OK

Content-Type: application/json

Field Type Description
date String
null int

Battery Level

curl -u username:password
     --request GET
     "https://api.cognosos.net/analytics/batteryLevel
     ?application_code=YOUR_APP_CODE”

The above command returns JSON structured like this:

{
    "normal": 139,
    "low": 0,
    "critical": 7
}

HTTP Request

GET https://api.cognosos.net/analytics/batteryLevel

Request Parameters

Field Required Type
application_code true String

Response Body

200 OK

Content-Type: application/json

Field Type Description
normal int
low int
critical int

Create Inventory Records

Device Status

curl -u username:password
     --request GET
     "https://api.cognosos.net/analytics/deviceStatus?
     application_code=YOUR_APP_CODE”

The above command returns JSON structured like this:

{
    "active": 124,
    "inactive": 22
}

HTTP Request

GET https://api.cognosos.net/analytics/deviceStatus

Request Parameters

Field Required Type
application_code true String

Response Body

200 OK

Content-Type: application/json

Field Type Description
active int
inactive int

Inventory Aging

curl -u username:password
     --request GET
     "https://api.cognosos.net/analytics/inventoryAging?
     application_code=YOUR_APP_CODE”

The above command returns JSON structured like this:

[
    {
        "bucket": 10,
        "count": 2
    },
    {
        "bucket": 20,
        "count": 1
    },
    {
        "bucket": 30,
        "count": 10
    }
]

HTTP Request

GET https://api.cognosos.net/analytics/inventoryAging

Request Parameters

Field Required Type
application_code true String

Response Body

200 OK

Content-Type: application/json

Field Type Description
bucket int
count int

Shop Throughput

curl -u username:password
     --request GET
     "https://api.cognosos.net/analytics/shopThroughput?
     application_code=YOUR_APP_CODE”

The above command returns JSON structured like this:

{
    "640": [
        {
            "date": "2018-05-12",
            "entered": 3,
            "left": 0,
            "stayed": 3
        },
        {
            "date": "2018-05-13",
            "entered": 0,
            "left": 0,
            "stayed": 3
        }
    ]
}

HTTP Request

GET https://api.cognosos.net/analytics/shopThroughput

Request Parameters

Field Required Type
application_code true String
zone false String
start_date false long
end_date false long

Response Body

200 OK

Content-Type: application/json

Field Type Description
date String
entered int
left int
stayed int

Asset Movement

Get

Get Asset Movements through the zones

Index

curl -u username:password
  -request GET
  "https://api.cognosos.net/AssetMovement?application_code=YOUR_APP_CODE”

The above command returns JSON structured like this:

[
    {
        "_index": "assetmovement",
        "_type": "Your_Application_YOUR_APP_CODE",
        "_id": "AXIzt6obzvLbXfkwglFx",
        "_score": null,
        "_source": {
            "node": {
                "id": 1464181,
                "asset_identifier": "Jim_RT220"
            },
            "application": {
                "id": 23,
                "code": "YOUR_APP_CODE"
            },
            "customer": {
                "id": 13,
                "name": "Your_Application"
            },
            "zone": {
                "id": 2177,
                "name": "Front Lot"
            },
            "date": {
                "entered": "2020-05-20T20:12:50+0000",
                "created": "2020-05-20T20:12:54+0000"
            }
        },
        "sort": [
            1590005574000
        ]
    }
]

HTTP Request

GET https://api.cognosos.net/AssetMovement”

Request Body

Field Required Type
application_code true String
size false int
node_id false long
zone_id false long
start_date false long
end_date false long
format false String

Response Body

200 OK

Content-Type: application/json

Field Type Description
_index String
_type String
_id String
_score String
_source Object node, application, customer, zone, date
sort list

Rules

Index

curl -u username:password
  --request GET
  "https://api.cognosos.net/rules”

The above command returns JSON structured like this:

[
    {
        "emailText": null,
        "id": 1,
        "messageText": "%asset% %action% %zone% on %time%. Reply STOP to opt out.",
        "smsText": null,
        "template": "Notify me when %asset% enters or leaves %zone%"
    },
    {
        "emailText": null,
        "id": 2,
        "messageText": "%asset% %action% %zone% on %time%. Reply STOP to opt out.",
        "smsText": null,
        "template": "Notify me when %asset% enters or leaves any zone"
    }
]

HTTP Request

GET https://api.cognosos.net/rules

Request Body

Field Required Type
max false Integer

Response Body

200 OK

Content-Type: application/json

Field Type Description
emailText String
id int
messageText String
smsText String
template String

Subscription

Unsubscribe

The above command returns JSON structured like this:

{
    "text": "Success"
}

Request Body

Field Required Type
endpointType true String
endpointAddress true String
zone_id false long
asset_identifier false String
application_code true String

Response Body

200 OK

Content-Type: application/json

[text: ‘Success’]

Delete

curl -u username:password
  --request DELETE
  "https://api.cognosos.net/subscription”

HTTP Request

DELETE https://api.cognosos.net/subscription/

Request Body

Field Required Type
type true int
topic true String
topicArn true String
application true int
dateCreated false Date
zone_id false long
asset_identifier false String
endpointType false String
endpointAddress false String
sentence false String
timeDayRange false String
sensorType false int

Response Body

201 NO_CONTENT

Index

curl -u username:password
  --request GET
  "https://api.cognosos.net/subscription”

HTTP Request

GET https://api.cognosos.net/subscription

Request Body

Field Required Type
max false Integer
type false Integer
zone_id false Long
asset_identifier false String
application_code false String
topic false String

Response Body

200 OK

Content-Type: application/json

Field Type Description
id int
asset_identifier String
dateCreated String
endpointAddress String
endpointType String
sensorType int
sentence String
timeDayRange String
topic String
topicArn String
type int
zone_id long

Save

curl -u username:password
  --request POST
  "https://api.cognosos.net/subscription”

HTTP Request

POST https://api.cognosos.net/subscription

Request Body

Field Required Type
type false Integer
zone_id false Long
asset_identifier false String
endpointType true String
endpointAddress true String
application_code true String
rule_id true Integer
start_time false Integer
end_time false Integer
sensor_type false Integer
timeDayRange false String

Response Body

201 Created

Content-Type: application/json

Field Type Description
id int
asset_identifier String
dateCreated String
endpointAddress String
endpointType String
sensorType int
sentence String
timeDayRange String
topic String
topicArn String
type int
zone_id long

Update

curl -u username:password
  --request PUT
  "https://api.cognosos.net/subscription/13”

The above command returns JSON structured like this:

{
    "id": 13,
    "asset_identifier": "WBA3C3C5XDF978678",
    "dateCreated": "2018-08-14T18:23:12Z",
    "endpointAddress": "test_user@example.com",
    "endpointType": "email",
    "sensorType": 0,
    "sentence": "Notify me when WBA3C3C5XDF978678 enters or leaves any zone",
    "timeDayRange": null,
    "topic": "5_-_MTORONTO_-_all_-_WBA3C3C5XDF978678_-_all",
    "topicArn": "arn:aws:sns:us-east-1:2374987:5_-_MTORONTO_-_all_-_WBA3C3C5XDF978678_-_all",
    "type": 1,
    "zone_id": 0
}

HTTP Request

PUT https://api.cognosos.net/subscription/

Request Body

Field Required Type
type true int
topic true String
topicArn true String
application true int
dateCreated false Date
zone_id false long
asset_identifier false String
endpointType false String
endpointAddress false String
sentence false String
timeDayRange false String
sensorType false int

Response Body

200 OK

Content-Type: application/json

Field Type Description
id int
asset_identifier String
dateCreated String
endpointAddress String
endpointType String
sensorType int
sentence String
timeDayRange String
topic String
topicArn String
type int
zone_id long

Data Packet

Index

curl -u username:password
  --request GET
  "https://api.cognosos.net/dataPacket”

HTTP Request

GET https://api.cognosos.net/dataPacket

Request Body

Field Required Type
size false int
query_string false String
device_id false long
gateway_id false int
sequence_number false
control false
message_version false
message_type false
channel false
start_signal_strength false
end_signal_strength false
start_date false long
end_date false long

Response Body

200 OK

Content-Type: application/json

The received packet data is returned.

Filter Definition

Delete

curl -u username:password
  --request DELETE
  "https://api.cognosos.net/device”

“https://api.cognosos.net/” ”`

The above command returns JSON structured like this:

[]

HTTP Request

DELETE https://api.cognosos.net/filterDefinition

Request Body

Field Required Type
json true String
type true String
name true String

Response Body

200 OK

Content-Type: application/json

[message: “Filter deleted”]

Index

curl -u username:password
  --request GET
  "https://api.cognosos.net/filterDefinition”

The above command returns JSON structured like this:

[]

HTTP Request

GET https://api.cognosos.net/filterDefinition

Request Body

Field Required Type
max false Integer
person_id false Long
application_code false String
name false String

Response Body

200 OK

Content-Type: application/json

Field Type Description
json String
type String
name String
person Object
application Object

Save

curl -u username:password
  --request POST
  "https://api.cognosos.net/filterDefinition”

The above command returns JSON structured like this:

{
    "application": null,
    "id": 167,
    "json": "null",
    "name": null,
    "person": null,
    "type": null
}

HTTP Request

POST https://api.cognosos.net/filterDefinition

Request Body

Field Required Type
filter true Filter
name true String
application_code false String
person_id false Long

Response Body

200 OK

Content-Type: application/json

Field Type Description
application Object
id int
json String
name String
person Object
type String

Update

curl -u username:password
  --request PUT
  "https://api.cognosos.net/filterDefinition”

The above command returns JSON structured like this:

[]

HTTP Request

PUT https://api.cognosos.net/filterDefinition

Request Body

Field Required Type
id false Long
max false Integer
person_id false Long
application_code false String
name false String

Response Body

200 OK

Content-Type: application/json

Field Type Description
application Object
id int
json String
name String
person Object
type String

On Spot

Count

curl -u username:password
  --request GET
  "https://api.cognosos.net/onSpot/count
  ?application_code=YOUR_APP_CODE”

The above command returns JSON structured like this:

{
    "count": 3
}

HTTP Request

GET https://api.cognosos.net/onSpot/count

Request Body

Field Required Type
application_code true String

Response Body

200 OK

Content-Type: application/json

Field Type Description
count int

Delete

curl -u username:password
  --request DELETE
  "https://api.cognosos.net/onSpot/1?application_code=YOUR_APP_CODE”

The above command returns JSON structured like this:

{
    "message": "Deleted"
}

HTTP Request

DELETE https://api.cognosos.net/onSpot/

Request Body

Field Required Type
application_code true String
id false long

Response Body

200 OK

Content-Type: application/json

Field Type Description
message String

Index

curl -u username:password
  --request GET
  "https://api.cognosos.net/onSpot?application_code=YOUR_APP_CODE”

The above command returns JSON structured like this:

[
    {
        "id": 68,
        "dateCreated": "2020-03-05T21:05:09Z",
        "enabled": false,
        "mappings": [],
        "name": "New ons-spot for David"
    },
    {
        "id": 67,
        "dateCreated": "2020-03-05T21:01:05Z",
        "enabled": false,
        "mappings": [
            {
                "dateCreated": "2020-03-05T21:02:06Z",
                "definition": {
                    "_ref": "../..",
                    "class": "com.cognosos.radiocloudappserver.OnSpotDefinition"
                },
                "description": null,
                "id": 123,
                "name": "Production year 2006 or 2008 ---> Zone = office",
                "predicateJson": "{\"custom_field_values\":{},\"current_zone\":{\"op\":\"COMPARE_EQUALS\",\"valuelist\":[\"640\"]}}",
                "selectionJson": "{\"custom_field_values\":{\"Year\":{\"op\":\"COMPARE_EQUALS\",\"valuelist\":[\"2006\",\"2008\"]}}}"
            },
            {
                "dateCreated": "2020-03-05T21:03:40Z",
                "definition": {
                    "_ref": "../..",
                    "class": "com.cognosos.radiocloudappserver.OnSpotDefinition"
                },
                "description": null,
                "id": 124,
                "name": "2014 ---> abc",
                "predicateJson": "{\"custom_field_values\":{},\"current_zone\":{\"op\":\"COMPARE_EQUALS\",\"valuelist\":[\"1923\"]}}",
                "selectionJson": "{\"custom_field_values\":{\"Year\":{\"op\":\"COMPARE_EQUALS\",\"valuelist\":[\"2014\"]}}}"
            }
        ],
        "name": "On-Spot for David"
    }
]

HTTP Request

GET https://api.cognosos.net/onSpot

Request Body

Field Required Type
application_code true String
max false Integer
sort false String
order false String
offset false Integer

Response Body

200 OK

Content-Type: application/json

Field Type Description
id int
dateCreated String
enabled boolean
mappings list
name String

Query On Spot

curl -u username:password
  --request POST
  "https://api.cognosos.net/onSpot/queryOnSpot/”

The above command returns JSON structured like this:


HTTP Request

POST https://api.cognosos.net/onSpot/queryOnSpot

Request Body

Field Required Type
name false String
latitude false String
longitude false String
address false String
placeId false String
application_type_id false int
ble_rtls_enabled false boolean
ble_rtls_provider false String
ble_rtls_customerId false String
ble_rtls_siteId false int
timezone false String
locale false String
name true String
dateCreated false Date
enabled false boolean
viewFilter false Filter
application_code true String

Response Body

200 OK

Content-Type: application/json

Save

curl -u username:password
  --request POST
  "https://api.cognosos.net/onSpot?application_code=YOUR_APP_CODE”

The above command returns JSON structured like this:

{
    "id": 84,
    "dateCreated": "2020-05-22T01:27:24Z",
    "enabled": false,
    "mappings": null,
    "name": null
}

HTTP Request

POST https://api.cognosos.net/onSpot

Request Body

Field Required Type
name false String
latitude false String
longitude false String
address false String
placeId false String
application_type_id false int
ble_rtls_enabled false boolean
ble_rtls_provider false String
ble_rtls_customerId false String
ble_rtls_siteId false int
timezone false String
locale false String
name true String
dateCreated false Date
enabled false boolean
application_code true String

Response Body

200 OK

Content-Type: application/json

Field Type Description
id int
dateCreated String
enabled boolean
mappings list
name String

Show

curl -u username:password
  --request GET
  "https://api.cognosos.net/onSpot/84?application_code=YOUR_APP_CODE”

The above command returns JSON structured like this:

{
    "id": 84,
    "dateCreated": "2020-05-22T01:27:24Z",
    "enabled": false,
    "mappings": [],
    "name": null
}

HTTP Request

GET https://api.cognosos.net/onSpot/

Request Body

Field Required Type
application_code true String
id false long

Response Body

Field Type Description
id int
dateCreated String
enabled boolean
mappings list
name String

On Spot Mapping

Delete

curl -u username:password
  --request DELETE
  "https://api.cognosos.net/onSpotMapping/4?application_code=YOUR_APP_CODE”

The above command returns JSON structured like this:

{
    "message": "Deleted"
}

HTTP Request

DELETE https://api.cognosos.net/onSpotMapping/

Request Body

Field Required Type
application_code true String
id false long

Response Body

200 OK

Content-Type: application/json

Field Type Description
message String

Index

curl -u username:password
  --request GET
  "https://api.cognosos.net/onSpotMapping”

The above command returns JSON structured like this:

[
    {
        "dateCreated": "2019-09-30T16:50:03Z",
        "definition": {
            "id": 8,
            "dateCreated": "2019-09-30T16:44:11Z",
            "enabled": false,
            "mappings": [
                {
                    "_ref": "../..",
                    "class": "com.cognosos.radiocloudappserver.OnSpotMapping"
                },
                {
                    "dateCreated": "2019-10-02T16:58:07Z",
                    "definition": {
                        "_ref": "../..",
                        "class": "com.cognosos.radiocloudappserver.OnSpotDefinition_$$_javassist_43"
                    },
                    "description": null,
                    "id": 22,
                    "name": "TL Lane",
                    "predicateJson": "{\"custom_field_values\":{},\"current_zone\":{\"op\":\"COMPARE_EQUALS\",\"valuelist\":[\"1242\"]}}",
                    "selectionJson": "{\"custom_field_values\":{\"Lane\":{\"op\":\"COMPARE_EQUALS\",\"valuelist\":[\"TL\"]}}}"
                }
            ],
            "name": "Test"
        },
        "description": "GM",
        "id": 10,
        "name": "GM",
        "predicateJson": "{\"custom_field_values\":{},\"current_zone\":{\"op\":\"COMPARE_EQUALS\",\"valuelist\":[\"1109\",\"1253\"]}}",
        "selectionJson": "{\"custom_field_values\":{\"Lane\":{\"op\":\"COMPARE_EQUALS\",\"valuelist\":[\"GM\"]}}}"
    }
]

HTTP Request

GET https://api.cognosos.net/onSpotMapping

Request Body

Field Required Type
application_code true String

Response Body

200 OK

Content-Type: application/json

Field Type Description
dateCreate String
definition Object
description String
id int
name String
predicateJson String
selectionJson String

Save

curl -u username:password
  --request POST
  "https://api.cognosos.net/onSpotMapping?application_code=YOUR_APP_CODE”

The above command returns JSON structured like this:

HTTP Request

POST https://api.cognosos.net/onSpotMapping

Request Body

Field Required Type
application_code true String

Response Body

Field Type Description
name String
description String
dateCreated Date
selectionJson String
predicateJson String
definition OnSpotDefinition Object

Show

curl -u username:password
  --request GET
  "https://api.cognosos.net/onSpotMapping/7?application_code=YOUR_APP_CODE”

The above command returns JSON structured like this:

{
    "dateCreated": "2019-09-28T14:53:16Z",
    "definition": {
        "id": 4,
        "dateCreated": "2019-09-28T14:48:20Z",
        "enabled": false,
        "mappings": [
            {
                "_ref": "../..",
                "class": "com.cognosos.radiocloudappserver.OnSpotMapping"
            }
        ],
        "name": "Truck Tender Ready"
    },
    "description": "Truck vehicles ready for tender",
    "id": 7,
    "name": "Truck Ready For Tender",
    "predicateJson": "{\"custom_field_values\":{},\"current_zone\":{\"op\":\"COMPARE_EQUALS\",\"valuelist\":[\"805\",\"804\"]}}",
    "selectionJson": "{\"custom_field_values\":{\"VPC\":{\"op\":\"COMPARE_EQUALS\",\"valuelist\":[\"Staging for Truck\"]},\"Hold\":{\"op\":\"COMPARE_EQUALS\",\"valuelist\":[\"No\",\"N\"]},\"RO\":{\"op\":\"COMPARE_EQUALS\",\"valuelist\":[\"N\"]}}}"
}

HTTP Request

GET https://api.cognosos.net/onSpotMapping/

Request Body

Field Required Type
application_code true String
id false long

Response Body

200 OK

Content-Type: application/json

Field Type Description
name String
description String
dateCreated Date
selectionJson String
predicateJson String
definition OnSpotDefinition Object

Site

Delete

curl -u username:password
  --request DELETE
  "https://api.cognosos.net/site”

HTTP Request

DELETE https://api.cognosos.net/site

Request Body

Field Required Type
name true String
dateCreated false Date
latitude false String
longitude false String
perimeter false String
max_count_threshold false Float
min_count_threshold false Float

Response Body

204 NO_CONTENT

Index

curl -u username:password
  --request GET
  "https://api.cognosos.net/site”

The above command returns JSON structured like this:

[
    {
        "application": {
            "id": 1,
            "address": null,
            "application_type": {
                "id": 1,
                "name": "Asset Tracker"
            },
            "code": "AAA",
            "dateCreated": "2017-02-17T19:52:20Z",
            "gps_granularity": 0.001,
            "latitude": "33.7772364",
            "longitude": "-84.3891107",
            "name": "Asset Tracker",
            "non_responsive_detection_frequency": 3,
            "placeId": null,
            "status": 1,
            "total_devices": 16000
        },
        "dateCreated": "2017-02-17T19:52:20Z",
        "id": 1,
        "latitude": "33.7772364",
        "longitude": "-84.3891107",
        "max_count_threshold": null,
        "min_count_threshold": null,
        "name": "default",
        "perimeter": null,
        "zones": []
    }
]

HTTP Request

GET https://api.cognosos.net/site

Request Body

Field Required Type
max false Integer

Response Body

200 OK

Content-Type: application/json

Field Type Description
application Object
dateCreated String
id int
latitude String
longitude String
max_count_threshold Float
min_count_threshold Float
name String
perimeter String
zones list

Save

curl -u username:password
  --request POST
  "https://api.cognosos.net/site”

HTTP Request

POST https://api.cognosos.net/site

Request Body

Field Required Type
name true String
dateCreated false Date
latitude false String
longitude false String
perimeter false String
max_count_threshold false Float
min_count_threshold false Float
application false Application Object
zones false list of Zone Objects

Response Body

201 Created

Content-Type: application/json

Field Type Description
application Object
dateCreated String
id int
latitude String
longitude String
max_count_threshold Float
min_count_threshold Float
name String
perimeter String
zones list

Update

curl -u username:password
  --request PUT
  "https://api.cognosos.net/site”

HTTP Request

PUT https://api.cognosos.net/site

Request Body

Field Required Type
name true String
dateCreated false Date
latitude false String
longitude false String
perimeter false String
max_count_threshold false Float
min_count_threshold false Float
application false Application Object
zones false list of Zone Objects

Response Body

200 OK

Content-Type: application/json

Field Type Description
application Object
dateCreated String
id int
latitude String
longitude String
max_count_threshold Float
min_count_threshold Float
name String
perimeter String
zones list

Structure

Index

curl -u username:password
  --request GET
  "https://api.cognosos.net/structure”

The above command returns JSON structured like this:

[
    {
        "id": 32,
        "dateCreated": "2020-01-08T21:55:25Z",
        "floors": [
            {
                "id": 1895,
                "abbreviation": null,
                "area": 2065.3424301645314,
                "capacity": 1,
                "dateCreated": "2020-01-08T21:55:25Z",
                "latitude": "33.78492642221698",
                "layout": null,
                "longitude": "-84.39031445491621",
                "max_count_threshold": null,
                "min_count_threshold": null,
                "name": "Floor 3",
                "node_count": 0,
                "overlayImage": {
                    "center_lat": null,
                    "center_lon": null,
                    "corner_bottomright_x": 33.78461108074858,
                    "corner_bottomright_y": -84.39034736621686,
                    "corner_topleft_x": 33.78495195879456,
                    "corner_topleft_y": -84.3895519827635,
                    "corner_topright_x": 0.0,
                    "corner_topright_y": 0.0,
                    "d_diff": null,
                    "imageContentType": "image/png",
                    "k_diff": null,
                    "layout": null,
                    "publicUrl": "https://cognosos-zone-geojsons.s3.amazonaws.com/stage/images/zone-143132.png",
                    "rotation": 1.0138748518006304
                },
                "parentZone": null,
                "perimeter": "33.78492642221698 -84.39031445491621,33.78491527588371 -84.38958623516866,33.78464107562895 -84.38959025848219,33.78464999272421 -84.39031847822973,33.78492642221698 -84.39031445491621",
                "site_id": 0,
                "status": 1,
                "type": "FLOOR",
                "z_ordering": 0
            }
        ],
        "last_floor": null,
        "latitude": "33.78492642221698",
        "longitude": "-84.39031445491621",
        "name": "Cognosos Office",
        "pathData": null,
        "perimeter": "33.78492642221698 -84.39031445491621,33.78491527588371 -84.38958623516866,33.78464107562895 -84.38959025848219,33.78464999272421 -84.39031847822973,33.78492642221698 -84.39031445491621",
        "status": 1
    }
]

HTTP Request

GET https://api.cognosos.net/structure

Request Body

Field Required Type
max false Integer
application_code true String
status false Integer
name false String

Response Body

200 OK

Content-Type: application/json

Field Type Description
id int
dateCreated String
floors list
last_floor Integer
latitude String
longitude String
name String
pathData String
perimeter String
status int

Save

curl -u username:password -H “Content-Type: application/json” -X POST -d ‘{ “application”:{“id”: 23, “code”: “YOUR_APP_CODE”}, “name”: “default”, “perimeter”: “33.4554 64.23432,33.7832 65.42342,33.4534 65.324242,33.4554 64.23432” }’ “http://cognosos-dev-lb-1668453522.us-east-1.elb.amazonaws.com/RadioCloudAppServer/structure”

HTTP Request

POST https://api.cognosos.net/structure

Request Body

Field Required Type
name true String
dateCreated false Date
perimeter true String
latitude false String
longitude false String
last_floor false Integer
pathData false String
status false Integer
application true Application
floors false list of Zone Objects

Response Body

201 CREATED

Content-Type: application/json

Field Type Description
id int
dateCreated String
floors list
last_floor Integer
latitude String
longitude String
name String
pathData String
perimeter String
status int

Update

curl -u username:password
  --request PUT
  "https://api.cognosos.net/structure”

HTTP Request

PUT https://api.cognosos.net/structure

Request Body

Field Required Type
name true String
dateCreated false Date
perimeter true String
latitude false String
longitude false String
last_floor false Integer
pathData false String
status false Integer
application true Applications

Response Body

200 OK

Content-Type: application/json

Field Type Description
id int
dateCreated String
floors list
last_floor Integer
latitude String
longitude String
name String
pathData String
perimeter String
status int

Exit Monitor Processing

To support the use case of alerting immediately when a tracked asset approaches an exit door, Cognosos supports Exit Monitor sensors, which detect the presence of nearby Cognosos tags and post a report of the observation to the Cognosos backend.

Exit Monitors are treated similarly to Zonal Activators and are setup with the Zonal Activator API. The latitude, longitude, and zone associated with the zonal activator record will be used to infer the location of detected tags.

NOTE - Internal API

The Exit Monitor API is intended for use by fielded Cognosos devices. It is not intended for use by customers in day- to-day operations.

Posting an Exit Monitor message

Our backend includes an AWS API Gateway definition for the Exit Monitor API. For production purposes, an exit monitor device must post to:

https://exitmonitor.radio.cognosos.net/default/reports

An x-api-key header must be present, and Cognosos Engineering must supply the API key for newly fielded devices.

The following attributes are used in the exit monitor report:

msg_info_v1.source_key: Used to select a Kinesis shard for inbound requests. Should be unique per exit monitor device.

exit_monitor_v1.exit_monitor_id: The Exit Monitor serial number. This corresponds to the Zonal Activator ID column in the Zonal Activator table.

exit_monitor_v1.device_id The Cognosos Tag ID that has been detected.

exit_monitor_v1.received.iso The timestamp of the detection event

Additional fields are not parsed, but are stored for future analysis.

Report Message Format - Minimal:

{ “exit_monitor_v1”: { “exit_monitor_id”: 2200000100, “device_id”: 2000000000, “received”: {“iso”: “2021-05-11T20:03:04.000Z”} } }

Report Message Format - Suggested :

{ “msg_info_v1”: { “seq_num”: 123, “seq_since”: “2021-05-11T12:03:00.000Z”, “source_key”: “exitalarm_2200000100”, “uid”: “EA2200000100D202010511T120300000Rabcdef” }, “exit_monitor_v1”: { “exit_monitor_id”: 2200000100, “device_id”: 2000000000, “received”: {“iso”: “2021-05-11T20:03:04.000Z”}, “ble_rx”: { “rssi”: {“dBm”: -60.0, “dBFS”: -20.0}, “threshold”: {“dBm”: -70}, “macaddr”: {“hex”: “010203040506”}, “mfg_data”: {“b64”: “Ay12Bc12==”}, “channel”: 37 } } }