Skip to main content

Analytics API Documentation

GET: Retrieve Analytics

Description

This route is used to retrieve a list of analytics for a specific project and filter by date.

Method

GET

Query Parameters

  • sort (string): The field by which to sort the analytics.
  • page (number): The page number of the results.
  • limit (number): The number of items per page.
  • startDate (number): The start date for the analytics.
  • EndDate (number): The end date for the analytics.

Response

  • Returns a JSON response with the list of analytics or an error message.

Status Codes

  • 200 OK: analytics retrieved successfully.
  • 500 Internal Server Error: Error listing analytics.

Throws

  • An error if request validation or analytics retrieval fails.

Example cURL

curl --location 'https://app.ai12z.net/api/projects/{projectId}/analytics/startDate={stratdate}&endDate={enddate}' \
--header 'Authorization: Bearer <YOUR_KEY>' \
--data-urlencode 'sort=name' \
--data-urlencode 'page=1' \
--data-urlencode 'limit=10'

GET: Retrieve Analytics by topquestions

Description

This route is used to retrieve a list of analytics topquestions for a project and filter by date.

Method

GET

URL Parameters

-### Query Parameters

  • sort (string): The field by which to sort the analytics.
  • page (number): The page number of the results.
  • limit (number): The number of items per page.
  • startDate (number): The start date for the analytics.
  • EndDate (number): The end date for the analytics.

Response

    • Returns a JSON response with the list of analytics topquestions or an error message..

Status Codes

  • 200 OK: analytics retrieved successfully.
  • 500 Internal Server Error: Error listing analytics.

Throws

  • An error if request validation or analytics retrieval fails.

Example cURL

curl --location 'https://app.ai12z.net/api/projects/{projectId}/analytics/topquestions/startDate={stratdate}&endDate={enddate}' \
--header 'Authorization: Bearer <YOUR_KEY>' \
--data-urlencode 'sort=name' \
--data-urlencode 'page=1' \
--data-urlencode 'limit=10'