Get ajax call
curl --request GET \
--url https://api.atatus.com/v2/projects/{projectId}/ajax/{ajaxId} \
--header 'X-API-KEY: <api-key>'import requests
url = "https://api.atatus.com/v2/projects/{projectId}/ajax/{ajaxId}"
headers = {"X-API-KEY": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-API-KEY': '<api-key>'}};
fetch('https://api.atatus.com/v2/projects/{projectId}/ajax/{ajaxId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.atatus.com/v2/projects/{projectId}/ajax/{ajaxId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-API-KEY: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.atatus.com/v2/projects/{projectId}/ajax/{ajaxId}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-API-KEY", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.atatus.com/v2/projects/{projectId}/ajax/{ajaxId}")
.header("X-API-KEY", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.atatus.com/v2/projects/{projectId}/ajax/{ajaxId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-API-KEY"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"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
}
]
}{
"Message": "API key is invalid!"
}{
"Message": "Not found"
}{
"Message": "Too many requests"
}{
"Message": "Internal server error"
}Ajax
Get ajax call
Returns the performance metrics of a single ajax call.
GET
/
projects
/
{projectId}
/
ajax
/
{ajaxId}
Get ajax call
curl --request GET \
--url https://api.atatus.com/v2/projects/{projectId}/ajax/{ajaxId} \
--header 'X-API-KEY: <api-key>'import requests
url = "https://api.atatus.com/v2/projects/{projectId}/ajax/{ajaxId}"
headers = {"X-API-KEY": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-API-KEY': '<api-key>'}};
fetch('https://api.atatus.com/v2/projects/{projectId}/ajax/{ajaxId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.atatus.com/v2/projects/{projectId}/ajax/{ajaxId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-API-KEY: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.atatus.com/v2/projects/{projectId}/ajax/{ajaxId}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-API-KEY", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.atatus.com/v2/projects/{projectId}/ajax/{ajaxId}")
.header("X-API-KEY", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.atatus.com/v2/projects/{projectId}/ajax/{ajaxId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-API-KEY"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"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
}
]
}{
"Message": "API key is invalid!"
}{
"Message": "Not found"
}{
"Message": "Too many requests"
}{
"Message": "Internal server error"
}Authorizations
Your Atatus API key. You can also send it as the api_key query parameter or, for POST/PUT requests, in the request body.
Path Parameters
ID of the specific ajax call
Query Parameters
The time duration. Example: 30m, 60m, 6h, 12h, 1d, 2d, 3d, 7d, 14d, 1M
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
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