---
title: "POST /v1/{+parent}/products:purge"
method: POST
path: "/v1/{+parent}/products:purge"
tags: ["projects"]
---

# POST /v1/{+parent}/products:purge

`POST /v1/{+parent}/products:purge`

Asynchronous API to delete all Products in a ProductSet or all Products that are in no ProductSet. If a Product is a member of the specified ProductSet in addition to other ProductSets, the Product will still be deleted. It is recommended to not delete the specified ProductSet until after this operation has completed. It is also recommended to not add any of the Products involved in the batch delete to a new ProductSet while this operation is running because those Products may still end up deleted. It's not possible to undo the PurgeProducts operation. Therefore, it is recommended to keep the csv files used in ImportProductSets (if that was how you originally built the Product Set) before starting PurgeProducts, in case you need to re-import the data after deletion. If the plan is to purge all of the Products from a ProductSet and then re-use the empty ProductSet to re-import new Products into the empty ProductSet, you must wait until the PurgeProducts operation has finished for that ProductSet. The google.longrunning.Operation API can be used to keep track of the progress and results of the request. `Operation.metadata` contains `BatchOperationMetadata`. (progress)

## Path parameters

- `parent` string, required

## Request body

- PurgeProductsRequest — Request message for the `PurgeProducts` method.
  - `force` boolean — The default value is false. Override this value to true to actually perform the purge.
  - `productSetPurgeConfig` ProductSetPurgeConfig — Config to control which ProductSet contains the Products to be deleted.
    - `productSetId` string — The ProductSet that contains the Products to delete. If a Product is a member of product_set_id in addition to other ProductSets, the Product will still be deleted.
  - `deleteOrphanProducts` boolean — If delete_orphan_products is true, all Products that are not in any ProductSet will be deleted.

## Response `200`

Successful response

---

[API](https://skmtc.net/google/apis/vision.md) · [All operations](https://skmtc.net/google/apis/vision/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/google/vision/versions/d5becca397b9/schema)
