> For the complete documentation index, see [llms.txt](https://guardian.hedera.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://guardian.hedera.com/docs/3.7.0/developer-tools-and-resources/api-reference/apis-related-to-statistics.md).

# APIs related to Statistics

The Policy Statistics APIs allow Standard Registries to create, manage, and evaluate statistic definitions — configurable rule sets that assess and score VC documents produced by Guardian policies. Assessments can be created against a definition and their full relationship graphs retrieved for audit and reporting purposes.

**Authentication:** All endpoints require a Bearer token (`Authorization: Bearer <token>`), obtained via `POST /accounts/login`.

| Method       | Endpoint                                                                           | Description                                       | Auth Required |
| ------------ | ---------------------------------------------------------------------------------- | ------------------------------------------------- | ------------- |
| **`POST`**   | `/api/v1/policy-statistics`                                                        | Creates a new statistic definition                | Yes           |
| **`GET`**    | `/api/v1/policy-statistics`                                                        | Returns all statistic definitions                 | Yes           |
| **`GET`**    | `/api/v1/policy-statistics/{definitionId}`                                         | Returns a statistic definition by ID              | Yes           |
| **`PUT`**    | `/api/v1/policy-statistics/{definitionId}`                                         | Updates a statistic definition                    | Yes           |
| **`DELETE`** | `/api/v1/policy-statistics/{definitionId}`                                         | Deletes a statistic definition                    | Yes           |
| **`PUT`**    | `/api/v1/policy-statistics/{definitionId}/publish`                                 | Publishes a statistic definition                  | Yes           |
| **`GET`**    | `/api/v1/policy-statistics/{definitionId}/relationships`                           | Returns statistic definition relationships        | Yes           |
| **`GET`**    | `/api/v1/policy-statistics/{definitionId}/documents`                               | Returns all documents for a definition            | Yes           |
| **`POST`**   | `/api/v1/policy-statistics/{definitionId}/assessment`                              | Creates a new statistic assessment                | Yes           |
| **`GET`**    | `/api/v1/policy-statistics/{definitionId}/assessment`                              | Returns all assessments for a definition          | Yes           |
| **`GET`**    | `/api/v1/policy-statistics/{definitionId}/assessment/{assessmentId}`               | Returns a statistic assessment by ID              | Yes           |
| **`GET`**    | `/api/v1/policy-statistics/{definitionId}/assessment/{assessmentId}/relationships` | Returns assessment relationships                  | Yes           |
| **`POST`**   | `/api/v1/policy-statistics/{policyId}/import/file`                                 | Imports a statistic definition from a zip file    | Yes           |
| **`GET`**    | `/api/v1/policy-statistics/{definitionId}/export/file`                             | Exports a statistic definition as a zip file      | Yes           |
| **`POST`**   | `/api/v1/policy-statistics/import/file/preview`                                    | Previews a statistic definition zip before import | Yes           |

## Endpoints

* [Returns All Statistic Definitions](https://guardian.hedera.com/docs/3.7.0/developer-tools-and-resources/api-reference/apis-related-to-statistics/returns-all-dashboards.md)
* [Returns All Statistic Assessments](https://guardian.hedera.com/docs/3.7.0/developer-tools-and-resources/api-reference/apis-related-to-statistics/returns-all-reports.md)
* [Returns Statistic Definition by ID](https://guardian.hedera.com/docs/3.7.0/developer-tools-and-resources/api-reference/apis-related-to-statistics/returns-dashboard-by-uuid.md)
* [Returns Statistic Assessment by ID](https://guardian.hedera.com/docs/3.7.0/developer-tools-and-resources/api-reference/apis-related-to-statistics/returns-report-data-by-report-uuid.md)
* [Returns Statistic Definition Relationships](https://guardian.hedera.com/docs/3.7.0/developer-tools-and-resources/api-reference/apis-related-to-statistics/returns-the-status-of-the-current-report.md)
* [Updates Statistic Definition](https://guardian.hedera.com/docs/3.7.0/developer-tools-and-resources/api-reference/apis-related-to-statistics/update-current-report.md)
* [Export Statistic Definition as ZIP File](https://guardian.hedera.com/docs/3.7.0/developer-tools-and-resources/api-reference/apis-related-to-statistics/export-report-data-in-a-csv-file-format.md)
* [Import Statistic Definition from ZIP File](https://guardian.hedera.com/docs/3.7.0/developer-tools-and-resources/api-reference/apis-related-to-statistics/export-report-data-in-a-xlsx-file-format.md)
* [Returns All Documents for a Statistic Definition](https://guardian.hedera.com/docs/3.7.0/developer-tools-and-resources/api-reference/apis-related-to-statistics/returns-metrics.md)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://guardian.hedera.com/docs/3.7.0/developer-tools-and-resources/api-reference/apis-related-to-statistics.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
