---
title: "Get the usage of an integration's parsed queries"
method: GET
path: "/v1/integrations/{integrationId}/exceptions/usage"
tags: ["Integration Exceptions"]
---

# Get the usage of an integration's parsed queries

`GET /v1/integrations/{integrationId}/exceptions/usage`

## Request

- Base URL: `https://docs.grepr.ai` (the document declares no server; this is the origin it was published from)
- URL: `https://docs.grepr.ai/v1/integrations/{integrationId}/exceptions/usage`
- Auth: one of:
  - API key in header `GREPR-API-KEY`
  - OpenID Connect (`https://grepr-prod.us.auth0.com/.well-known/openid-configuration`)

Returns the usage the observability vendor reports for the source of each parsed query, such as when a Datadog dashboard was last viewed and its total views, with whether the last attempt to read it worked. Queries the vendor reported nothing for are absent rather than reported as never viewed.

## Path parameters

- `integrationId` string, required

## Response `200`

Usage retrieved

- ExceptionUsageResponse: Usage the vendor reports for an integration's parsed queries
  - `reportedTypes` string[], required: The parsed query exception types (values of a parsed query's exceptionType) the vendor reports usage for. Empty when the vendor reports none; a query of any other type has no usage to show.
  - `status` UsageStatus, required: The outcome of the last attempt to read the integration's usage
    - `collectedAt` string, date-time: When usage was last read successfully. The usage returned is as of this time; absent when it was never read.
    - `detail` string: Why the last attempt failed, in words fit to show. Absent when it worked.
    - `state` 'OK' | 'PENDING' | 'PERMISSION_DENIED' | 'NO_VIEWS' | 'ERROR', required: Whether the usage of the integration's parsed queries could be read
  - `usage` object, required: Usage keyed by composite exception id (integrationId:vendorResourceId:exceptionType), the key the impacts endpoint uses. A query the vendor reported nothing for is absent, which is not the same as never viewed.

## Other responses

- `401`: Unauthorized
- `404`: Not Found - Integration not found.

---

[API](https://skmtc.dev/grepr/apis/grepr-api.md) - [All operations](https://skmtc.dev/grepr/apis/grepr-api/llms.txt) - [OpenAPI document](https://skmtc.dev/grepr/apis/grepr-api/revisions/2a5ce03a0bf0?raw)
