Skip to main content

assignments_for_hits

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

Overview

Nameassignments_for_hits
TypeResource
Idaws.mturk.assignments_for_hits

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
accept_timestring (date-time)The date and time the Worker accepted the assignment.
answerstringThe Worker's answers submitted for the HIT contained in a QuestionFormAnswers document, if the Worker provides an answer. If the Worker does not provide any answers, Answer may contain a QuestionFormAnswers document, or Answer may be empty.
approval_timestring (date-time)If the Worker has submitted results and the Requester has approved the results, ApprovalTime is the date and time the Requester approved the results. This value is omitted from the assignment if the Requester has not yet approved the results.
assignment_idstringA unique identifier for the assignment. (pattern: <code>^[A-Z0-9]+$</code>)
assignment_statusstringThe status of the assignment. (Submitted, Approved, Rejected)
auto_approval_timestring (date-time)If results have been submitted, AutoApprovalTime is the date and time the results of the assignment results are considered Approved automatically if they have not already been explicitly approved or rejected by the Requester. This value is derived from the auto-approval delay specified by the Requester in the HIT. This value is omitted from the assignment if the Worker has not yet submitted results.
deadlinestring (date-time)The date and time of the deadline for the assignment. This value is derived from the deadline specification for the HIT and the date and time the Worker accepted the HIT.
hit_idstringThe ID of the HIT. (pattern: <code>^[A-Z0-9]+$</code>)
rejection_timestring (date-time)If the Worker has submitted results and the Requester has rejected the results, RejectionTime is the date and time the Requester rejected the results.
requester_feedbackstringThe feedback string included with the call to the ApproveAssignment operation or the RejectAssignment operation, if the Requester approved or rejected the assignment and specified feedback.
submit_timestring (date-time)If the Worker has submitted results, SubmitTime is the date and time the assignment was submitted. This value is omitted from the assignment if the Worker has not yet submitted results.
worker_idstringThe ID of the Worker who accepted the HIT. (pattern: <code>^A[A-Z0-9]+$</code>)

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
list_assignments_for_hitselectregionThe ListAssignmentsForHIT operation retrieves completed assignments for a HIT. You can use this operation to retrieve the results for a HIT. You can get assignments for a HIT at any time, even if the HIT is not yet Reviewable. If a HIT requested multiple assignments, and has received some results but has not yet become Reviewable, you can still retrieve the partial results with this operation. Use the AssignmentStatus parameter to control which set of assignments for a HIT are returned. The ListAssignmentsForHIT operation can return submitted assignments awaiting approval, or it can return assignments that have already been approved or rejected. You can set AssignmentStatus=Approved,Rejected to get assignments that have already been approved and rejected together in one result set. Only the Requester who created the HIT can retrieve the assignments for that HIT. Results are sorted and divided into numbered pages and the operation returns a single page of results. You can use the parameters of the operation to control sorting and pagination.
create_additional_assignments_for_hitinsertregion, HITId, NumberOfAdditionalAssignmentsThe CreateAdditionalAssignmentsForHIT operation increases the maximum number of assignments of an existing HIT. To extend the maximum number of assignments, specify the number of additional assignments. HITs created with fewer than 10 assignments cannot be extended to have 10 or more assignments. Attempting to add assignments in a way that brings the total number of assignments for a HIT from fewer than 10 assignments to 10 or more assignments will result in an AWS.MechanicalTurk.InvalidMaximumAssignmentsIncrease exception. HITs that were created before July 22, 2015 cannot be extended. Attempting to extend HITs that were created before July 22, 2015 will result in an AWS.MechanicalTurk.HITTooOldForExtension exception.

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 ListAssignmentsForHIT operation retrieves completed assignments for a HIT. You can use this operation to retrieve the results for a HIT. You can get assignments for a HIT at any time, even if the HIT is not yet Reviewable. If a HIT requested multiple assignments, and has received some results but has not yet become Reviewable, you can still retrieve the partial results with this operation. Use the AssignmentStatus parameter to control which set of assignments for a HIT are returned. The ListAssignmentsForHIT operation can return submitted assignments awaiting approval, or it can return assignments that have already been approved or rejected. You can set AssignmentStatus=Approved,Rejected to get assignments that have already been approved and rejected together in one result set. Only the Requester who created the HIT can retrieve the assignments for that HIT. Results are sorted and divided into numbered pages and the operation returns a single page of results. You can use the parameters of the operation to control sorting and pagination.

SELECT
accept_time,
answer,
approval_time,
assignment_id,
assignment_status,
auto_approval_time,
deadline,
hit_id,
rejection_time,
requester_feedback,
submit_time,
worker_id
FROM aws.mturk.assignments_for_hits
WHERE region = '{{ region }}' -- required
;

INSERT examples

The CreateAdditionalAssignmentsForHIT operation increases the maximum number of assignments of an existing HIT. To extend the maximum number of assignments, specify the number of additional assignments. HITs created with fewer than 10 assignments cannot be extended to have 10 or more assignments. Attempting to add assignments in a way that brings the total number of assignments for a HIT from fewer than 10 assignments to 10 or more assignments will result in an AWS.MechanicalTurk.InvalidMaximumAssignmentsIncrease exception. HITs that were created before July 22, 2015 cannot be extended. Attempting to extend HITs that were created before July 22, 2015 will result in an AWS.MechanicalTurk.HITTooOldForExtension exception.

INSERT INTO aws.mturk.assignments_for_hits (
HITId,
NumberOfAdditionalAssignments,
UniqueRequestToken,
region
)
SELECT
'{{ HITId }}' /* required */,
{{ NumberOfAdditionalAssignments }} /* required */,
'{{ UniqueRequestToken }}',
'{{ region }}'
;