Oracle Web Services On Demand Guide > Web Services On Demand API Calls > Service API Calls >

AuditTrailQueryPage


Returns records from the master audit trail.

Usage

You use the AuditTrailQueryPage method to execute a query against the master audit trail, and return a subset of the records that match the search criteria set by the method arguments.

The following are attributes of the <ListOfAuditTrail> element that you can specify:

  • pagesize. Determines the maximum number of records displayed on a page following a query.
  • startrownum. Indicates the row from which the AuditTrailQueryPage method starts to return records.
  • recordcountneeded. Indicates whether a record count for the query is to be returned.

You can also use the searchspec attribute on the AuditTrail element to provide a search specification.

Each of the child elements of <ListOfAuditTrail> can have the following attributes:

  • sortorder. Determines the sort order for the records returned by the query, either ASC for ascending or DESC for descending.
  • sortsequence. An integer value that determines the order of the sort specification.

The following are attributes of the <AuditTrailData> element that can be returned:

  • recordcount. An integer value that indicates the record count.
  • lastpage. A value that indicates whether or not the last value in the query set has been returned.

Arguments

Table 41 describes the arguments taken by the AuditTrailQueryPage method.

Table 41. Arguments Taken by the AuditTrailQueryPage Method
Name
Description
Required
Default
I/O

ListOfAuditTrail

The list of audit trail entries queried (input), and after query execution, the list of audit trail entries returned (output).

Yes

Not applicable

Input/Output

NamedSearchSpec

Indicates the search specification for a named list for the audit trail.

No

Not applicable

Input

LOVLanguageMode

The language mode for the audit trail, see The LOVLanguageMode Argument.

No

LIC

Input

ViewMode

Specifies the level of access to records specified in the method call, see The ViewMode Argument.

Yes

Broadest

Input

Return Value of the Call

The following information is returned:

  • Id. The table row ID.
  • SourceType. A value that indicates whether the session was interactive or a Web services session.
  • RecordType. The record type.
  • RecordUpdatedDate. The date when the object was last updated.
  • UserFirstName. The user's first name.
  • UserFullName. The user's full name.
  • UserID. The user's ID.
  • UserLastName. The user's last name.
  • UserSignInID. The user's login ID.
  • FieldName. The field modified in the object.
  • RecordName. The name of the record.
  • Operation. The type of change that was performed, for example, create, delete, or modify.
  • SourceIPAddress. The IP address of the computer on which the change took place.

    NOTE:  This value is returned only when this information is available.

  • NewFieldValue. The new value of the field.
  • OldFieldValue. The previous value of the field.

There are also various elements with names beginning with Created, Modified, and Updated that give information about who performed the create, modify, or update operation on the record.

Sample SOAP Request - AuditTrailQueryPage

The following SOAP request queries the audit trail. It demonstrates the use of the pagesize and startrownum attributes to return a specific number of records starting at a specific row. The searchspec attribute species that only records modified after a certain date and time are to be returned:

<?xml version="1.0" encoding="utf-8" standalone="no"?>

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" xmlns:xsd="http://www.w3.org/2001/XMLSchema">

   <soap:Header>

      <wsse:Security>

         <wsse:UsernameToken>

            <wsse:Username>%%%USERNAME%%%</wsse:Username>

            <wsse:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText">%%%PASSWORD%%%</wsse:Password>

         </wsse:UsernameToken>

      </wsse:Security>

   </soap:Header>

   <soap:Body>

      <AuditTrailQueryPage_Input xmlns="urn:crmondemand/ws/audittrail/">

         <ListOfAuditTrail startrownum="0" pagesize="100" recordcountneeded="true">

            <AuditTrail searchspec="[ModifiedDate] > '2013-06-02T07:52:59Z'">

               <ModifiedDate/>

               <CreatedDate/>

               <ModifiedById/>

               <CreatedById/>

               <ModId/>

               <Id/>

               <SourceType/>

               <RecordType/>

               <RecordUpdatedDate/>

               <UserFirstName/>

               <UserFullName/>

               <UserId/>

               <UserLastName/>

               <UserSignInId/>

               <FieldName/>

               <RecordName/>

               <Operation/>

               <SourceIPAddress/>

               <UpdatedByFirstName/>

               <UpdatedByLastName/>

               <UpdatedByUserSignInId/>

               <UpdatedByAlias/>

               <UpdatedByFullName/>

               <UpdatedByIntegrationId/>

               <UpdatedByExternalSystemId/>

               <UpdatedByEMailAddr/>

               <CreatedByFirstName/>

               <CreatedByLastName/>

               <CreatedByUserSignInId/>

               <CreatedByAlias/>

               <CreatedByFullName/>

               <CreatedByIntegrationId/>

               <CreatedByExternalSystemId/>

               <CreatedByEMailAddr/>

               <CreatedBy/>

               <ModifiedBy/>

               <NewFieldValue/>

               <OldFieldValue/>

            </AuditTrail>

         </ListOfAuditTrail>

      </AuditTrailQueryPage_Input>

   </soap:Body>

</soap:Envelope>

Sample SOAP Response

The following illustrates the SOAP response (most of the <AuditTrail> elements are omitted, as indicated by the ellipses (...)):

<?xml version="1.0" encoding="utf-8"?>

<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">

   <SOAP-ENV:Body>

      <ns:AuditTrailQueryPage_Output>

         <ListOfAuditTrail recordcount="24" lastpage="true">

            <AuditTrail>

               <ModifiedDate>2014-06-02T07:52:59Z</ModifiedDate>

               <CreatedDate>2014-06-02T07:52:59Z</CreatedDate>

               <ModifiedById>1-D5S9Z</ModifiedById>

               <CreatedById>1-D5S9Z</CreatedById>

               <ModId>0</ModId>

               <Id>1QA2-22RN1C</Id>

               <SourceType>UI</SourceType>

               <RecordType>Opportunity</RecordType>

               <RecordUpdatedDate>2014-06-02T07:52:58Z</RecordUpdatedDate>

               <UserFirstName>System</UserFirstName>

               <UserFullName>SystemAdmin</UserFullName>

               <UserId>1-D5S9Z</UserId>

               <UserLastName>Admin</UserLastName>

               <UserSignInId>ADMIN@CUSTCOMP2.COM</UserSignInId>

               <FieldName>Sales Stage - Translation</FieldName>

               <RecordName>Testing</RecordName>

               <Operation>Modify</Operation>

               <SourceIPAddress>12.168.23.232</SourceIPAddress>

               <UpdatedByFirstName>System</UpdatedByFirstName>

               <UpdatedByLastName>Admin</UpdatedByLastName>

               <UpdatedByUserSignInId>ADMIN@CUSTCOMP2.COM</UpdatedByUserSignInId>

               <UpdatedByAlias>System Admin Alias (admin@custcomp2.com)</UpdatedByAlias>

               <UpdatedByFullName>System Admin</UpdatedByFullName>

               <UpdatedByIntegrationId>1-D5S9W</UpdatedByIntegrationId>

               <UpdatedByExternalSystemId/>

               <UpdatedByEMailAddr>wiley.coyote@acme.com</UpdatedByEMailAddr>

               <CreatedByFirstName>System</CreatedByFirstName>

               <CreatedByLastName>Admin</CreatedByLastName>

               <CreatedByUserSignInId>ADMIN@CUSTCOMP2.COM</CreatedByUserSignInId>

               <CreatedByAlias>System Admin Alias (admin@custcomp2.com)</CreatedByAlias>

               <CreatedByFullName>System Admin</CreatedByFullName>

               <CreatedByIntegrationId>1-D5S9W</CreatedByIntegrationId>

               <CreatedByExternalSystemId/>

               <CreatedByEMailAddr>wiley.coyote@acme.com</CreatedByEMailAddr>

               <CreatedBy>System Admin, 06/02/2014 07:52:59</CreatedBy>

               <ModifiedBy>System Admin, 06/02/2014 07:52:59</ModifiedBy>

               <NewFieldValue>Short List</NewFieldValue>

               <OldFieldValue>Qualified Lead</OldFieldValue>

            </AuditTrail>

...

...

            <AuditTrail>

               <ModifiedDate>2014-06-02T08:06:10Z</ModifiedDate>

               <CreatedDate>2014-06-02T08:06:10Z</CreatedDate>

               <ModifiedById>1-D5S9Z</ModifiedById>

               <CreatedById>1-D5S9Z</CreatedById>

               <ModId>0</ModId>

               <Id>1QA2-22RN1L</Id>

               <SourceType>UI</SourceType>

               <RecordType>x</RecordType>

               <RecordUpdatedDate>2014-06-02T08:06:10Z</RecordUpdatedDate>

               <UserFirstName>System</UserFirstName>

               <UserFullName>System Admin</UserFullName>

               <UserId>1-D5S9Z</UserId>

               <UserLastName>Admin</UserLastName>

               <UserSignInId>ADMIN@CUSTCOMP2.COM</UserSignInId>

               <FieldName>Account/Audit Trail Item 2</FieldName>

               <RecordName>Administrator Owner Access Profile</RecordName>

               <Operation>Modify</Operation>

               <SourceIPAddress>12.168.23.232</SourceIPAddress>

               <UpdatedByFirstName>System</UpdatedByFirstName>

               <UpdatedByLastName>Admin</UpdatedByLastName>

               <UpdatedByUserSignInId>ADMIN@CUSTCOMP2.COM</UpdatedByUserSignInId>

               <UpdatedByAlias>System Admin Alias (admin@custcomp2.com)</UpdatedByAlias>

               <UpdatedByFullName>System Admin</UpdatedByFullName>

               <UpdatedByIntegrationId>1-D5S9W</UpdatedByIntegrationId>

               <UpdatedByExternalSystemId/>

               <UpdatedByEMailAddr>wiley.coyote@acme.com</UpdatedByEMailAddr>

               <CreatedByFirstName>System</CreatedByFirstName>

               <CreatedByLastName>Admin</CreatedByLastName>

               <CreatedByUserSignInId>ADMIN@CUSTCOMP2.COM</CreatedByUserSignInId>

               <CreatedByAlias>System Admin Alias (admin@custcomp2.com)</CreatedByAlias>

               <CreatedByFullName>System Admin</CreatedByFullName>

               <CreatedByIntegrationId>1-D5S9W</CreatedByIntegrationId>

               <CreatedByExternalSystemId/>

               <CreatedByEMailAddr>wiley.coyote@acme.com</CreatedByEMailAddr>

               <CreatedBy>System Admin, 06/02/2014 08:06:10</CreatedBy>

               <ModifiedBy>System Admin, 06/02/2014 08:06:10</ModifiedBy>

               <NewFieldValue>1</NewFieldValue>

               <OldFieldValue>-1</OldFieldValue>

            </AuditTrail>

         </ListOfAuditTrail>

      </ns:AuditTrailQueryPage_Output>

   </SOAP-ENV:Body>

</SOAP-ENV:Envelope>

Oracle Web Services On Demand Guide, Version 25.0 (Oracle CRM On Demand Release 37) Copyright © 2018, Oracle and/or its affiliates. All rights reserved. Legal Notices.