API Reference

RAN Provider REST APIs provide direct data access to Base Station information for use in external monitoring and reporting. An API key is required to authenticate API usage. If you have not received an API key, please email your request to support@senetco.com or call the technical support phone number shown on support@senetco.com.

Base Station Status API

The Base Station Status API returns detailed information for a set of Base Stations. This may include details about the Base Station like model type, version and uptime as well as current connection information.

There are 2 status sources supported by this API, that are selected using the required parameter.

Resource URL

https://api.senetco.io/rest/integration/bstn/details

Parameters

Parameter Name Description Required Default Value Allowed Values
eui The IEEE EUI-64 identifier for the Base Station. Used to limit the returned data to a specific EUI. No
status The type of status data to use as a source.
Alert=Retrieve Base Stations only with open alerts.
Any=Retrieve Base Stations with or without open alerts
Yes alert, any
fields A comma separated list of fields names to return in the data set. Used to return a smaller subset of data than the default.
Supported Fields:
"status, lastContact,lastPacket,name,model,ismBandName,version,uptime,radius,antennaHeight,alertLevel,deltaTime,address,"
"location,gpsLocation,gpsAltitude"
No All Fields Any combination of the supported fields

Curl Examples

Status for Base Stations with open alerts.

curl -H "authorization: <API_KEY_TO_USE>" --insecure -X POST "https://api.senetco.io/rest/integration/bstn/details?status=alert" 

Status for a specific Base Station with open alerts.

curl -H "authorization: <API_KEY_TO_USE>" --insecure -X POST "https://api.senetco.io/rest/integration/bstn/details?status=alert&eui=AAAAAAAAAAAAAAAA"

Status for Base Stations with or without open alerts.

curl -H "authorization: <API_KEY_TO_USE>" --insecure -X POST "https://api.senetco.io/rest/integration/bstn/details?status=any"

Status for a Base Station with or without open alerts, only return fields "status" and "lastContact".

curl -H "authorization: <API_KEY_TO_USE>" --insecure -X POST "https://api.senetco.io/rest/integration/bstn/details?status=any&eui=AAAAAAAAAAAAAAAA&fields=status,lastContact"

Response Examples

For a single Base Station all fields returned:

{
   "data":[
      {
         "eui":"AAAAAAAAAAAAAAAA",
         "status":{
            "color":"orange",
            "connIssues":"Connection Issues: No SSH",
            "alertCount":1
         },
         "lastContact":1550691020270,
         "lastPacket":1550691080252,
         "name":"Sample BSTN",
         "model":"MultiTech Conduit AP",
         "ismBandName":"US902-928:Default",
         "version":"02_04_04",
         "uptime":30187974,
         "radius":10,
         "antennaHeight":15.01,
         "alertLevel":"Level 1",
         "deltaTime":41,
         "location":{
            "latitude":43.083412,
            "longitude":-70.77599
         },
         "gpsLocation":{
            "latitude":"43.07851",
            "longitude":"-70.7583"
         },
         "gpsAltitude":"32.16134"
      }
   ]
}

Multiple Base Stations with only the "status" and "lastContact" fields returned:

{
   "data":[
      {
         "eui":"AAAAAAAAAAAAAAAA",
         "status":{
            "color":"orange",
            "connIssues":"Connection Issues: No SSH",
            "alertCount":1
         },
         "lastContact":1550691020270
      },
      {
         "eui":"BBBBBBBBBBBBBBBB",
         "status":{
            "color":"red",
            "connIssues":"No Issues",
            "alertCount":2
         },
         "lastContact":1550691020354
      }
   ]
}

Base Station Deploy API

The Base Station Deploy API is designed to allow deployment of a Base Station dynamically post install. This API allows information about the Base Station deployment to be updated without using the web application. The information that can be updated includes, location, height, radius, address, and name.

Note

A Base Station must be created through the provisioning workflow, if the Base Station wasn't provisioned this way, the network administrator's support team should be contacted. If a Base Station was previously deployed, subsequent deployments will override previously provided information.

Resource URL

https://api.senetco.io/rest/integration/bstn/deploy

HTTP Method

POST

Parameters

Parameter Description Required Default Value Allowed Values
eui The IEEE EUI-64 identifier for the LoRa Base Station. Yes Hexadecimal String

Request Body(JSON)

Parameter Description Required Default Value Allowed Values
address The street address of the site No A valid street address
city The city of the site No A valid city name
stateProvince The state or province of the site No A valid state or province
postalCode The postal code of the site No A valid postal code
name The name of the site No N/A
latitude The latitude of the site in decimal degrees Yes A non-zero value between 90 and -90
longitude The longitude of the site in decimal degrees Yes A non-zero value between 180 and -180
height The height above ground level of the top of the antenna in feet Yes A value greater than 0
radius The radius of the sites range in miles Yes A value greater than 0

Curl Example

curl -X POST \
  'https://api.senetco.io/rest/integration/bstn/deploy?eui=FEFFFFFFFFFF0001' \
  -H 'Authorization: <your api key>' \
  -H 'Content-Type: application/json' \
  -d '{
    "address": "100 Market Street",
    "city": "Portsmouth",
    "stateProvince": "NH",
    "postalCode": "03801",
    "name": "Provisioned BSTN",
    "latitude": 44.071568,
    "longitude": -70.762245,
    "height": 100,
    "radius": 10
}'

Example request:

{
    "address": "100 Market Street",
    "city": "Portsmouth",
    "stateProvince": "NH",
    "postalCode": "03801",
    "name": "Provisioned BSTN",
    "latitude": 44.071568,
    "longitude": -70.762245,
    "height": 100,
    "radius": 10
}

Response

Code Reason Description
200 Success Request has been successfully processed
403 Authorization Failure Access to this resource was rejected due to an authorization failure
400 Bad Request Invalid request due to insufficient or malformed parameters
404 Base Station or File Not Found Indicates that the given Base Station EUI doesn't exist

Example Success Response:

{
    "message": "Success!"
}