---
title: "Update report"
method: PUT
path: "/api/v1/reports/{reportIdOrSlug}"
tags: ["Reports"]
---

# Update report

`PUT /api/v1/reports/{reportIdOrSlug}`

Update a report

## Path parameters

- `reportIdOrSlug` string, required

## Request body

- ReportUpdate — Resource update operation model.
  - `endpoint` WebhookEndpoint, required — Webhook endpoint to send the report to.
    - `description` string — Optional description of the webhook endpoint.
    - `rateLimit` integer — Optional rate limit for the webhook endpoint.
    - `url` string, required — The URL of the webhook endpoint.
  - `filter` ReportFilter — Filter to apply to the report.
    - `subject` Filter — Filter can be used to express complex queries.
      - `$and` Filter[]
      - `$eq` union — FilterValue represents a value that can be used in a filter (string, float, string array or float array).
        - string
        - number, double
        - FilterValueString[] — FilterValueArrayString represents an array of strings.
        - FilterValueNumber[] — FilterValueArrayNumber represents an array of numbers.
      - `$gt` union — FilterValue represents a value that can be used in a filter (string, float, string array or float array).
        - string
        - number, double
        - FilterValueString[] — FilterValueArrayString represents an array of strings.
        - FilterValueNumber[] — FilterValueArrayNumber represents an array of numbers.
      - `$gte` union — FilterValue represents a value that can be used in a filter (string, float, string array or float array).
        - string
        - number, double
        - FilterValueString[] — FilterValueArrayString represents an array of strings.
        - FilterValueNumber[] — FilterValueArrayNumber represents an array of numbers.
      - `$in` union — FilterValue represents a value that can be used in a filter (string, float, string array or float array).
        - string
        - number, double
        - FilterValueString[] — FilterValueArrayString represents an array of strings.
        - FilterValueNumber[] — FilterValueArrayNumber represents an array of numbers.
      - `$lt` union — FilterValue represents a value that can be used in a filter (string, float, string array or float array).
        - string
        - number, double
        - FilterValueString[] — FilterValueArrayString represents an array of strings.
        - FilterValueNumber[] — FilterValueArrayNumber represents an array of numbers.
      - `$lte` union — FilterValue represents a value that can be used in a filter (string, float, string array or float array).
        - string
        - number, double
        - FilterValueString[] — FilterValueArrayString represents an array of strings.
        - FilterValueNumber[] — FilterValueArrayNumber represents an array of numbers.
      - `$ne` union — FilterValue represents a value that can be used in a filter (string, float, string array or float array).
        - string
        - number, double
        - FilterValueString[] — FilterValueArrayString represents an array of strings.
        - FilterValueNumber[] — FilterValueArrayNumber represents an array of numbers.
      - `$nin` union — FilterValue represents a value that can be used in a filter (string, float, string array or float array).
        - string
        - number, double
        - FilterValueString[] — FilterValueArrayString represents an array of strings.
        - FilterValueNumber[] — FilterValueArrayNumber represents an array of numbers.
      - `$or` Filter[]
    - `usage` Filter — Filter can be used to express complex queries.
      - `$and` Filter[]
      - `$eq` union — FilterValue represents a value that can be used in a filter (string, float, string array or float array).
        - string
        - number, double
        - FilterValueString[] — FilterValueArrayString represents an array of strings.
        - FilterValueNumber[] — FilterValueArrayNumber represents an array of numbers.
      - `$gt` union — FilterValue represents a value that can be used in a filter (string, float, string array or float array).
        - string
        - number, double
        - FilterValueString[] — FilterValueArrayString represents an array of strings.
        - FilterValueNumber[] — FilterValueArrayNumber represents an array of numbers.
      - `$gte` union — FilterValue represents a value that can be used in a filter (string, float, string array or float array).
        - string
        - number, double
        - FilterValueString[] — FilterValueArrayString represents an array of strings.
        - FilterValueNumber[] — FilterValueArrayNumber represents an array of numbers.
      - `$in` union — FilterValue represents a value that can be used in a filter (string, float, string array or float array).
        - string
        - number, double
        - FilterValueString[] — FilterValueArrayString represents an array of strings.
        - FilterValueNumber[] — FilterValueArrayNumber represents an array of numbers.
      - `$lt` union — FilterValue represents a value that can be used in a filter (string, float, string array or float array).
        - string
        - number, double
        - FilterValueString[] — FilterValueArrayString represents an array of strings.
        - FilterValueNumber[] — FilterValueArrayNumber represents an array of numbers.
      - `$lte` union — FilterValue represents a value that can be used in a filter (string, float, string array or float array).
        - string
        - number, double
        - FilterValueString[] — FilterValueArrayString represents an array of strings.
        - FilterValueNumber[] — FilterValueArrayNumber represents an array of numbers.
      - `$ne` union — FilterValue represents a value that can be used in a filter (string, float, string array or float array).
        - string
        - number, double
        - FilterValueString[] — FilterValueArrayString represents an array of strings.
        - FilterValueNumber[] — FilterValueArrayNumber represents an array of numbers.
      - `$nin` union — FilterValue represents a value that can be used in a filter (string, float, string array or float array).
        - string
        - number, double
        - FilterValueString[] — FilterValueArrayString represents an array of strings.
        - FilterValueNumber[] — FilterValueArrayNumber represents an array of numbers.
      - `$or` Filter[]
  - `query` ReportQuery, required — Query to apply on the usage data.
    - `groupBy` string[] — Optional group by fields.
    - `period` 'MINUTE' | 'HOUR' | 'DAY' | 'MONTH', required — Query period used by reporting.
    - `windowSize` 'MINUTE' | 'HOUR' | 'DAY' | 'MONTH' — Aggregation window size.

## Response `200`

The request has succeeded.

- union — One of the report types.
  - object — The object storage report.
    - `bucketName` string, required — The name of the bucket to export events to.
    - `id` string, required — The ID of the report.
    - `objectPrefix` string — Optional prefix to use for the object key. It is useful to organize the objects in the bucket.
    - `region` string — The region of the object storage.
    - `schedule` ReportSchedule, required — The schedule of the report. Defines how frequently the report should run.
      - `interval` '1m' | '1h' | '24h', required — The interval of the report.
      - `startAt` string, date-time, required — The start time of the report. Set it to now if you want sync to start immediatly.
    - `slug` string, required — The unique slug of the report. Must be unique within the organization.
    - `storageType` 's3' | 'gcs', required — The type of the object storage engine.
    - `type` 'objectStorage', required — The type of the report.
  - object — The stripe report.
    - `id` string, required — The ID of the report.
    - `meter` Meter, required — A meter is a configuration that defines how to match and aggregate events.
      - `aggregation` 'SUM' | 'COUNT' | 'UNIQUE_COUNT' | 'AVG' | 'MIN' | 'MAX' | 'LATEST', required — The aggregation type to use for the meter.
      - `annotations` Annotations — Set of key-value pairs managed by the system. Cannot be modified by user.
      - `createdAt` string, date-time, required — Timestamp of when the resource was created.
      - `deletedAt` string, date-time — Timestamp of when the resource was permanently deleted.
      - `description` string — Optional description of the resource. Maximum 1024 characters.
      - `eventFrom` string, date-time — The date since the meter should include events. Useful to skip old events. If not specified, all historical events are included.
      - `eventType` string, required — The event type to aggregate.
      - `groupBy` object — Named JSONPath expressions to extract the group by values from the event data. Keys must be unique and consist only alphanumeric and underscore characters.
      - `id` string, required — A unique identifier for the resource.
      - `metadata` Metadata — Set of key-value pairs. Metadata can be used to store additional information about a resource.
      - `name` string — Human-readable name for the resource. Between 1 and 256 characters. Defaults to the slug if not specified.
      - `slug` string, required — A unique, human-readable identifier for the meter. Must consist only alphanumeric and underscore characters.
      - `updatedAt` string, date-time, required — Timestamp of when the resource was last updated.
      - `valueProperty` string — JSONPath expression to extract the value from the ingested event's data property. The ingested value for SUM, AVG, MIN, and MAX aggregations is a number or a string that can be parsed to a number. For UNIQUE_COUNT aggregation, the ingested value must be a string. For COUNT aggregation the valueProperty is ignored.
    - `meterGroupByFilters` object — Optional meter group by filters. Useful if the meter scope is broader than what report tracks.
    - `schedule` ReportSchedule, required — The schedule of the report. Defines how frequently the report should run.
      - `interval` '1m' | '1h' | '24h', required — The interval of the report.
      - `startAt` string, date-time, required — The start time of the report. Set it to now if you want sync to start immediatly.
    - `slug` string, required — The unique slug of the report. Must be unique within the organization.
    - `stripeBillingMeterId` string, required — The ID of the Stripe billing meter entity.
    - `type` 'stripe', required — The type of the report.
  - object — The webhook report.
    - `endpoint` WebhookEndpoint, required — Webhook endpoint to send the report to.
      - `description` string — Optional description of the webhook endpoint.
      - `rateLimit` integer — Optional rate limit for the webhook endpoint.
      - `url` string, required — The URL of the webhook endpoint.
    - `filter` ReportFilter — Filter to apply to the report.
      - `subject` Filter — Filter can be used to express complex queries.
        - `$and` Filter[]
        - `$eq` union — FilterValue represents a value that can be used in a filter (string, float, string array or float array).
          - string
          - number, double
          - FilterValueString[] — FilterValueArrayString represents an array of strings.
          - FilterValueNumber[] — FilterValueArrayNumber represents an array of numbers.
        - `$gt` union — FilterValue represents a value that can be used in a filter (string, float, string array or float array).
          - string
          - number, double
          - FilterValueString[] — FilterValueArrayString represents an array of strings.
          - FilterValueNumber[] — FilterValueArrayNumber represents an array of numbers.
        - `$gte` union — FilterValue represents a value that can be used in a filter (string, float, string array or float array).
          - string
          - number, double
          - FilterValueString[] — FilterValueArrayString represents an array of strings.
          - FilterValueNumber[] — FilterValueArrayNumber represents an array of numbers.
        - `$in` union — FilterValue represents a value that can be used in a filter (string, float, string array or float array).
          - string
          - number, double
          - FilterValueString[] — FilterValueArrayString represents an array of strings.
          - FilterValueNumber[] — FilterValueArrayNumber represents an array of numbers.
        - `$lt` union — FilterValue represents a value that can be used in a filter (string, float, string array or float array).
          - string
          - number, double
          - FilterValueString[] — FilterValueArrayString represents an array of strings.
          - FilterValueNumber[] — FilterValueArrayNumber represents an array of numbers.
        - `$lte` union — FilterValue represents a value that can be used in a filter (string, float, string array or float array).
          - string
          - number, double
          - FilterValueString[] — FilterValueArrayString represents an array of strings.
          - FilterValueNumber[] — FilterValueArrayNumber represents an array of numbers.
        - `$ne` union — FilterValue represents a value that can be used in a filter (string, float, string array or float array).
          - string
          - number, double
          - FilterValueString[] — FilterValueArrayString represents an array of strings.
          - FilterValueNumber[] — FilterValueArrayNumber represents an array of numbers.
        - `$nin` union — FilterValue represents a value that can be used in a filter (string, float, string array or float array).
          - string
          - number, double
          - FilterValueString[] — FilterValueArrayString represents an array of strings.
          - FilterValueNumber[] — FilterValueArrayNumber represents an array of numbers.
        - `$or` Filter[]
      - `usage` Filter — Filter can be used to express complex queries.
        - `$and` Filter[]
        - `$eq` union — FilterValue represents a value that can be used in a filter (string, float, string array or float array).
          - string
          - number, double
          - FilterValueString[] — FilterValueArrayString represents an array of strings.
          - FilterValueNumber[] — FilterValueArrayNumber represents an array of numbers.
        - `$gt` union — FilterValue represents a value that can be used in a filter (string, float, string array or float array).
          - string
          - number, double
          - FilterValueString[] — FilterValueArrayString represents an array of strings.
          - FilterValueNumber[] — FilterValueArrayNumber represents an array of numbers.
        - `$gte` union — FilterValue represents a value that can be used in a filter (string, float, string array or float array).
          - string
          - number, double
          - FilterValueString[] — FilterValueArrayString represents an array of strings.
          - FilterValueNumber[] — FilterValueArrayNumber represents an array of numbers.
        - `$in` union — FilterValue represents a value that can be used in a filter (string, float, string array or float array).
          - string
          - number, double
          - FilterValueString[] — FilterValueArrayString represents an array of strings.
          - FilterValueNumber[] — FilterValueArrayNumber represents an array of numbers.
        - `$lt` union — FilterValue represents a value that can be used in a filter (string, float, string array or float array).
          - string
          - number, double
          - FilterValueString[] — FilterValueArrayString represents an array of strings.
          - FilterValueNumber[] — FilterValueArrayNumber represents an array of numbers.
        - `$lte` union — FilterValue represents a value that can be used in a filter (string, float, string array or float array).
          - string
          - number, double
          - FilterValueString[] — FilterValueArrayString represents an array of strings.
          - FilterValueNumber[] — FilterValueArrayNumber represents an array of numbers.
        - `$ne` union — FilterValue represents a value that can be used in a filter (string, float, string array or float array).
          - string
          - number, double
          - FilterValueString[] — FilterValueArrayString represents an array of strings.
          - FilterValueNumber[] — FilterValueArrayNumber represents an array of numbers.
        - `$nin` union — FilterValue represents a value that can be used in a filter (string, float, string array or float array).
          - string
          - number, double
          - FilterValueString[] — FilterValueArrayString represents an array of strings.
          - FilterValueNumber[] — FilterValueArrayNumber represents an array of numbers.
        - `$or` Filter[]
    - `id` string, required — The ID of the report.
    - `meter` Meter, required — A meter is a configuration that defines how to match and aggregate events.
      - `aggregation` 'SUM' | 'COUNT' | 'UNIQUE_COUNT' | 'AVG' | 'MIN' | 'MAX' | 'LATEST', required — The aggregation type to use for the meter.
      - `annotations` Annotations — Set of key-value pairs managed by the system. Cannot be modified by user.
      - `createdAt` string, date-time, required — Timestamp of when the resource was created.
      - `deletedAt` string, date-time — Timestamp of when the resource was permanently deleted.
      - `description` string — Optional description of the resource. Maximum 1024 characters.
      - `eventFrom` string, date-time — The date since the meter should include events. Useful to skip old events. If not specified, all historical events are included.
      - `eventType` string, required — The event type to aggregate.
      - `groupBy` object — Named JSONPath expressions to extract the group by values from the event data. Keys must be unique and consist only alphanumeric and underscore characters.
      - `id` string, required — A unique identifier for the resource.
      - `metadata` Metadata — Set of key-value pairs. Metadata can be used to store additional information about a resource.
      - `name` string — Human-readable name for the resource. Between 1 and 256 characters. Defaults to the slug if not specified.
      - `slug` string, required — A unique, human-readable identifier for the meter. Must consist only alphanumeric and underscore characters.
      - `updatedAt` string, date-time, required — Timestamp of when the resource was last updated.
      - `valueProperty` string — JSONPath expression to extract the value from the ingested event's data property. The ingested value for SUM, AVG, MIN, and MAX aggregations is a number or a string that can be parsed to a number. For UNIQUE_COUNT aggregation, the ingested value must be a string. For COUNT aggregation the valueProperty is ignored.
    - `meterGroupByFilters` object — Optional meter group by filters. Useful if the meter scope is broader than what report tracks.
    - `query` ReportQuery, required — Query to apply on the usage data.
      - `groupBy` string[] — Optional group by fields.
      - `period` 'MINUTE' | 'HOUR' | 'DAY' | 'MONTH', required — Query period used by reporting.
      - `windowSize` 'MINUTE' | 'HOUR' | 'DAY' | 'MONTH' — Aggregation window size.
    - `schedule` ReportSchedule, required — The schedule of the report. Defines how frequently the report should run.
      - `interval` '1m' | '1h' | '24h', required — The interval of the report.
      - `startAt` string, date-time, required — The start time of the report. Set it to now if you want sync to start immediatly.
    - `slug` string, required — The unique slug of the report. Must be unique within the organization.
    - `type` 'webhook', required — The type of the report.

## Other responses

- `400` — The server cannot or will not process the request due to something that is perceived to be a client error (e.g., malformed request syntax, invalid request message framing, or deceptive request routing).
- `401` — The request has not been applied because it lacks valid authentication credentials for the target resource.
- `403` — The server understood the request but refuses to authorize it.
- `412` — One or more conditions given in the request header fields evaluated to false when tested on the server.
- `500` — The server encountered an unexpected condition that prevented it from fulfilling the request.
- `503` — The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay.
- `default` — An unexpected error response.

---

[API](https://skmtc.dev/openmeter/apis/openmeter-cloud-api.md) · [All operations](https://skmtc.dev/openmeter/apis/openmeter-cloud-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/openmeter/openmeter-cloud-api/revisions/c9c0ec9cffe9/schema)
