You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
File ~/.local/lib/python3.10/site-packages/InsightIDR4Py.py:232, in InsightIDR.ListInvestigations(self, assignee_email, start_time, end_time, multi_customer, priorities, sort, sources, statuses, tags) 230 result = response.json() 231 # get the total
--> 232 total = result["metadata"]["total_data"] 233 # add the results to the output list 234 investigations.extend(result["data"])`
code
"import InsightIDR4Py as idr
from datetime import datetime, timedelta, timezone
define API key (store this value securely)
api_key = "apikey"
connect to InsightIDR API
api = idr.InsightIDR(api_key)
list investigations from the past 7 days
start_time_7d_ago = (datetime.now(timezone.utc) - timedelta(7)).strftime("%Y-%m-%dT%H:%M:%SZ")
print(start_time_7d_ago)
investigations = api.ListInvestigations(start_time=start_time_7d_ago)"
error
"Traceback (most recent call last):
File "C:\Users\user\Desktop\v1.py", line 14, in
investigations = api.ListInvestigations(start_time=start_time_7d_ago)
File "C:\Users\user\AppData\Local\Programs\Python\Python312\Lib\site-packages\InsightIDR4Py.py", line 240, in ListInvestigations
params["index"] += 100
KeyError: 'index' "
The text was updated successfully, but these errors were encountered: