Get Request Logs
curl --request GET \
--url https://api.apitally.io/v1/apps/{app_id}/request-logs \
--header 'Api-Key: <api-key>'import requests
url = "https://api.apitally.io/v1/apps/{app_id}/request-logs"
headers = {"Api-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'Api-Key': '<api-key>'}};
fetch('https://api.apitally.io/v1/apps/{app_id}/request-logs', 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.apitally.io/v1/apps/{app_id}/request-logs",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"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.apitally.io/v1/apps/{app_id}/request-logs"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("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.apitally.io/v1/apps/{app_id}/request-logs")
.header("Api-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.apitally.io/v1/apps/{app_id}/request-logs")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Api-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"data": [
{
"timestamp": "2023-11-07T05:31:56Z",
"request_uuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"env": "prod",
"consumer": "user-123",
"method": "GET",
"path": "/v1/users/{user_id}",
"url": "https://api.example.com/v1/users/1",
"status_code": 200,
"request_size_bytes": 123,
"response_size_bytes": 123,
"response_time_ms": 123,
"client_ip": "203.45.123.67",
"client_country_iso_code": "US"
}
],
"has_more": true,
"next_token": "<string>"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Endpoints
Get Request Logs
Get request log data for an app. With pagination. Requests to endpoints that have been excluded in the dashboard are excluded here as well.
GET
/
v1
/
apps
/
{app_id}
/
request-logs
Get Request Logs
curl --request GET \
--url https://api.apitally.io/v1/apps/{app_id}/request-logs \
--header 'Api-Key: <api-key>'import requests
url = "https://api.apitally.io/v1/apps/{app_id}/request-logs"
headers = {"Api-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'Api-Key': '<api-key>'}};
fetch('https://api.apitally.io/v1/apps/{app_id}/request-logs', 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.apitally.io/v1/apps/{app_id}/request-logs",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"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.apitally.io/v1/apps/{app_id}/request-logs"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("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.apitally.io/v1/apps/{app_id}/request-logs")
.header("Api-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.apitally.io/v1/apps/{app_id}/request-logs")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Api-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"data": [
{
"timestamp": "2023-11-07T05:31:56Z",
"request_uuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"env": "prod",
"consumer": "user-123",
"method": "GET",
"path": "/v1/users/{user_id}",
"url": "https://api.example.com/v1/users/1",
"status_code": 200,
"request_size_bytes": 123,
"response_size_bytes": 123,
"response_time_ms": 123,
"client_ip": "203.45.123.67",
"client_country_iso_code": "US"
}
],
"has_more": true,
"next_token": "<string>"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Authorizations
Path Parameters
App ID
Required range:
x >= 1Query Parameters
Filter to environment ID, if provided.
Required range:
x >= 1Filter to consumer ID, if provided.
Required range:
x >= 1Filter to HTTP method(s), comma-separated.
Maximum string length:
64Example:
"GET,POST"
Filter to path pattern, supports wildcards (*).
Maximum string length:
1024Example:
"/api/v1/*"
Filter to HTTP status code(s), comma-separated. Can include code classes (e.g., '4xx').
Maximum string length:
128Pattern:
^(?:\d{3}|\dxx)(?:,(?:\d{3}|\dxx))*$Example:
"2xx,400"
Start date and time in ISO 8601 format. Defaults to 24 hours ago.
Example:
"2025-05-14T00:00:00Z"
End date and time in ISO 8601 format. Defaults to now.
Example:
"2025-05-15T00:00:00Z"
Maximum number of records to return per page.
Required range:
1 <= x <= 1000Token to fetch the next page of records, as returned by a previous request.
Maximum string length:
1024