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

[Bug] Problem with 'get_case_observables' #2466

Open
SantiFernandez17 opened this issue Jun 15, 2023 · 0 comments
Open

[Bug] Problem with 'get_case_observables' #2466

SantiFernandez17 opened this issue Jun 15, 2023 · 0 comments
Labels
bug TheHive4 TheHive4 related issues

Comments

@SantiFernandez17
Copy link

SantiFernandez17 commented Jun 15, 2023

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

@SantiFernandez17 SantiFernandez17 added bug TheHive4 TheHive4 related issues labels Jun 15, 2023
@SantiFernandez17 SantiFernandez17 changed the title [Bug] [Bug] Problem with 'get_case_observables' Jun 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug TheHive4 TheHive4 related issues
Projects
None yet
Development

No branches or pull requests

1 participant