Get API logs
curl --request GET \
--url https://{subdomain}.qanapi.cloud/api/v3/logs/api \
--header 'X-Qanapi-Authorization: <api-key>'import requests
url = "https://{subdomain}.qanapi.cloud/api/v3/logs/api"
headers = {"X-Qanapi-Authorization": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-Qanapi-Authorization': '<api-key>'}};
fetch('https://{subdomain}.qanapi.cloud/api/v3/logs/api', 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://{subdomain}.qanapi.cloud/api/v3/logs/api",
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-Qanapi-Authorization: <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://{subdomain}.qanapi.cloud/api/v3/logs/api"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-Qanapi-Authorization", "<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://{subdomain}.qanapi.cloud/api/v3/logs/api")
.header("X-Qanapi-Authorization", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://{subdomain}.qanapi.cloud/api/v3/logs/api")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-Qanapi-Authorization"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"current_page": 123,
"data": [
{
"api_key_id": 123,
"domain": "<string>",
"endpoint": "<string>",
"method": "<string>",
"status_code": 123,
"configuration_id": 123,
"request_id": "<string>",
"proxied": true,
"proxied_to": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"api_key": {
"id": "1",
"prefix": "qapi_",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"revoked_at": "2023-11-07T05:31:56Z",
"user": {
"id": 123,
"name": "<string>",
"email": "jsmith@example.com",
"two_factor_enabled": true,
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"roles": [
{
"name": "<string>",
"description": "<string>",
"permissions": [
{
"name": "<string>"
}
]
}
]
},
"configurations": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"type": "<string>",
"values": [
{
"key": "<string>",
"value": "<string>"
}
]
}
],
"permissions": [
{
"name": "<string>"
}
]
}
}
],
"first_page_url": "<string>",
"from": 123,
"last_page": 123,
"last_page_url": "<string>",
"links": [
{
"url": "<string>",
"label": "<string>",
"page": 123,
"active": true
}
],
"next_page_url": "<string>",
"path": "<string>",
"per_page": 123,
"prev_page_url": "<string>",
"to": 123,
"total": 123
}
Logs
Get API logs
GET
/
logs
/
api
Get API logs
curl --request GET \
--url https://{subdomain}.qanapi.cloud/api/v3/logs/api \
--header 'X-Qanapi-Authorization: <api-key>'import requests
url = "https://{subdomain}.qanapi.cloud/api/v3/logs/api"
headers = {"X-Qanapi-Authorization": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-Qanapi-Authorization': '<api-key>'}};
fetch('https://{subdomain}.qanapi.cloud/api/v3/logs/api', 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://{subdomain}.qanapi.cloud/api/v3/logs/api",
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-Qanapi-Authorization: <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://{subdomain}.qanapi.cloud/api/v3/logs/api"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-Qanapi-Authorization", "<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://{subdomain}.qanapi.cloud/api/v3/logs/api")
.header("X-Qanapi-Authorization", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://{subdomain}.qanapi.cloud/api/v3/logs/api")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-Qanapi-Authorization"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"current_page": 123,
"data": [
{
"api_key_id": 123,
"domain": "<string>",
"endpoint": "<string>",
"method": "<string>",
"status_code": 123,
"configuration_id": 123,
"request_id": "<string>",
"proxied": true,
"proxied_to": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"api_key": {
"id": "1",
"prefix": "qapi_",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"revoked_at": "2023-11-07T05:31:56Z",
"user": {
"id": 123,
"name": "<string>",
"email": "jsmith@example.com",
"two_factor_enabled": true,
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"roles": [
{
"name": "<string>",
"description": "<string>",
"permissions": [
{
"name": "<string>"
}
]
}
]
},
"configurations": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"type": "<string>",
"values": [
{
"key": "<string>",
"value": "<string>"
}
]
}
],
"permissions": [
{
"name": "<string>"
}
]
}
}
],
"first_page_url": "<string>",
"from": 123,
"last_page": 123,
"last_page_url": "<string>",
"links": [
{
"url": "<string>",
"label": "<string>",
"page": 123,
"active": true
}
],
"next_page_url": "<string>",
"path": "<string>",
"per_page": 123,
"prev_page_url": "<string>",
"to": 123,
"total": 123
}
Authorizations
Response
API logs
⌘I