> ## Documentation Index
> Fetch the complete documentation index at: https://axiom.co/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Run MPL query to edge deployment

<Info>
  Support for MPL queries is currently in public preview. For more information, see [Feature states](/platform-overview/roadmap#feature-states).
</Info>

<Warning>
  Use this endpoint to query data from a specific edge deployment. The data you query must be stored in the edge deployment where you query it. For more information, see [Query data](/restapi/ingest) and [Edge deployments](/reference/edge-deployments).

  The base domain for this endpoint is the base domain of the edge deployment where you want to query data.

  | Edge deployment      | Base domain for ingest and query |
  | :------------------- | :------------------------------- |
  | `US East 1 (AWS)`    | `us-east-1.aws.edge.axiom.co`    |
  | `EU Central 1 (AWS)` | `eu-central-1.aws.edge.axiom.co` |

  This endpoint only supports API tokens. Personal access tokens (PATs) aren't supported. For more information, see [Tokens](/reference/tokens).
</Warning>


## OpenAPI

````yaml v1-edge-query post /query/_mpl
openapi: 3.0.0
info:
  description: Query execution API for regional Edge deployments
  title: Axiom Query
  termsOfService: http://axiom.co/terms
  contact:
    name: Axiom support team
    url: https://axiom.co
    email: hello@axiom.co
  license:
    name: Apache 2.0
    url: https://www.apache.org/licenses/LICENSE-2.0.html
  version: 2.0.0
servers:
  - url: https://{axiom-domain}/v1/
security: []
paths:
  /query/_mpl:
    post:
      tags:
        - query
      operationId: queryMetrics
      parameters:
        - description: >-
            Response format. If omitted, the Accept header is used for content
            negotiation. Defaults to metrics-v2 when neither is specified.
          name: format
          in: query
          schema:
            type: string
            enum:
              - metrics-v1
              - metrics-v2
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/MetricsRequestWithOptions'
        required: true
      responses:
        '200':
          description: MetricsResult
          headers:
            X-Axiom-History-Query-Id:
              schema:
                type: string
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MetricsResult'
        default:
          description: User or system error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MetricsError'
      security:
        - Auth:
            - query|read
components:
  schemas:
    MetricsRequestWithOptions:
      type: object
      required:
        - startTime
        - endTime
      properties:
        endTime:
          description: End time for the query range
          type: string
        mpl:
          description: The MPL query.
          type: string
        startTime:
          description: >-
            start and end time for the query, these must be specified as RFC3339
            strings

            or using relative time expressions (e.g. now-1h, now-1d, now-1w,
            etc)
          type: string
    MetricsResult:
      description: Metrics query result (streaming binary data)
      type: object
    MetricsError:
      type: object
      properties:
        error:
          description: The error
          type: string
        message:
          description: A formatted user-facing error message
          type: string
  securitySchemes:
    Auth:
      description: >-
        Authenticate using an API token or personal access token (PAT). Include
        the token as a Bearer token: `Authorization: Bearer <token>`. For more
        information, see [Tokens](/reference/tokens).
      type: oauth2
      flows:
        authorizationCode:
          authorizationUrl: https://accounts.google.com/o/oauth2/v2/auth
          tokenUrl: https://www.googleapis.com/oauth2/v4/token
          scopes: {}

````