def get_offenses(api_client, filter):

    endpoint = 'siem/offenses'
    params = {'fields': 'id,description,status,offense_type,offense_source',
              'filter': filter}

    response = api_client.call_api(endpoint, 'GET', params=params,
                                   print_request=True)
    response_body = response.read().decode('utf-8')

    if response.code > 299 or response.code < 200:

        print("API call failed.")
        print(response_body)
        return None

    offenses = json.loads(response_body)

    return offenses
Get offense summaries consisting of the following fields from the offense
dataset/ETHPy150Open ibm-security-intelligence/api-samples/siem/09_GetOffensesForIp.py/get_offenses