Skip to main content

assignments

Creates, updates, deletes, gets or lists an assignments resource.

Overview

Nameassignments
TypeResource
Idaws.mturk.assignments

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
assignmentobjectThe assignment. The response includes one Assignment element.
hitobjectThe HIT associated with this assignment. The response includes one HIT element.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
get_assignmentselectregionThe GetAssignment operation retrieves the details of the specified Assignment.
approve_assignmentexecregion, AssignmentIdThe ApproveAssignment operation approves the results of a completed assignment. Approving an assignment initiates two payments from the Requester's Amazon.com account The Worker who submitted the results is paid the reward specified in the HIT. Amazon Mechanical Turk fees are debited. If the Requester's account does not have adequate funds for these payments, the call to ApproveAssignment returns an exception, and the approval is not processed. You can include an optional feedback message with the approval, which the Worker can see in the Status section of the web site. You can also call this operation for assignments that were previous rejected and approve them by explicitly overriding the previous rejection. This only works on rejected assignments that were submitted within the previous 30 days and only if the assignment's related HIT has not been deleted.
reject_assignmentexecregion, AssignmentId, RequesterFeedbackThe RejectAssignment operation rejects the results of a completed assignment. You can include an optional feedback message with the rejection, which the Worker can see in the Status section of the web site. When you include a feedback message with the rejection, it helps the Worker understand why the assignment was rejected, and can improve the quality of the results the Worker submits in the future. Only the Requester who created the HIT can reject an assignment for the HIT.
send_bonusexecregion, WorkerId, BonusAmount, AssignmentId, ReasonThe SendBonus operation issues a payment of money from your account to a Worker. This payment happens separately from the reward you pay to the Worker when you approve the Worker's assignment. The SendBonus operation requires the Worker's ID and the assignment ID as parameters to initiate payment of the bonus. You must include a message that explains the reason for the bonus payment, as the Worker may not be expecting the payment. Amazon Mechanical Turk collects a fee for bonus payments, similar to the HIT listing fee. This operation fails if your account does not have enough funds to pay for both the bonus and the fees.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
regionstringAWS region (default: us-east-1)

SELECT examples

The GetAssignment operation retrieves the details of the specified Assignment.

SELECT
assignment,
hit
FROM aws.mturk.assignments
WHERE region = '{{ region }}' -- required
;

Lifecycle Methods

The ApproveAssignment operation approves the results of a completed assignment. Approving an assignment initiates two payments from the Requester's Amazon.com account The Worker who submitted the results is paid the reward specified in the HIT. Amazon Mechanical Turk fees are debited. If the Requester's account does not have adequate funds for these payments, the call to ApproveAssignment returns an exception, and the approval is not processed. You can include an optional feedback message with the approval, which the Worker can see in the Status section of the web site. You can also call this operation for assignments that were previous rejected and approve them by explicitly overriding the previous rejection. This only works on rejected assignments that were submitted within the previous 30 days and only if the assignment's related HIT has not been deleted.

EXEC aws.mturk.assignments.approve_assignment
@region='{{ region }}' --required
@@json=
'{
"AssignmentId": "{{ AssignmentId }}",
"RequesterFeedback": "{{ RequesterFeedback }}",
"OverrideRejection": {{ OverrideRejection }}
}'
;