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

Fix for Issue 243 - allows parent objects to be returned #244

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion thehive4py/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@ def __find_rows(self, find_url, **attributes):
sort (Array): List of fields to sort the result with. Prefix the field name with `-` for descending order
and `+` for ascending order
range (str): A range describing the number of rows to be returned
nparent (int): Number of parent objects for a record to return. E.g. parent case(s) for a task or observable. The default used by TheHive when searching for these items is 10.

Returns:
response (requests.Response): Response object including a JSON array representing the list of searched records.
Expand All @@ -107,7 +108,8 @@ def __find_rows(self, find_url, **attributes):
# Add range and sort parameters
params = {
"range": attributes.get("range", "all"),
"sort": attributes.get("sort", [])
"sort": attributes.get("sort", []),
"nparent": attributes.get("nparent", 0)
}

# Add body
Expand Down