From 89f6213fcdf1f3e8545f9347c68a4baffbf66e9d Mon Sep 17 00:00:00 2001 From: Benjamin Kan Date: Tue, 26 Apr 2022 14:58:37 +0200 Subject: [PATCH 1/3] Add description/example for eventTypeFilters param --- spec/descriptions/getEvents.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/spec/descriptions/getEvents.md b/spec/descriptions/getEvents.md index 13002ea..089d004 100644 --- a/spec/descriptions/getEvents.md +++ b/spec/descriptions/getEvents.md @@ -8,6 +8,8 @@ This endpoint retrieves all available events for the requested timeframe. - **excludeTriggeredBefore:** Whether to exclude events that have been triggered before the requested timeframe in order to enable searching for events that have started within the given timeframe, excluding events that are previously active already. This is useful for 3rd party integrations that fetch events from Instana with a scheduled batch job in a fixed interval using tumbling windows, when you only care about new events. This option is more restrictive than `filterEventUpdates` and does not inform about event state updates that got `CLOSED` in the timeframe of the query if not also the start time of the event is within that query timeframe. - **filterEventUpdates:** Filters results to event updates only. This means that an event is only included when its event state changed in the given query timeframe. This is useful for 3rd party integrations that fetch events from Instana with a scheduled batch job in a fixed interval using a tumbling windows, when you care about event state updates. +- **filterEventUpdates:** Filters results to event updates only. This means that an event is only included when its event state changed in the given query timeframe. This is useful for 3rd party integrations that fetch events from Instana with a scheduled batch job in a fixed interval using a tumbling windows, when you care about event state updates. +- **eventTypeFilters:** Filters results to the specified event types. By default, events of any type are returned. ### Examples @@ -24,3 +26,10 @@ Fetch all events that have been opened or closed within the last minute, using a TO_MILLIS=$((($(date +%s) - 120) * 1000)) curl --request GET "https:///api/events?windowSize=60000&to=$TO_MILLIS&filterEventUpdates=true" \ --header 'Authorization: apiToken ' ``` + +Fetch all incidents which duration overlaps with the last 10 minutes. + +```bash +curl --request GET 'https:///api/events?eventTypeFilters=incident' \ +--header 'Authorization: apiToken ' +``` From 351d0d63f03b7350d565cab343efab99f7bf7675 Mon Sep 17 00:00:00 2001 From: Benjamin Kan Date: Tue, 26 Apr 2022 15:39:16 +0200 Subject: [PATCH 2/3] Implement review feedback --- spec/descriptions/getEvents.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/spec/descriptions/getEvents.md b/spec/descriptions/getEvents.md index 089d004..a944814 100644 --- a/spec/descriptions/getEvents.md +++ b/spec/descriptions/getEvents.md @@ -8,8 +8,7 @@ This endpoint retrieves all available events for the requested timeframe. - **excludeTriggeredBefore:** Whether to exclude events that have been triggered before the requested timeframe in order to enable searching for events that have started within the given timeframe, excluding events that are previously active already. This is useful for 3rd party integrations that fetch events from Instana with a scheduled batch job in a fixed interval using tumbling windows, when you only care about new events. This option is more restrictive than `filterEventUpdates` and does not inform about event state updates that got `CLOSED` in the timeframe of the query if not also the start time of the event is within that query timeframe. - **filterEventUpdates:** Filters results to event updates only. This means that an event is only included when its event state changed in the given query timeframe. This is useful for 3rd party integrations that fetch events from Instana with a scheduled batch job in a fixed interval using a tumbling windows, when you care about event state updates. -- **filterEventUpdates:** Filters results to event updates only. This means that an event is only included when its event state changed in the given query timeframe. This is useful for 3rd party integrations that fetch events from Instana with a scheduled batch job in a fixed interval using a tumbling windows, when you care about event state updates. -- **eventTypeFilters:** Filters results to the specified event types. By default, events of any type are returned. +- **eventTypeFilters:** Filters results to the specified or a set of event type(s), such as `incident`, `issue` or `change`. By default, events of any type are returned. ### Examples From d59370965f039d8aecb2f3a9c08bc3ea00c84f3d Mon Sep 17 00:00:00 2001 From: Benjamin Kan Date: Tue, 26 Apr 2022 15:52:28 +0200 Subject: [PATCH 3/3] Update example usage of eventTypeFilters with multiple types --- spec/descriptions/getEvents.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/spec/descriptions/getEvents.md b/spec/descriptions/getEvents.md index a944814..073f6b6 100644 --- a/spec/descriptions/getEvents.md +++ b/spec/descriptions/getEvents.md @@ -8,7 +8,7 @@ This endpoint retrieves all available events for the requested timeframe. - **excludeTriggeredBefore:** Whether to exclude events that have been triggered before the requested timeframe in order to enable searching for events that have started within the given timeframe, excluding events that are previously active already. This is useful for 3rd party integrations that fetch events from Instana with a scheduled batch job in a fixed interval using tumbling windows, when you only care about new events. This option is more restrictive than `filterEventUpdates` and does not inform about event state updates that got `CLOSED` in the timeframe of the query if not also the start time of the event is within that query timeframe. - **filterEventUpdates:** Filters results to event updates only. This means that an event is only included when its event state changed in the given query timeframe. This is useful for 3rd party integrations that fetch events from Instana with a scheduled batch job in a fixed interval using a tumbling windows, when you care about event state updates. -- **eventTypeFilters:** Filters results to the specified or a set of event type(s), such as `incident`, `issue` or `change`. By default, events of any type are returned. +- **eventTypeFilters:** Filters results to the specified event type(s), such as `incident`, `issue` or `change`. By default, events of any type are returned. ### Examples @@ -26,9 +26,9 @@ TO_MILLIS=$((($(date +%s) - 120) * 1000)) curl --request GET "https:///api --header 'Authorization: apiToken ' ``` -Fetch all incidents which duration overlaps with the last 10 minutes. +Fetch all incidents and issues which duration overlaps with the last 10 minutes. ```bash -curl --request GET 'https:///api/events?eventTypeFilters=incident' \ +curl --request GET 'https:///api/events?eventTypeFilters=incident&eventTypeFilters=issue' \ --header 'Authorization: apiToken ' ```