MCPcopy Create free account
hub / github.com/Keeper-Security/Commander / get_request_status

Function get_request_status

keepercommander/service/api/command.py:149–168  ·  view source on GitHub ↗

Get status; only the submitting API key can read its own request.

(request_id: str, **kwargs)

Source from the content-addressed store, hash-verified

147 @bp.route("/status/<request_id>", methods=["GET"])
148 @unified_api_decorator()
149 def get_request_status(request_id: str, **kwargs) -> Tuple[Response, int]:
150 """Get status; only the submitting API key can read its own request."""
151 try:
152 owner_key = _caller_owner_key()
153 status_info = queue_manager.get_request_status(request_id, owner_key=owner_key)
154 if status_info is None:
155 return jsonify({
156 "status": "error",
157 "error": "Error: Request not found"
158 }), 404
159
160 return jsonify({
161 "success": True,
162 "request_id": request_id,
163 **status_info
164 }), 200
165
166 except Exception as e:
167 logger.error(f"Error getting request status: {e}")
168 return jsonify({"status": "error", "error": str(e)}), 500
169
170 @bp.route("/result/<request_id>", methods=["GET"])
171 @unified_api_decorator()

Callers

nothing calls this directly

Calls 3

_caller_owner_keyFunction · 0.85
get_request_statusMethod · 0.80
errorMethod · 0.45

Tested by

no test coverage detected