Skip to main content

hits

Creates, updates, deletes, gets or lists a hits resource.

Overview

Namehits
TypeResource
Idaws.mturk.hits

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
assignment_duration_in_secondsinteger (int64)The length of time, in seconds, that a Worker has to complete the HIT after accepting it.
auto_approval_delay_in_secondsinteger (int64)The amount of time, in seconds, after the Worker submits an assignment for the HIT that the results are automatically approved by Amazon Mechanical Turk. This is the amount of time the Requester has to reject an assignment submitted by a Worker before the assignment is auto-approved and the Worker is paid.
creation_timestring (date-time)The date and time the HIT was created.
descriptionstringA general description of the HIT.
expirationstring (date-time)The date and time the HIT expires.
hit_group_idstringThe ID of the HIT Group of this HIT. (pattern: <code>^[A-Z0-9]+$</code>)
hit_idstringA unique identifier for the HIT. (pattern: <code>^[A-Z0-9]+$</code>)
hit_layout_idstringThe ID of the HIT Layout of this HIT. (pattern: <code>^[A-Z0-9]+$</code>)
hit_review_statusstringIndicates the review status of the HIT. Valid Values are NotReviewed | MarkedForReview | ReviewedAppropriate | ReviewedInappropriate. (NotReviewed, MarkedForReview, ReviewedAppropriate, ReviewedInappropriate)
hit_statusstringThe status of the HIT and its assignments. Valid Values are Assignable | Unassignable | Reviewable | Reviewing | Disposed. (Assignable, Unassignable, Reviewable, Reviewing, Disposed)
hit_type_idstringThe ID of the HIT type of this HIT (pattern: <code>^[A-Z0-9]+$</code>)
keywordsstringOne or more words or phrases that describe the HIT, separated by commas. Search terms similar to the keywords of a HIT are more likely to have the HIT in the search results.
max_assignmentsintegerThe number of times the HIT can be accepted and completed before the HIT becomes unavailable.
number_of_assignments_availableintegerThe number of assignments for this HIT that are available for Workers to accept.
number_of_assignments_completedintegerThe number of assignments for this HIT that have been approved or rejected.
number_of_assignments_pendingintegerThe number of assignments for this HIT that are being previewed or have been accepted by Workers, but have not yet been submitted, returned, or abandoned.
qualification_requirementsarrayConditions that a Worker's Qualifications must meet in order to accept the HIT. A HIT can have between zero and ten Qualification requirements. All requirements must be met in order for a Worker to accept the HIT. Additionally, other actions can be restricted using the ActionsGuarded field on each QualificationRequirement structure.
questionstringThe data the Worker completing the HIT uses produce the results. This is either either a QuestionForm, HTMLQuestion or an ExternalQuestion data structure.
requester_annotationstringAn arbitrary data field the Requester who created the HIT can use. This field is visible only to the creator of the HIT.
rewardstringA string representing a currency amount. (pattern: <code>^[0-9]+(.)?[0-9]{0,2}$</code>)
titlestringThe title of the HIT.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
get_hitselectregionThe GetHIT operation retrieves the details of the specified HIT.
create_hitinsertregion, LifetimeInSeconds, AssignmentDurationInSeconds, Reward, Title, DescriptionThe CreateHIT operation creates a new Human Intelligence Task (HIT). The new HIT is made available for Workers to find and accept on the Amazon Mechanical Turk website. This operation allows you to specify a new HIT by passing in values for the properties of the HIT, such as its title, reward amount and number of assignments. When you pass these values to CreateHIT, a new HIT is created for you, with a new HITTypeID. The HITTypeID can be used to create additional HITs in the future without needing to specify common parameters such as the title, description and reward amount each time. An alternative way to create HITs is to first generate a HITTypeID using the CreateHITType operation and then call the CreateHITWithHITType operation. This is the recommended best practice for Requesters who are creating large numbers of HITs. CreateHIT also supports several ways to provide question data: by providing a value for the Question parameter that fully specifies the contents of the HIT, or by providing a HitLayoutId and associated HitLayoutParameters. If a HIT is created with 10 or more maximum assignments, there is an additional fee. For more information, see Amazon Mechanical Turk Pricing.
create_hit_typeinsertregion, AssignmentDurationInSeconds, Reward, Title, DescriptionThe CreateHITType operation creates a new HIT type. This operation allows you to define a standard set of HIT properties to use when creating HITs. If you register a HIT type with values that match an existing HIT type, the HIT type ID of the existing type will be returned.
create_hit_with_hit_typeinsertregion, HITTypeId, LifetimeInSecondsThe CreateHITWithHITType operation creates a new Human Intelligence Task (HIT) using an existing HITTypeID generated by the CreateHITType operation. This is an alternative way to create HITs from the CreateHIT operation. This is the recommended best practice for Requesters who are creating large numbers of HITs. CreateHITWithHITType also supports several ways to provide question data: by providing a value for the Question parameter that fully specifies the contents of the HIT, or by providing a HitLayoutId and associated HitLayoutParameters. If a HIT is created with 10 or more maximum assignments, there is an additional fee. For more information, see Amazon Mechanical Turk Pricing.
update_expiration_for_hitupdateregion, HITId, ExpireAtThe UpdateExpirationForHIT operation allows you update the expiration time of a HIT. If you update it to a time in the past, the HIT will be immediately expired.
update_hit_type_of_hitupdateregion, HITId, HITTypeIdThe UpdateHITTypeOfHIT operation allows you to change the HITType properties of a HIT. This operation disassociates the HIT from its old HITType properties and associates it with the new HITType properties. The HIT takes on the properties of the new HITType in place of the old ones.
update_hit_review_statusupdateregion, HITIdThe 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.
delete_hitdeleteregionThe DeleteHIT operation is used to delete HIT that is no longer needed. Only the Requester who created the HIT can delete it. You can only dispose of HITs that are in the Reviewable state, with all of their submitted assignments already either approved or rejected. If you call the DeleteHIT operation on a HIT that is not in the Reviewable state (for example, that has not expired, or still has active assignments), or on a HIT that is Reviewable but without all of its submitted assignments already approved or rejected, the service will return an error. HITs are automatically disposed of after 120 days. After you dispose of a HIT, you can no longer approve the HIT's rejected assignments. Disposed HITs are not returned in results for the ListHITs operation. Disposing HITs can improve the performance of operations such as ListReviewableHITs and ListHITs.

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 GetHIT operation retrieves the details of the specified HIT.

SELECT
assignment_duration_in_seconds,
auto_approval_delay_in_seconds,
creation_time,
description,
expiration,
hit_group_id,
hit_id,
hit_layout_id,
hit_review_status,
hit_status,
hit_type_id,
keywords,
max_assignments,
number_of_assignments_available,
number_of_assignments_completed,
number_of_assignments_pending,
qualification_requirements,
question,
requester_annotation,
reward,
title
FROM aws.mturk.hits
WHERE region = '{{ region }}' -- required
;

INSERT examples

The CreateHIT operation creates a new Human Intelligence Task (HIT). The new HIT is made available for Workers to find and accept on the Amazon Mechanical Turk website. This operation allows you to specify a new HIT by passing in values for the properties of the HIT, such as its title, reward amount and number of assignments. When you pass these values to CreateHIT, a new HIT is created for you, with a new HITTypeID. The HITTypeID can be used to create additional HITs in the future without needing to specify common parameters such as the title, description and reward amount each time. An alternative way to create HITs is to first generate a HITTypeID using the CreateHITType operation and then call the CreateHITWithHITType operation. This is the recommended best practice for Requesters who are creating large numbers of HITs. CreateHIT also supports several ways to provide question data: by providing a value for the Question parameter that fully specifies the contents of the HIT, or by providing a HitLayoutId and associated HitLayoutParameters. If a HIT is created with 10 or more maximum assignments, there is an additional fee. For more information, see Amazon Mechanical Turk Pricing.

INSERT INTO aws.mturk.hits (
MaxAssignments,
AutoApprovalDelayInSeconds,
LifetimeInSeconds,
AssignmentDurationInSeconds,
Reward,
Title,
Keywords,
Description,
Question,
RequesterAnnotation,
QualificationRequirements,
UniqueRequestToken,
AssignmentReviewPolicy,
HITReviewPolicy,
HITLayoutId,
HITLayoutParameters,
region
)
SELECT
{{ MaxAssignments }},
{{ AutoApprovalDelayInSeconds }},
{{ LifetimeInSeconds }} /* required */,
{{ AssignmentDurationInSeconds }} /* required */,
'{{ Reward }}' /* required */,
'{{ Title }}' /* required */,
'{{ Keywords }}',
'{{ Description }}' /* required */,
'{{ Question }}',
'{{ RequesterAnnotation }}',
'{{ QualificationRequirements }}',
'{{ UniqueRequestToken }}',
'{{ AssignmentReviewPolicy }}',
'{{ HITReviewPolicy }}',
'{{ HITLayoutId }}',
'{{ HITLayoutParameters }}',
'{{ region }}'
RETURNING
hit
;

UPDATE examples

The UpdateExpirationForHIT operation allows you update the expiration time of a HIT. If you update it to a time in the past, the HIT will be immediately expired.

UPDATE aws.mturk.hits
SET
HITId = '{{ HITId }}',
ExpireAt = '{{ ExpireAt }}'
WHERE
region = '{{ region }}' --required
AND HITId = '{{ HITId }}' --required
AND ExpireAt = '{{ ExpireAt }}' --required;

DELETE examples

The DeleteHIT operation is used to delete HIT that is no longer needed. Only the Requester who created the HIT can delete it. You can only dispose of HITs that are in the Reviewable state, with all of their submitted assignments already either approved or rejected. If you call the DeleteHIT operation on a HIT that is not in the Reviewable state (for example, that has not expired, or still has active assignments), or on a HIT that is Reviewable but without all of its submitted assignments already approved or rejected, the service will return an error. HITs are automatically disposed of after 120 days. After you dispose of a HIT, you can no longer approve the HIT's rejected assignments. Disposed HITs are not returned in results for the ListHITs operation. Disposing HITs can improve the performance of operations such as ListReviewableHITs and ListHITs.

DELETE FROM aws.mturk.hits
WHERE region = '{{ region }}' --required
;