---
title: "POST /v1/assuredworkloads:archiveResourceEvents"
method: POST
path: "/v1/assuredworkloads:archiveResourceEvents"
tags: ["assuredworkloads"]
---

# POST /v1/assuredworkloads:archiveResourceEvents

`POST /v1/assuredworkloads:archiveResourceEvents`

Finds orphan ResourceEvents matching the criteria and moves them to the ArchivedResourceEvents table.

## Request body

- GoogleCloudAssuredworkloadsV1ArchiveResourceEventsRequest — Request for archiving resource events.
  - `batchSize` integer — Required. The number of events to process in a single transaction batch.
  - `eventCutoffTime` string, google-datetime — Required. Only events with EventTime earlier than this cutoff will be archived.
  - `maxEventsMove` integer — Required. The maximum total number of events to move in this request.
  - `archiveTime` string, google-datetime — Optional. Time to set as ArchiveTime in the archive table. If not provided, the current time is used.
  - `region` string — Required. The region of the workload(s) whose events should be archived. This is used to filter workloads based on AssurantWorkloadData.region.
  - `organizationId` string, int64 — Required. The organization ID for which to archive events.

## Response `200`

Successful response

---

[API](https://skmtc.dev/google/apis/assuredworkloads.md) · [All operations](https://skmtc.dev/google/apis/assuredworkloads/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/google/assuredworkloads/revisions/bff5f680b449/schema)
