List API error logs
using RestSharp;
var options = new RestClientOptions("https://api.sandbox.{id}.gr4vy.app/api-logs");
var client = new RestClient(options);
var request = new RestRequest("");
request.AddHeader("Authorization", "Bearer <token>");
var response = await client.GetAsync(request);
Console.WriteLine("{0}", response.Content);package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.sandbox.{id}.gr4vy.app/api-logs"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
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.sandbox.{id}.gr4vy.app/api-logs")
.header("Authorization", "Bearer <token>")
.asString();<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.sandbox.{id}.gr4vy.app/api-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 => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}import requests
url = "https://api.sandbox.{id}.gr4vy.app/api-logs"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.sandbox.{id}.gr4vy.app/api-logs', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request GET \
--url https://api.sandbox.{id}.gr4vy.app/api-logs \
--header 'Authorization: Bearer <token>'{
"items": [
{
"type": "api-log",
"id": "8d3fe99b-1422-42e6-bbb3-932d95ae5f79",
"request_method": "POST",
"request_url": "http://api.wpay.gr4vy.app/transactions",
"request_received_at": "2022-01-01T00:00:00+00:00",
"response_status_code": 400,
"response_body": {
"code": "bad_request",
"message": "Request failed validation",
"status": 400,
"type": "error",
"details": {
"pointer": "/payment_method/number",
"message": "ensure this value has at least 13 characters",
"location": "body",
"type": "value_error.any_str.min_length"
}
},
"response_sent_at": "2022-01-01T00:00:10+00:00"
}
]
}{
"type": "error",
"code": "unauthorized",
"status": 401,
"message": "No valid API authentication found",
"details": []
}List 4XX errors
Returns a list of API 4XX and 5XX logs.
GET
/
api-logs
List API error logs
using RestSharp;
var options = new RestClientOptions("https://api.sandbox.{id}.gr4vy.app/api-logs");
var client = new RestClient(options);
var request = new RestRequest("");
request.AddHeader("Authorization", "Bearer <token>");
var response = await client.GetAsync(request);
Console.WriteLine("{0}", response.Content);package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.sandbox.{id}.gr4vy.app/api-logs"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
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.sandbox.{id}.gr4vy.app/api-logs")
.header("Authorization", "Bearer <token>")
.asString();<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.sandbox.{id}.gr4vy.app/api-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 => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}import requests
url = "https://api.sandbox.{id}.gr4vy.app/api-logs"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.sandbox.{id}.gr4vy.app/api-logs', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request GET \
--url https://api.sandbox.{id}.gr4vy.app/api-logs \
--header 'Authorization: Bearer <token>'{
"items": [
{
"type": "api-log",
"id": "8d3fe99b-1422-42e6-bbb3-932d95ae5f79",
"request_method": "POST",
"request_url": "http://api.wpay.gr4vy.app/transactions",
"request_received_at": "2022-01-01T00:00:00+00:00",
"response_status_code": 400,
"response_body": {
"code": "bad_request",
"message": "Request failed validation",
"status": 400,
"type": "error",
"details": {
"pointer": "/payment_method/number",
"message": "ensure this value has at least 13 characters",
"location": "body",
"type": "value_error.any_str.min_length"
}
},
"response_sent_at": "2022-01-01T00:00:10+00:00"
}
]
}{
"type": "error",
"code": "unauthorized",
"status": 401,
"message": "No valid API authentication found",
"details": []
}This endpoint requires the
api-logs.read scope.⌘I