PUT /admin/purge/ API

The PUT /admin/purge/ API endpoint allows you to remove a list of deleted entities from Atlas.

To purge deleted entities, use the PUT method on the /admin/purge/ endpoint with a payload containing a JSON list of Atlas GUIDs:
PUT /api/atlas/admin/purge/ 
This call takes a list of GUIDs for Atlas entities; each entity in the list is purged from Atlas if the entity is already marked as deleted. This call requires a user account with Atlas administrator privileges. The successfully purged entities are listed in the audit log, referenced by their GUIDs.

The parameters include:

Parameter Format / Value Description
body JSON list:

["GUID", "GUID", ...]

One or more Atlas entity GUIDs for deleted entities that you want to purge from Atlas. If the list includes an entity that is not already marked as deleted, the entity will be ignored and Atlas will process the remaining entities in the list.

Entity GUIDs appear on the URL for the entity detail page and in the metadata returned from an API search call such as GET /search/dsl or POST /search/basic.

header: content type application/json Atlas expects the payload of the call to be in JSON format.
header: authorization Per your environment Atlas requires authentication, which you can provide with username and password as a parameter in a cURL call (-u username:password) or using cookies or other generated methods to pass appropriate credentials. The user must have Atlas administrator privileges.

The response from a PUT /admin/purge call is a JSON-formatted list of the entities that were successfully purged. The content includes the GUID and qualified name of each entity, its status ("DELETED"), and lists of classifications, terms, labels, and related entities that were associated with the purged entity. If no entities are purged, the response is an empty list {}.

Note that the number of entities provided in the request may not match the number of entities included in the response. When Atlas purges an entity, it also purges all additional entities dependent on the indicated entity. Thus if you request to purge a single Hive table, the response includes an entry for the Hive table and entries for each of the table's columns, its DDL, and its storage description.

For example, a cURL command to purge two Hive tables might look like the following, where the authorization is passed in the call as an encrypted string:
curl -X PUT 'http://host3.acme.com:31000/api/atlas/admin/purge/' \
-H 'Content-Type: application/json' \
-H 'Authorization: Basic YWRtaW46YWRtaW4=' \
-d '["b9355eab-bbf5-4cd6-b711-12f85a3e9d01", "9fed31f5-0a27-40dc-ba97-96d153fc297b"]'
The response would include each table, its DDL, its storage description, and all its columns:
{
    "mutatedEntities": {
        "PURGE": [
            {
                "typeName": "hive_table_ddl",
                "attributes": {
                    "qualifiedName": "default.2020springcampaign@cm:1578968155000"
                },
                "guid": "6cfb43ba-d6ec-4628-b98c-da13a7fe35a0",
                "status": "DELETED",
                "displayText": "default.2020springcampaign@cm:1578968155000",
                "classificationNames": [],
                "meaningNames": [],
                "meanings": [],
                "isIncomplete": false,
                "labels": []
            },
            {
                "typeName": "hive_table",
                "attributes": {
                    "owner": "admin",
                    "createTime": 1578968155000,
                    "qualifiedName": "default.2020springcampaign@cm",
                    "name": "2020springcampaign"
                },
                "guid": "9fed31f5-0a27-40dc-ba97-96d153fc297b",
                "status": "DELETED",
                "displayText": "2020springcampaign",
                "classificationNames": [
                    "Fact"
                ],
                "meaningNames": [],
                "meanings": [],
                "isIncomplete": false,
                "labels": [
                    "ReviewComplete"
                ]
            },
            {
                "typeName": "hive_storagedesc",
                "attributes": {
                    "qualifiedName": "default.2020springcampaign@cm_storage"
                },
                "guid": "ed59c502-64d9-485a-b5b7-fd2f3d41e2b8",
                "status": "DELETED",
                "displayText": "default.2020springcampaign@cm_storage",
                "classificationNames": [],
                "meaningNames": [],
                "meanings": [],
                "isIncomplete": false,
                "labels": []
            },
            {
                "typeName": "hive_column",
                "attributes": {
                    "owner": "admin",
                    "qualifiedName": "default.2020springcampaign.id@cm",
                    "name": "id"
                },
                "guid": "1f8c8d86-f9d8-4810-889b-0dbfee2c73ff",
                "status": "DELETED",
                "displayText": "id",
                "classificationNames": [],
                "meaningNames": [],
                "meanings": [],
                "isIncomplete": false,
                "labels": []
            },
            {
                "typeName": "hive_column",
                "attributes": {
                    "owner": "admin",
                    "qualifiedName": "default.2020springcampaign.name@cm",
                    "name": "name"
                },
                "guid": "72d689d2-6fae-4de3-bb75-27ab764e1083",
                "status": "DELETED",
                "displayText": "name",
                "classificationNames": [],
                "meaningNames": [],
                "meanings": [],
                "isIncomplete": false,
                "labels": []
            },
            {
                "typeName": "hive_table_ddl",
                "attributes": {
                    "qualifiedName": "default.2019wintercampaign@cm:1488968156001"
                },
                "guid": "6cfb43ba-d6ec-4628-c98c-bc13a7fe3982",
                "status": "DELETED",
                "displayText": "default.2019wintercampaign@cm:1488968156001",
                "classificationNames": [],
                "meaningNames": [],
                "meanings": [],
                "isIncomplete": false,
                "labels": []
            },
            {
                "typeName": "hive_table",
                "attributes": {
                    "owner": "admin",
                    "createTime": 1488968156001,
                    "qualifiedName": "default.2019wintercampaign@cm",
                    "name": "2019wintercampaign"
                },
                "guid": "9fed31f5-0a27-40dc-ba98-bc13a7fe3983",
                "status": "DELETED",
                "displayText": "2019wintercampaign",
                "classificationNames": [
                    "Fact"
                ],
                "meaningNames": [],
                "meanings": [],
                "isIncomplete": false,
                "labels": [
                    "ReviewComplete"
                ]
            }, <additional entries for Hive table columns, ddl, storage description>
        ]
    }
}