An audit trail provides information about who made changes to a particular record, and when.


List Audit History

Return information about multiple types of objects based on query parameters. This object is a combination of standard object record audit trail logs, custom object record audit trail logs, user access logs, and smart event log records.

For example, you can return the aggregated history for a given user, return all records of a specific object type, return all records across a defined period of time, and so forth.

<readByQuery>
    <object>AUDITHISTORY</object>
    <fields>*</fields>
    <query></query>
    <pagesize>100</pagesize>
</readByQuery>

readByQuery

Parameters

Name Required Type Description
object Required string Use AUDITHISTORY
fields Optional string Comma-separated list of fields on the object to list. For best performance and predictability, limit the number of fields. To return all fields, omit the element or provide * for the value.
query Required string SQL-like query based on fields on the object. Illegal XML characters must be properly encoded. The following SQL operators are supported: <, >, >=, <=, =, like, not like, in, not in. When doing NULL comparisons: IS NOT NULL, IS NULL. Multiple fields may be matched using the AND and OR operators. Joins are not supported. Single quotes in any operands must be escaped with a backslash - For example, the value Erik's Deli would become 'Erik\'s Deli'.
pagesize Optional integer Custom page size between 1 and 1000 items (Default: 100)

query

Name Required Type Description  
USERID Optional string User ID  
ACCESSTIME Optional string Timestamp in the format MM/DD/YYYY HH:MM:SS  
ACCESSMODE Optional string Use Access, Modified, Created, Deleted, Workflow, Activity, User Action, Login, Platform Def, Platform Action, Add Event, Modify Event,Delete Event, Paid Event, Approve Event, Decline Event.  
SOURCE Optional sting Use api, csv, system, or ui  
OBJECTTYPE Optional string Object type, which can be a record type such as apbill or a type such as ddsjob, userinfo, and so forth.  
OBJECTKEY Optional string Unique name field of the object, which differs based on the object type. For example, on APBILL it is the RECORDNO, and on USERINFO, it is the LOGINID. ``

List Standard Object Record Audit Trail Logs

Return information about field level changes for a given record.

getAuditTrail

List all audit trail logs for the given record.

<getAuditTrail>
    <object>APBILL</object>
    <recordNo>1</recordNo>
</getAuditTrail>

Parameters

Name Required Type Description
object Required string Any valid audited object type.
recordNo Optional integer RECORDNO for the record to get. Required if not using objectKey.
objectKey Optional string Unique name field of the object, which differs based on the object type. For example, on APBILL it is the RECORDNO, and on USERINFO, it is the LOGINID.

Note: If no information is returned, it means the record was created (or last modified) before the audit trail feature was implemented.

Response

auditTrailDetail

The above function returns data structured like this:

<auditTrailDetail>
  <userId>admin</userId> 
  <object>apbill</object>
  <objectKey>204</objectKey> 
  <accessTime>2017-04-01T08:29:34+00:00</accessTime>
  <accessMode>access</accessMode> 
  <workflowAction></workflowAction> 
  <webServer>web49</webServer> 
  <trackingId>WN9k7cCoA5UAAFrQKesAAAAA</trackingId> 
  <ipAddress>xxx.xxx.xxx.xxx</ipAddress> 
  <source>ui</source> 
</auditTrailDetail>

Parameters

Name Type Description
userId string User ID that performed the action
object string Name of the object
objectKey string Unique name field of the object, which differs based on the object type. For example, on APBILL it is the RECORDNO, and on USERINFO, it is the LOGINID.
accessTime datetime Timestamp of the access
accessMode string Access mode (delete, modify, create, access, workflow, activity, user action)
workflowAction string Workflow action (paid, voided, etc.)
webServer string Webserver that performed the action
trackingId string Internal tracking ID
ipAddress string IP address of the end user
source string Source of the action (ui, api, csv, or system)

List Custom Object Record Audit Trail Logs

readByQuery

List audit trail logs for all records on April 19, 2012

<readByQuery>
    <object>ACTIVITYLOG</object>
    <fields>*</fields>
    <query>OBJ_ID &gt; 10000 AND CREATED_AT &gt;= '04/19/2012 12:00:00' AND CREATED_AT &lt; '04/20/2012 12:00:00'</query>
    <pagesize>100</pagesize>
</readByQuery>

Parameters

Name Required Type Description
object Required string Use ACTIVITYLOG
fields Optional string Comma-separated list of fields on the object to list. For best performance and predictability, limit the number of fields. To return all fields, omit the element or provide * for the value.
query Required string SQL-like query based on fields on the object. Illegal XML characters must be properly encoded. The following SQL operators are supported: <, >, >=, <=, =, like, not like, in, not in. When doing NULL comparisons: IS NOT NULL, IS NULL. Multiple fields may be matched using the AND and OR operators. Joins are not supported. Single quotes in any operands must be escaped with a backslash - For example, the value Erik's Deli would become 'Erik\'s Deli'.
pagesize Optional integer Custom page size between 1 and 1000 items (Default: 100)

query

Name Required Type Description
OBJ_ID Required integer ID of the record. All record ID’s begin above 10000. Use the record’s id value or find it on the record view’s System Information tab in the UI.
CREATED_BY Optional integer Created by user record number
CREATEDBYUSER Optional string Created by user ID
CREATED_AT Optional datetime Created at timestamp in format mm/dd/yyyy hh:mm:ss

Response

activitylog

The above function returns data structured like this:

<activitylog>
    <RECORDNO>11034</RECORDNO>
    <OBJ_ID>10049</OBJ_ID>
    <TRAIL_TEXT>Value of &quot;Name&quot; field has been changed from &quot;Test1&quot; to &quot;Test2&quot;.</TRAIL_TEXT>
    <EMAIL_TEXT></EMAIL_TEXT>
    <CREATED_BY>4</CREATED_BY>
    <CREATEDBYUSER>jsmith</CREATEDBYUSER>
    <CREATED_AT>04/19/2012 15:50:05</CREATED_AT>
</activitylog>

Parameters

Name Type Description
RECORDNO integer RECORDNO for the activity log
OBJ_ID integer ID of the record. All record ID’s begin above 10000. Use the record’s id value or find it on the record view’s System Information tab in the UI.
TRAIL_TEXT string Information about the change
EMAIL_TEXT string  
CREATED_BY integer Created by user record number
CREATEDBYUSER string Created by user ID
CREATED_AT datetime Created at timestamp in format mm/dd/yyyy hh:mm:ss

Get Custom Object Record Audit Trail Logs

read

<read>
    <object>ACTIVITYLOG</object>
    <keys>1</keys>
    <fields>*</fields>
</read>

Parameters

Name Required Type Description
object Required string Use ACTIVITYLOG
keys Required string The log RECORDNO to get
fields Optional string Comma-separated list of fields on the object to get. For best performance and predictability, limit the number of fields. To return all fields, omit the element or provide * for the value.

Provide feedback