Retrieve Request Log

If you're a developer working on integrating with Payiano's, the Request Log endpoint can be a really handy tool. Whether you're setting up a new integration or updating an existing one, this endpoint lets you check out all the details of the requests your application is sending to Payiano's. It's great for confirming the data you're sending in your POST or PUT requests and for looking over the query parameters in your GET requests. Plus, once your integration is up and running, the Request Log is there to help you keep an eye on things. You can easily search for any errors (like those with Response Codes of 400 or higher) or hunt down specific requests to make sure Payiano's got them.

GET/request_logs/{id}
Sandbox: https://api.payiano.dev/v1/request_logs/{id}
Live: https://api.payiano.com/v1/request_logs/{id}
Security
  • Authorization header with access token is required to access this endpoint: Bearer ACCESS-TOKEN
  • Your access token should be associated to this permission request_logs_view
Request
Request body schema:
application/json
Path parameters:
id
required
Type: ulid
Length: 26

The unique ID assigned to each Request Log which is generated by our system using the ULID format. Each ID is precisely 26 characters long, ensuring a unique and consistent identifier for every Request Log. This ULID is automatically created by our system and is used to uniquely identify and track each Request Log in our database.

Response
200
Response schema:
application/json
Response body:
request_log
Type: object

The Request Log model details.

id
Type: ulid
Length: 26

The unique ID assigned to each Request Log which is generated by our system using the ULID format. Each ID is precisely 26 characters long, ensuring a unique and consistent identifier for every Request Log. This ULID is automatically created by our system and is used to uniquely identify and track each Request Log in our database.

path
Type: string

The API endpoint that was accessed. This information is vital for understanding which parts of your API are most used or may need optimization or additional security measures.

method
Type: string

The HTTP method used. Knowing the method helps in analyzing the nature of the requests (e.g., data retrieval vs. data submission) and optimizing API endpoints accordingly.

origin
Type: string|null

The domain from which the request originated. It's important for identifying the source of the traffic, understanding user behavior, and detecting potentially malicious sources.

response_time
Type: integer

The Milliseconds taken to process the request. Critical for assessing the performance of your API and identifying slow or problematic endpoints.

client_agent
Type: string|null

Information about the client's software (browser, OS). This helps in understanding the environments in which your API is used and ensuring compatibility across different systems.

client_ip
Type: string|null

The IP address of the client making the request. Useful for geo-locating users, analyzing traffic patterns, and detecting suspicious activities.

request_query
Type: mixed|null

Query parameters often dictate how the data should be filtered or customized when returned by the API. For instance, parameters might specify which fields to return, limit the number of records, or apply specific filters. It helps in understanding these user preferences and requirements.

request_body
Type: mixed|null

The data sent by the client in the request. Essential for debugging issues, understanding user behavior, and optimizing the user experience.

request_headers
Type: mixed|null

Headers sent by the client. These can provide context about the request, such as authentication tokens, preferred languages, and client capabilities.

response_code
Type: integer

The HTTP status code returned (e.g., 200 OK, 422 Unprocessable Entity). Important for monitoring the health of your API and identifying errors or issues that need attention.

response_body
Type: mixed|null

The data sent back to the client in response to their request. Crucial for ensuring the correct operation of your API and understanding how responses are handled by clients.

response_headers
Type: mixed|null

Headers sent back in the response. They can include metadata about the response, such as content type and cache controls, which are important for client-side processing and optimization.

requested_at
Type: datetime

Date of when the request was made. This is essential for monitoring API usage over time, identifying peak usage periods, and planning for scaling. This attribute can be formatted as an ISO 8601 string or a UNIX timestamp in milliseconds, depending on the preferred datetime format specified in the request header (e.g., 2024-08-04T14:22:01Z or 1722572118554). By default, the format is UNIX timestamp in milliseconds.

created_at
Type: datetime

The created datetime of the request log. This attribute can be formatted as an ISO 8601 string or a UNIX timestamp in milliseconds, depending on the preferred datetime format specified in the request header (e.g., 2024-08-04T14:22:01Z or 1722572118554). By default, the format is UNIX timestamp in milliseconds.

updated_at
Type: datetime

The updated datetime of the request log. This attribute can be formatted as an ISO 8601 string or a UNIX timestamp in milliseconds, depending on the preferred datetime format specified in the request header (e.g., 2024-08-04T14:22:01Z or 1722572118554). By default, the format is UNIX timestamp in milliseconds.

Response sample:
1
{
2
"request_log": {
3 "id": "01hqh45s7826hfwdze8dp1z21f", 4 "path": "v1/customers", 5 "method": "POST", 6 "origin": "my.payiano.com", 7 "response_time": 1, 8 "client_agent": "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/121.0.0.0 Safari/537.36", 9 "client_ip": "199.36.158.100", 10
"request_query": {
11
"includes": [
12 "customer.billding_address" 13 ] 14 }, 15
"request_body": {
16 "name": "Yara Kamal", 17 "email": "yara@pyngy.com", 18 "reference_id": "db64355a-8e8d-31e8-a782-2dce8057fe61" 19 }, 20
"request_headers": {
21
"host": [
22 "api.payiano.com" 23 ], 24
"accept": [
25 "application/json" 26 ], 27 "authorization": "Bearer eyJpdiI***********ZRcGQUG4", 28
"user-agent": [
29 "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/121.0.0.0 Safari/537.36" 30 ] 31 }, 32 "response_code": 422, 33
"response_body": {
34 "message": "The reference id has already been taken.", 35
"errors": {
36
"reference_id": [
37 "The reference id has already been taken." 38 ] 39 } 40 }, 41
"response_headers": {
42
"Cache-Control": [
43 "no-cache, private" 44 ], 45
"Date": [
46 "Mon, 29 Jan 2024 07:22:21 GMT" 47 ], 48
"Content-Type": [
49 "application/json" 50 ] 51 }, 52 "requested_at": "1722572118554", 53 "created_at": "1722572118554", 54 "updated_at": "1722572118554" 55 } 56}