You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jun 2, 2025. It is now read-only.
Repository navigation
This repository was archived by the owner on Jun 2, 2025. It is now read-only.
http://localhost:5000/api/entity/ not working as expected #13
I have tried to add entity using both pyet and curl -POST but neither of them worked. I am able to get_entity but if I add the function entity_add with the required parameters ( name, description & tags) - it doesnt work. Moreover, As one of your suggestions in one of the issues - that, this will add an entity but to add sub-object ( malware, threat actor etc) _cls needs to be set manually. Can you please explain this in bit detail?
<title>500 Internal Server Error</title>
h1Internal Server Error
The server encountered an internal error and was unable to complete your request. Either the server is overloaded or there is an error in the application.
How to set _cls value - can you please share working example to add entity through API?
INFO:user_management:Default user logged in : yeti
ERROR:app:Exception on /api/entity/ [POST]
Traceback (most recent call last):
File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 2446, in wsgi_app
response = self.full_dispatch_request()
File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1951, in full_dispatch_request
rv = self.handle_user_exception(e)
File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1820, in handle_user_exception
reraise(exc_type, exc_value, tb)
File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1949, in full_dispatch_request
rv = self.dispatch_request()
File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1935, in dispatch_request
return self.view_functionsrule.endpoint
File "/usr/local/lib/python2.7/dist-packages/flask_classy.py", line 200, in proxy
response = view(**request.view_args)
File "/home/osboxes/yeti/core/web/helpers.py", line 39, in inner
return f(*args, **kwargs)
File "/home/osboxes/yeti/core/web/api/crud.py", line 143, in new
obj = objectmanager(**params).save()
File "/usr/local/lib/python2.7/dist-packages/mongoengine/base/document.py", line 93, in init
raise FieldDoesNotExist(msg)
FieldDoesNotExist: The fields "set([u'params'])" do not exist on the document "Entity"
Activity
Kirtar22 commentedon Nov 28, 2019
@tomchop @threathive - Can you please help? Appreciate your support. Thanks
Kirtar22 commentedon Nov 28, 2019
http -vv --json POST localhost:5000/api/entity/ params:='{"name":"Malware","tags":"api-tag","family":"api-family","source":"api"}'
@tomchop @threathive
How to set _cls value - can you please share working example to add entity through API?
INFO:user_management:Default user logged in : yeti
ERROR:app:Exception on /api/entity/ [POST]
Traceback (most recent call last):
File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 2446, in wsgi_app
response = self.full_dispatch_request()
File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1951, in full_dispatch_request
rv = self.handle_user_exception(e)
File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1820, in handle_user_exception
reraise(exc_type, exc_value, tb)
File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1949, in full_dispatch_request
rv = self.dispatch_request()
File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1935, in dispatch_request
return self.view_functionsrule.endpoint
File "/usr/local/lib/python2.7/dist-packages/flask_classy.py", line 200, in proxy
response = view(**request.view_args)
File "/home/osboxes/yeti/core/web/helpers.py", line 39, in inner
return f(*args, **kwargs)
File "/home/osboxes/yeti/core/web/api/crud.py", line 143, in new
obj = objectmanager(**params).save()
File "/usr/local/lib/python2.7/dist-packages/mongoengine/base/document.py", line 93, in init
raise FieldDoesNotExist(msg)
FieldDoesNotExist: The fields "set([u'params'])" do not exist on the document "Entity"
Regards,
Kirtar