Documentation (Beta)
Toggle Dark/Light/Auto mode Toggle Dark/Light/Auto mode Toggle Dark/Light/Auto mode Back to homepage

Gateway Commands API

To subscribe to new commands from the NS, GW should subscribe to following MQTT topic:

api/v1/gateway/commands

Commands

Ping Command

To execute ping command, set the number of packets to sent from the gateway and the destination IP address or hostname.

--header 'x-Authorization: Bearer {token}' \
--header 'Content-Type: application/json' \
--data '{
  "packetsCount": {count(e.g.5)},
  "destination": "{destination}"
}'

Response body:

{
    "packets_sent": 5,
    "packets_recv": 5
}

  • {host} = Network Server or OAM host
  • {gatewayId} = Gateway ID in the Network Server/OAM
  • {packetsCount} = number of packets should be sent
  • {destination} = where packets should be sent
  • {packets_sent} = number of packets that were sent
  • {packets_recv} = number of packets that were received

Reboot Command

Reboot command will reboot the gateway.

--header 'x-Authorization: Bearer {token}' \
--header 'Content-Type: application/json' \
--data '{}'

  • {host} = Network Server or OAM host
  • {gatewayId} = Gateway ID in the Network Server/OAM

Get Antennas Count

Get Gateway’s antenna count

curl --location 'https://{host}/api/gateway/{GatewayId}/command/getAntennasCount' \
--header 'x-Authorization: Bearer {token}' \
--header 'Content-Type: application/json' \
--data '{}'

Response body:

{
    "antennasCount": 1,
    "status": "ok"
}

  • {host} = Network Server or OAM host
  • {gatewayId} = Gateway ID in the Network Server/OAM
  • {antennasCount} = number of Gateway antennas

Get Public Key

curl --location 'https://{host}/api/gateway/{GatewayId}/command/getPublicKey' \
--header 'x-Authorization: Bearer {token}' \
--header 'Content-Type: application/json' \
--data '{

}'
  • {host} = Network Server or OAM host
  • {gatewayId} = Gateway ID in the Network Server/OAM

Establish Reverse SSH Session

curl --location 'https://{host}/api/gateway/{GatewayId}/command/reverseSsh' \
--header 'x-Authorization: Bearer {token}' \
--header 'Content-Type: application/json' \
--data-raw '{
  "options": "-f -N -T -R",
  "sshRevPort": port,
  "username": "username",
  "password": "password",
  "sshHost": "https://{host}/",
  "sshPort": sshPort
}'
  • {host} = Network Server or OAM host
  • {gatewayId} = Gateway ID in the Network Server/OAM

Terminate all reverse SSH sessions

curl --location 'https://{host}/api/gateway/{GatewayId}/command/stopReverseSsh' \
--header 'x-Authorization: Bearer {token}' \
--header 'Content-Type: application/json' \
--data '{

}'
  • {host} = Network Server or OAM host
  • {gatewayId} = Gateway ID in the Network Server/OAM



Location

Get Gateway Location

curl --location 'https://{host}/api/gateway/{GatewayId}/command/getGpsCoordinates' \
--header 'x-Authorization: Bearer {token}' \
--header 'Content-Type: application/json' \
--data '{

}'
  • {host} = Network Server or OAM host
  • {gatewayId} = Gateway ID in the Network Server/OAM



Gateway Details

Get Gateway Info

This endpoint provides Module Name, T-code, Module Revision, Serial number, Gateway ID, IP addresses of Eth0, wwan0, and Loopback.

--header 'x-Authorization: Bearer {token}' \
--header 'Content-Type: application/json' \
--data '{}'

Response body:

{
    "interfaces": {
        "wwan0": "111.111.11.11",
        "lo": "127.0.0.1",
        "eth0": "111.111.11.11"
    },
    "moduleName": "Kona_Micro_Indoor",
    "moduleProductCode": "T0001111",
    "moduleRevision": "C",
    "moduleSerialNumber": "1111A1111",
    "custGatewayId": "647FDAFFFE111111"
}

  • {host} = Network Server or OAM host
  • {gatewayId} = Gateway ID in the Network Server/OAM
  • {wwan0} = wan IP address
  • {eth0} = ethernet IP address
  • {moduleName} = Gateway Model name,
  • {moduleProductCode} = T-Code,
  • {moduleRevision}= Revision,
  • {moduleSerialNumber} = Gateway Serial Number,
  • {custGatewayId} = Gateway Id
  • {lo} = Loopback

Get Radio Statistics

Check Gateway’s Radio Statistic

curl --location 'https://{host}/api/gateway/GatewayId/command/getRadioStatistics' \
--header 'x-Authorization: Bearer {token}' \
--header 'Content-Type: application/json' \
--data '{
  "index": 10
}'

Response body:

    "numTxPackets": 0,
    "numRxPackets": 1,
    "rxFineTimestamp": 0,
    "rxNoFineTimestamp": 0,
    "rxCrcOkPackets": 0,
    "rxCrcErrPackets": 1,
    "noMatch": 0
}

  • {host} = Network Server or OAM host
  • {gatewayId} = Gateway ID in the Network Server/OAM
  • {numTxPackets} = number of transmitted packets
  • {numRxPackets} = number of received packets
  • {rxCrcOkPackets} = number of successful CRC packets
  • {rxCrcErrPackets} = number of failed CRC packets

Reset Radio Statistics Counters

Reset Radio Statistics Counters

curl --location --request POST 'https://{host}/api/gateway/{GatewayId}/command/resetRadioStatisticsCounters' \
--header 'x-Authorization: Bearer {token}' \
--data ''

  • {host} = Network Server or OAM host
  • {gatewayId} = Gateway ID in the Network Server/OAM

Get Spectral Scan Params

curl --location 'https://{host}/api/gateway/{GatewayId}/command/getSpectralScanParams' \
--header 'x-Authorization: {token}' \
--header 'Content-Type: application/json' \
--data '{}'

Response body:

{
    "antenna": 0,
    "samplePeriod": 0,
    "num125kChan": 34,
    "startFreq125k": 863100,
    "stepFreq125k": 200,
    "num500kChan": 0,
    "startFreq500k": 863000,
    "stepFreq500k": 1600,
    "minRx": 863099968,
    "maxRx": 869900032
}

Get Spectral Scan Progress

curl --location 'https://{host}/api/gateway/{GatewayId}}/command/getSpectralScanProgress' \
--header 'x-Authorization: {token}' \
--header 'Content-Type: application/json' \
--data '{}'

Get Spectral Scan Results

curl --location 'https://{host}/api/gateway/{gatewayId}}/command/getSpectralScanResults' \
--header 'x-Authorization: Bearer {token}' \
--header 'Content-Type: application/json' \
--data '{}'

  • {host} = Network Server or OAM host
  • {gatewayId} = Gateway ID in the Network Server/OAM

Backups

Get Backups

This endpoint will provide existing backups

curl --location 'https://{host}/api/gateway/{GatewayId}/command/getBackups' \
--header 'x-Authorization: Bearer {token}' \
--header 'Content-Type: application/json' \
--data '{}'

Response body:

    "status": "backup:ok\n",
    "backups": [
        {
            "description": "dist-upgrade: before updating from {BSP_version_1} to {BSP_version_2}",
            "date": "YYYY-MM-DDT00:00:00",
            "index": 0
        }
    ]
}
  • {host} = Network Server or OAM host
  • {gatewayId} = Gateway ID in the Network Server/OAM

Create Backup

Create new backup for Gateway:

curl --location 'https://{host}/api/gateway/{GatewayId}/command/createBackup' \
--header 'x-Authorization: {token} \
--header 'Content-Type: application/json' \
--data '{
  "description": "backup_1"
  }'
  • {host} = Network Server or OAM host
  • {gatewayId} = Gateway ID in the Network Server/OAM
  • {description} = any name for the backup to identify it

Restore Backup

Restore specified backup:

curl --location 'https://{host}/api/gateway/{GatewayId}/command/restoreBackup' \
--header 'x-Authorization: Bearer {token}' \
--header 'Content-Type: application/json' \
--data '{
  "index": 10
}'
  • {host} = Network Server or OAM host
  • {gatewayId} = Gateway ID in the Network Server/OAM
  • {index} = index of desired backup.

Software Management

Get Software Versions

Get Gateway’s Software version list

curl --location 'https://{host}/api/gateway/{GatewayId}/command/getSoftwareVersions' \
--header 'x-Authorization: Bearer {token}' \
--header 'Content-Type: application/json' \
--data '{}'
  • {host} = Network Server or OAM host
  • {gatewayId} = Gateway ID in the Network Server/OAM

Get Upgradable Software

Get the Upgradable Software list:

curl --location 'https://{host}/api/gateway/{GatewayId}/command/getUpgradableSoftware' \
--header 'x-Authorization: Bearer {token}' \
--header 'Content-Type: application/json' \
--data '{}'

Response body:

    {
        "name": "filename",
        "ver": "version",
        "newVer": "version",
        "special": 0
    }
]

  • {host} = Network Server or OAM host
  • {gatewayId} = Gateway ID in the Network Server/OAM
  • {name} = name of the file
  • {ver} = file version

Get Installable Software

Get the list of Software ready to install

curl --location 'https://{host}/api/gateway/{GatewayId}/command/getInstallableSoftware' \
--header 'x-Authorization: Bearer {token}' \
--header 'Content-Type: application/json' \
--data '{}'

Response body:

[
    {
        "name": "filename",
        "ver": "version"
    }
]

  • {host} = Network Server or OAM host
  • {gatewayId} = Gateway ID in the Network Server/OAM
  • {name} = name of the file
  • {ver} = file version

Upgrade Software

Upgrade Gateway Software:

--header 'x-Authorization: Bearer {token}' \
--header 'Content-Type: application/json' \
--data '{
  "packageToUpgrade": "all"
}'

  • {host} = Network Server or OAM host
  • {gatewayId} = Gateway ID in the Network Server/OAM
  • {packageToUpgrade} = packages that are selected for upgrading

Install Software

Install selected Software:

curl --location 'https://{host}/api/gateway/{gatewayId}/command/installSoftware' \
--header 'x-Authorization: Bearer {token}' \
--header 'Content-Type: application/json' \
--data '{
  "packageToInstall": "file"
}'
---
  • {host} = Network Server or OAM host
  • {gatewayId} = Gateway ID in the Network Server/OAM
  • {packageToInstall} = package to install from the list of Installable components

Get Last Install Upgrade Status

Get Installation status:

curl --location 'https://{host}/api/gateway/{gatewayId}/command/getLastInstallUpgradeStatus' \
--header 'x-Authorization: Bearer {token}' \
--header 'Content-Type: application/json' \
--data '{}'

Response body:

{
    "lastOperation": "upgrade",
    "lastStatus": 90005
}

  • {host} = Network Server or OAM host
  • {gatewayId} = Gateway ID in the Network Server/OAM
  • {name} = name of the file
  • {ver} = file version

Get Bsp Status

curl --location 'https://{host}/api/gateway/{GatewayId}/command/getBspStatus' \
--header 'x-Authorization: Bearer {token}' \
--header 'Content-Type: application/json' \
--data '{}'
  • {host} = Network Server or OAM host
  • {gatewayId} = Gateway ID in the Network Server/OAM

Wireless Modem

Get WmDevice Information

Get Wireless Modem RF Information:

curl --location 'https://{host}/api/gateway/{GatewayId}/command/getWmDeviceInformation' \
--header 'x-Authorization: Bearer {token}' \
--header 'Content-Type: application/json' \
--data '{}'

  • {host} = Network Server or OAM host
  • {gatewayId} = Gateway ID in the Network Server/OAM

Get WmHomeNetwork Branch

Check the active profile parameters:

curl --location 'https://{host}/api/gateway/{GatewayId}/command/getWmHomeNetworkBranch' \
--header 'x-Authorization: Bearer {token}' \
--header 'Content-Type: application/json' \
--data '{}'

Response body:

{
    "homeNetwork": "network_name",
    "roamingStatus": "Off/on",
    "dataCapabilities": "LTE",
    "sessionState": "ATTACHED",
    "dataBearer": "LTE",
    "dormancyStatus": "CHANNEL ACTIVE",
    "luRejectCause": "0"
}

  • {host} = Network Server or OAM host
  • {gatewayId} = Gateway ID in the Network Server/OAM

Get WmRf Information

Get Wireless Modem RF Information:

curl --location 'https://{host}/api/gateway/{GatewayId}/command/getWmRfInformation' \
--header 'x-Authorization: Bearer {token}' \
--header 'Content-Type: application/json' \
--data '{}'

Response body:

{
    "radioInterface": "LTE",
    "activeBandClass": 0,
    "activeChannel": 0,
    "signalStrength": 0,
    "ecio": 0,
    "io": 0,
    "sinr": 0,
    "rsrq": 0
    *"cellid": <value> ----> parameter available for newest BSP
}

  • {host} = Network Server or OAM host
  • {gatewayId} = Gateway ID in the Network Server/OAM

GET WmNetworkInfo

Get Wireless Modem Network Info:

PLEASE NOTE: available for the newest BSP

curl --location 'https://{host}/api/gateway/{GatewayId}/command/getWmNetworkInfo' \
---header 'x-Authorization: Bearer {token}' \
--header 'Content-Type: application/json' \
--data '{}'

Response body:

[ 
  "availableNetworks":
   {
    "mnc": <unique id for a network> 
    "MCC": <unique id for a network>
    "name": "network provider name",
    "active": "Unknown/Current/Available"
  } 
]
  • {host} = Network Server or OAM host
  • {gatewayId} = Gateway ID in the Network Server/OAM

SET WmPreferredNetwork

Set Wireless Modem Preferred Network:

PLEASE NOTE: available for the newest BSP

curl --location 'https://{host}/api/gateway/{GatewayId}/command/setWmPreferredNetwork' \
--header 'x-Authorization: Bearer {token}' \
--header 'Content-Type: application/json' \
--data '{
    "mcc": "0", 
    "mnc": "0" 

  }'

Response body:

{
  "status": "CM response message",
}

Get WmActive Profile Parameters

Get Active Profile parameters

curl --location 'https://{host}/api/gateway/{GatewayId}/command/getWmActiveProfileParameters' \
--header 'x-Authorization: Bearer {token}' \
--header 'Content-Type: application/json' \
--data '{}'

Response body:

{
    "pdpType": "0",
    "authentication": "0",
    "profileName": "name",
    "apnName": "name",
    "userName": "",
    "ipAddress": "000.00.00.00",
    "primaryDNS": "00.00.000.00",
    "secondaryDNS": "00.00.000.00"
}

  • {host} = Network Server or OAM host
  • {gatewayId} = Gateway ID in the Network Server/OAM

Get Wm Call Statistics

curl --location 'https://{host}/api/gateway/{GatewayId}/command/getWmCallStatistics' \
--header 'x-Authorization: Bearer {token}' \
--header 'Content-Type: application/json' \
--data '{}'

Response body:

    "callStatus": "CONNECTED",
    "bytesTransferred": 0,
    "bytesReceived": 0,
    "currentTxRate": 0,
    "currentRxRate": 0,
    "maxTxRate": 50000000,
    "maxRxRate": 300000000
}

  • {host} = Network Server or OAM host
  • {gatewayId} = Gateway ID in the Network Server/OAM
  • {callStatus} = “CONNECTED/NOT CONNECTED”,
  • {bytesTransferred} = transferred data in bytes,
  • {bytesReceived} = received data in bytes,
  • {currentTxRate} = transmit rate,
  • {currentRxRate} = Recieve rate,
  • {maxTxRate} = max allowed transmit rate,
  • {maxRxRate} = max allowed receive rate

Get Wm Apns

Get all created APNs:

curl --location 'https://{host}/api/gateway/{GatewayId}/command/getWmApns' \
--header 'x-Authorization: Bearer {token}' \
--header 'Content-Type: application/json' \
--data '{}'

Response body:

{
    "workingIdx": 2,
    "apns": [
        {
            "name": "name",
            "type": 0,
            "idxModem": 1,
            "idx": 1
        }
        ]
}

  • {host} = Network Server or OAM host
  • {gatewayId} = Gateway ID in the Network Server/OAM

getWmPDP_Profiles

curl --location 'https://{host}/api/gateway/{GatewayId}/command/getWmPDP_Profiles' \
--header 'x-Authorization: Bearer {token}' \
--header 'Content-Type: application/json' \
--data '{

}'
  • {host} = Network Server or OAM host
  • {gatewayId} = Gateway ID in the Network Server/OAM

modifyWmPDP_Profiles

curl --location 'https://{host}/api/gateway/{GatewayId}/command/modifyWmPDP_Profiles' \
--header 'x-Authorization: Bearer {token}' \
--header 'Content-Type: application/json' \
--data '{

}'
  • {host} = Network Server or OAM host
  • {gatewayId} = Gateway ID in the Network Server/OAM

Add Wm Apn

Add new APN:

curl --location 'https://{host}/api/gateway/{GatewayId}/command/addWmApn' \
--header 'x-Authorization: Bearer {token}' \
--header 'Content-Type: application/json' \
--data '{
  "name": "test_apn1"
}'

  • {host} = Network Server or OAM host
  • {gatewayId} = Gateway ID in the Network Server/OAM

Update Wm Apn

Update selected APN:

curl --location 'https://{host}/api/gateway/{GatewayId}/command/updateWmApn' \
--header 'x-Authorization: Bearer {token}' \
--header 'Content-Type: application/json' \
--data '{
  "name": "test_update",
  "type": 0,
  "idxModem": 1,
  "idx": 1
}'

  • {host} = Network Server or OAM host
  • {gatewayId} = Gateway ID in the Network Server/OAM

Delete Wm Apn

Delete selected APN:

curl --location 'https://{host}/api/gateway/{GatewayId}/command/deleteWmApn' \
--header 'x-Authorization: Bearer {token}' \
--header 'Content-Type: application/json' \
--data '5'

  • {host} = Network Server or OAM host
  • {gatewayId} = Gateway ID in the Network Server/OAM

Get Wm Status Apn

Check the Gateway’s APN status:

curl --location 'https://{host}/api/gateway/{GatewayId}/command/getWmStatusApn' \
--header 'x-Authorization: Bearer {token}' \
--header 'Content-Type: application/json' \
--data '{}'

Response body:

{
    "status": "Connected successfully with this APN",
    "simStatus": "READY"
}

  • {host} = Network Server or OAM host
  • {gatewayId} = Gateway ID in the Network Server/OAM

WAN

Get Connectivity Types

Check preferred and fallback Connectivity Types (Ethernet and Cellular)

curl --location 'https://{host}/api/gateway/{GatewayId}/command/getConnectivityTypes' \
--header 'x-Authorization: Bearer {token}' \
--header 'Content-Type: application/json' \
--data '{}'

Response body:

[
    {
        "index": 1,
        "type": "Ethernet",
        "preferred": true,
        "fallback": false
    },
    {
        "index": 3,
        "type": "Cellular",
        "preferred": false,
        "fallback": true
    }
]

  • {host} = Network Server or OAM host
  • {gatewayId} = Gateway ID in the Network Server/OAM
  • {type} = interface type(Ethernet/Cellular)
  • {preferred} = set as preferred interface
  • {fallback} = set as secondary interface, that will work if the preferred one will disconnect

Set Preferred and Fallback Connectivity Type

Set preferred and fallback Connectivity Type (Ethernet and Cellular):

curl --location 'https://{host}/api/gateway/{GatewayId}/command/setPreferredFallbackConnectivityType' \
--header 'x-Authorization: Bearer {token}' \
--header 'Content-Type: application/json' \
--data '{
  "preferredIdx": 1,
  "fallbackIdx": 3
}'

  • {host} = Network Server or OAM host
  • {gatewayId} = Gateway ID in the Network Server/OAM

Set Preferred Ping IP Address

Set preferred Ping IP addresses:

curl --location 'https://{host}/api/gateway/{GatewayId}/command/setPreferredPingIpAddress' \
--header 'x-Authorization: Bearer {token}' \
--header 'Content-Type: application/json' \
--data '{
  "ipAddr": "8.8.8.8"
}'

  • {host} = Network Server or OAM host
  • {gatewayId} = Gateway ID in the Network Server/OAM

Get Preferred Ping IP Address

Get preferred Ping IP addresses:

curl --location 'https://{host}/api/gateway/{GatewayId}/command/getPreferredPingIpAddress' \
--header 'x-Authorization: Bearer {token}' \
--header 'Content-Type: application/json' \
--data '{}'

Response body:

    "ipAddr":"8.8.8.8
}

  • {host} = Network Server or OAM host
  • {gatewayId} = Gateway ID in the Network Server/OAM

Firewall

Get Firewall Configuration

Get preferred Firewall Configurations:

curl --location 'https://{host}/api/gateway/{GatewayId}/command/getFirewallConfiguration' \
--header 'x-Authorization: Bearer {token}' \
--header 'Content-Type: application/json' \
--data '{}'

  • {host} = Network Server or OAM host
  • {gatewayId} = Gateway ID in the Network Server/OAM

Set Firewall Configuration

Set preferred Firewall Configurations:

curl --location 'https://{host}/api/gateway/{GatewayId}/command/setFirewallConfiguration' \
--header 'x-Authorization: Bearer {token}' \
--header 'Content-Type: application/json' \
--data '{
  "enabled": false,
  "doSPrevention": {
    "enabled": false,
    "perMinLimit": 30,
    "burstLimit": 60
  },
  "ssh": {
    "enabled": true
  },
  "ping": {
    "enabled": false,
    "limit": {
      "enabled": false,
      "pingPerMinLimit": 30,
      "pingBurstLimit": 60
    }
  },
  "filters": []
}'

  • {host} = Network Server or OAM host
  • {gatewayId} = Gateway ID in the Network Server/OAM