[Bug] Problem with 'get_case_observables'
SantiFernandez17 opened this issue · 0 comments
Request Type
Bug Problem with 'get_case_observables'
Problem Description
Hello, good afternoon. I'm trying to run the "get_case_observables" command from the TH4PY API documentation but I get the following error: Status code: 400 | Error: {'type': 'AttributeCheckingError', 'message': '[Invalid format for _id: FString(88888), expected id ()]', 'errors': [{'name': '_id', 'format ': 'id', 'acceptedInput': [], 'field': 'FString(88888)', 'type': 'InvalidFormatAttributeError'}]}.
my code is the following:
(88888 its a example)
def command_get_case_observables(client: Client, args: dict):
case_id = str(args.get('caseId')) ()
res = client.get_case_observables(case_id)
for observable in res:
print(observable.data)
() here also try int(args.get('caseId')) and args.get('caseId')
def get_case_observables(self, case_id):
response = self.theHiveApi.get_case_observables(case_id)
if response.status_code == 200:
return response.json()
else:
return_error('Status code: ' + str(response.status_code) + ' | Error: ' + str(response.json()))
error('Get case tasks failed')
Could you please help me? Thank you very much =D