> ## 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.

# Create saved query



## OpenAPI

````yaml v2 post /apl-starred-queries
openapi: 3.0.0
info:
  description: A public and stable API for interacting with axiom services
  title: Axiom
  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://api.axiom.co/v2/
security:
  - bearerAuth: []
paths:
  /apl-starred-queries:
    post:
      tags:
        - starred
      operationId: createStarred
      requestBody:
        $ref: '#/components/requestBodies/StarredQuery'
      responses:
        '200':
          description: StarredQueryWithId
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/StarredQueryWithId'
      security:
        - Auth:
            - starredQueries|create
components:
  requestBodies:
    StarredQuery:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/StarredQuery'
      required: true
  schemas:
    StarredQueryWithId:
      type: object
      allOf:
        - $ref: '#/components/schemas/StarredQuery'
        - type: object
          required:
            - id
          properties:
            id:
              type: string
    StarredQuery:
      type: object
      required:
        - kind
        - name
        - who
        - query
        - metadata
      properties:
        dataset:
          type: string
        kind:
          type: string
          enum:
            - apl
        metadata:
          type: object
          additionalProperties:
            type: string
        name:
          type: string
        query:
          $ref: '#/components/schemas/APLRequestWithOptions'
        who:
          type: string
    APLRequestWithOptions:
      type: object
      required:
        - apl
      properties:
        apl:
          type: string
        cursor:
          type: string
        defaultLimit:
          type: integer
          format: int64
        defaultOrder:
          type: array
          items:
            $ref: '#/components/schemas/APLRequestWithOptionsDefaultOrder'
        endTime:
          type: string
        includeCursor:
          type: boolean
        includeCursorField:
          type: boolean
        libraries:
          type: array
          items:
            type: string
        queryOptions:
          $ref: '#/components/schemas/QueryOptions'
        startTime:
          type: string
        variables:
          type: object
    APLRequestWithOptionsDefaultOrder:
      type: object
      properties:
        desc:
          type: boolean
        field:
          type: string
    QueryOptions:
      type: object
      properties:
        disableCache:
          type: boolean
        disableStats:
          type: boolean
        disableTrace:
          type: boolean
        maxDataPoints:
          type: integer
          format: int64
        maxSeries:
          type: integer
          format: int64
        noAggregation:
          type: boolean
        noFill:
          type: boolean
        noInterpolation:
          type: boolean
        priority:
          type: string
          enum:
            - low
            - medium
            - high
        resolution:
          type: string
        displayNull:
          type: string
          enum:
            - auto
            - 'null'
            - span
            - zero
            - ''
          description: >-
            Controls how empty intervals are rendered in time series charts.
            `auto` infers from the query, `null` leaves gaps, `span` connects
            adjacent points, `zero` fills with zero.
        overlayCharts:
          $ref: '#/components/schemas/BooleanString'
          description: >-
            When enabled, charts are overlaid on a single chart instead of
            stacked separately.
        shownColumns:
          type: string
          maxLength: 10000
        timeSeriesVariant:
          type: string
          enum:
            - area
            - bars
            - line
            - lines
            - ''
        timeSeriesView:
          type: string
          enum:
            - charts
            - resultsTable
            - charts|resultsTable
            - ''
      additionalProperties: false
    BooleanString:
      type: string
      enum:
        - 'true'
        - 'false'
        - ''
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      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).
    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: {}

````

Built with [Mintlify](https://mintlify.com).