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

# Compute Analytics

> Explicitly fire the job to compute analytics on the backend.

This is useful for the Haiqu-generated circuit (data loading, hemistich)
when analytics metrics are not computed.

Args:
    circuit_id (str): ID of the circuit.
    user (User): User authenticated with api key.
    analytics_type (AnalyticsType): The type of metrics to compute.

Returns:
    Response: 200 if OK, 404 if no such circuit exists.



## OpenAPI

````yaml https://api.haiqu.ai/openapi.json post /circuits/{circuit_id}/compute_analytics/{analytics_type}
openapi: 3.1.0
info:
  title: Haiqu API
  summary: Haiqu RESTful API service.
  description: Cloud service providing the access to Haiqu cloud runtime
  contact:
    name: Haiqu Inc.
    url: https://haiqu.ai/
    email: info@haiqu.ai
  version: 1.4.0
servers: []
security: []
paths:
  /circuits/{circuit_id}/compute_analytics/{analytics_type}:
    post:
      summary: Compute Analytics
      description: |-
        Explicitly fire the job to compute analytics on the backend.

        This is useful for the Haiqu-generated circuit (data loading, hemistich)
        when analytics metrics are not computed.

        Args:
            circuit_id (str): ID of the circuit.
            user (User): User authenticated with api key.
            analytics_type (AnalyticsType): The type of metrics to compute.

        Returns:
            Response: 200 if OK, 404 if no such circuit exists.
      operationId: >-
        compute_analytics_circuits__circuit_id__compute_analytics__analytics_type__post
      parameters:
        - name: circuit_id
          in: path
          required: true
          schema:
            type: string
            title: Circuit Id
        - name: analytics_type
          in: path
          required: true
          schema:
            $ref: '#/components/schemas/AnalyticsType'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - APIKeyQuery: []
        - APIKeyHeader: []
components:
  schemas:
    AnalyticsType:
      type: string
      enum:
        - core
        - advanced
        - evolution
      title: AnalyticsType
      description: Class for circuit analytics type.
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    APIKeyQuery:
      type: apiKey
      in: query
      name: HAIQU_API_KEY
    APIKeyHeader:
      type: apiKey
      in: header
      name: authorization

````