---
title: "QueryApplicationAnalytics"
url: "https://nov18-dev.movespot.fyi/apis/portal-application-analytics-2/versions/e0606fc8-5af7-4955-b903-d9cb07167332/schemas/QueryApplicationAnalytics"
---

> Full API specification: https://nov18-dev.movespot.fyi/apis/portal-application-analytics-2/versions/e0606fc8-5af7-4955-b903-d9cb07167332.md

# QueryApplicationAnalytics

## OpenAPI definition

```yaml
openapi: 3.0.0
info:
  title: Portal Application Analytics
  version: 2.0.0
components:
  schemas:
    ApiProductVersionFilter:
      type: object
      properties:
        dimension:
          description: The dimension to filter.
          type: string
          enum:
            - API_PRODUCT_VERSION
        type:
          $ref: "#/components/schemas/FilterType"
        values:
          description: |
            The UUIDs of the API product versions to include in the results.
          type: array
          items:
            type: string
            pattern: ^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$
      additionalProperties: false
      required:
        - dimension
        - type
        - values
    ApplicationFilter:
      type: object
      properties:
        dimension:
          description: The dimension to filter. If no application filter is provided the
            API will implicitly filter on the applications owned by the
            developer making the query request.
          type: string
          enum:
            - APPLICATION
        type:
          $ref: "#/components/schemas/FilterType"
        values:
          description: |
            The UUIDs of the dev portal applications to include in the results.
          type: array
          items:
            type: string
            pattern: ^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$
      additionalProperties: false
      required:
        - dimension
        - type
        - values
    StatusCodeFilter:
      type: object
      properties:
        dimension:
          description: The dimension to filter.
          type: string
          enum:
            - STATUS_CODE
        type:
          $ref: "#/components/schemas/FilterType"
        values:
          description: |
            Only include requests with specific status codes in the results.
          type: array
          items:
            type: integer
            minimum: 100
            maximum: 999
      additionalProperties: false
      required:
        - dimension
        - type
        - values
    StatusCodeGroupedFilter:
      type: object
      properties:
        dimension:
          description: The dimension to filter.
          type: string
          enum:
            - STATUS_CODE_GROUPED
        type:
          $ref: "#/components/schemas/FilterType"
        values:
          description: |
            Only include the given groups of status codes in the results.
          type: array
          items:
            type: string
            pattern: ^\d[X][X]$
      additionalProperties: false
      required:
        - dimension
        - type
        - values
    FilterType:
      description: The type of filter to apply.  `IN` filters will limit results to
        only the specified values, while `NOT_IN` filters will exclude the
        specified values.
      type: string
      enum:
        - IN
        - NOT_IN
    QueryApplicationAnalytics:
      type: object
      properties:
        start_ms:
          description: Unix timestamp in milliseconds specifying the lower bound to return
            data for the query, inclusive.
          type: integer
        end_ms:
          description: Unix timestamp in milliseconds specifying upper bound to return
            data for the query, inclusive.
          type: integer
        metrics:
          description: >
            A property of your API (such as request count or latency) that you
            wish to query on.

            Your chosen metric is aggregated within the specified dimensions,
            meaning that if you query 'request count by application', you'll
            receive the total number of requests each application received
            within the given time frame.  Some metrics, such as latency and
            response size, have more complicated aggregations: selecting P99
            will result in the 99th percentile of the chosen metric.
          type: array
          items:
            type: string
            enum:
              - REQUEST_COUNT
              - REQUEST_PER_MINUTE
              - RESPONSE_LATENCY_P99
              - RESPONSE_LATENCY_P95
              - RESPONSE_LATENCY_P50
              - RESPONSE_SIZE_P99
              - RESPONSE_SIZE_P95
              - RESPONSE_SIZE_P50
              - REQUEST_SIZE_P99
              - REQUEST_SIZE_P95
              - REQUEST_SIZE_P50
          maxItems: 1
          minItems: 1
        dimensions:
          description: >
            The dimensions for the query.  A query may have up to 2 dimensions,
            including time.

            If no dimensions are provided, the report will simply return the
            provided metric aggregated across

            all available data.
          type: array
          items:
            type: string
            enum:
              - API_PRODUCT_VERSION
              - APPLICATION
              - STATUS_CODE
              - STATUS_CODE_GROUPED
              - TIME
          default: []
          maxItems: 2
          minItems: 0
        granularity_ms:
          description: >
            `granularity_ms` is only valid for queries that include a time
            dimension, and it specifies the time buckets in for the returned
            data.
          type: integer
          default: 86400000
        filter:
          type: array
          items:
            discriminator:
              propertyName: dimension
              mapping:
                API_PRODUCT_VERSION: "#/components/schemas/ApiProductVersionFilter"
                APPLICATION: "#/components/schemas/ApplicationFilter"
                STATUS_CODE: "#/components/schemas/StatusCodeFilter"
                STATUS_CODE_GROUPED: "#/components/schemas/StatusCodeGroupedFilter"
            oneOf:
              - $ref: "#/components/schemas/ApiProductVersionFilter"
              - $ref: "#/components/schemas/ApplicationFilter"
              - $ref: "#/components/schemas/StatusCodeFilter"
              - $ref: "#/components/schemas/StatusCodeGroupedFilter"
          default: []
      additionalProperties: false
      required:
        - start_ms
        - end_ms
        - metrics
```
