REST API - doPurgeAudit

The table summarizes the REST API - doPurgeAudit.

Request

Format
POST <baseurl>/audit/purge/start
Query parameters
  • batchsize=string (optional, default=100): The number of process instances to be deleted before the transaction is committed.
  • runinbackground=boolean (optional, default=true): If this option is set to true, the purge takes place in background and the service returns immediately. If false, the service waits for the purge to complete before returning.
  • threshold=datetime (optional, default=none): The threshold date before which process instances must have been completed, cancelled, or failed if they are to be eligible to be purged. If this parameter is not specified, the data for all completed, cancelled, and failed process instances will be deleted.

    The date and time must be in the format defined in Using DateTime Literals. For example:

    2013-02-10T11:34:22.222Z
  • advancedoptions=string (not used)
  • requireallextendeddata=boolean (optional, default=false): Displays all the extended data options for the operation.
  • requiredextendeddata=enumeration (optional): Specifies one or more specific items of extended data (separated by semi-colons) to display. For possible values see PurgeStatus Object.
Body processTemplates element (mandatory): This is an array of process templates. You can specify the process templates to be considered for purging by specifying either their IDs or their names. You can combine both forms of template identification in the same request.

With either method of identification, each repetition specifies a process template. All data relating to eligible process instances of a specified template is deleted. Which instances are eligible for deletion depends on the setting of threshold.

If neither form of template identifier is specified, the operation defaults to all templates.

  • processTemplateIdIdentifier: The process template IDs, corresponding to a unique process template name, module name, and module version, can be obtained from proc_tpl_pk in the ec_pe_status database table or from proc_tpl_name in the ec_proc_template table.
  • processTemplateIdName: The name of the process template. If the name is unique throughout the system, it is sufficient identification by itself. If not, you can specify the moduleName and the version of the template to complete a unique identification. You can obtain naming information by calling listProcessTemplates .

Note that if a process includes sub-processes, you must specify only the main process. Specifying a sub-process name or template ID, either alone or together with the main process, may cause an error.

Response

JSON Returns a JSON representation of the content of a PurgeStatus element.
XML Returns the content of a PurgeStatus element (from the EventCollectorManagementService schema).

Example

Request
POST <baseurl>/audit/purge/start?requireallextendeddata=true
Request body
<ProcessTemplates>
  <processTemplateNameIdentifier>
    <processTemplateName>SystemActionTestProcess</processTemplateName>
    <version>1.0.0.20150714174226023</version>
  </processTemplateNameIdentifier>
</ProcessTemplates>
Response
<?xml version="1.0" encoding="UTF-8"?>
<xml-fragment>
  <statusMessage>50 instances matched! Purge operation [EC-PURGE-1373901337493] started successfully! Check BPM Logs for progress!</statusMessage>
  <status>PURGE_IN_PROGRESS</status>
</xml-fragment>