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);{
"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"
}
]
}Returns a list of API 4XX and 5XX 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);{
"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"
}
]
}api-logs.read scope.Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Returns a list of API logs.
A list of API log entries.
A list of API log entries.
Show child attributes
api-log.
api-log "api-log"
The ID of the API log entry.
"8d3fe99b-1422-42e6-bbb3-932d95ae5f79"
The http request method that generated the log entry.
"POST"
The http request URL which trigged the error log.
"http://api.wpay.gr4vy.app/transactions"
The date and time that the request was received.
"2022-01-01T00:00:00+00:00"
The http request status code.
400
The JSON response body for the log entry.
Show child attributes
The error code.
"bad_request"
The error message.
"Request failed validation"
The HTTP error code.
400
Type of the log entry.
"error"
Details of the log entry, stack trace and endpoint.
Show child attributes
Log's pointer.
"/payment_method/number"
Detailed message on the log entry.
"ensure this value has at least 13 characters"
Location on where the error happened.
"body"
Detailed error type that is specified in the log entry.
"value_error.any_str.min_length"
date-time of when the response was sent.
"2022-01-01T00:00:10+00:00"
Was this page helpful?