Get ajax report
curl --request GET \
--url https://api.atatus.com/v2/projects/{projectId}/reports/ajax \
--header 'X-API-KEY: <api-key>'import requests
url = "https://api.atatus.com/v2/projects/{projectId}/reports/ajax"
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}/reports/ajax', 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}/reports/ajax",
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}/reports/ajax"
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}/reports/ajax")
.header("X-API-KEY", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.atatus.com/v2/projects/{projectId}/reports/ajax")
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{
"totalTime": 2413.36,
"responseTime": 2413.35,
"callbackTime": 0.01,
"receivedSize": 12585.85,
"sentSize": 8.79,
"errorCount": 183,
"errorRate": 1.58,
"throughput": 11556,
"percentile_50": 884.27,
"percentile_75": 1542.67,
"percentile_90": 3470.1,
"percentile_95": 9834.26,
"percentile_99": 33381.95
}{
"Message": "API key is invalid!"
}{
"Message": "Too many requests"
}{
"Message": "Internal server error"
}Reports
Get ajax report
Returns only the ajax report for a time range. Browser projects only.
GET
/
projects
/
{projectId}
/
reports
/
ajax
Get ajax report
curl --request GET \
--url https://api.atatus.com/v2/projects/{projectId}/reports/ajax \
--header 'X-API-KEY: <api-key>'import requests
url = "https://api.atatus.com/v2/projects/{projectId}/reports/ajax"
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}/reports/ajax', 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}/reports/ajax",
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}/reports/ajax"
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}/reports/ajax")
.header("X-API-KEY", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.atatus.com/v2/projects/{projectId}/reports/ajax")
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{
"totalTime": 2413.36,
"responseTime": 2413.35,
"callbackTime": 0.01,
"receivedSize": 12585.85,
"sentSize": 8.79,
"errorCount": 183,
"errorRate": 1.58,
"throughput": 11556,
"percentile_50": 884.27,
"percentile_75": 1542.67,
"percentile_90": 3470.1,
"percentile_95": 9834.26,
"percentile_99": 33381.95
}{
"Message": "API key is invalid!"
}{
"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
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