Skip to content

/AWS1/IF_SHB=>GETFINDINGSTRENDSV2()

About GetFindingsTrendsV2

Returns findings trend data based on the specified criteria. This operation helps you analyze patterns and changes in findings over time.

Method Signature

METHODS /AWS1/IF_SHB~GETFINDINGSTRENDSV2
  IMPORTING
    !IO_FILTERS TYPE REF TO /AWS1/CL_SHBFNDGSTRENDSFILTERS OPTIONAL
    !IV_STARTTIME TYPE /AWS1/SHBTIMESTAMP OPTIONAL
    !IV_ENDTIME TYPE /AWS1/SHBTIMESTAMP OPTIONAL
    !IV_NEXTTOKEN TYPE /AWS1/SHBNEXTTOKEN OPTIONAL
    !IV_MAXRESULTS TYPE /AWS1/SHBMAXRESULTS OPTIONAL
  RETURNING
    VALUE(OO_OUTPUT) TYPE REF TO /aws1/cl_shbgetfndstrendsv2rsp
  RAISING
    /AWS1/CX_SHBACCESSDENIEDEX
    /AWS1/CX_SHBINTERNALSERVEREX
    /AWS1/CX_SHBTHROTTLINGEX
    /AWS1/CX_SHBVALIDATIONEX
    /AWS1/CX_SHBCLIENTEXC
    /AWS1/CX_SHBSERVEREXC
    /AWS1/CX_RT_TECHNICAL_GENERIC
    /AWS1/CX_RT_SERVICE_GENERIC.

IMPORTING

Required arguments:

iv_starttime TYPE /AWS1/SHBTIMESTAMP /AWS1/SHBTIMESTAMP

The starting timestamp for the time period to analyze findings trends, in ISO 8601 format.

iv_endtime TYPE /AWS1/SHBTIMESTAMP /AWS1/SHBTIMESTAMP

The ending timestamp for the time period to analyze findings trends, in ISO 8601 format.

Optional arguments:

io_filters TYPE REF TO /AWS1/CL_SHBFNDGSTRENDSFILTERS /AWS1/CL_SHBFNDGSTRENDSFILTERS

The filters to apply to the findings trend data.

iv_nexttoken TYPE /AWS1/SHBNEXTTOKEN /AWS1/SHBNEXTTOKEN

The token to use for paginating results. This value is returned in the response if more results are available.

iv_maxresults TYPE /AWS1/SHBMAXRESULTS /AWS1/SHBMAXRESULTS

The maximum number of trend data points to return in a single response.

RETURNING

oo_output TYPE REF TO /aws1/cl_shbgetfndstrendsv2rsp /AWS1/CL_SHBGETFNDSTRENDSV2RSP

Domain /AWS1/RT_ACCOUNT_ID
Primitive Type NUMC

Examples

Syntax Example

This is an example of the syntax for calling the method. It includes every possible argument and initializes every possible value. The data provided is not necessarily semantically accurate (for example the value "string" may be provided for something that is intended to be an instance ID, or in some cases two arguments may be mutually exclusive). The syntax shows the ABAP syntax for creating the various data structures.

DATA(lo_result) = lo_client->getfindingstrendsv2(
  io_filters = new /aws1/cl_shbfndgstrendsfilters(
    it_compositefilters = VALUE /aws1/cl_shbfndstrendscompos00=>tt_fndgstrendscompositefiltlst(
      (
        new /aws1/cl_shbfndstrendscompos00(
          it_nestedcompositefilters = VALUE /aws1/cl_shbfndstrendscompos00=>tt_fndgstrendscompositefiltlst(
          )
          it_stringfilters = VALUE /aws1/cl_shbfndgstrendsstrfilt=>tt_fndgstrendsstringfilterlist(
            (
              new /aws1/cl_shbfndgstrendsstrfilt(
                io_filter = new /aws1/cl_shbstringfilter(
                  iv_comparison = |string|
                  iv_value = |string|
                )
                iv_fieldname = |string|
              )
            )
          )
          iv_operator = |string|
        )
      )
    )
    iv_compositeoperator = |string|
  )
  iv_endtime = '20150101000000.0000000'
  iv_maxresults = 123
  iv_nexttoken = |string|
  iv_starttime = '20150101000000.0000000'
).

This is an example of reading all possible response values

lo_result = lo_result.
IF lo_result IS NOT INITIAL.
  lv_granularityfield = lo_result->get_granularity( ).
  LOOP AT lo_result->get_trendsmetrics( ) into lo_row.
    lo_row_1 = lo_row.
    IF lo_row_1 IS NOT INITIAL.
      lv_timestamp = lo_row_1->get_timestamp( ).
      lo_trendsvalues = lo_row_1->get_trendsvalues( ).
      IF lo_trendsvalues IS NOT INITIAL.
        lo_severitytrendscount = lo_trendsvalues->get_severitytrends( ).
        IF lo_severitytrendscount IS NOT INITIAL.
          lv_trendsvaluecount = lo_severitytrendscount->get_unknown( ).
          lv_trendsvaluecount = lo_severitytrendscount->get_informational( ).
          lv_trendsvaluecount = lo_severitytrendscount->get_low( ).
          lv_trendsvaluecount = lo_severitytrendscount->get_medium( ).
          lv_trendsvaluecount = lo_severitytrendscount->get_high( ).
          lv_trendsvaluecount = lo_severitytrendscount->get_critical( ).
          lv_trendsvaluecount = lo_severitytrendscount->get_fatal( ).
          lv_trendsvaluecount = lo_severitytrendscount->get_other( ).
        ENDIF.
      ENDIF.
    ENDIF.
  ENDLOOP.
  lv_nexttoken = lo_result->get_nexttoken( ).
ENDIF.