Skip to content

list_review_policy_results_for_hit

list_review_policy_results_for_hit(
    hit_id: EntityId,
    *,
    config_overrides: Optional[MTurkClientConfig] = None,
    policy_levels: Optional[ReviewPolicyLevelList] = None,
    retrieve_actions: Optional[Boolean] = None,
    retrieve_results: Optional[Boolean] = None,
    next_token: Optional[PaginationToken] = None,
    max_results: Optional[ResultSize] = None,
) -> ListReviewPolicyResultsForHITResponse

The ListReviewPolicyResultsForHIT operation retrieves the computed results and the actions taken in the course of executing your Review Policies for a given HIT. For information about how to specify Review Policies when you call CreateHIT, see Review Policies. The ListReviewPolicyResultsForHIT operation can return results for both Assignment-level and HIT-level review results.

Parameters:

  • hit_id (EntityId) –

    The unique identifier of the HIT to retrieve review results for.

  • policy_levels (Optional[ReviewPolicyLevelList], default: None ) –

    The Policy Level(s) to retrieve review results for - HIT or Assignment. If omitted, the default behavior is to retrieve all data for both policy levels. For a list of all the described policies, see Review Policies.

  • retrieve_actions (Optional[Boolean], default: None ) –

    Specify if the operation should retrieve a list of the actions taken executing the Review Policies and their outcomes.

  • retrieve_results (Optional[Boolean], default: None ) –

    Specify if the operation should retrieve a list of the results computed by the Review Policies.

  • next_token (Optional[PaginationToken], default: None ) –

    Pagination token

  • max_results (Optional[ResultSize], default: None ) –

    Limit the number of results returned.

Raises:

  • RequestError –

    Your request is invalid.

  • ServiceFault –

    Amazon Mechanical Turk is temporarily unable to process your request. Try your call again.

  • UnknownServiceError –

    The service returned an error code this client does not model.

Source code in docs_src/capo_mturk/_services/m_turk.py
def list_review_policy_results_for_hit(
    self,
    hit_id: "capo_mturk.types.entity_id.EntityId",
    *,
    config_overrides: Optional[MTurkClientConfig] = None,
    policy_levels: Optional[
        "capo_mturk.types.review_policy_level_list.ReviewPolicyLevelList"
    ] = None,
    retrieve_actions: Optional["capo_mturk.types.boolean.Boolean"] = None,
    retrieve_results: Optional["capo_mturk.types.boolean.Boolean"] = None,
    next_token: Optional[
        "capo_mturk.types.pagination_token.PaginationToken"
    ] = None,
    max_results: Optional["capo_mturk.types.result_size.ResultSize"] = None,
) -> "capo_mturk.types.list_review_policy_results_for_hit_response.ListReviewPolicyResultsForHITResponse":
    """<p> The <code>ListReviewPolicyResultsForHIT</code> operation retrieves the computed results and the actions taken in the course of executing your Review Policies for a given HIT. For information about how to specify Review Policies when you call CreateHIT, see Review Policies. The ListReviewPolicyResultsForHIT operation can return results for both Assignment-level and HIT-level review results. </p>

    Args:
        hit_id: <p>The unique identifier of the HIT to retrieve review results for.</p>
        policy_levels: <p> The Policy Level(s) to retrieve review results for - HIT or Assignment. If omitted, the default behavior is to retrieve all data for both policy levels. For a list of all the described policies, see Review Policies. </p>
        retrieve_actions: <p> Specify if the operation should retrieve a list of the actions taken executing the Review Policies and their outcomes. </p>
        retrieve_results: <p> Specify if the operation should retrieve a list of the results computed by the Review Policies. </p>
        next_token: <p>Pagination token</p>
        max_results: <p>Limit the number of results returned.</p>

    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.list_review_policy_results_for_hit_request.ListReviewPolicyResultsForHITRequest]",
    ) -> OperationResponse[
        "capo_mturk.types.list_review_policy_results_for_hit_response.ListReviewPolicyResultsForHITResponse"
    ]:
        import capo_mturk._operations.m_turk_requester_service_v20170117.list_review_policy_results_for_hit

        output, http_response = (
            capo_mturk._operations.m_turk_requester_service_v20170117.list_review_policy_results_for_hit.list_review_policy_results_for_hit(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("ListReviewPolicyResultsForHIT")
    )
    input_: capo_mturk.types.list_review_policy_results_for_hit_request.ListReviewPolicyResultsForHITRequest = {
        "hit_id": hit_id
    }
    if policy_levels is not None:
        input_["policy_levels"] = policy_levels
    if retrieve_actions is not None:
        input_["retrieve_actions"] = retrieve_actions
    if retrieve_results is not None:
        input_["retrieve_results"] = retrieve_results
    if next_token is not None:
        input_["next_token"] = next_token
    if max_results is not None:
        input_["max_results"] = max_results

    response = execute_pipeline(
        OperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    response.response.close()
    return response.output