Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

API doesn't return notes #52

Closed
Elhitch opened this issue Sep 28, 2020 · 3 comments
Closed

API doesn't return notes #52

Elhitch opened this issue Sep 28, 2020 · 3 comments

Comments

@Elhitch
Copy link

Elhitch commented Sep 28, 2020

Hi, it looks like when search_incidents is used, the response doesn't contain the notes within the matched incident(s). Is this supported and am I doing something wrong?

@glicht
Copy link
Collaborator

glicht commented Sep 28, 2020

Not sure what you mean by "notes". Can you provide more details.

@Elhitch
Copy link
Author

Elhitch commented Sep 30, 2020

Hi, in the screenshot below (from a demo Demisto environment, not our own) you can see the Notes widget in the center of the screen.

image

@glicht
Copy link
Collaborator

glicht commented Oct 9, 2020

@Elhitch this API is currently not supported by demisto-py.

You can use the generic request to fetch this data. It is stored under investigation in the entries field.

For example:

# create api_instance based on env variables
api_instance = demisto_client.configure()

# fetch an investigation according to it's id (the id can obtained from the incident). For example an id of 50
(res, status, headers) = api_instance.generic_request('/investigation/50', 'POST', {"pageSize":100},  response_type='object' )
# res['entries'] will contain the war room data. The `note` will be true for relevant notes. For example you can print all relevant entries:
print(list(filter(lambda a: a.get('note', False) is True, res['entries'])))

@glicht glicht closed this as completed Oct 9, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants