Bulk Delete Entities
This operation deletes selected profiles in bulk from a tenant.
Request
POST {TenantURL}/entities/_delete
Parameter | Required | Details | |
---|---|---|---|
Headers | Authorization | Yes | The information about authentication access token in format "Bearer <accessToken>". For more information,see topic Authentication API. |
Query | mode | No |
This parameter specifies how entities are removed. Possible parameter values are:
Note: Entities that only have the soft parameter mode enabled are also removed. |
sendMail | No | This parameter specifies if an email must be sent after the task is completed. If the parameter is not specified, an email is not sent. | |
Body | Yes |
The JSON object representing the delete entities request object. The object must have an objects property that represents the entities API request. For more information, see topic Bulk update of attributes. If you specify the entity URIs, then only these entities are processed. |
Response
- numberOfProcessedObjects- number of deleted entities since the task started.
- objectsFailedToDeleteCount- number of objects that were not deleted.
- objectsFailedToDelete- entity IDs that were not deleted (only 100 entity IDs that were not deleted are displayed).
- name- name of the manual task in the following format: "<Hard/Soft> Delete Entities By Type: <entity type URI>".
- started- time when the task started.
- throughput- current speed of the task (number of entities deleted per second).
- tenant- name of the tenant.
- current- current system time.
Examples
POST {TenantURL}/entities/_delete
Headers: Authorization: Bearer c3f28fdd-e082-4f90-8840-9896914eaf41
{
"objects" : {
"filter" : "startsWith(attributes.LastName, 'Ind')",
"excludeList" : [ "entities/i2", "entities/i3" ]
}
}
{
"id": "f3d47316-c249-4e60-9a8a-8e97cc9ca0e3",
...
"parameters": {
"tenantId": "jondoe",
"entityType": "HCP",
"mode": "hard"
},
"currentState": {
"objectsFailedToDelete": [
"1AlLNjPS",
"8C06vMB"
],
"entityType": "configuration/entityTypes/HCP",
"lastExecutionEC2Instances": "i-0e9422455e94d46e1",
"objectsFailedToDeleteCount": 2,
"numberOfFailedToPublishEvents": 0,
"lastHourThroughput": 0.0,
"numberOfProcessedObjects": 126,
"status": "Completed"
},
"throughput": 9.692307,
"duration": "13s"
}