Ajax API help you to get the performance metrics of any ajax call.

Getting a list of Ajax call

To get a list of ajax call and its metrics for a specific duration, send the following request:

GET /v2/projects/:projectId/ajax

Sample

copy
icon/buttons/copy
curl -H "X-API-KEY: <YOUR_API_KEY>" \
     "https://api.atatus.com/v2/projects/<projectId>/ajax?timeDur=7d"
copy
icon/buttons/copy
curl -H "X-API-KEY: 79769089efbb4767a542e0696448e34c" \
     "https://api.atatus.com/v2/projects/5c7cb42cdbe639200c330e52/ajax?timeDur=7d"

Parameters

Name Description
apiKey (Required) API Key to read data. See here to generate new API Key.
projectId (Required) A unique identifier of the project. See here to locate the Project ID
timeDur (Required) The time duration. Example: 30m, 60m, 6h, 12h, 1d, 2d, 3d, 7d, 14d, 1M
timeStart & timeEnd Instead of timeDur, you can give custom timeStart and timeEnd. Format: YYYY-MM-DD+HH:mm Eg: timeStart=2020-03-01+00:00&timeEnd=2020-03-06+00:00

Response

{
  "stats": {
    "totalTime": 553645.2,
    "responseTime": 553568.9,
    "callbackTime": 76.2,
    "throughput": 341,
    "errorCount": 0,
    "errorRate": 0,
    "sentSize": 1293.67,
    "receivedSize": 3973.9
  },
  "data": [
    {
      "id": "74edd3725e70c64x0aae10cd731304d4",
      "url": "https://www.acme.com/*/api/get-charts/*",
      "method": "GET",
      "throughput": 41,
      "resTotal": 8489,
      "totalTime": 207.0488,
      "responseTime": 207.0488,
      "callbackTime": 0,
      "receivedSize": 148.6829,
      "sentSize": 0,
      "errorCount": 0,
      "errorRate": 0,
      "percentile_50": 122,
      "percentile_75": 164,
      "percentile_90": 508,
      "percentile_95": 794,
      "percentile_99": 1232.4,
      "timeConsumedPercentage": 4.5,
      "throughputPercentage": 12.02,
      "underOnePercent": false
    }
  ]
}

Getting a specific ajax by Id

To get ajax call metrics with specific id, send the following request:

GET /v2/projects/:projectId/ajax/:ajaxId

Sample

copy
icon/buttons/copy
curl -H "X-API-KEY: <YOUR_API_KEY>" \
     "https://api.atatus.com/v2/projects/<projectId>/ajax/<ajaxId>?timeDur=7d"
copy
icon/buttons/copy
curl -H "X-API-KEY: 79769089efbb4767a542e0696448e34c" \
     "https://api.atatus.com/v2/projects/5c7cb42cdbe639200c330e52/ajax/74edd3725e70c64x0aae10cd731304d4?timeDur=7d"

Parameters

Name Description
apiKey (Required) API Key to read data. See here to generate new API Key.
projectId (Required) A unique identifier of the project. See here to locate the Project ID
ajaxId (Required) ID of the specific ajax call
timeDur (Required) The time duration. Example: 30m, 60m, 6h, 12h, 1d, 2d, 3d, 7d, 14d, 1M
timeStart & timeEnd Instead of timeDur, you can give custom timeStart and timeEnd. Format: YYYY-MM-DD+HH:mm Eg: timeStart=2020-03-01+00:00&timeEnd=2020-03-06+00:00

Response

{
  "stats": {
    "totalTime": 207048.8,
    "responseTime": 207048.8,
    "callbackTime": 0,
    "throughput": 41,
    "errorCount": 0,
    "errorRate": 0,
    "sentSize": 0,
    "receivedSize": 148.68
  },
  "data": [
    {
      "id": "74edd3725e70c64x0aae10cd731304d4",
      "url": "https://www.acme.com/*/api/get-charts/*",
      "method": "GET",
      "throughput": 41,
      "resTotal": 8489,
      "totalTime": 207.0488,
      "responseTime": 207.0488,
      "callbackTime": 0,
      "receivedSize": 148.6829,
      "sentSize": 0,
      "errorCount": 0,
      "errorRate": 0,
      "percentile_50": 122,
      "percentile_75": 164,
      "percentile_90": 508,
      "percentile_95": 794,
      "percentile_99": 1232.4,
      "timeConsumedPercentage": 100,
      "throughputPercentage": 100,
      "underOnePercent": false
    }
  ]
}

Getting a Ajax call with specific path

You can search for specific ajax calls with search query parameter. It allows you to search for a specific keyword in the ajax path field.

GET /v2/projects/:projectId/ajax?search=keyword

Sample

copy
icon/buttons/copy
curl -H "X-API-KEY: <YOUR_API_KEY>" \
     "https://api.atatus.com/v2/projects/<projectId>/ajax?search=<KEY_WORD>&timeDur=7d"
copy
icon/buttons/copy
curl -H "X-API-KEY: 79769089efbb4767a542e0696448e34c" \
     "https://api.atatus.com/v2/projects/5c7cb42cdbe639200c330e52/ajax?search=charts&timeDur=7d"

Parameters

Name Description
apiKey (Required) API Key to read data. See here to generate new API Key.
projectId (Required) A unique identifier of the project. See here to locate the Project ID
search (Required) Keyword for search ajax url.
timeDur (Required) The time duration. Example: 30m, 60m, 6h, 12h, 1d, 2d, 3d, 7d, 14d, 1M
timeStart & timeEnd Instead of timeDur, you can give custom timeStart and timeEnd. Format: YYYY-MM-DD+HH:mm Eg: timeStart=2020-03-01+00:00&timeEnd=2020-03-06+00:00

Response

{
  "stats": {
    "totalTime": 232253,
    "responseTime": 232241,
    "callbackTime": 12,
    "throughput": 83,
    "errorCount": 0,
    "errorRate": 0,
    "sentSize": 0,
    "receivedSize": 79.23
  },
  "data": [
    {
      "id": "74edd3725e70c64x0aae10cd731304d4",
      "url": "https://www.acme.com/*/api/get-charts/*",
      "method": "GET",
      "throughput": 41,
      "resTotal": 8489,
      "totalTime": 207.0488,
      "responseTime": 207.0488,
      "callbackTime": 0,
      "receivedSize": 148.6829,
      "sentSize": 0,
      "errorCount": 0,
      "errorRate": 0,
      "percentile_50": 122,
      "percentile_75": 164,
      "percentile_90": 508,
      "percentile_95": 794,
      "percentile_99": 1232.4,
      "timeConsumedPercentage": 44.04,
      "throughputPercentage": 49.4,
      "underOnePercent": false
    }
  ]
}