Skip to main content
POST
/
organizations
/
{organizationID}
/
projects
/
{projectID}
/
branches
/
{branchID}
/
logs
Retrieve branch logs
curl --request POST \
  --url https://api.xata.tech/organizations/{organizationID}/projects/{projectID}/branches/{branchID}/logs \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "start": "2023-11-07T05:31:56Z",
  "end": "2023-11-07T05:31:56Z",
  "filters": [
    {
      "values": [
        "<string>"
      ],
      "value": "<string>"
    }
  ],
  "limit": 100,
  "cursor": "<string>"
}
'
{
  "start": "2023-11-07T05:31:56Z",
  "end": "2023-11-07T05:31:56Z",
  "logs": [
    {
      "timestamp": "2023-11-07T05:31:56Z",
      "instanceID": "<string>",
      "message": "<string>",
      "process": "<string>"
    }
  ],
  "nextCursor": "<string>"
}

Authorizations

Authorization
string
header
required

The access token received from the authorization server in the OAuth 2.0 flow.

Path Parameters

organizationID
string
required
Pattern: [a-zA-Z0-9_-~:]+
projectID
string
required
branchID
string
required

Body

application/json
start
string<date-time>
required

Start time

end
string<date-time>
required

End time

filters
object[]

Filters applied to log entries. Multiple filters are combined with AND.

limit
integer
default:100
Required range: 1 <= x <= 200
cursor
string

Pagination cursor from a previous response

Response

Logs for a branch

A collection of logs for each of the instances of a branch

start
string<date-time>
required
end
string<date-time>
required
logs
object[]
required
nextCursor
string | null
required

Pagination cursor for the next page