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

# Resolve analytics board widget data



## OpenAPI

````yaml /openapi.yaml post /widgets/{id}/data
openapi: 3.0.1
info:
  title: GetSpecs REST API
  description: REST API documentation for GetSpecs.
  version: 1.0.0
servers:
  - url: /v1
  - url: https://demo-api.getspecs.io/v1
security: []
paths:
  /widgets/{id}/data:
    post:
      tags:
        - AnalyticsBoardWidget
      summary: Resolve analytics board widget data
      operationId: analytics_board_widgets#data
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: integer
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                project_id:
                  type: integer
                project_ids:
                  type: array
                  items:
                    type: integer
                package_id:
                  type: integer
                  description: >-
                    Narrows project_items/baseline_items widgets to one package
                    of the single requested project; without it baseline_items
                    counts every in-progress or finished package
                package_section_id:
                  type: integer
                  description: >-
                    Narrows further to one section (and its subsections);
                    requires package_id
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                oneOf:
                  - type: object
                    required:
                      - value
                    properties:
                      value:
                        type: number
                        nullable: true
                        description: >-
                          null for avg/min/max when no row has a value to
                          aggregate
                  - type: array
                    items:
                      type: object
                      required:
                        - key
                        - label
                        - value
                      properties:
                        key: {}
                        label: {}
                        value:
                          type: number
                          nullable: true
                  - type: array
                    items:
                      type: object
                      required:
                        - bucket_start
                        - value
                      properties:
                        bucket_start:
                          type: string
                          format: date
                        value:
                          type: number
                          nullable: true
                          description: >-
                            Empty buckets are filled: 0 for count/sum, null for
                            avg/min/max/ratio
                  - type: object
                    required:
                      - restricted
                    properties:
                      restricted:
                        type: boolean
                    description: The widget reads a column hidden from the current role
                  - type: object
                    required:
                      - unavailable
                    properties:
                      unavailable:
                        type: boolean
                    description: The widget references a column that was deleted
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error'
        '422':
          description: Unprocessable Entity
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error'
      security:
        - apiKey: []
          workspaceId: []
components:
  schemas:
    error:
      type: object
      properties:
        error:
          type: string
        errors:
          type: array
          items:
            type: object
            properties:
              field:
                type: string
                nullable: true
              code:
                type: string
                nullable: true
              message:
                type: string
            required:
              - message
  securitySchemes:
    apiKey:
      type: apiKey
      name: authorization
      in: header
    workspaceId:
      type: apiKey
      name: X-Workspace-ID
      in: header

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.