URL args: text : search text type : type of object to be searched.
(sid, did)
| 72 | @permissions_required(AllPermissionTypes.tools_search_objects) |
| 73 | @pga_login_required |
| 74 | def search(sid, did): |
| 75 | """ |
| 76 | URL args: |
| 77 | text <required>: search text |
| 78 | type <optional>: type of object to be searched. |
| 79 | """ |
| 80 | text = request.args.get('text', None) |
| 81 | obj_type = request.args.get('type', None) |
| 82 | |
| 83 | so_obj = SearchObjectsHelper(sid, did, blueprint.show_system_objects()) |
| 84 | |
| 85 | status, res = so_obj.search(text, obj_type) |
| 86 | |
| 87 | if not status: |
| 88 | return internal_server_error(errormsg=res) |
| 89 | |
| 90 | return make_json_response(data=res) |
nothing calls this directly
no test coverage detected