iotecconnections-by-time

The following shows how to generate the iotecconnections-by-time report using either the Reporting API's Generate a report POST operation or the Get a cacheable report GET operation. Details about each report's supported products, metrics, filters, and available data intervals are also available dynamically by running the API's Get a report type operation, also shown below. See also other available reports.

Report definition

Provides traffic information on the connection requests and drops for a selected period of time that is no longer than 90 days.

This report allows you to configure the aggregation interval for each data record. Available interval values are: MONTH, WEEK, DAY, HOUR, FIVE_MINUTES.

Business object: cpcode

Data available for: 90 days

Available metrics

MetricDescription
Data metrics
eventsCountConnections events per time unit.
Summary metrics
eventsCountMaxMaximum number of connections events in time unit.
eventsCountMinMinimum number of connections events in time unit.
eventsCountSlopeEvents count slope.
eventsCountTotalTotal number of connections events in report time range.

Available filters

FilterTypeDescription
Optional filters
event_codeStringEvent code.
jurisdictionsIntegerA geographically distributed set of servers.
namespacesIntegerA unique, user-defined identifier indicating a particular configuration.
status_codeStringStatus code.

POST request

POST /reporting-api/v1/reports/iotecconnections-by-time/versions/1/report-data{?start,​end,​interval}

Sample: /reporting-api/v1/reports/iotecconnections-by-time/versions/1/report-data?start​=2020-06-26T13%3A40%3A00Z​&end​=2020-06-26T14%3A00%3A00Z​&interval​=FIVE_MINUTES

Query parameters

ParameterTypeSampleDescription
Required
startString2020-06-26T13:40:00ZSpecifies the start of the reported period as an ISO-8601 timestamp with optional time zone. The report includes data that matches the start value's timestamp.
endString2020-06-26T14:00:00ZSpecifies the end of the reported period as an ISO-8601 timestamp with optional time zone. The report excludes any data that matches the end value's timestamp.
intervalEnumerationFIVE_MINUTESThe duration of each data record. Available values: MONTH, WEEK, DAY, HOUR, FIVE_MINUTES.

JSON request members

MemberTypeDescription
objectIdsArraySpecifies the set of cpcode values you want to report on.
objectIdsEnumerationAs an alternative to an array of ID values, specify all as a string for unfiltered data. Either way, objectIds is required.
metricsArrayThe set of desired metrics. If omitted, the report includes all available metrics.
filtersMap of ArraysSpecifies a set of custom filters, with each filter's name keying an array with each filter's set of values.

Request body:

{
    "objectIds": [
        "55232",
        "23433",
        "32433"
    ],
    "metrics": [
        "eventsCount",
        "eventsCountMax",
        "eventsCountMin",
        "eventsCountSlope",
        "eventsCountTotal"
    ],
    "filters": {
        "event_code": [
            "D",
            "C"
        ],
        "jurisdictions": [
            "0",
            "1"
        ],
        "namespaces": [
            "namespace_mqtt",
            "name1"
        ],
        "status_code": [
            "04",
            "06"
        ]
    }
}

GET request

GET /reporting-api/v1/reports/iotecconnections-by-time/versions/1/report-data{?start,​end,​interval,​objectIds,​allObjectIds,​metrics,​filters}

Sample: /reporting-api/v1/reports/iotecconnections-by-time/versions/1/report-data?start​=2020-06-26T13%3A40%3A00Z​&end​=2020-06-26T14%3A00%3A00Z​&interval​=FIVE_MINUTES​&objectIds​=55232,​23433,​32433​&metrics​=eventsCount%2CeventsCountMax​&filters​=event_code%3DD%2Cevent_code%3DC%2Cjurisdictions%3D0%2Cjurisdictions%3D1

Query parameters

ParameterTypeSampleDescription
Required
startString2020-06-26T13:40:00ZSpecifies the end of the reported period as an ISO-8601 timestamp with optional time zone. The report excludes any data that matches the end value's timestamp.
endString2020-06-26T14:00:00ZSpecifies if unavailable reports should be shown.
intervalEnumerationFIVE_MINUTESThe duration of each data record. Available values: MONTH, WEEK, DAY, HOUR, FIVE_MINUTES.
Optional
allObjectIdsBooleantrueAs an alternative to objectIds, enabling this generates a report that includes all IDs available for the cpcode objectType. This parameter is ignored if the request also specifies a set of objectIds.
objectIdsString55232,​23433,​32433As an alternative to allObjectIds, specifies the set of unique IDs for the cpcode objectType you want to report on, formatted as a comma-delimited list.
metricsStringeventsCount,​eventsCountMaxSpecifies a comma-separated list of metrics to include in the report, otherwise all metrics if omitted. The set of available metrics depends on the type of report. URL-encode the entire value in the GET request.
filtersStringevent_code=​D,event_code=​C,jurisdictions=​0,​jurisdictions=​1Specifies criteria to filter the report's data. The set of available filters depends on the type of report. Separate each filter name and value with an equals (=) character, and separate various name/value pairs with commas (,). To specify more than one filter value, repeat the filter name. See the accompanying example for guidance. URL-encode the entire value in the GET request.

JSON response

Status 200 application/json

Response body:

{
    "metadata": {
        "name": "iotecconnections-by-time",
        "version": "1",
        "outputType": "FLAT",
        "groupBy": [
            "startdatetime"
        ],
        "interval": "FIVE_MINUTES",
        "start": "2020-06-26T13:40:00Z",
        "end": "2020-06-26T14:00:00Z",
        "availableDataEnds": null,
        "suggestedRetryTime": null,
        "rowCount": 4,
        "filters": [
            {
                "name": "event_code",
                "values": [
                    "D",
                    "C"
                ]
            },
            {
                "name": "jurisdictions",
                "values": [
                    "0",
                    "1"
                ]
            },
            {
                "name": "namespaces",
                "values": [
                    "namespace_mqtt",
                    "name1"
                ]
            },
            {
                "name": "status_code",
                "values": [
                    "04",
                    "06"
                ]
            }
        ],
        "columns": [
            {
                "name": "groupBy",
                "label": "startdatetime"
            },
            {
                "name": "eventsCount",
                "label": "Connections Events"
            }
        ],
        "objectType": "cpcode",
        "objectIds": [
            "55232",
            "23433",
            "32433"
        ]
    },
    "data": [
        {
            "startdatetime": "2020-06-26T13:40:00Z",
            "eventsCount": "981"
        },
        {
            "startdatetime": "2020-06-26T13:45:00Z",
            "eventsCount": "928"
        },
        {
            "startdatetime": "2020-06-26T13:50:00Z",
            "eventsCount": "1361"
        },
        {
            "startdatetime": "2020-06-26T13:55:00Z",
            "eventsCount": "2088"
        }
    ],
    "summaryStatistics": {
        "eventsCountMax": {
            "value": "2261",
            "details": {}
        },
        "eventsCountMin": {
            "value": "3348",
            "details": {}
        },
        "eventsCountSlope": {
            "value": "3452",
            "details": {}
        },
        "eventsCountTotal": {
            "value": "1727",
            "details": {}
        }
    }
}

CSV response

Status 200 text/csv

Response Body:

#METADATA_START
name,​iotecconnections-by-time
version,​1
source,​iotecconnections-by-time/versions/1
groupBy,​startdatetime
start,​2020-06-26T13:40:00Z
end,​2020-06-26T14:00:00Z
interval,`FIVE_MINUTES`
availableDataEnds,
suggestedRetryTime,
rowCount,​4
objectType,​cpcode
objectIds,​55232,​23433,​32433
event_code,D,C
jurisdictions,​0,1
namespaces,​namespace_mqtt,​name1
status_code,​04,​06
#METADATA_END

#SUMMARYSTATISTICS_START
eventsCountMax,​2261
eventsCountMin,​3348
eventsCountSlope,​3452
eventsCountTotal,​1727
#SUMMARYSTATISTICS_END

#COLUMNS_START
startdatetime,​eventsCount
#COLUMNS_END

#DATA_START
2020-06-26T13:40:00Z,981
2020-06-26T13:45:00Z,928
2020-06-26T13:50:00Z,1361
2020-06-26T13:55:00Z,2088
#DATA_END

Get report details

This sample Get a report type operation gets the same information you need to run the iotecconnections-by-time report as provided in this reference documentation, but available dynamically to your API client application.

GET /reporting-api/v1/reports/iotecconnections-by-time/versions/1

Status 200 application/json

Response body:

{
    "name": "iotecconnections-by-time",
    "description": "Provides traffic information on the connection requests and drops for a selected period of time that is no longer than 90 days.",
    "businessObjectName": "cpcode",
    "version": 1,
    "status": "PUBLISHED",
    "deprecated": false,
    "timeBased": true,
    "outputType": "FLAT",
    "available": true,
    "metrics": [
        {
            "name": "eventsCount",
            "description": "Connections events per time unit.",
            "label": "Connections Events",
            "unit": "COUNT",
            "summaryStatistic": false
        },
        {
            "name": "eventsCountMax",
            "description": "Maximum number of connections events in time unit.",
            "label": "Maximum Number of Events",
            "unit": "COUNT",
            "summaryStatistic": true
        },
        {
            "name": "eventsCountMin",
            "description": "Minimum number of connections events in time unit.",
            "label": "Minimum Number of Events",
            "unit": "COUNT",
            "summaryStatistic": true
        },
        {
            "name": "eventsCountSlope",
            "description": "Events count slope.",
            "label": "Events count slope",
            "unit": "COUNT",
            "summaryStatistic": true
        },
        {
            "name": "eventsCountTotal",
            "description": "Total number of connections events in report time range.",
            "label": "Total Events",
            "unit": "COUNT",
            "summaryStatistic": true
        }
    ],
    "groupOutlyingValues": {
        "enabled": false
    },
    "groupBy": [
        "startdatetime"
    ],
    "filters": [
        {
            "name": "event_code",
            "type": "string",
            "description": "Event code.",
            "required": false
        },
        {
            "name": "namespaces",
            "type": "int",
            "description": "A unique, user-defined identifier indicating a particular configuration.",
            "required": false
        },
        {
            "name": "status_code",
            "type": "string",
            "description": "Status code.",
            "required": false
        },
        {
            "name": "jurisdictions",
            "type": "int",
            "description": "A geographically distributed set of servers.",
            "required": false
        }
    ],
    "intervals": [
        "MONTH",
        "WEEK",
        "DAY",
        "HOUR",
        "FIVE_MINUTES"
    ],
    "dataRetentionDays": 90,
    "links": [
        {
            "rel": "self",
            "href": "/reporting-api/v1/reports/iotecconnections-by-time/versions/1"
        },
        {
            "rel": "versions",
            "href": "/reporting-api/v1/reports/iotecconnections-by-time/versions"
        },
        {
            "rel": "all-reports",
            "href": "/reporting-api/v1/reports"
        },
        {
            "rel": "execute-report",
            "href": "/reporting-api/v1/reports/iotecconnections-by-time/versions/1/report-data"
        }
    ]
}