> ## Documentation Index
> Fetch the complete documentation index at: https://docs.stigg.io/llms.txt
> Use this file to discover all available pages before exploring further.

# usageEvents

> Get usage events



**query** `usageEvents(input: UsageEventsInput!): UsageEventsPreview!`

## Arguments

**`input`**: `UsageEventsInput!` (required)

Input for usage events

## Returns

`UsageEventsPreview!`

**`events`**: `[UsageEvent!]!`

A usage event record

## Examples

```graphql Query
query UsageEvents($input: UsageEventsInput!) {
  usageEvents(input: $input) {
    events {
      customer {
        additionalMetaData
        awsMarketplaceCustomerId
        billingCurrency
        billingId
        billingLinkUrl
        coupon {
          __typename
        }
      }
      customerId
      dimensions
      eventName
      id
      idempotencyKey
    }
  }
}
```

```json Variables
{
  "input": {
    "environmentId": "value"
  }
}
```

```json Response
{
  "data": {
    "usageEvents": {
      "events": [
        {
          "customer": {
            "additionalMetaData": "value",
            "awsMarketplaceCustomerId": "string",
            "billingCurrency": "AED",
            "billingId": "string",
            "billingLinkUrl": "string",
            "coupon": {
              "__typename": "Coupon"
            }
          },
          "customerId": "string",
          "dimensions": "value",
          "eventName": "string",
          "id": "string",
          "idempotencyKey": "string"
        }
      ]
    }
  }
}
```


## Related topics

- [UsageEvent](https://docs.stigg.io/graphql-reference/types/UsageEvent.md)
- [Viewing usage events](https://docs.stigg.io/documentation/getting-usage-data-into-stigg/viewing-usage-events.md)
- [Report usage events](https://docs.stigg.io/api-reference/usage/report-usage-events.md)
- [UsageEventsInput](https://docs.stigg.io/graphql-reference/types/UsageEventsInput.md)
- [UsageEventsPreview](https://docs.stigg.io/graphql-reference/types/UsageEventsPreview.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.