Query Audit Trail

API Type

REST

HTTP Method

POST

Description

Retrieves all audit trail items.

URL Format (On Premises)

https://[domain]:[port]/AgilePointServer/Workflow/QueryAuditTrail

URL Format (AgilePoint for Azure)

https://[domain]:[port]/AgilePointService/Workflow/QueryAuditTrail

Request Parameters

Name Description
None Not Applicable

Request Body Properties

Name Description

where

Definition:
The where clause of the SQL statement you want to query.
Type
string
Allowed Values:
The where clause of a SQL statement.

JavaScript Code Example

$("#btnQueryAuditTrail").click(function () {
  
  var JSONObject = { where: "CATEGORY = 0 AND PURPOSE='Check-in process definition'"};
  $.ajax({
    url: "https://mydomain:9011/AgilePointServer/Workflow/QueryAuditTrail",
    data: JSON.stringify(JSONObject)
  });
  
});

Java Code Example

public String QueryAuditTrail(String where) {

  String URI = "http://mydomain:9011/AgilePointServer/Workflow/QueryAuditTrail";

  HTTPOperations ops = new HTTPOperations(domain, this.userName,
                       password, appID, locale);

  JSONObject postData = new JSONObject();
  try {
    postData.put("where", where);
    return ops.POSTMethod(URI, postData.toString());
  } catch (JSONException e1) {
    e1.printStackTrace();
  }
  return "";
}

C# Code Example

public string QueryAuditTrail()
  {
    string URL = "http://mydomain:9011/AgilePointServer/Workflow/QueryAuditTrail";

    string jsonRequestdata = "{
      \"sql\":\"CATEGORY = 0 AND PURPOSE='Check-in process definition'\"}";

    HTTPOperations ops = new HTTPOperations(domain, this.userName, 
                         password, appID, locale);

    return ops.POSTMethod(URL, jsonRequestdata);
  }

Output

An array list of WFAuditTrailItem objects.

JSON Response Body Example

[{
  "Category":0,
  "DateOccurred":" \/Date(928149600000)\/",
  "Description":"Core.FailedUncheckOut.Ownership",
  "ObjectID":"",
  "ObjectInfo":"",
  "Performer":"DEMO3\\Administrator",
  "Purpose":"Check-in Process Definition",
  "Status":0
  },
  {
    "Category":0,
    "DateOccurred":" \/Date(928149600000)\/", 
    "Description":"",
    "ObjectID":"A9F16EC0FC424C8189917DB1E6E8FB5C",
    "ObjectInfo":"SingleCompleteMobileView\/1.01",
    "Performer":"DEMO3\\Administrator",
    "Purpose":"Check-in Process Definition",
    "Status":0
}]

Supported Versions

AgilePoint BPMS v5.0 R2 and higher