amazonka-mechanicalturk-1.6.0: Amazon Mechanical Turk SDK.

Copyright(c) 2013-2018 Brendan Hay
LicenseMozilla Public License, v. 2.0.
MaintainerBrendan Hay <brendan.g.hay+amazonka@gmail.com>
Stabilityauto-generated
Portabilitynon-portable (GHC extensions)
Safe HaskellNone
LanguageHaskell2010

Network.AWS.MechanicalTurk.CreateHIT

Contents

Description

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 .

Synopsis

Creating a Request

createHIT Source #

Creates a value of CreateHIT with the minimum fields required to make a request.

Use one of the following lenses to modify other fields as desired:

  • chitHITReviewPolicy - The HIT-level Review Policy applies to the HIT. You can specify for Mechanical Turk to take various actions based on the policy.
  • chitUniqueRequestToken - A unique identifier for this request which allows you to retry the call on error without creating duplicate HITs. This is useful in cases such as network timeouts where it is unclear whether or not the call succeeded on the server. If the HIT already exists in the system from a previous call using the same UniqueRequestToken, subsequent calls will return a AWS.MechanicalTurk.HitAlreadyExists error with a message containing the HITId.
  • chitAutoApprovalDelayInSeconds - The number of seconds after an assignment for the HIT has been submitted, after which the assignment is considered Approved automatically unless the Requester explicitly rejects it.
  • chitRequesterAnnotation - An arbitrary data field. The RequesterAnnotation parameter lets your application attach arbitrary data to the HIT for tracking purposes. For example, this parameter could be an identifier internal to the Requester's application that corresponds with the HIT. The RequesterAnnotation parameter for a HIT is only visible to the Requester who created the HIT. It is not shown to the Worker, or any other Requester. The RequesterAnnotation parameter may be different for each HIT you submit. It does not affect how your HITs are grouped.
  • chitMaxAssignments - The number of times the HIT can be accepted and completed before the HIT becomes unavailable.
  • chitKeywords - One or more words or phrases that describe the HIT, separated by commas. These words are used in searches to find HITs.
  • chitHITLayoutId - The HITLayoutId allows you to use a pre-existing HIT design with placeholder values and create an additional HIT by providing those values as HITLayoutParameters. Constraints: Either a Question parameter or a HITLayoutId parameter must be provided.
  • chitHITLayoutParameters - If the HITLayoutId is provided, any placeholder values must be filled in with values using the HITLayoutParameter structure. For more information, see HITLayout.
  • chitQualificationRequirements - Conditions 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.
  • chitQuestion - The data the person completing the HIT uses to produce the results. Constraints: Must be a QuestionForm data structure, an ExternalQuestion data structure, or an HTMLQuestion data structure. The XML question data must not be larger than 64 kilobytes (65,535 bytes) in size, including whitespace. Either a Question parameter or a HITLayoutId parameter must be provided.
  • chitAssignmentReviewPolicy - The Assignment-level Review Policy applies to the assignments under the HIT. You can specify for Mechanical Turk to take various actions based on the policy.
  • chitLifetimeInSeconds - An amount of time, in seconds, after which the HIT is no longer available for users to accept. After the lifetime of the HIT elapses, the HIT no longer appears in HIT searches, even if not all of the assignments for the HIT have been accepted.
  • chitAssignmentDurationInSeconds - The amount of time, in seconds, that a Worker has to complete the HIT after accepting it. If a Worker does not complete the assignment within the specified duration, the assignment is considered abandoned. If the HIT is still active (that is, its lifetime has not elapsed), the assignment becomes available for other users to find and accept.
  • chitReward - The amount of money the Requester will pay a Worker for successfully completing the HIT.
  • chitTitle - The title of the HIT. A title should be short and descriptive about the kind of task the HIT contains. On the Amazon Mechanical Turk web site, the HIT title appears in search results, and everywhere the HIT is mentioned.
  • chitDescription - A general description of the HIT. A description includes detailed information about the kind of task the HIT contains. On the Amazon Mechanical Turk web site, the HIT description appears in the expanded view of search results, and in the HIT and assignment screens. A good description gives the user enough information to evaluate the HIT before accepting it.

data CreateHIT Source #

See: createHIT smart constructor.

Instances

Eq CreateHIT Source # 
Data CreateHIT Source # 

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> CreateHIT -> c CreateHIT #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c CreateHIT #

toConstr :: CreateHIT -> Constr #

dataTypeOf :: CreateHIT -> DataType #

dataCast1 :: Typeable (* -> *) t => (forall d. Data d => c (t d)) -> Maybe (c CreateHIT) #

dataCast2 :: Typeable (* -> * -> *) t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c CreateHIT) #

gmapT :: (forall b. Data b => b -> b) -> CreateHIT -> CreateHIT #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> CreateHIT -> r #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> CreateHIT -> r #

gmapQ :: (forall d. Data d => d -> u) -> CreateHIT -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> CreateHIT -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> CreateHIT -> m CreateHIT #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> CreateHIT -> m CreateHIT #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> CreateHIT -> m CreateHIT #

Read CreateHIT Source # 
Show CreateHIT Source # 
Generic CreateHIT Source # 

Associated Types

type Rep CreateHIT :: * -> * #

Hashable CreateHIT Source # 
ToJSON CreateHIT Source # 
NFData CreateHIT Source # 

Methods

rnf :: CreateHIT -> () #

AWSRequest CreateHIT Source # 
ToHeaders CreateHIT Source # 

Methods

toHeaders :: CreateHIT -> [Header] #

ToPath CreateHIT Source # 
ToQuery CreateHIT Source # 
type Rep CreateHIT Source # 
type Rep CreateHIT = D1 * (MetaData "CreateHIT" "Network.AWS.MechanicalTurk.CreateHIT" "amazonka-mechanicalturk-1.6.0-LJdO7bIweE9BcCI1YoYmug" False) (C1 * (MetaCons "CreateHIT'" PrefixI True) ((:*:) * ((:*:) * ((:*:) * ((:*:) * (S1 * (MetaSel (Just Symbol "_chitHITReviewPolicy") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 * (Maybe ReviewPolicy))) (S1 * (MetaSel (Just Symbol "_chitUniqueRequestToken") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 * (Maybe Text)))) ((:*:) * (S1 * (MetaSel (Just Symbol "_chitAutoApprovalDelayInSeconds") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 * (Maybe Integer))) (S1 * (MetaSel (Just Symbol "_chitRequesterAnnotation") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 * (Maybe Text))))) ((:*:) * ((:*:) * (S1 * (MetaSel (Just Symbol "_chitMaxAssignments") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 * (Maybe Int))) (S1 * (MetaSel (Just Symbol "_chitKeywords") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 * (Maybe Text)))) ((:*:) * (S1 * (MetaSel (Just Symbol "_chitHITLayoutId") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 * (Maybe Text))) (S1 * (MetaSel (Just Symbol "_chitHITLayoutParameters") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 * (Maybe [HITLayoutParameter])))))) ((:*:) * ((:*:) * ((:*:) * (S1 * (MetaSel (Just Symbol "_chitQualificationRequirements") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 * (Maybe [QualificationRequirement]))) (S1 * (MetaSel (Just Symbol "_chitQuestion") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 * (Maybe Text)))) ((:*:) * (S1 * (MetaSel (Just Symbol "_chitAssignmentReviewPolicy") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 * (Maybe ReviewPolicy))) (S1 * (MetaSel (Just Symbol "_chitLifetimeInSeconds") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 * Integer)))) ((:*:) * ((:*:) * (S1 * (MetaSel (Just Symbol "_chitAssignmentDurationInSeconds") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 * Integer)) (S1 * (MetaSel (Just Symbol "_chitReward") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 * Text))) ((:*:) * (S1 * (MetaSel (Just Symbol "_chitTitle") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 * Text)) (S1 * (MetaSel (Just Symbol "_chitDescription") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 * Text)))))))
type Rs CreateHIT Source # 

Request Lenses

chitHITReviewPolicy :: Lens' CreateHIT (Maybe ReviewPolicy) Source #

The HIT-level Review Policy applies to the HIT. You can specify for Mechanical Turk to take various actions based on the policy.

chitUniqueRequestToken :: Lens' CreateHIT (Maybe Text) Source #

A unique identifier for this request which allows you to retry the call on error without creating duplicate HITs. This is useful in cases such as network timeouts where it is unclear whether or not the call succeeded on the server. If the HIT already exists in the system from a previous call using the same UniqueRequestToken, subsequent calls will return a AWS.MechanicalTurk.HitAlreadyExists error with a message containing the HITId.

chitAutoApprovalDelayInSeconds :: Lens' CreateHIT (Maybe Integer) Source #

The number of seconds after an assignment for the HIT has been submitted, after which the assignment is considered Approved automatically unless the Requester explicitly rejects it.

chitRequesterAnnotation :: Lens' CreateHIT (Maybe Text) Source #

An arbitrary data field. The RequesterAnnotation parameter lets your application attach arbitrary data to the HIT for tracking purposes. For example, this parameter could be an identifier internal to the Requester's application that corresponds with the HIT. The RequesterAnnotation parameter for a HIT is only visible to the Requester who created the HIT. It is not shown to the Worker, or any other Requester. The RequesterAnnotation parameter may be different for each HIT you submit. It does not affect how your HITs are grouped.

chitMaxAssignments :: Lens' CreateHIT (Maybe Int) Source #

The number of times the HIT can be accepted and completed before the HIT becomes unavailable.

chitKeywords :: Lens' CreateHIT (Maybe Text) Source #

One or more words or phrases that describe the HIT, separated by commas. These words are used in searches to find HITs.

chitHITLayoutId :: Lens' CreateHIT (Maybe Text) Source #

The HITLayoutId allows you to use a pre-existing HIT design with placeholder values and create an additional HIT by providing those values as HITLayoutParameters. Constraints: Either a Question parameter or a HITLayoutId parameter must be provided.

chitHITLayoutParameters :: Lens' CreateHIT [HITLayoutParameter] Source #

If the HITLayoutId is provided, any placeholder values must be filled in with values using the HITLayoutParameter structure. For more information, see HITLayout.

chitQualificationRequirements :: Lens' CreateHIT [QualificationRequirement] Source #

Conditions 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.

chitQuestion :: Lens' CreateHIT (Maybe Text) Source #

The data the person completing the HIT uses to produce the results. Constraints: Must be a QuestionForm data structure, an ExternalQuestion data structure, or an HTMLQuestion data structure. The XML question data must not be larger than 64 kilobytes (65,535 bytes) in size, including whitespace. Either a Question parameter or a HITLayoutId parameter must be provided.

chitAssignmentReviewPolicy :: Lens' CreateHIT (Maybe ReviewPolicy) Source #

The Assignment-level Review Policy applies to the assignments under the HIT. You can specify for Mechanical Turk to take various actions based on the policy.

chitLifetimeInSeconds :: Lens' CreateHIT Integer Source #

An amount of time, in seconds, after which the HIT is no longer available for users to accept. After the lifetime of the HIT elapses, the HIT no longer appears in HIT searches, even if not all of the assignments for the HIT have been accepted.

chitAssignmentDurationInSeconds :: Lens' CreateHIT Integer Source #

The amount of time, in seconds, that a Worker has to complete the HIT after accepting it. If a Worker does not complete the assignment within the specified duration, the assignment is considered abandoned. If the HIT is still active (that is, its lifetime has not elapsed), the assignment becomes available for other users to find and accept.

chitReward :: Lens' CreateHIT Text Source #

The amount of money the Requester will pay a Worker for successfully completing the HIT.

chitTitle :: Lens' CreateHIT Text Source #

The title of the HIT. A title should be short and descriptive about the kind of task the HIT contains. On the Amazon Mechanical Turk web site, the HIT title appears in search results, and everywhere the HIT is mentioned.

chitDescription :: Lens' CreateHIT Text Source #

A general description of the HIT. A description includes detailed information about the kind of task the HIT contains. On the Amazon Mechanical Turk web site, the HIT description appears in the expanded view of search results, and in the HIT and assignment screens. A good description gives the user enough information to evaluate the HIT before accepting it.

Destructuring the Response

createHITResponse Source #

Creates a value of CreateHITResponse with the minimum fields required to make a request.

Use one of the following lenses to modify other fields as desired:

  • chitrsHIT - Contains the newly created HIT data. For a description of the HIT data structure as it appears in responses, see the HIT Data Structure documentation.
  • chitrsResponseStatus - -- | The response status code.

data CreateHITResponse Source #

See: createHITResponse smart constructor.

Instances

Eq CreateHITResponse Source # 
Data CreateHITResponse Source # 

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> CreateHITResponse -> c CreateHITResponse #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c CreateHITResponse #

toConstr :: CreateHITResponse -> Constr #

dataTypeOf :: CreateHITResponse -> DataType #

dataCast1 :: Typeable (* -> *) t => (forall d. Data d => c (t d)) -> Maybe (c CreateHITResponse) #

dataCast2 :: Typeable (* -> * -> *) t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c CreateHITResponse) #

gmapT :: (forall b. Data b => b -> b) -> CreateHITResponse -> CreateHITResponse #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> CreateHITResponse -> r #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> CreateHITResponse -> r #

gmapQ :: (forall d. Data d => d -> u) -> CreateHITResponse -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> CreateHITResponse -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> CreateHITResponse -> m CreateHITResponse #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> CreateHITResponse -> m CreateHITResponse #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> CreateHITResponse -> m CreateHITResponse #

Read CreateHITResponse Source # 
Show CreateHITResponse Source # 
Generic CreateHITResponse Source # 
NFData CreateHITResponse Source # 

Methods

rnf :: CreateHITResponse -> () #

type Rep CreateHITResponse Source # 
type Rep CreateHITResponse = D1 * (MetaData "CreateHITResponse" "Network.AWS.MechanicalTurk.CreateHIT" "amazonka-mechanicalturk-1.6.0-LJdO7bIweE9BcCI1YoYmug" False) (C1 * (MetaCons "CreateHITResponse'" PrefixI True) ((:*:) * (S1 * (MetaSel (Just Symbol "_chitrsHIT") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 * (Maybe HIT))) (S1 * (MetaSel (Just Symbol "_chitrsResponseStatus") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 * Int))))

Response Lenses

chitrsHIT :: Lens' CreateHITResponse (Maybe HIT) Source #

Contains the newly created HIT data. For a description of the HIT data structure as it appears in responses, see the HIT Data Structure documentation.

chitrsResponseStatus :: Lens' CreateHITResponse Int Source #

  • - | The response status code.