GithubHelp home page GithubHelp logo

insightidr4py's People

Contributors

mbabinski avatar zach-allgood avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

insightidr4py's Issues

KeyError: 'logs'

Hi
I just started using this.

I am trying to run the example script for user authentication and I am receiving the following error:

anthony@computer:~/IDR$ python3 TestLogSearch.py Traceback (most recent call last): File "/home/anthony/IDR/TestLogSearch.py", line 9, in <module> groups = idr.QueryGroups(logset_name, query, time_range) File "/home/anthony/IDR/IDR4Py.py", line 112, in QueryGroups log_ids = ListLogIdsByLogSetName(logset_name) File "/home/anthony/IDR/IDR4Py.py", line 37, in ListLogIdsByLogSetName log_info = GetLogInfo() File "/home/anthony/IDR/IDR4Py.py", line 22, in GetLogInfo response = requests.get(log_mgmt_url, headers=headers).json()["logs"] KeyError: 'logs'

Feature Request?

Hi.
Any interest on adding capability to work with Investigations via Python with the API?

I am really enjoying your work with Log Search so thank you.

getting error when using api.ListInvestigations

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' "

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.