GET
/
api_logs
curl --request GET \
  --url https://api.getlago.com/api/v1/api_logs \
  --header 'Authorization: Bearer <token>'
{
  "api_logs": [
    {
      "api_version": "v1",
      "client": "Lago Ruby v1.26.0",
      "http_method": "post",
      "http_status": 200,
      "logged_at": "2025-03-31T12:31:44Z",
      "request_body": "{ \"billable_metric\": { \"name\": \"Storage\", \"code\": \"storage\" } }",
      "request_origin": "https://app.lago.dev/",
      "request_path": "/billable_metrics",
      "created_at": "2022-04-29T08:59:51Z",
      "request_id": "1a901a90-1a90-1a90-1a90-1a901a901a90",
      "request_response": "{ \"lago_id\": \"b9155544-e261-4e92-b54e-f65d7609294c\", ... }"
    }
  ],
  "meta": {
    "current_page": 2,
    "next_page": 3,
    "prev_page": 1,
    "total_pages": 4,
    "total_count": 70
  }
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Query Parameters

page
integer

Page number.

Example:

1

per_page
integer

Number of records per page.

Example:

20

from_date
string

Filter api logs from a specific date.

Example:

"2022-08-09"

to_date
string

Filter api logs up to a specific date.

Example:

"2022-08-09"

http_methods
enum<string>[]

Filter results by HTTP methods

Example:
["post", "put"]
http_statuses
(enum<string> | integer)[]

Filter results by HTTP status or by generic request status

Example:
["failed", "succeeded", 404]
api_version
string[]

Filter results by API version

Example:
["v1"]
request_paths
string

Filter results by the path of the request

Example:

"/billable_metrics/"

Response

200
application/json

List of api logs

The response is of type object.