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

# Query

> Query bounded real-user performance percentiles, experience scores, time buckets, and route summaries.



## OpenAPI

````yaml /openapi.json post /v1/orgs/{orgId}/projects/{projectId}/speed-insights/query
openapi: 3.1.0
info:
  title: Korve API
  version: 0.1.0
  description: >-
    Typed control plane for deploying applications and explicitly provisioning
    their managed infrastructure.
servers:
  - url: https://api.korve.dev
security: []
paths:
  /v1/orgs/{orgId}/projects/{projectId}/speed-insights/query:
    post:
      tags:
        - speedInsights
      summary: Query
      description: >-
        Query bounded real-user performance percentiles, experience scores, time
        buckets, and route summaries.
      operationId: speedInsights.query
      parameters:
        - name: orgId
          in: path
          required: true
          schema:
            type: string
          description: The organization's id (UUID) or slug — either form is accepted.
        - name: projectId
          in: path
          required: true
          schema:
            type: string
          description: The project's id (UUID) or slug — either form is accepted.
      requestBody:
        required: true
        x-korve-max-bytes: 8192
        content:
          application/json:
            schema:
              type: object
              properties:
                from:
                  type: string
                  format: date-time
                until:
                  type: string
                  format: date-time
                environment:
                  type: string
                  pattern: ^[a-z][a-z0-9-]{0,38}$
                device:
                  type: string
                  enum:
                    - all
                    - desktop
                    - mobile
                route:
                  type: string
                  minLength: 1
                  maxLength: 256
                  pattern: ^/[^?#]*$
                granularity:
                  type: string
                  enum:
                    - hour
                    - day
              additionalProperties: false
      responses:
        '200':
          description: Bounded Speed Insights report.
          content:
            application/json:
              schema:
                type: object
                properties:
                  from:
                    type: string
                    format: date-time
                  until:
                    type: string
                    format: date-time
                  retentionDays:
                    type: integer
                    enum:
                      - 30
                  summary:
                    type: object
                    properties:
                      score:
                        type:
                          - number
                          - 'null'
                        minimum: 0
                        maximum: 100
                      samples:
                        type: integer
                        minimum: 0
                      vitals:
                        type: array
                        items:
                          type: object
                          properties:
                            metric:
                              type: string
                              enum:
                                - CLS
                                - FCP
                                - INP
                                - LCP
                                - TTFB
                            unit:
                              type: string
                              enum:
                                - milliseconds
                                - score
                            rating:
                              type:
                                - string
                                - 'null'
                              enum:
                                - good
                                - needs-improvement
                                - poor
                                - null
                            samples:
                              type: integer
                              minimum: 0
                            p75:
                              type:
                                - number
                                - 'null'
                            p90:
                              type:
                                - number
                                - 'null'
                            p95:
                              type:
                                - number
                                - 'null'
                            p99:
                              type:
                                - number
                                - 'null'
                          required:
                            - metric
                            - unit
                            - rating
                            - samples
                            - p75
                            - p90
                            - p95
                            - p99
                          additionalProperties: false
                        maxItems: 5
                    required:
                      - score
                      - samples
                      - vitals
                    additionalProperties: false
                  series:
                    type: array
                    maxItems: 720
                    items:
                      type: object
                      properties:
                        bucket:
                          type: string
                          format: date-time
                        score:
                          type:
                            - number
                            - 'null'
                          minimum: 0
                          maximum: 100
                        samples:
                          type: integer
                          minimum: 0
                      required:
                        - bucket
                        - score
                        - samples
                      additionalProperties: false
                  routes:
                    type: array
                    maxItems: 50
                    items:
                      type: object
                      properties:
                        route:
                          type: string
                        score:
                          type:
                            - number
                            - 'null'
                          minimum: 0
                          maximum: 100
                        samples:
                          type: integer
                          minimum: 0
                        vitals:
                          type: array
                          items:
                            type: object
                            properties:
                              metric:
                                type: string
                                enum:
                                  - CLS
                                  - FCP
                                  - INP
                                  - LCP
                                  - TTFB
                              unit:
                                type: string
                                enum:
                                  - milliseconds
                                  - score
                              rating:
                                type:
                                  - string
                                  - 'null'
                                enum:
                                  - good
                                  - needs-improvement
                                  - poor
                                  - null
                              samples:
                                type: integer
                                minimum: 0
                              p75:
                                type:
                                  - number
                                  - 'null'
                              p90:
                                type:
                                  - number
                                  - 'null'
                              p95:
                                type:
                                  - number
                                  - 'null'
                              p99:
                                type:
                                  - number
                                  - 'null'
                            required:
                              - metric
                              - unit
                              - rating
                              - samples
                              - p75
                              - p90
                              - p95
                              - p99
                            additionalProperties: false
                          maxItems: 5
                      required:
                        - route
                        - score
                        - samples
                        - vitals
                      additionalProperties: false
                required:
                  - from
                  - until
                  - retentionDays
                  - summary
                  - series
                  - routes
                additionalProperties: false
        '404':
          description: No such project or environment.
        '422':
          description: Invalid time window, filter, or granularity.
        '503':
          description: Speed Insights data is temporarily unavailable.
      security:
        - apiKey: []
        - session: []
components:
  securitySchemes:
    apiKey:
      type: http
      scheme: bearer
      bearerFormat: korve_api_key
    session:
      type: apiKey
      in: cookie
      name: korve.session_token

````