Experience Platform -Deletion of batch from API | Community
Skip to main content
Level 2
September 26, 2024
Solved

Experience Platform -Deletion of batch from API

  • September 26, 2024
  • 1 reply
  • 1641 views

Hi All 

 

My requirement is every day i will get new file in S3 and need to ingest into my dataset and previous batch need to be deleted.

 

For this i have used below curl's

To get the batch details 

curl -X POST https://platform.adobe.io/data/foundation/import/batches \
-H 'Authorization: Bearer {ACCESS_TOKEN}' \
-H 'Content-Type: application/json' \
-H 'x-gw-ims-org-id: {ORG_ID}' \
-H 'x-api-key: {API_KEY}' \
-H 'x-sandbox-name: {SANDBOX_NAME}'
-d '{
"datasetId": "{DATASET_ID}",
"inputFormat": {
"format": "csv"
}
}'

 

Batch deletion 

curl -X POST https://platform.adobe.io/data/foundation/import/batches/{BATCH_ID}?action=REVERT \
-H 'Authorization: Bearer {ACCESS_TOKEN}' \
-H 'x-gw-ims-org-id: {ORG_ID}' \
-H 'x-api-key: {API_KEY}' \
-H 'x-sandbox-name: {SANDBOX_NAME}'

 

While testing it in postman i am able to view the deletion happen but if i query the dataset i am able to view the records 

Can any one suggest me any alternative way.

 

Thanks in advance.

 

Thanks and regards 

Gowtham Raj

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by Parvesh_Parmar

Hello @gowthamr123 ,

 

If I understood correctly, you followed these steps:

 

1. Deleted the batch using the "Delete a Batch" API, and I assume you received a 200 response.

https://experienceleague.adobe.com/en/docs/experience-platform/ingestion/batch/api-overview#delete-a-batch

 

 

2.Then you ran a query to check the batch status.

 

https://experienceleague.adobe.com/en/docs/experience-platform/ingestion/batch/overview#signal-batch-completion

 

 

At this point, the status should show as "deleted."

 

 

However, if your data is still visible the next day, it seems the batch was deleted, but the data itself was not removed from the Data Lake or Profile Service.

 

From the process you've described, it looks like the ingestion and deletion APIs are only managing the batch in the Batch Data Collection.

 

 

The batch deletion API does not indicate that it will delete data from the Profile Service or Data Lake.

 

If you want to remove data from datasets, I recommend using the Data Hygiene API, which is designed for this purpose:

https://experienceleague.adobe.com/en/docs/experience-platform/data-lifecycle/api/overview

 

 

Kind regards,
Parvesh

 

 

 

 

 

1 reply

Parvesh_Parmar
Community Advisor
Parvesh_ParmarCommunity AdvisorAccepted solution
Community Advisor
September 27, 2024

Hello @gowthamr123 ,

 

If I understood correctly, you followed these steps:

 

1. Deleted the batch using the "Delete a Batch" API, and I assume you received a 200 response.

https://experienceleague.adobe.com/en/docs/experience-platform/ingestion/batch/api-overview#delete-a-batch

 

 

2.Then you ran a query to check the batch status.

 

https://experienceleague.adobe.com/en/docs/experience-platform/ingestion/batch/overview#signal-batch-completion

 

 

At this point, the status should show as "deleted."

 

 

However, if your data is still visible the next day, it seems the batch was deleted, but the data itself was not removed from the Data Lake or Profile Service.

 

From the process you've described, it looks like the ingestion and deletion APIs are only managing the batch in the Batch Data Collection.

 

 

The batch deletion API does not indicate that it will delete data from the Profile Service or Data Lake.

 

If you want to remove data from datasets, I recommend using the Data Hygiene API, which is designed for this purpose:

https://experienceleague.adobe.com/en/docs/experience-platform/data-lifecycle/api/overview

 

 

Kind regards,
Parvesh

 

 

 

 

 

Parvesh Parmar – Adobe Community Advisor https://www.linkedin.com/in/parvesh-parmar/