openapi: 3.2.0 info: title: CallidusAI Stats API description: Callidus AI backend API version: 0.1.0 tags: - name: Stats paths: /stats/view: post: tags: - Stats summary: Record Page View description: 'Record a page view for the specified path. Updates or creates PageStats and DailyStats records. This endpoint is designed to be resilient - it will return success even if stats recording fails, since stats are non-critical to the main application.' operationId: record_page_view_stats_view_post requestBody: content: application/json: schema: $ref: '#/components/schemas/ViewRequest' required: true responses: '200': description: Successful Response content: application/json: schema: {} '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /stats/click: post: tags: - Stats summary: Record Button Click description: 'Record a button click for the specified path and button. Updates or creates ButtonStats, PageStats, and DailyStats records. This endpoint is designed to be resilient - it will return success even if stats recording fails, since stats are non-critical to the main application.' operationId: record_button_click_stats_click_post requestBody: content: application/json: schema: $ref: '#/components/schemas/ClickRequest' required: true responses: '200': description: Successful Response content: application/json: schema: {} '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' components: schemas: ClickRequest: properties: path: type: string title: Path button: type: string title: Button type: object required: - path - button title: ClickRequest ValidationError: properties: loc: items: anyOf: - type: string - type: integer type: array title: Location msg: type: string title: Message type: type: string title: Error Type input: title: Input ctx: type: object title: Context type: object required: - loc - msg - type title: ValidationError HTTPValidationError: properties: detail: items: $ref: '#/components/schemas/ValidationError' type: array title: Detail type: object title: HTTPValidationError ViewRequest: properties: path: type: string title: Path isReturningVisitor: type: boolean title: Isreturningvisitor isBot: type: boolean title: Isbot type: object required: - path - isReturningVisitor - isBot title: ViewRequest