See all operations
POST: system/events/search?starting_row={starting_row}&number_of_rows={number_of_rows}&sort_field={sort_field}&sort_direction={sort_direction}
Description
Retrieves a filtered list of event logs from across the system
Filter on EVENT TYPE: use the following ints: Error = 1, Warning = 2, Information = 4, SuccessAudit = 8, FailureAudit = 16
(example: [{ "PropertyName": "EventTypeId", "IntValue": 2 }]).
Filter on DATE TIME: specify a datetime - this works with just the date (recommended).
(example: [{"PropertyName": "EventTimeUtc", "StringValue": "2021-03-03"}]).
Filter on CATEGORY example: [{ "PropertyName": "EventCategory", "StringValue": "Application" }].
Filter on CODE example: [{ "PropertyName": "EventCode", "IntValue": 0 }].
Filter on MESSAGE example: [{ "PropertyName": "Message", "StringValue": "Database violation" }].
Filter on DETAILS example: [{ "PropertyName": "Details", "StringValue": "System.Net" }].
How to Execute
To access this REST web service, you need to use the following URL (make sure to replace any parameters (eg {project_id}) with the relevant value (eg 1):
https://api.inflectra.com/Spira/Services/v7_0/RestService.svc/system/events/search?starting_row={starting_row}&number_of_rows={number_of_rows}&sort_field={sort_field}&sort_direction={sort_direction}
Request Parameters
Name
|
Description
|
starting_row
|
The starting row (starting with 1)
|
number_of_rows
|
The number of rows to retrieve (max 500)
|
sort_field
|
The field to sort by (do not sort by EventTypeName - this is for display purposes only)
|
sort_direction
|
The sort direction [ASC|DESC]
|
Request Body
<ArrayOfRemoteFilter xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Inflectra.SpiraTest.Web.Services.v7_0.DataObjects">
<RemoteFilter>
<DateRangeValue i:nil="true" />
<IntValue i:nil="true" />
<MultiValue i:nil="true" />
<PropertyName i:nil="true" />
<StringValue i:nil="true" />
</RemoteFilter>
</ArrayOfRemoteFilter>
[{"PropertyName":null,
"IntValue":null,
"StringValue":null,
"MultiValue":null,
"DateRangeValue":null}]
Return Data
The JSON and XML examples below show the shape of one entry that will be returned. It does not show an example of how that entry will be populated.
<ArrayOfRemoteEvent2 xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Inflectra.SpiraTest.Web.Services.v7_0.DataObjects">
<RemoteEvent2>
<Details i:nil="true" />
<EventCategory i:nil="true" />
<EventCode>0</EventCode>
<EventId i:nil="true" />
<EventTimeUtc>0001-01-01T00:00:00</EventTimeUtc>
<EventTypeId>0</EventTypeId>
<EventTypeName i:nil="true" />
<Message i:nil="true" />
</RemoteEvent2>
</ArrayOfRemoteEvent2>
[{"EventTypeId":0,
"EventTypeName":null,
"Message":null,
"Details":null,
"EventTimeUtc":"0001-01-01T00:00:00",
"EventCategory":null,
"EventCode":0,
"EventId":null}]