Skip to content

Error 400 when using detects.QueryDetects #178

Answered by jshcodes
Sshahar asked this question in Q&A
Discussion options

You must be logged in to vote

There appears to be an issue with using 'devices.hostname' for a sort parameter when using this operation. Using the updated code below should work. (We are looking into the issue with the device hostname sort.)

Let us know if you are still encountering problems.

import json
from falconpy import detects as FalconDetects

with open("config.json", "r") as cred_file:
    config = json.loads(cred_file.read())
creds = {
    "client_id": config["falcon_client_id"],
    "client_secret": config["falcon_client_secret"]
}

falcon = FalconDetects.Detects(creds=creds)

PARAMS = {
    'sort': 'first_behavior|asc'
}

response = falcon.QueryDetects(parameters=PARAMS)
print(response)

Replies: 2 comments 5 replies

Comment options

You must be logged in to vote
5 replies
@Sshahar
Comment options

@jshcodes
Comment options

@Sshahar
Comment options

@jshcodes
Comment options

@jshcodes
Comment options

Comment options

You must be logged in to vote
0 replies
Answer selected by jshcodes
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
detects Detections issues and questions
2 participants