List routes
curl --request GET \
--url https://api.atatus.com/v2/projects/{projectId}/routes \
--header 'X-API-KEY: <api-key>'import requests
url = "https://api.atatus.com/v2/projects/{projectId}/routes"
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}/routes', 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}/routes",
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}/routes"
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}/routes")
.header("X-API-KEY", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.atatus.com/v2/projects/{projectId}/routes")
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": {
"routeTime": 1074.06,
"throughput": 10
},
"data": [
{
"id": "f437819cfc6bd9c821fbd87794e4f0ca",
"url": "https://www.acme.com/feed",
"throughput": 3,
"routeTime": 323.6667,
"min": 231,
"max": 410,
"spa": {
"routeTime": 323.6667,
"throughput": 3
},
"routeName": "https://www.acme.com/feed",
"timeConsumedPercentage": 0,
"throughputPercentage": 18.75,
"underOnePercent": false
},
{
"id": "1ab3a451a05a649b3cca215c696d49b8",
"url": "https://www.acme.com/login",
"throughput": 4,
"routeTime": 278.25,
"min": 175,
"max": 336,
"spa": {
"routeTime": 278.25,
"throughput": 4
},
"routeName": "https://www.acme.com/login",
"timeConsumedPercentage": 0,
"throughputPercentage": 25,
"underOnePercent": false
},
{
"id": "311efa79354a49d27d9c584af921e619",
"url": "https://www.acme.com/dashboard",
"throughput": 3,
"routeTime": 192.3333,
"min": 130,
"max": 310,
"spa": {
"routeTime": 192.3333,
"throughput": 3
},
"routeName": "https://www.acme.com/dashboard",
"timeConsumedPercentage": 0,
"throughputPercentage": 18.75,
"underOnePercent": false
}
]
}{
"Message": "API key is invalid!"
}{
"Message": "Too many requests"
}{
"Message": "Internal server error"
}Routes
List routes
Returns the performance metrics of the routes of an application project. Pass search to match a keyword in the route path.
GET
/
projects
/
{projectId}
/
routes
List routes
curl --request GET \
--url https://api.atatus.com/v2/projects/{projectId}/routes \
--header 'X-API-KEY: <api-key>'import requests
url = "https://api.atatus.com/v2/projects/{projectId}/routes"
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}/routes', 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}/routes",
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}/routes"
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}/routes")
.header("X-API-KEY", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.atatus.com/v2/projects/{projectId}/routes")
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": {
"routeTime": 1074.06,
"throughput": 10
},
"data": [
{
"id": "f437819cfc6bd9c821fbd87794e4f0ca",
"url": "https://www.acme.com/feed",
"throughput": 3,
"routeTime": 323.6667,
"min": 231,
"max": 410,
"spa": {
"routeTime": 323.6667,
"throughput": 3
},
"routeName": "https://www.acme.com/feed",
"timeConsumedPercentage": 0,
"throughputPercentage": 18.75,
"underOnePercent": false
},
{
"id": "1ab3a451a05a649b3cca215c696d49b8",
"url": "https://www.acme.com/login",
"throughput": 4,
"routeTime": 278.25,
"min": 175,
"max": 336,
"spa": {
"routeTime": 278.25,
"throughput": 4
},
"routeName": "https://www.acme.com/login",
"timeConsumedPercentage": 0,
"throughputPercentage": 25,
"underOnePercent": false
},
{
"id": "311efa79354a49d27d9c584af921e619",
"url": "https://www.acme.com/dashboard",
"throughput": 3,
"routeTime": 192.3333,
"min": 130,
"max": 310,
"spa": {
"routeTime": 192.3333,
"throughput": 3
},
"routeName": "https://www.acme.com/dashboard",
"timeConsumedPercentage": 0,
"throughputPercentage": 18.75,
"underOnePercent": false
}
]
}{
"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
Keyword for search routes.