How Can We Help?
Pure API: Bulk Delete using PostmanPure API: Bulk Delete using Postman
Introduction
Using tools like Postman, the Bulk Delete functionality in Pure API allows users to efficiently remove multiple records or data objects in a single operation. An API testing and development tool, you can send structured requests to the Pure API to delete specific data in bulk. This method is particularly useful for large-scale data cleanup tasks and saving time compared to manual deletions. This guide provides step-by-step instructions for configuring and executing Bulk Delete requests in Postman, including setting up the API endpoint, headers, and payload for successful operations.
Pure API examples disclaimer
Disclaimer
• Proceed at your own risk. Running this script/function means you will not blame the author if this breaks your data.
• This script/function is provided AS IS without warranty of any kind. It is recommended to run them in a test-staging environment to assess the outcome and understand their functionality.
• Elsevier will not support or review any code that uses or is based on these examples. Nor will Elsevier support it in any other way.
• This script has been tested with Pure 5.31 but might not work for future versions of Pure.
• This script is developed for Python version 3.11 and have not been tested with any other version of Python.
• Please make sure any Pure server you run this script against, has been backed up prior to running this script, to insure you can return to a working Pure if things fail
Requirements
- Pure Admin Account
- Valid API Key
- API Documentation
- Postman
Expertise Level
Beginner (Though it is recommended to Test the Pure API: A Beginner's Guide at first).
How to use the testing/development tool
- Download and install Postman:
Visit the Postman website to download and install the Postman application on your computer. Postman is available for Windows, Mac, and Linux operating systems.
- Set up a Collection:
- In Postman, create a new collection.
-
Use a collection-level or environment variable to store the UUIDs of the research output to delete. For example, create a variable called UUID.
- Add a new DELETE request within the collection for each item you want to delete.
- Use a collection-level or environment variable to store the UUIDs of the research output to delete. For example, create a variable called UUID.
- Add the Api-key in the header or params

3. Use variables for UUIDs:
Set the request URL. For example: https://yourPureAdminURL/ws/api/research-outputs{{UUID}}
4. Use Data Files:
The records below are examples of Research outputs marked for deletion. These were imported using the Import from File feature. A sample .bib file is attached for testing purposes. Once you’ve imported the file, it should create five research outputs for deletion. Copy the UUIDs of these records, as you will need them for step 4.a.

-
In the Collection Runner, upload your data file containing the list of IDs (refer to the attached CSV file for an example.).
Retrieve and copy the UUIDs from the records created in the previous step that are intended for deletion.
- Run the collection, and Postman will execute a DELETE request for each UUID listed.
An HTTP 204 API response indicates that the execution was successful. This confirms that you were able to delete the array of UUIDs using Postman.

Updated at February 13, 2025