Searching Audit Data (Queries, Data Table)
To search for audit messages, use the QueryAuditHistory service. The service takes the following optional parameters:
Parameter
Description
Default Value
maxItems
The maximum number of results to return from the query. (INTEGER)
500 items
locale
The abbreviation of the language name in which to return the results. (STRING). For example, fr for French or zh_CN for Chinese (China). For a list of locales supported by ThingWorx, refer to Supported Locales below.
The locale of the logged-in user submitting the query
startDate
A date and time. The query begins looking up audit messages, starting from the date and time you specify here. (DATETIME)
Unspecified
endDate
A date and time. The query stops looking up audit messages when the date and time of the messages reaches the date and time you specify here. (DATETIME)
Unspecified
query
A query string (in JSON format).
This parameter is used in several ThingWorx services. For complete details, refer to Query Parameter for Query Services.
N/A
auditCategory
The category of audit messages that you want to search. See the table of audit categories in Audit Categories.
* 
This parameter contains the i18n non-localized category name.
Unspecified
The format for this service follows:

QueryAuditHistory(maxItems [INTEGER], startDate [DATETIME], endDate [DATETIME],
auditCategory [STRING],query[QUERY], locale[STRING])
By default, a query returns 500 rows. To change the number of rows returned by the query, set the maxItems parameter to the desired number of rows. There is an upper limit to the number of rows that you can specify for the maxItems parameter. By default that limit is 5000 rows. A system administrator can change this limit when configuring the Audit Subsystem. System administrators should refer to the topic, Configuration of the Audit Subsystem.
If you want to filter and sort data, you can use the Data Filter widget in a mashup.
Supported Locales
The following figure shows the locales supported by ThingWorx:
Was this helpful?