Our Python SDK got smarter. We developed a Typscript SDK too. We are updating our SDK code blocks. Python SDKhere.Typscript SDKhere.
Description
Patronus AI APIOpen telemetry

Search Logs

POST
/v1/otel/logs/search
/v1/otel/logs/search

The Authorization access token

Authorization

X-API-KEY<token>

In: header

Request Body

application/jsonRequired

filtersFilters

orderOrder

Default: "timestamp desc"Value in: "timestamp asc" | "timestamp desc"

limitLimit

Default: 10000Maximum: 10000
curl -X POST "https://api.patronus.ai/v1/otel/logs/search" \
  -H "X-API-KEY: <token>" \
  -H "Content-Type: application/json" \
  -d '{
    "filters": [
      {
        "field": "string",
        "op": "eq",
        "value": {},
        "or_": [
          {
            "field": "string",
            "op": "eq",
            "value": {},
            "or_": [
              {}
            ],
            "and_": [
              {
                "field": "string",
                "op": "eq",
                "value": {},
                "or_": [
                  {}
                ],
                "and_": [
                  {}
                ]
              }
            ]
          }
        ],
        "and_": [
          {
            "field": "string",
            "op": "eq",
            "value": {},
            "or_": [
              {
                "field": "string",
                "op": "eq",
                "value": {},
                "or_": [
                  {}
                ],
                "and_": [
                  {}
                ]
              }
            ],
            "and_": [
              {}
            ]
          }
        ]
      }
    ],
    "order": "timestamp asc",
    "limit": 10000
  }'

Successful Response

{
  "logs": [
    {
      "timestamp": "2019-08-24T14:15:22Z",
      "trace_id": "string",
      "span_id": "string",
      "trace_flags": 0,
      "severity_text": "string",
      "severity_number": 0,
      "service_name": "string",
      "body": null,
      "resource_schema_url": "string",
      "resource_attributes": {
        "property1": "string",
        "property2": "string"
      },
      "scope_schema_url": "string",
      "scope_name": "string",
      "scope_version": "string",
      "scope_attributes": {
        "property1": "string",
        "property2": "string"
      },
      "log_attributes": {
        "property1": "string",
        "property2": "string"
      }
    }
  ]
}