---
updatedAt: 2026-06-12T18:48:09.000Z
agentTools:
  projectIndex: https://docs.strivacity.com/llms.txt
---

# Query consent acceptance statistics

You can query the consent acceptance statistics by calling this endpoint.

| REQUIRED API PERMISSION |
|:------------------------|
| read:statistic |


# OpenAPI definition

```json
{
  "openapi": "3.0.1",
  "info": {
    "description": "API documentation of Admin Portal",
    "title": "Admin Portal",
    "version": "v0.0.1"
  },
  "servers": [
    {
      "url": "https://{tenant}",
      "variables": {
        "tenant": {
          "default": "example.strivacity.com",
          "description": "Your Strivacity tenant"
        }
      }
    }
  ],
  "tags": [
    {
      "name": "Statistics"
    }
  ],
  "paths": {
    "/admin/api/v1/statistics/ConsentAcceptance": {
      "get": {
        "description": "You can query the consent acceptance statistics by calling this endpoint.\n\n| REQUIRED API PERMISSION |\n|:------------------------|\n| read:statistic |\n",
        "operationId": "queryConsentAcceptanceStatistics",
        "parameters": [
          {
            "in": "query",
            "name": "startDate",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "in": "query",
            "name": "endDate",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "description": "Location in IANA time zone format.",
            "in": "query",
            "name": "location",
            "required": false,
            "schema": {
              "pattern": "^\\w+/\\w+$",
              "type": "string",
              "default": "Etc/UTC"
            }
          },
          {
            "description": "List of application ids that events should be used for the statistics",
            "in": "query",
            "name": "application",
            "required": false,
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          },
          {
            "in": "query",
            "name": "interval",
            "required": false,
            "schema": {
              "pattern": "^\\d{1,2}h$",
              "type": "string",
              "enum": [
                "1h",
                "...",
                "99h"
              ]
            }
          },
          {
            "description": "Desired resolution for the the requested statistics",
            "in": "query",
            "name": "period",
            "required": false,
            "schema": {
              "pattern": "^(hour|day|month|year)$",
              "type": "string",
              "enum": [
                "hour",
                "day",
                "month",
                "year"
              ]
            }
          },
          {
            "description": "Filter against the given variant IDs or 'null'. Explicit 'null' means baseline variant.",
            "in": "query",
            "name": "variant",
            "required": false,
            "schema": {
              "type": "array",
              "items": {
                "pattern": "^$|^[\\p{L}\\p{N}\\-.:\\/_(){}\\[\\]|&'\"?!@+*°]([\\p{L}\\p{N}\\-.:\\/_(){}\\[\\]|&'\"?!@+*° ]*[\\p{L}\\p{N}\\-.:\\/_(){}\\[\\]|&'\"?!@+*°])?$",
                "type": "string",
                "description": "UUID or 'null'"
              }
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "*/*": {
                "schema": {
                  "$ref": "#/components/schemas/StatsResponse_Stats"
                }
              }
            },
            "description": "OK"
          },
          "400": {
            "content": {
              "*/*": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemJson"
                }
              }
            },
            "description": "Bad Request"
          },
          "401": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemJson"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemJson"
                }
              }
            },
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "securityScheme": [
              "read:statistic"
            ]
          }
        ],
        "summary": "Query consent acceptance statistics",
        "tags": [
          "Statistics"
        ]
      }
    }
  },
  "components": {
    "schemas": {
      "FieldError": {
        "type": "object",
        "properties": {
          "field": {
            "type": "string"
          },
          "message": {
            "type": "string"
          },
          "objectName": {
            "type": "string"
          }
        }
      },
      "Link_Stats": {
        "type": "object",
        "properties": {
          "href": {
            "type": "string"
          },
          "meta": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            }
          }
        },
        "description": "Represents a single link for statistics"
      },
      "LinksResponse_Stats": {
        "type": "object",
        "properties": {
          "self": {
            "$ref": "#/components/schemas/Link_Stats"
          }
        }
      },
      "ProblemJson": {
        "type": "object",
        "properties": {
          "detail": {
            "type": "string"
          },
          "entityName": {
            "type": "string",
            "description": "The name of the entity within the error has occurred"
          },
          "errorKey": {
            "type": "string",
            "description": "A unique identifier of the error"
          },
          "fieldErrors": {
            "type": "array",
            "description": "Field constraint violation errors",
            "items": {
              "$ref": "#/components/schemas/FieldError"
            }
          },
          "message": {
            "type": "string",
            "description": "A unique identifier in format of 'error.{errorKey}'"
          },
          "params": {
            "type": "array",
            "description": "Further information related to the actual error",
            "items": {
              "type": "object",
              "additionalProperties": {
                "type": "object"
              }
            }
          },
          "path": {
            "type": "string",
            "description": "Request URI"
          },
          "status": {
            "type": "integer",
            "description": "Status code",
            "format": "int32"
          },
          "title": {
            "type": "string"
          }
        },
        "description": "Based on [RFC 7807](https://datatracker.ietf.org/doc/html/rfc7807)"
      },
      "StatsResponseValue_Stats": {
        "type": "object",
        "properties": {
          "groups": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            }
          },
          "time": {
            "type": "string",
            "format": "date-time"
          },
          "value": {
            "type": "number",
            "format": "double"
          }
        },
        "description": "Represents a time-group-value triplet."
      },
      "StatsResponse_Stats": {
        "type": "object",
        "properties": {
          "links": {
            "$ref": "#/components/schemas/LinksResponse_Stats"
          },
          "values": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/StatsResponseValue_Stats"
            }
          }
        }
      }
    },
    "securitySchemes": {
      "securityScheme": {
        "scheme": "bearer",
        "type": "http"
      }
    }
  }
}
```