The UpdateHITReviewStatus operation updates the status of a HIT. If the status is Reviewable, this operation can update the status to Reviewing, or it can revert a Reviewing HIT back to the Reviewable status.
Parameters:
-
hit_id
(EntityId)
–
The ID of the HIT to update.
-
revert
(Optional[Boolean], default:
None
)
–
Specifies how to update the HIT status. Default is False.
Raises:
Source code in docs_src/capo_mturk/_services/m_turk.py
| def update_hit_review_status(
self,
hit_id: "capo_mturk.types.entity_id.EntityId",
*,
config_overrides: Optional[MTurkClientConfig] = None,
revert: Optional["capo_mturk.types.boolean.Boolean"] = None,
) -> "capo_mturk.types.update_hit_review_status_response.UpdateHITReviewStatusResponse":
"""<p> The <code>UpdateHITReviewStatus</code> operation updates the status of a HIT. If the status is Reviewable, this operation can update the status to Reviewing, or it can revert a Reviewing HIT back to the Reviewable status. </p>
Args:
hit_id: <p> The ID of the HIT to update. </p>
revert: <p> Specifies how to update the HIT status. Default is <code>False</code>. </p> <ul> <li> <p> Setting this to false will only transition a HIT from <code>Reviewable</code> to <code>Reviewing</code> </p> </li> <li> <p> Setting this to true will only transition a HIT from <code>Reviewing</code> to <code>Reviewable</code> </p> </li> </ul>
Raises:
capo_mturk.errors.request_error.RequestError: <p>Your request is invalid.</p>
capo_mturk.errors.service_fault.ServiceFault: <p>Amazon Mechanical Turk is temporarily unable to process your request. Try your call again.</p>
capo_mturk.errors.UnknownServiceError: The service returned an error code this client does not model.
"""
def _handler(
req: "OperationRequest[capo_mturk.types.update_hit_review_status_request.UpdateHITReviewStatusRequest]",
) -> OperationResponse[
"capo_mturk.types.update_hit_review_status_response.UpdateHITReviewStatusResponse"
]:
import capo_mturk._operations.m_turk_requester_service_v20170117.update_hit_review_status
output, http_response = (
capo_mturk._operations.m_turk_requester_service_v20170117.update_hit_review_status.update_hit_review_status(
req.options, req.input
)
)
return OperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("UpdateHITReviewStatus")
)
input_: capo_mturk.types.update_hit_review_status_request.UpdateHITReviewStatusRequest = {
"hit_id": hit_id
}
if revert is not None:
input_["revert"] = revert
response = execute_pipeline(
OperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
response.response.close()
return response.output
|