Searching...

Matching results

    GET

    In 2.17.1, an API was introduced on the AMM. Currently only GET API calls are available.

    /api/v1/systems/groups

    Returns a list of gateway groups with the same group hierarchy as the AMM.

    Request

    GET https://ip address of AMM/api/v1/systems/groups

    Response

    HTTPS/1.1 200 OK
    Content-Type: application/json
    ...
    {
       "All gateways": {
       "id": 9,
       "subgroups": [
          {"MGOS": {"id": 11,"subgroups":[]}},
          {"ALEOS": {"id": 16,"subgroups":[]}}
          ]
       }
    }

    There are no parameters.

    HTTP Status Name Description
    401 unauthorized Request does not have a valid access token
    403 access_denied API access is disabled from API client, user or customer group
    429 too_many_requests Request has reached rate limit
    408 api.request.timeout Raised when response took longer than configured request timeout threshold. Default is 300 seconds
    This API call is only available from AMM 2.17.4.

    /api/v1/systems/groups/{groupID}/data

    Returns latest stats of all gateways for specified gateway group, including gateways under sub-groups.

    Request

    GET https://ip address of AMM/api/v1/systems/groups/{groupID}/data?ids=ReportIdleTime,GPS Location-latitude,GPS Location-longitude

    Response

    HTTPS/1.1 200 OK
    Content-Type: application/json
    ...
    {
        "My Fleet Group": [
            {
                "MG90 Device Group": [
                    {
                        "uid": "H090111G0999",
                        "data": [
                            {
                                "GPS Location-longitude": [
                                    {
                                        "value": "-123.070867",
                                        "timestamp": 1661280377864
                                    }
                                ]
                            },
                            {
                                "ReportIdleTime": [
                                    {
                                        "value": "57 days 0 hour",
                                        "timestamp": 1666386719101
                                    }
                                ]
                            },
                            {
                                "GPS Location-latitude": [
                                    {
                                        "value": "49.171683",
                                        "timestamp": 1661280377864
                                    }
                                ]
                            }
                        ]
                    },
                    {
                        "uid": "J090111G0999",
                        "data": [
                            {
                                "GPS Location-longitude": [
                                    {
                                        "value": "-123.070433",
                                        "timestamp": 1665001185148
                                    }
                                ]
                            },
                            {
                                "ReportIdleTime": [
                                    {
                                        "value": "16 days 0 hour",
                                        "timestamp": 1666386719103
                                    }
                                ]
                            },
                            {
                                "GPS Location-latitude": [
                                    {
                                        "value": "49.172283",
                                        "timestamp": 1665001185148
                                    }
                                ]
                            }
                        ]
                    }
                ]
            },
            {
                "ALEOS Device Group": [
                    {
                        "uid": "N655110061029999",
                        "data": [
                            {
                                "GPS Location-longitude": [
                                    {
                                        "value": "-123.0702",
                                        "timestamp": 1553637945000
                                    }
                                ]
                            },
                            {
                                "ReportIdleTime": [
                                    {
                                        "value": "1303 days 22 hours",
                                        "timestamp": 1666386719103
                                    }
                                ]
                            },
                            {
                                "GPS Location-latitude": [
                                    {
                                        "value": "49.171983",
                                        "timestamp": 1553637945000
                                    }
                                ]
                            }
                        ]
                    }
                ]
            }
        ]
    }
    Name Description Use
    groupId Id of gateway group. required
    ids Stats. Optional. Minimum one required if included in request parameters.
    idPrefix Prefix of requested stats. Optional. Cannot be empty if included in request parameters.
    HTTP Status Name Description
    400 group.not.found.or.insufficient.privileges No group found with the "groupId", or user does not have correct privileges
    400 system.invalid.data.param Either 'ids' or 'idPrefix' is invalid
    400 lastdata.incompatible.parameters Both 'ids' and 'idPrefix' parameters are present
    400 lastdata.empty.parameters 'idPrefix' parameter is present but empty (use no parameter instead)
    400 aggregation.too.many.targets Too many gateways are requested for a single API call. Default maximum 100 gateways under given gateway group can be retrieved for a single API call. Configurable with AMM web.xml
    400 aggregation.too.many.data Too many stats are requested per gateway for a single API call. Default maximum 20 stats per gateway can be retrieved for a single API call. Configurable with AMM web.xml.
    401 unauthorized Request does not have a valid access token
    403 access_denied API access is disabled from API client, user or customer group
    429 too_many_requests Request has reached rate limit
    408 api.request.timeout Raised when response took longer than configured request timeout threshold. Default is 300 seconds

    /api/v1/systems

    Returns a list of gateways accessible by the user in a group hierachy similar to the AMM UI. Empty groups are not shown.

    Request

    GET https://ip address of AMM/api/v1/systems?heartbeat=1440&platforms=MG90,GX440,LX60,MP70

    Response

    HTTPS/1.1 200 OK
    Content-Type: application/json
    ...
    {
       "All gateways": [{
          "My MG90 devices": [
             {
                "uid": "ND6123999011020",
                "name": "my MG90 A"
             }, {
                "uid": "ND90410999011035",
                "name": "my MG90 B"
             }]
          }, {
          "My ALEOS devices": [
             {
                "uid": "CA13999002410",
                "name": "my GX440"
             }, {
                "uid": "WM80520999021016",
                "name": "my LX60"
             },{
                "uid": "N655119991021018",
                "name": "my MP70 A"
            }, {
               "uid": "N660940999011023",
               "name": "my MP70 B"
            }]
          }, {
             "uid": "ND90410999011039",
             "name": "my unregistered MG90"
          }
       ]
    }
    Name Description Use
    heartbeat Heartbeat in minutes optional
    platforms The list of platforms separated by a comma optional
    cellulars The list of cellular capabilities separated by a comma optional
    groupid The id of a gateway group. If provided, returns all gateways under the given group. optional
    HTTP Status Name Description
    401 unauthorized Request does not have a valid access token
    403 access_denied API access is disabled from API client, user or customer group
    429 too_many_requests Request has reached rate limit
    408 api.request.timeout Raised when response took longer than configured request timeout threshold. Default is 300 seconds

    /api/v1/systems/{uid}/data

    Gets the latest stats of a gateway.

    The uid is the gateway ESN and must be specified. Minimum one stat id is required.

    Request

    GET https://ip address of AMM/api/v1/systems/uid/data?ids=ReportIdleTime,GPS Location-latitude,GPS Location-longitude
    

    Response

    HTTPS/1.1 200 OK
    Content-Type: application/json
    ...
    {
       "ReportIdleTime": [{
          "value": "2796808",
          "timestamp": 1581500240000
       }],
       "GPS Location-latitude": [{
          "value": "49.273376",
          "timestamp": 1579136926000
       }],
       "GPS Location-longitude": [{
          "value": "-123.103834",
          "timestamp": 1579136926000
       }]
    } 
    Name Description Use
    uid Serial number of gateway. required
    ids Stats. Minimum one required.

    ALEOS: For a list of stats reported by ALEOS devices, see Features Supported by ALEOS Devices

    MGOS: For a list of stats reported by MGOS devices, see MGOS Stats.

    GENX: For a list of starts reported by GENX devices, see GENX Stats.

    HTTP Status Name Description
    400 system.unknown No gateway matched the uid (ESN).
    400 system.invalid.data.param Stat key is invalid.
    401 unauthorized Request does not have a valid access token
    403 access_denied API access is disabled from API client, user or customer group
    429 too_many_requests Request has reached rate limit
    408 api.request.timeout Raised when response took longer than configured request timeout threshold. Default is 300 seconds

    /api/v1/system/data/raw

    Gets the historical stats for a single gateway. Limited to one gateway and one stat and up to 7 days. Default time period is last 24 hours. A maximum of 25,000 records will be returned. If there are more than 25,000 records, this will be indicated in the response.

    Note: Historical stats endpoint data parameters are case sensitive. If the dataid such as “LinkX-RSSI” is spelt as “linkx-RSSI”, the API endpoint will return “500 Server Error” instead of the expected “400 Bad Request”.


    Simple Request

    Get the historical stats "ReportIdleTime" for gateway "ND61230099991020"
    GET https://ip address of AMM/api/v1/systems/data/raw?targetid=ND61230099991020&dataid=ReportIdleTime
                                        

    Response

    HTTPS/1.1 200 OK
    Content-Type: application/json
    ...
    {
        "ND61230099991020": {
          "ReportIdleTime": [{
             "timestamp": 1581500940000,
             "value": "2806901"
          },{
             "timestamp": 1581500840000,
             "value": "2796808"   
          },{
             "timestamp": 1581500740000,
             "value": "2434111"   
          }]
        } 
    }                               

    Request

    Get historical "CPU-Temperature" stats for gateway "ND61230099991020" from "Jan 1st, 2022" to "Jan 8th, 2022", and the AMM system time zone is "Pacific Daylight (UTC-7h)".
    GET https://ip address of AMM/api/v1/systems/data/raw?dataid=CPU-Temperature&targetid=ND61230099991020&from=1641024000000&to=1641628800000
    

    Response

    If the logged in user uses metric units, then the temperature returned will be in Celsius.
    HTTPS/1.1 200 OK
    Content-Type: application/json
    ...
    {
        "ND61230099991020": {
             "CPU-Temperature": [
                {
                    "value": "67.0 °C",
                    "timestamp": 1641624833000
                },
                {
                    "value": "68.0 °C",
                    "timestamp": 1641624773000
                },
                {
                    "value": "67.0 °C",
                    "timestamp": 1641624412000
                },
                {
                    "value": "68.0 °C",
                    "timestamp": 1641624352000
                },
                {
                    "value": "67.0 °C",
                    "timestamp": 1641624292000
                },
                ...
            ]
        }
    }
    If the logged in user uses imperial units, then the temperature returned will be in Fahrenheit.
    HTTPS/1.1 200 OK
    Content-Type: application/json
    ...
    {
        "ND61230099991020": {
             "CPU-Temperature": [
                {
                    "value": "152.6 °F",
                    "timestamp": 1641624833000
                },
                {
                    "value": "154.4 °F",
                    "timestamp": 1641624773000
                },
                {
                    "value": "152.6 °F",
                    "timestamp": 1641624412000
                },
                {
                    "value": "154.4 °F",
                    "timestamp": 1641624352000
                },
                {
                    "value": "152.6 °F",
                    "timestamp": 1641624292000
                },
                ...
            ]
        }
    }

    Request

    Get historical "ReportIdleTime" stats for gateway "ND61230099991020" where the return data is greater than 25,000 records.
    GET https://ip address of AMM/api/v1/systems/data/raw?targetid=ND61230099991020&dataid=ReportIdleTime
    

    Response (when return data set has greater than 25,000 records)

    HTTPS/1.1 200 OK
    Content-Type: application/json
    ...
    {
        "ND61230099991020": {
          "pagesize": "25000",
          "total": "100000"
          "ReportIdleTime": [{
             "timestamp": 1581500940000,
             "value": "2806901"
          },{
             "timestamp": 1581500840000,
             "value": "2796808"   
          },{
             "timestamp": 1581500740000,
             "value": "2434111"   
          }
          ...
        ]
      }
    }

    Response Info (when greater than 25,000 records returned) :
    “pagesize” : number of records returned

    “total”: total number of records found

    To query for the rest of the data:

    1. Create a new API request with the same parameters.
    2. Use the timestamp of the last record returned from the previous request as the new start time plus 1 millisecond.
    3. End time remains unchanged.

    Request

    Get remainder of data from query that returned maximum number of records by quering the next 7 days.
    GET https://ip address of AMM/api/v1/systems/data/raw?targetid=ND61230099991020&dataid=ReportIdleTime&from=1581500940001&to=1582134540001
    

    Note: 1581500940001 (Feb 12 2020 09:49:00) + 7 days (7 x 24 hrs) = 1582134540001 (Feb 19 2020 09:49:00). Pacific Daylight (UTC-7h)

    Request

    Get the historical "CPU-Temperature" stats for the month of January 2022 for gateway "ND61230099991020". ie Jan 1st 00:00:00 to Feb 1st 00:00:00. Time zone is Pacific Daylight (UTC-7h)
    Query 1, From Jan 1st (1641024000000) to Jan 8th (1641628800000)
    GET https://ip address of AMM/api/v1/systems/data/raw?dataid=CPU-Temperature&targetid=ND61230099991020&from=1641024000000&to=1641628800000
                                        
    Query 2, From Jan 8th (1641628800001) to Jan 15th (1642233600000)
    GET https://ip address of AMM/api/v1/systems/data/raw?dataid=CPU-Temperature&targetid=ND61230099991020&from=1641628800001&to=1642233600000
                                        
    Query 3, From Jan 15th (1642233600001) to Jan 22nd (1642838400000)
    GET https://ip address of AMM/api/v1/systems/data/raw?dataid=CPU-Temperature&targetid=ND61230099991020&from=1642233600001&to=1642838400000
                                        
    Query 4, From Jan 22nd (1642838400001) to Jan 29th (1643443200000)
    GET https://ip address of AMM/api/v1/systems/data/raw?dataid=CPU-Temperature&targetid=ND61230099991020&from=1642838400001&to=1643443200000
                                        
    Query 5, From Jan 29th (1643443200001) to Feb 1st (1643702400000)
    GET https://ip address of AMM/api/v1/systems/data/raw?dataid=CPU-Temperature&targetid=ND61230099991020&from=1643443200001&to=1643702400000
                                        
    Name Description Use Default Notes
    from Inclusive timestamp representing the beginning of the period Optional, but required if using to 1 day Maximum is 7 days. Format is timestamp using system timezone
    to Exclusive timestamp representing the end of the period Optional, but required if using from Current Time Maximum is 7 days. Format is timestamp using system timezone
    targetid A gateway ESN Required
    dataid A stat key Required Case sensitive

    ALEOS: For a list of stats reported by ALEOS devices, see Features Supported by ALEOS Devices

    MGOS: For a list of stats reported by MGOS devices, see MGOS Stats.

    GENX: For a list of starts reported by GENX devices, see GENX Stats.

    HTTP Status Name Description
    400 system.unknown No gateway matched the uid (ESN)
    400 system.invalid.data.param Stat key is invalid
    400 system.invalid.timerange Time range is greater than 7 days, or the "From" date is before the "To" date
    400 aggregation.too.many.data More than one stat is requested
    400 aggregation.too.many.targets More than one target is requested
    401 unauthorized Request does not have a valid access token
    403 access_denied API access is disabled from API client, user or customer group
    429 too_many_requests Request has reached rate limit
    408 api.request.timeout Raised when response took longer than configured request timeout threshold. Default is 300 seconds
    TOP