Skip to main content

Logs API

Overview

The SigNoz Logs API is a robust interface which enables developers to manage and analyze log data efficiently. This API facilitates various operations:

  • Searching Logs: Allows users to search through log data based on specific criteria. For example, finding all logs where the error code is 500.

  • Paginating Logs: Helps in navigating through large sets of log data in a manageable way. For instance, retrieving logs in batches of 100 for easy viewing.

  • Aggregating Logs: Enables summarizing log data to extract meaningful insights, such as aggregating logs to count the number of errors per day.

API Endpoint

Endpoint for Logs API:

POST https://{URL}/api/v3/query_range

Replace {URL} with your instance URL, e.g., example.signoz.io.

Prerequisites

Access Token: To access this API, you need an Access Token. Navigate to the Settings page in the SigNoz UI and create a new Access Token.

image

Access Tokens can only be created/managed by users with the Admin role. If you don't have the Admin role, contact your organization's admin to create an Access Token for you.

Authentication

Using the Access Token: Add the Access token to your request header as follows:

SIGNOZ-API-KEY:{YOUR_ACCESS_TOKEN}
tip

Secure storage and handling of your Access Token is crucial to prevent unauthorized access.