Follow

AuditLogitems API call

You can use the AuditLogItems API call to retrieve a filtered list of audit log entries, and to retrieve a particular audit log entry.

Wild Apricot's API is intended for use by developers with technical expertise. If you need assistance, we provide support via email or through our Developers forum.

Retrieving a particular audit log entry

Syntax
GET [baseAPIaddress]/v2.1/Accounts/[accountID]/AuditLogItems/[entryID]
Example:
GET https://api.wildapricot.org/v2.1/Accounts/58293/AuditLogItems/2525543

Retrieving multiple audit log entries

Syntax
GET [baseAPIaddress]/v2.1/Accounts/[accountID]/AuditLogItems/?[filterCriteria]
Example:
GET https://api.wildapricot.org/v2.1/accounts/13703/AuditLogItems/?FilterObjectType=Event&FilterObjectId=51377

Parameters

The following parameters are used within the AuditLogItems API call:

baseAPIaddress
The base address of the API. For more information, see API access options.

accountID
The account identifier that is returned by the Accounts API call.

entryID
The unique identifier for an audit log entry. Audit log entry IDs are returned by the AuditLogItems call.

filterCriteria
The criteria used to filter the search results. This is a required parameter. For details, see Filtering the results (below).

Each API call must include an authentication information that verifies your account and prevents others from accessing your data. For more information, see API access options.

Filtering the results

When retrieving multiple audit log entries, you must include filter criteria. You can filter the results by specifying a filter object, by specifying a start and/or end date, and by specifying a set of audit log entry ids. You can combine multiple filter criteria to further narrow the results.

Specifying a filter object

Specifying a filter object allows you to filter the audit log entries by a particular customer, event, event registration, invoice, payment, refund, or donation.

Syntax
GET [baseAPIaddress]/v2.1/Accounts/[accountID]/AuditLogItems/?FilterObjectType=[objectType]&FilterObjectId=[objectID]

where objectType can be Customer, Event , EventRegistration, Invoice, Payment, Refund, or Donation, and objectID is the unique identifier of the customer, event, event registration, invoice, payment, refund, or donation.

Example:
GET https://api.wildapricot.org/v2.1/accounts/13703/AuditLogItems/?FilterObjectType=Event&FilterObjectId=51377

Specifying a start or end document date

You can filter the audit log entries by specifying a start date and/or an end date (using the DocumentDate field).

Syntax
GET [baseAPIaddress]/v2.1/Accounts/[accountID]/AuditLogItems/?StartDate=[date]&EndDate=[date]

where date is the start or end date of the range (using the yyyy-mm-dd date format).

Example:
GET https://api.wildapricot.org/v2.1/accounts/13703/AuditLogItems/?StartDate=2016-11-01&EndDate=2016-11-30

Specifying a set of audit log entries

You can filter the audit log entries by specifying a set of audit log entries.

Syntax
GET [baseAPIaddress]/v2.1/Accounts/[accountID]/AuditLogItems/?ids=[id1],[id2],[id3]...

where id is the unique identifier of an audit log entry.

Example:
GET https://api.wildapricot.org/v2.1/accounts/13703/AuditLogItems/?ids=2525543,2525544

Paging

Using the $skip and $top parameters, you can retrieve audit log entries in sets or pages. You use the $top parameter to specify the maximum number of entries to be returned, and the $skip parameter to specify the number of entries to skip. The $skip parameter is incremented each call to return the next set or page of entries.

Example

You want to retrieve 50 entries using an application that can only process 20 records at a time. Using the following calls, the application retrieves the first set of 20 entries, then a second set of 20, and finally, the remaining 10 entries.

https://api.wildapricot.org/v2.1/accounts/13703/AuditLogItems/?FilterObjectType=Event&FilterObjectId=51377&$skip=0&$top=20
https://api.wildapricot.org/v2.1/accounts/13703/AuditLogItems/?FilterObjectType=Event&FilterObjectId=51377&$skip=20&$top=20
https://api.wildapricot.org/v2.1/accounts/13703/AuditLogItems/?FilterObjectType=Event&FilterObjectId=51377&$skip=40&$top=20

In this example, the $top specifies the maximum number of entries to retrieve (20), and the $skip parameter is incremented from 0 to 20 to 40 to skip the entries retrieved by the previous call(s).

Response fields

For each audit log entry, the AuditLogItems API call retrieves the following information.

Contact
The ID and URL of the contact the entry applies to.

Email
The email address of the contact.

FirstName
The first name of the contact.

ID
The unique identifier of the audit log entry.

LastName
The last name of the contact.

Organization
The organization of the contact.

Message
The message displayed for this audit log entry.

OrderType
The origin of the audit log entry. Possible values are:

  • Undefined
  • MembershipApplication
  • MembershipRenewal
  • MembershipLevelChange
  • EventRegistration
  • Donation
  • ChangeBillingPlan
  • ChangeBillingInfo

Properties
Key/value array with technical information from payment systems. Only returned when retrieving a single audit log entry.

Severity
The importance of the message. Possible values are:

  • Undefined
  • Verbose
  • Information
  • AttentionRequired
  • Warning
  • Error
  • Critical

Timestamp
The date and time the entry was created.

URL
The URL of the audit log entry.

Sample JSON response

{
"Items": [
{
"Timestamp": "2016-11-21T15:41:41.19+00:00",
"Contact": {
"Id": 29977001,
"Url": "https://api.wildapricot.org/v2/accounts/203011/Contacts/29977001"
},
"FirstName": "Dana",
"LastName": "Dana",
"Email": "dbarrett@test.com",
"Organization": "",
"Message": "Invoice #00003 generated for Member application by Barrett, Dana. Amount $10.00.",
"Severity": "Information",
"OrderType": "MembershipApplication",
"Properties": null,
"Id": 8522488,
"Url": "https://api.wildapricot.org/v2/accounts/203011/AuditLogItems/8522488"
},
{
"Timestamp": "2016-11-21T15:38:54.513+00:00",
"Contact": {
"Id": 29976949,
"Url": "https://api.wildapricot.org/v2/accounts/203011/Contacts/29976949"
},
"FirstName": "Steve",
"LastName": "Steve",
"Email": "steve@wildapricot.com",
"Organization": "Keep It Wild",
"Message": "Invoice #00002 generated for Event registration by Andrews, Steve. Amount $80.00.",
"Severity": "Information",
"OrderType": "EventRegistration",
"Properties": null,
"Id": 8522485,
"Url": "https://api.wildapricot.org/v2/accounts/203011/AuditLogItems/8522485"
}
]
}

Sample XML response

<ApiResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" i:type="AuditItemsListResult" xmlns="http://api.wildapricot.org">
<Items>
<AuditItem>
<Id>8522488</Id>
<Url>https://api.wildapricot.org/v2/accounts/203011/AuditLogItems/8522488</Url>
<Contact>
<Id>29977001</Id>
<Url>https://api.wildapricot.org/v2/accounts/203011/Contacts/29977001</Url>
</Contact>
<Email>dbarrett@test.com</Email>
<FirstName>Dana</FirstName>
<LastName>Dana</LastName>
<Message>Invoice #00003 generated for Member application by Barrett, Dana. Amount $10.00.</Message>
<OrderType>MembershipApplication</OrderType>
<Organization>
</Organization>
<Properties xmlns:d4p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays" i:nil="true" />
<Severity>Information</Severity>
<Timestamp xmlns:d4p1="http://schemas.datacontract.org/2004/07/System">
<d4p1:DateTime>2016-11-21T15:41:41.19Z</d4p1:DateTime>
<d4p1:OffsetMinutes>0</d4p1:OffsetMinutes>
</Timestamp>
</AuditItem>
<AuditItem>
<Id>8522485</Id>
<Url>https://api.wildapricot.org/v2/accounts/203011/AuditLogItems/8522485</Url>
<Contact>
<Id>29976949</Id>
<Url>https://api.wildapricot.org/v2/accounts/203011/Contacts/29976949</Url>
</Contact>
<Email>steve@wildapricot.com</Email>
<FirstName>Steve</FirstName>
<LastName>Steve</LastName>
<Message>Invoice #00002 generated for Event registration by Andrews, Steve. Amount $80.00.</Message>
<OrderType>EventRegistration</OrderType>
<Organization>Keep It Wild</Organization>
<Properties xmlns:d4p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays" i:nil="true" />
<Severity>Information</Severity>
<Timestamp xmlns:d4p1="http://schemas.datacontract.org/2004/07/System">
<d4p1:DateTime>2016-11-21T15:38:54.513Z</d4p1:DateTime>
<d4p1:OffsetMinutes>0</d4p1:OffsetMinutes>
</Timestamp>
</AuditItem>
</Items>
</ApiResponse>

0 Comments

Please sign in to leave a comment.

Search: WildApricot.com 

About results ( seconds) Sort by: 
Sorry, an error occured when performing search.