# Class: AuditService

## tibco.objectapi.service.AuditService

#### new AuditService()

### Methods

#### checkAutoArchive(request, callback)

Checks whether an archive is currently running. It returns the status of the last archive that ran. If the archive is currently running, it also returns the status of the archive that is currently running.

##### Parameters:

Name | Type | Description
--- | --- | ---
`request` | tibco.objectapi.service.request.CheckAutoArchiveRequest | A request set with data for this service call.
`callback` | tibco.objectapi.service.Callback | A callback to handle the service response of type `CheckAutoArchiveResponseObject`.

#### checkPurge(request, callback)

Checks the status of a purge started with the doPurge function.

##### Parameters:

Name | Type | Description
--- | --- | ---
`request` | tibco.objectapi.service.request.CheckPurgeRequest | A request set with data for this service call.
`callback` | tibco.objectapi.service.Callback | A callback to handle the service response of type `PurgeStatus`.

#### doPurge(request, callback)

Purges data related to completed, cancelled, and failed process instances from the Event Collector database tables.

##### Parameters:

Name | Type | Description
--- | --- | ---
`request` | tibco.objectapi.service.request.DoPurgeRequest | A request set with data for this service call.
`callback` | tibco.objectapi.service.Callback | A callback to handle the service response of type `PurgeStatus`.

#### event(request, callback)

Submits an event to the Event Collector database.

##### Parameters:

Name | Type | Description
--- | --- | ---
`request` | tibco.objectapi.service.request.EventRequest | A request set with data for this service call.
`callback` | tibco.objectapi.service.Callback | A callback to handle the service response of type `NoContentResponse`.

#### executeAction(request, callback)

Executes a Statistics/Audit action.

##### Parameters:

Name | Type | Description
--- | --- | ---
`request` | tibco.objectapi.service.request.ExecuteActionRequest | A request set with data for this service call.
`callback` | tibco.objectapi.service.Callback | A callback to handle the service response of type `ExecuteActionResponseObject`.

#### executeQuery(request, callback)

Executes the specified query against the Event Collector database tables.

##### Parameters:

Name | Type | Description
--- | --- | ---
`request` | tibco.objectapi.service.request.ExecuteQueryAuditRequest | A request set with data for this service call.
`callback` | tibco.objectapi.service.Callback | A callback to handle the service response of type `ExecuteQueryResponseType`.

#### executeRegisteredQuery(request, callback)

Executes a query that has been previously registered using the registerQuery function.

##### Parameters:

Name | Type | Description
--- | --- | ---
`request` | tibco.objectapi.service.request.ExecuteRegisteredQueryRequest | A request set with data for this service call.
`callback` | tibco.objectapi.service.Callback | A callback to handle the service response of type `GenericResult`.

#### getAttributes(request, callback)

Lists all attributes in the Event Collector database tables that are registered for a specific component.

##### Parameters:

Name | Type | Description
--- | --- | ---
`request` | tibco.objectapi.service.request.GetAttributesRequest | A request set with data for this service call.
`callback` | tibco.objectapi.service.Callback | A callback to handle the service response of type `AttributeDefinitions`.

#### getCaseReport(request, callback)

Generates an audit trail for the given case class.

##### Parameters:

Name | Type | Description
--- | --- | ---
`request` | tibco.objectapi.service.request.GetCaseReportRequest | A request set with data for this service call.
`callback` | tibco.objectapi.service.Callback | A callback to handle the service response of type `CaseAudit`.

#### getChart(request, callback)

Requests Chart information

##### Parameters:

Name | Type | Description
--- | --- | ---
`request` | tibco.objectapi.service.request.GetChartRequest | A request set with data for this service call.
`callback` | tibco.objectapi.service.Callback | A callback to handle the service response of type `ChartResult`.

#### getChartData(request, callback)

Requests Chart data information

##### Parameters:

Name | Type | Description
--- | --- | ---
`request` | tibco.objectapi.service.request.GetChartDataRequest | A request set with data for this service call.
`callback` | tibco.objectapi.service.Callback | A callback to handle the service response of type `ChartDataResult`.

#### getComponents(request, callback)

Lists the components that are registered on the system.

##### Parameters:

Name | Type | Description
--- | --- | ---
`request` | tibco.objectapi.service.request.GetComponentsRequest | A request set with data for this service call.
`callback` | tibco.objectapi.service.Callback | A callback to handle the service response of type `GetComponentsResponseObject`.

#### getConfiguration(request, callback)

Obtains configuration data from EC.

##### Parameters:

Name | Type | Description
--- | --- | ---
`request` | tibco.objectapi.service.request.GetConfigurationRequest | A request set with data for this service call.
`callback` | tibco.objectapi.service.Callback | A callback to handle the service response of type `GetConfigurationResponseObject`.

#### getProcessInstanceReport(request, callback)

Generates an audit trail report for a given process instance.

##### Parameters:

Name | Type | Description
--- | --- | ---
`request` | tibco.objectapi.service.request.GetProcessInstanceReportRequest | A request set with data for this service call.
`callback` | tibco.objectapi.service.Callback | A callback to handle the service response of type `ProcessInstanceAudit`.

#### getSearchCaseReport(request, callback)

Generates an audit trail for the given case data.

##### Parameters:

Name | Type | Description
--- | --- | ---
`request` | tibco.objectapi.service.request.GetSearchCaseReportRequest | A request set with data for this service call.
`callback` | tibco.objectapi.service.Callback | A callback to handle the service response of type `CaseAudit`.

#### getWorkItemReport(request, callback)

Generates an audit trail report for a given work item.

##### Parameters:

Name | Type | Description
--- | --- | ---
`request` | tibco.objectapi.service.request.GetWorkItemReportRequest | A request set with data for this service call.
`callback` | tibco.objectapi.service.Callback | A callback to handle the service response of type `WorkItemAudit`.

#### isQueryRegistered(request, callback)

Tests whether a query is registered with Event Collector. (This can be useful for determining whether a frequently used query tag is already present on the system.)

##### Parameters:

Name | Type | Description
--- | --- | ---
`request` | tibco.objectapi.service.request.IsQueryRegisteredRequest | A request set with data for this service call.
`callback` | tibco.objectapi.service.Callback | A callback to handle the service response of type `BooleanResponse`.

#### lookupQueryByTag(request, callback)

Lists the details for a particular query (identified by its tag). This operation can be used to obtain the GUID for a registered query.

##### Parameters:

Name | Type | Description
--- | --- | ---
`request` | tibco.objectapi.service.request.LookupQueryByTagRequest | A request set with data for this service call.
`callback` | tibco.objectapi.service.Callback | A callback to handle the service response of type `LookupQueryByTagResponseObject`.

#### registerAttributes(request, callback)

Registers attributes with the Event Collector database.

##### Parameters:

Name | Type | Description
--- | --- | ---
`request` | tibco.objectapi.service.request.RegisterAttributesRequest | A request set with data for this service call.
`callback` | tibco.objectapi.service.Callback | A callback to handle the service response of type `RegisterAttributesResponseObject`.

#### registerComponent(request, callback)

Registers a component with the Event Collector database.

##### Parameters:

Name | Type | Description
--- | --- | ---
`request` | tibco.objectapi.service.request.RegisterComponentRequest | A request set with data for this service call.
`callback` | tibco.objectapi.service.Callback | A callback to handle the service response of type `RegisterComponentResponseObject`.

#### registerEnvironment(request, callback)

Registers an environment.

##### Parameters:

Name | Type | Description
--- | --- | ---
`request` | tibco.objectapi.service.request.RegisterEnvironmentRequest | A request set with data for this service call.
`callback` | tibco.objectapi.service.Callback | A callback to handle the service response of type `RegisterEnvironmentResponseObject`.

#### registerQuery(request, callback)

Registers a query with Event Collector, so that it can be subsequently executed using the executeRegisteredQuery function.

##### Parameters:

Name | Type | Description
--- | --- | ---
`request` | tibco.objectapi.service.request.RegisterQueryRequest | A request set with data for this service call.
`callback` | tibco.objectapi.service.Callback | A callback to handle the service response of type `RegisterQueryResponseObject`.

#### setConfiguration(request, callback)

Sets configuration data from EC.

##### Parameters:

Name | Type | Description
--- | --- | ---
`request` | tibco.objectapi.service.request.SetConfigurationRequest | A request set with data for this service call.
`callback` | tibco.objectapi.service.Callback | A callback to handle the service response of type `SetConfigurationResponseObject`.

#### stopAutoArchive(request, callback)

Stops an archive operation that is currently running. The archive operation may not be able to stop immediately, but will stop as soon as possible.

##### Parameters:

Name | Type | Description
--- | --- | ---
`request` | tibco.objectapi.service.request.StopAutoArchiveRequest | A request set with data for this service call.
`callback` | tibco.objectapi.service.Callback | A callback to handle the service response of type `NoContentResponse`.

#### stopPurge(request, callback)

Stops a purge started with the doPurge function.

##### Parameters:

Name | Type | Description
--- | --- | ---
`request` | tibco.objectapi.service.request.StopPurgeRequest | A request set with data for this service call.
`callback` | tibco.objectapi.service.Callback | A callback to handle the service response of type `PurgeStatus`.

#### triggerAutoArchive(request, callback)

Starts an archive, if it is not currently running. If the archive overlaps the time that the next archive is scheduled to run, the archive will not run and the next archive will take place at the next scheduled time.

##### Parameters:

Name | Type | Description
--- | --- | ---
`request` | tibco.objectapi.service.request.TriggerAutoArchiveRequest | A request set with data for this service call.
`callback` | tibco.objectapi.service.Callback | A callback to handle the service response of type `NoContentResponse`.

#### unregisterQuery(request, callback)

Unregisters a previously registered query.

##### Parameters:

Name | Type | Description
--- | --- | ---
`request` | tibco.objectapi.service.request.UnregisterQueryRequest | A request set with data for this service call.
`callback` | tibco.objectapi.service.Callback | A callback to handle the service response of type `NoContentResponse`.