Logz.io Query API

The Query API from Logz.io — 1 operation(s) for query.

Operations 2

GET /v1/metrics/prometheus/api/v1/query Evaluates an instant query at a single point in time #
POST /v1/metrics/prometheus/api/v1/query Evaluates an instant query at a single point in time using POST #

Documentation

Specifications

Schemas & Data

Other Resources

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/logz-io-query-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

logz-io-query-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  description: '# Introduction

    This API is documented using the **OpenAPI 2.0** specification.'
  title: Logz.io Query API
  termsOfService: https://logz.io/about-us/terms-of-use/
  contact:
    email: help@logz.io
    url: https://docs.logz.io/
  license:
    name: Apache 2.0
    url: http://www.apache.org/licenses/LICENSE-2.0.html
servers:
- url: https://api.logz.io/
security:
- X-API-TOKEN: []
tags:
- name: Query
paths:
  /v1/metrics/prometheus/api/v1/query:
    get:
      operationId: GetInstantQuery
      summary: Evaluates an instant query at a single point in time
      description: 'Retrieve data by submitting a GET request with query parameters.

        Please ensure to change the region in the URL to match your account''s region.'
      tags:
      - Query
      parameters:
      - in: query
        name: query
        required: true
        description: Prometheus expression query string.
        schema:
          type: string
      - in: query
        name: time
        required: false
        description: Evaluation timestamp as an RFC3339 or Unix timestamp. Optional.
        schema:
          type: string
      - in: query
        name: timeout
        required: false
        description: Evaluation timeout. Defaults to the value of the -query.timeout flag.
        schema:
          type: string
      responses:
        200:
          description: Query results in a defined format.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/QueryResult'
        400:
          description: Invalid request parameters.
        500:
          description: Internal server error.
    post:
      operationId: PostInstantQuery
      summary: Evaluates an instant query at a single point in time using POST
      description: 'Submit query data in the request body using URL-encoded form parameters.

        Please ensure to change the region in the URL to match your account''s region.'
      tags:
      - Query
      responses:
        200:
          description: Successful query evaluation.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/QueryResult'
        400:
          description: Invalid request parameters.
        500:
          description: Internal server error.
      requestBody:
        content:
          application/x-www-form-urlencoded:
            schema:
              type: object
              properties:
                query:
                  type: string
                  description: Prometheus expression query string.
                time:
                  type: string
                  description: Evaluation timestamp as an RFC3339 or Unix timestamp. Optional.
                timeout:
                  type: string
                  description: Evaluation timeout. Defaults to the value of the -query.timeout flag.
              required:
              - query
components:
  schemas:
    QueryResult:
      type: object
      properties:
        status:
          type: string
          description: Status of the query (e.g., success, fail).
        data:
          type: object
          properties:
            resultType:
              type: string
              enum:
              - matrix
              - vector
              - scalar
              - string
              description: Type of the result.
            result:
              type: array
              items:
                type: object
                required:
                - metric
                - value
                properties:
                  metric:
                    type: object
                    additionalProperties:
                      type: string
                    description: Labels identifying the metric.
                  value:
                    type: array
                    items:
                      type: string
                    minItems: 2
                    maxItems: 2
                    description: The actual data point returned by the query, with timestamp and value.
  securitySchemes:
    X-API-TOKEN:
      description: 'You can manage your API tokens from the [Logz.io API tokens](https://app.logz.io/#/dashboard/settings/manage-tokens/api) page.


        API tokens are account-specific. You will need to be logged into the relevant Log Management or SIEM account to view the API tokens associated with it.


        To manage your API tokens, log into the relevant account in your Logz.io platform, click the gear in the top-right menu, and select [**Tools > Manage tokens > API tokens**](https://app.logz.io/#/dashboard/settings/manage-tokens/api).


        It''s important to keep your tokens secure. API tokens carry privileges to make changes to users and accounts, so if you believe an API token has been compromised, delete it, and replace it with a new token in your integrations.'
      type: apiKey
      in: header
      name: X-API-TOKEN
x-servers:
- url: https://api.logz.io
  description: US East (Northern Virginia)
- url: https://api-au.logz.io
  description: Asia Pacific (Sydney)
- url: https://api-ca.logz.io
  description: Canada (Central)
- url: https://api-eu.logz.io
  description: Europe (Frankfurt)
- url: https://api-uk.logz.io
  description: Europe (London)
x-tagGroups:
- name: Log Monitoring
  tags:
  - Search logs
  - Alerts
  - Deployments
  - Insights
  - Logz.io snapshots
- name: Cloud SIEM
  tags:
  - Security account
  - Security rules
  - Security events
  - Lookup lists
- name: Account administration
  tags:
  - Manage users
  - Manage metrics account
  - Associated accounts
  - Authentication groups
  - Who am I
  - Manage time-based log accounts
  - Manage shared tokens
  - Manage API tokens
  - Manage notification endpoints
  - Import or export Kibana objects
- name: Manage data shipping
  tags:
  - Manage log shipping tokens
  - Drop filters
  - Archive logs
  - Restore logs
  - Parsing
  - Delete object API
- name: Data security
  tags:
  - Retrieve audit trail
- name: Connect to AWS resources
  tags:
  - Connect to CloudTrail
  - Connect to S3 Buckets
- name: Metrics API Gateway
  tags:
  - Grafana contact points
  - Grafana data source
  - Grafana alerting provisioning
  - Grafana silence management
  - Grafana annotations
  - Grafana dashboards
  - Grafana dashboard search
  - Grafana snapshots
  - Grafana get all folders
  description: Metrics API Gateway to supported endpoints.