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] Adding an asset via API #683

Open
sorchaa opened this issue Jan 12, 2025 · 0 comments
Open

[BUG] Adding an asset via API #683

sorchaa opened this issue Jan 12, 2025 · 0 comments
Labels
bug Something isn't working

Comments

@sorchaa
Copy link

sorchaa commented Jan 12, 2025

Describe the bug
I can't create an asset in a case using the APIs.
When I use the API Post /case/assets/add. The return response is 200. And it returns the new asset.

But when I use the API Get /case/assets/list, the new asset doesn't appear.

And on the web interface, the assets dont appear and it stays in this state :
image

I tried on Linux and Windows and it's the same thing.
The code if you want :

3 functions : 
        case = cy_iris.add_case("aqaaqa","test","fdesc")        
        asset = cy_iris.add_asset_by_case(case['case_id'], 10, "serv_smb","10.0.0.21")
        assets = cy_iris.get_assets_by_case(case['case_id'])

Newly objects (case and assets) have a value :

case = 
{'case_name': '#18 - test', 'case_description': 'fdesc', 'case_soc_id': 'aqaaqa', 'case_customer': 1, 'classification_id': None, 'reviewer_id': None, 'severity_id': 4, 'case_id': 18, 'open_date': '2025-01-12', 'close_date': None, 'closing_note': None, 'user_id': 2, 'owner_id': 2, 'status_id': 0, 'state_id': 3, 'custom_attributes': None, 'case_uuid': '596a0b7e-52a4-4dea-918b-36bea8a610ac', 'review_status_id': None, 'modification_history': {'1736676006.983663': {...}}}

asset = 
{'asset_name': 'serv_smb', 'asset_enrichment': None, 'asset_type': {'asset_name': 'Windows - Server', 'asset_description': 'Standard Windows Server', 'asset_icon_compromised': 'ioc_windows_server.png', 'asset_icon_not_compromised': 'windows_server.png', 'asset_id': 10}, 'alerts': [], 'analysis_status': None, 'asset_id': 37, 'asset_uuid': 'e7267dbc-037a-4f91-aefb-29fbee25e961', 'asset_description': None, 'asset_domain': None, 'asset_ip': '10.0.0.21', 'asset_info': None, 'asset_compromise_status_id': None, 'asset_type_id': 10, 'asset_tags': None, 'case_id': 18, 'date_added': '2025-01-12T10:00:09.152033', 'date_update': '2025-01-12T10:00:09.152039', 'user_id': 2, 'analysis_status_id': None, 'custom_attributes': None, 'modification_history': None}

But assets stays empty.

I think I read all docs but I don't understand why it dooesn't work. Maybe I forget something.

Thanks for all,

@sorchaa sorchaa added the bug Something isn't working label Jan 12, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant