Description: List The list of events , sorted out by the time of interception (from new to old ones). Method: GET Resource: event Parameters: filter - the filter list of filtration:date[from] — start date in UNIX-timestamp format (can be used separately from date[to])date[to] — finish end date in UNIX-timestamp format (can be used separately from date[from])insert_date[>] — start insert date in UNIX-timestamp format separated by microtime dot, for example, filter[insert_date][>]=1234.123312insert_date[<] — end insert date in UNIX-timestamp separated by microtime dot, for example, filter[insert_date][<]=1234.123312insert_date[>=] — start insert date in UNIX-timestamp format separated by microtime dot, for example filter[insert_date][>=]=1234.123312 (incl.) (API 1.1 and later versions)insert_date[<=] — end insert date in UNIX-timestamp separated by microtime dot, for example filter[insert_date][<=]=1234.123312 (incl.) (API 1.1 and later versions)rule_group_type[] — rule group (API 1.1 and later versions)violation_level[] — violation level (API 1.1 and later versions)verdict[] — verdict (API 1.1 and later versions)
object_type_code[] — type of event (can be several values)protocol[] — protocol (can be several values)user_decision[] — user decision (can be several values)object_size[from] — from what bytes the event should be started to search the minimum number of bytes for event search (can be used separately from object_size[to])object_size[to] — to what bytes the event should be searched forthe maximum number of bytes for event search (can be used separately from object_size[from])protected_catalog_id[] — security objects catalogue ID an ID of the catalog with protected objects (can be several values)tag_id[] — tag ID (can be several values)
with[] - the list of additional entities , to be added to the object (for example, senders, recipients, etc.):
protected_catalogsprotected_documentspoliciessenders_keyssendersrecipients_keysrecipientsworkstations_keysworkstationstagsperimeters (API 1.1 and later versions)attachments (API 1.1 and later versions)files (API 1.1 and later versions) — an undocumented parameter which returns all contents with unempty FILE_NAME field
without[] — additional flags
count — omit calculating totalCount (calculating totalCount may take more than halftime of the query, so we recommend using event/stat method instead)
headers[] — the list of additional fields (titles) of the event (for all fields, you * character). You can get the list with event/header method (API 1.1 and later versions)sort[] — an undocumented field for sorting the result (significantly slows down getting events; for getting the first/last event, we recommend using event/stat method. Possible keys:capture_date — asc (API 1.1 and later vesions) /desc, for example, ?sort[capture_date]=descinsert_date — asc/desc, for example, ?sort[insert_date]=asc (API 1.1 and later versions)
start - from what position the events should be given (a start position for returning events (the default value is 0)limit - how many events to be given return (the default value is 100, but not cannot be more than 1000)
Response: List The list of events, sorted out by the time of interception (from new to old ones). ExampleExamples: | Блок кода |
|---|
| title | Get the first 100 events of January 2015 |
|---|
| GET /xapi/event?filter[date][from]=1420059600&filter[date][to]=1422737999&start=0&limit=100
X-API-Version: 1
X-API-CompanyId: iw
X-API-ImporterName: aplab
X-API-Auth-Token: gla20dos1pcdbr69caxz |
| Информация |
|---|
| title | Steps to take when receiving events for the first time: |
|---|
| - Define the date starting from which it is required to receive events. For example, to receive an interval INSERT_DATE from the events statistics (GET /xapi/event/stat).
- Divide the interval by the smalest value: number of streams (not higher than 32) or number of cores on server.
- In each stream, create and run the first request to receive a list of event which will look as follows:
GET /xapi/event?without[]=count&filter[insert_date][>=]={interval_minimum}&filter[insert_date][<=]={interval_maximum}&sort[insert_date]=asc&limit=1000 - Remember all OBJECT_ID in the received list.
- In the received list, find the last INSERT_DATE and use it as
interval_minimum in the request described at step 3. - Exclude the events which were remembered in the last iteration, from the new list.
- If no
interval_maximum, start again from step 4. - Save to persistent storage:
- INSERT_DATE maximum value, received at step 1.
- OBJECT_ID list from the interval, which includes INSERT_DATE maximum value.
|
|