Application Response Time Performance API
  • 11 Jan 2023
  • 6 Minutes to read
  • Dark
    Light
  • PDF

Application Response Time Performance API

  • Dark
    Light
  • PDF

Article summary

Netreo's API system must be enabled to use this API. See How to Enable Netreo API Access

Calls to this API are made using HTTP/HTTPS and must be sent as key/value pairs in a POST request.

Resource

The resource accessed by this API are the application response time checks (WebART and email).

This resource offers the following endpoints:

  • WebART ID List
  • WebART Performance Data
  • EmailART Performance Data

Resource URL

{your.netreo.ip.or.name}/fw/index.php?r=restful

Endpoints

WebART ID List

POST
/art/web-list
Returns the current list of Netreo WebART checks and their IDs.

Parameters

The parameters for this endpoint must be included as request body parameters in a POST request.

password
String/Required if authentication is enabled.
The API key set in Netreo’s API Administration. Case-sensitive.

pin
String/Required when using Netreo SaaS-based APIs. Not applicable to on-premise deployments.
The pin number supplied in Netreo’s API Administration.

Request Examples

Curl using POST with API Authentication Disabled

curl -X POST \
  'http://38.2.11.62/fw/index.php?r=restful/art/web-list' \
  -H 'content-type: multipart/form-data; boundary=----WebKitFormBoundary7MA4YWxkTrZu0gW' \

Curl using POST with API Authentication Enabled

curl -X POST \
  'http://38.2.11.62/fw/index.php?r=restful/art/web-list' \
  -H 'content-type: multipart/form-data; boundary=----WebKitFormBoundary7MA4YWxkTrZu0gW' \
  -F password=test123

Response

Supplying an incorrect password, or no password with API authentication enabled, will return an "Incorrect password" error.

A successful call to this API will return a standard JSON object array.

Note: The output will be returned as standard JSON without indentation or line breaks. It is formatted here to make the example easier to read.

Response Examples

Successful list retrieval.

{
    "cloud": [
        {
            "id": 199,
            "name": "Google"
        },
        {
            "id": 32,
            "name": "SW"
        }
    ]
}

Response Schema

OutputTypeDescription
cloudarrayWebART checks returned in this array have been configured to display in the "Cloud" WebART category in the Netreo UI.
localarrayWebART checks returned in this array have been configured to display in the "Local" WebART category in the Netreo UI.
remotearrayWebART checks returned in this array have been configured to display in the "Remote" WebART category in the Netreo UI.
idstringThe Netreo internal ID for the WebART check. Use this ID with the "WebART Performance Data" endpoint to identify a specific WebART check.
name
stringThe name of a WebART check, as specified in the "name" of the check configuration.

WebART Performance Data

POST
/art/web-data
Retrieves performance data for the WebART check ID specified in the parameters (last 24 hours if no quick_time is specified).

Parameters

The parameters for this endpoint must be included as request body parameters in a POST request.

password
String/Required if authentication is enabled.
The API key set in Netreo’s API Administration. Case-sensitive.

pin
String/Required when using Netreo SaaS-based APIs. Not applicable to on-premise deployments.
The pin number supplied in Netreo’s API Administration.

id
String/Required
The ID of the WebART check for which you would like to retrieve performance data. Retrieve this ID using the "WebART ID List" endpoint.

quick_time
String/Optional
The time frame for which to retrieve performance data. Options are: lasthour,  last5,  last15,  last24,  today,  yesterday,  7dy,  thisweek,  lastweek,  thismonth,  lastmonth,  thisyear, last12months. If no time frame is specified, last24 is used.

Request Examples

Curl using POST with API Authentication Disabled

curl -X POST \
  'http://38.2.11.62/fw/index.php?r=restful/art/web-data' \
  -H 'content-type: multipart/form-data; boundary=----WebKitFormBoundary7MA4YWxkTrZu0gW' \
  -F id=32

Curl using POST with API Authentication Enabled

curl -X POST \
  'http://38.2.11.62/fw/index.php?r=restful/art/web-data' \
  -H 'content-type: multipart/form-data; boundary=----WebKitFormBoundary7MA4YWxkTrZu0gW' \
  -F password=pass123 \
  -F id=32

Response

Supplying an incorrect password, or no password with API authentication enabled, will return an "Incorrect password" error.

A successful call to this API will return a standard JSON object array.

Note: The output will be returned as standard JSON without indentation or line breaks. It is formatted here to make the example easier to read.

Response Example

Successful retrieval.

[
    {
        "name": "SW",
        "total_response_time_avg": "2.44",
        "total_response_time_peak": "6.10",
        "total_response_time_data": {
            "average_value": "2.435109",
            "data_pairs": {
                "data_point": [
                    "1548329400,2.556022",
                    "1548330300,2.181757",
                    "1548331200,2.640758",
                    "1548332100,2.270000",
                    "1548333000,2.684911",
                    "1548333900,2.112390",
                    "1548334800,2.697262",
                    "1548335700,2.230767",
                    "1548336600,2.005582",
                    "1548337500,2.339432",
                    "1548338400,2.562268",
                    "1548339300,2.538362",
                    "1548340200,2.424657",
                    "1548341100,2.408940",
                    "1548342000,2.024804",
                    "1548342900,2.550288",
                    "1548343800,1.988182",
                    "1548344700,2.583882",
                    "1548345600,2.259431",
                    "1548346500,2.620279",
                    "1548347400,2.441927",
                    "1548348300,2.428560",
                    "1548349200,2.546886",
                    "1548350100,2.456082",
                    "1548351000,2.432298",
                    "1548351900,2.730504",
                    "1548352800,2.801969",
                    "1548353700,2.633610",
                    "1548354600,2.295877",
                    "1548355500,2.228038",
                    "1548356400,2.316053",
                    "1548357300,2.391952",
                    "1548358200,2.717508",
                    "1548359100,2.348200",
                    "1548360000,2.130989",
                    "1548360900,2.291844",
                    "1548361800,2.406157",
                    "1548362700,2.404844",
                    "1548363600,2.739939",
                    "1548364500,2.395218",
                    "1548365400,2.294653",
                    "1548366300,2.264349",
                    "1548367200,2.124159",
                    "1548368100,2.943847",
                    "1548369000,2.807381",
                    "1548369900,2.222853",
                    "1548370800,2.586858",
                    "1548371700,2.382762",
                    "1548372600,2.191544",
                    "1548373500,2.180287",
                    "1548374400,2.554336",
                    "1548375300,2.300711",
                    "1548376200,2.380878",
                    "1548377100,2.997994",
                    "1548378000,1.995513",
                    "1548378900,2.531317",
                    "1548379800,2.218038",
                    "1548380700,2.272200",
                    "1548381600,2.692483",
                    "1548382500,2.110677",
                    "1548383400,2.168567",
                    "1548384300,2.381027",
                    "1548385200,2.174106",
                    "1548386100,2.647710",
                    "1548387000,2.467600",
                    "1548387900,2.219668",
                    "1548388800,2.174328",
                    "1548389700,2.044790",
                    "1548390600,2.226961",
                    "1548391500,1.991481",
                    "1548392400,2.249577",
                    "1548393300,3.021577",
                    "1548394200,2.267960",
                    "1548395100,2.785317",
                    "1548396000,2.540533",
                    "1548396900,2.407913",
                    "1548397800,2.547506",
                    "1548398700,2.400922",
                    "1548399600,2.612802",
                    "1548400500,2.165602",
                    "1548401400,2.707790",
                    "1548402300,2.172061",
                    "1548403200,3.636193",
                    "1548404100,2.154153",
                    "1548405000,2.508780",
                    "1548405900,1.830124",
                    "1548406800,2.446318",
                    "1548407700,3.334591",
                    "1548408600,3.544304",
                    "1548409500,2.428988",
                    "1548410400,2.216726",
                    "1548411300,2.416751",
                    "1548412200,2.947267",
                    "1548413100,2.426031",
                    "1548414000,2.506379",
                    "1548414900,2.126821"
                ]
            },
            "last_value": "2.150020",
            "max_value": "6.098520",
            "min_value": "1.447720",
            "rra_position": "0"
        }
    }
]

Response Schema

OutputTypeDescription
namestringThe name of the WebART check returning the data, as seen in the Netreo UI.
total_response_time_avgnumberThe average for the returned datapoint values, to two decimal places. Used for UI display.
total_response_time_peaknumberThe peak for the returned datapoint values, to two decimal places. Used for UI display.
total_response_time_dataobjectObject containing:
average_value
data_pairs
average_value
numberThe raw average value for the returned data points, to six decimal places.
data_pairs
objectContains the data point array.
data_point
number arrayThe raw data values. The first number is the timestamp of when the data value was recorded, the second number is the value.
last_value
numberThis value is provided by RRDtool. See that documentation for more information.
max_value
numberThe raw peak value for the returned data points, to six decimal places.
min_value
numberThis value is provided by RRDtool. See that documentation for more information.
rra_position
numberSpecifies whether the data points returned represent variable 1 or variable 2 as seen in the threshold check configuration for this performance data set.

EmailART Performance Data

There is only one EmailART check, so no ID is required.

POST
/art/email-list
Retrieves performance data for the single email application check in Netreo (last 24 hours if no quick_time is specified).

Parameters

The parameters for this endpoint must be included as request body parameters in a POST request.

password
String/Required if authentication is enabled.
The API key set in Netreo’s API Administration. Case-sensitive.

pin
String/Required when using Netreo SaaS-based APIs. Not applicable to on-premise deployments.
The pin number supplied in Netreo’s API Administration.

quick_time
String/Optional
The time frame for which to retrieve performance data. Options are: lasthour,  last5,  last15,  last24,  today,  yesterday,  7dy,  thisweek,  lastweek,  thismonth,  lastmonth,  thisyear, last12months. If no time frame is specified, last24 is used.

Request Examples

Curl using POST with API Authentication Disabled

curl -X POST \
  'http://38.2.11.62/fw/index.php?r=restful/art/email-list' \
  -H 'content-type: multipart/form-data; boundary=----WebKitFormBoundary7MA4YWxkTrZu0gW' \

Curl using POST with API Authentication Enabled

curl -X POST \
  'http://38.2.11.62/fw/index.php?r=restful/art/email-list' \
  -H 'content-type: multipart/form-data; boundary=----WebKitFormBoundary7MA4YWxkTrZu0gW' \
  -F password=pass123

Response

Supplying an incorrect password, or no password with API authentication enabled, will return an "Incorrect password" error.

A successful call to this API will return a standard JSON object array.

Note: The output will be returned as standard JSON without indentation or line breaks. It is formatted here to make the example easier to read.

Response Examples

Successful list retrieval.

{
    "1892": {
        "email_id": 200,
        "id": 1892,
        "name": "Google Mail",
        "total_response_time_avg": "6.32",
        "total_response_time_peak": "9.94",
        "total_response_time_data": {
            "average_value": "6.315395",
            "data_pairs": {
                "data_point": [
                    "1548342000,6.402822",
                    "1548342900,7.025526",
                    "1548343800,6.677991",
                    "1548344700,6.935164",
                    "1548345600,5.512493",
                    "1548346500,6.257050",
                    "1548347400,6.072183",
                    "1548348300,6.327517",
                    "1548349200,5.970277",
                    "1548350100,6.234593",
                    "1548351000,4.734230",
                    "1548351900,6.419969",
                    "1548352800,5.346174",
                    "1548353700,7.010962",
                    "1548354600,5.050666",
                    "1548355500,7.127130",
                    "1548356400,6.476474",
                    "1548357300,6.272405",
                    "1548358200,6.119360",
                    "1548359100,6.226665",
                    "1548360000,6.004895",
                    "1548360900,5.778210",
                    "1548361800,5.406563",
                    "1548362700,6.157570",
                    "1548363600,6.346018",
                    "1548364500,5.626114",
                    "1548365400,5.787796",
                    "1548366300,4.932414",
                    "1548367200,6.535727",
                    "1548368100,5.276412",
                    "1548369000,6.229124",
                    "1548369900,6.409825",
                    "1548370800,7.187826",
                    "1548371700,6.282838",
                    "1548372600,6.856522",
                    "1548373500,5.609932",
                    "1548374400,6.756072",
                    "1548375300,6.268816",
                    "1548376200,6.390769",
                    "1548377100,5.630783",
                    "1548378000,6.528099",
                    "1548378900,5.917161",
                    "1548379800,6.111029",
                    "1548380700,6.447849",
                    "1548381600,6.598487",
                    "1548382500,5.985561",
                    "1548383400,5.785681",
                    "1548384300,6.436204",
                    "1548385200,6.907297",
                    "1548386100,6.725661",
                    "1548387000,6.720896",
                    "1548387900,6.092643",
                    "1548388800,6.260194",
                    "1548389700,5.586273",
                    "1548390600,6.035682",
                    "1548391500,5.861245",
                    "1548392400,6.935488",
                    "1548393300,8.151835",
                    "1548394200,6.625226",
                    "1548395100,6.035160",
                    "1548396000,6.005499",
                    "1548396900,6.044483",
                    "1548397800,6.128529",
                    "1548398700,6.174872",
                    "1548399600,5.827967",
                    "1548400500,6.133217",
                    "1548401400,5.830094",
                    "1548402300,7.187402",
                    "1548403200,5.935066",
                    "1548404100,4.861159",
                    "1548405000,5.300645",
                    "1548405900,6.261996",
                    "1548406800,6.487393",
                    "1548407700,7.005176",
                    "1548408600,6.894171",
                    "1548409500,7.707865",
                    "1548410400,7.181074",
                    "1548411300,6.926976",
                    "1548412200,6.626892",
                    "1548413100,7.043565",
                    "1548414000,6.606328",
                    "1548414900,5.630593",
                    "1548415800,6.355638",
                    "1548416700,7.480890",
                    "1548417600,7.372963",
                    "1548418500,6.369382",
                    "1548419400,7.414077",
                    "1548420300,6.459060",
                    "1548421200,7.108168",
                    "1548422100,6.934375",
                    "1548423000,5.713603",
                    "1548423900,6.031635",
                    "1548424800,7.197466",
                    "1548425700,6.151295",
                    "1548426600,7.028444",
                    "1548427500,5.438369"
                ]
            },
            "last_value": "2.979094",
            "max_value": "9.942057",
            "min_value": "2.242472",
            "rra_position": "0"
        }
    }
}

Response Schema

OutputTypeDescription
email_idstringThis value is used only within Netreo, and is of no value externally.
idstringThe Netreo internal identification for the email check.
namestringThe name of the email check returning the data, as seen in the Netreo UI.
total_response_time_avgnumberThe average for the returned datapoint values, to two decimal places. Used for UI display.
total_response_time_peaknumberThe peak for the returned datapoint values, to two decimal places. Used for UI display.
total_response_time_dataobjectObject containing:
average_value
data_pairs
average_value
numberThe raw average value for the returned data points, to six decimal places.
data_pairs
objectContains the data point array.
data_point
number arrayThe raw data values. The first number is the timestamp of when the data value was recorded, the second number is the value.
last_value
numberThis value is provided by RRDtool. See that documentation for more information.
max_value
numberThe raw peak value for the returned data points, to six decimal places.
min_value
numberThis value is provided by RRDtool. See that documentation for more information.
rra_position
numberSpecifies whether the data points returned represent variable 1 or variable 2 as seen in the threshold check configuration for this performance data set.

Was this article helpful?

What's Next