analytics

POST /api/v1/analytics/query

Changed on

Request

  • Base URL
    /api/v1 (relative, and the document was published on a file host, not at the API’s origin)
  • URL
    /api/v1/api/v1/analytics/query
  • Auth
    none declared

Headers

X-RateLimit-Remaininginteger
Example:99

Number of requests remaining in the current time window

X-RateLimit-Limitinteger
Example:100

Maximum number of requests allowed per minute

Request body

queryobject

OpenSearch DSL query object

sizenumber

Number of results to return

fromnumber

Offset for pagination

aggsobject

OpenSearch aggregations object

Example request

{
  "query": {
    "match_all": {}
  },
  "size": 10,
  "aggs": {
    "components": {
      "terms": {
        "field": "component_id"
      }
    }
  }
}

Response

Query analytics data for the authenticated organization

totalnumber required

Total number of matching documents

hitsobject[] required

Search hits

aggregationsobject

Aggregation results

Example response

{
  "total": 100
}

Changes