The AWS SDK for JavaScript v2 has reached end-of-support.
We recommend that you migrate to AWS SDK for JavaScript v3. For additional details and information on how to migrate, please refer to the announcement.

Class: AWS.MTurk

Inherits:
AWS.Service show all
Identifier:
mturk
API Version:
2017-01-17
Defined in:
(unknown)

Overview

Constructs a service interface object. Each API operation is exposed as a function on service.

Sending a Request Using MTurk

var mturk = new AWS.MTurk();
mturk.acceptQualificationRequest(params, function (err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Locking the API Version

In order to ensure that the MTurk object uses this specific API, you can construct the object by passing the apiVersion option to the constructor:

var mturk = new AWS.MTurk({apiVersion: '2017-01-17'});

You can also set the API version globally in AWS.config.apiVersions using the mturk service identifier:

AWS.config.apiVersions = {
  mturk: '2017-01-17',
  // other service API versions
};

var mturk = new AWS.MTurk();

Version:

  • 2017-01-17

Constructor Summary collapse

Property Summary collapse

Properties inherited from AWS.Service

apiVersions

Method Summary collapse

Methods inherited from AWS.Service

makeRequest, makeUnauthenticatedRequest, waitFor, setupRequestListeners, defineService

Constructor Details

new AWS.MTurk(options = {}) ⇒ Object

Constructs a service object. This object has one method for each API operation.

Examples:

Constructing a MTurk object

var mturk = new AWS.MTurk({apiVersion: '2017-01-17'});

Options Hash (options):

  • params (map)

    An optional map of parameters to bind to every request sent by this service object. For more information on bound parameters, see "Working with Services" in the Getting Started Guide.

  • endpoint (String|AWS.Endpoint)

    The endpoint URI to send requests to. The default endpoint is built from the configured region. The endpoint should be a string like 'https://{service}.{region}.amazonaws.com' or an Endpoint object.

  • accessKeyId (String)

    your AWS access key ID.

  • secretAccessKey (String)

    your AWS secret access key.

  • sessionToken (AWS.Credentials)

    the optional AWS session token to sign requests with.

  • credentials (AWS.Credentials)

    the AWS credentials to sign requests with. You can either specify this object, or specify the accessKeyId and secretAccessKey options directly.

  • credentialProvider (AWS.CredentialProviderChain)

    the provider chain used to resolve credentials if no static credentials property is set.

  • region (String)

    the region to send service requests to. See AWS.MTurk.region for more information.

  • maxRetries (Integer)

    the maximum amount of retries to attempt with a request. See AWS.MTurk.maxRetries for more information.

  • maxRedirects (Integer)

    the maximum amount of redirects to follow with a request. See AWS.MTurk.maxRedirects for more information.

  • sslEnabled (Boolean)

    whether to enable SSL for requests.

  • paramValidation (Boolean|map)

    whether input parameters should be validated against the operation description before sending the request. Defaults to true. Pass a map to enable any of the following specific validation features:

    • min [Boolean] — Validates that a value meets the min constraint. This is enabled by default when paramValidation is set to true.
    • max [Boolean] — Validates that a value meets the max constraint.
    • pattern [Boolean] — Validates that a string value matches a regular expression.
    • enum [Boolean] — Validates that a string value matches one of the allowable enum values.
  • computeChecksums (Boolean)

    whether to compute checksums for payload bodies when the service accepts it (currently supported in S3 only)

  • convertResponseTypes (Boolean)

    whether types are converted when parsing response data. Currently only supported for JSON based services. Turning this off may improve performance on large response payloads. Defaults to true.

  • correctClockSkew (Boolean)

    whether to apply a clock skew correction and retry requests that fail because of an skewed client clock. Defaults to false.

  • s3ForcePathStyle (Boolean)

    whether to force path style URLs for S3 objects.

  • s3BucketEndpoint (Boolean)

    whether the provided endpoint addresses an individual bucket (false if it addresses the root API endpoint). Note that setting this configuration option requires an endpoint to be provided explicitly to the service constructor.

  • s3DisableBodySigning (Boolean)

    whether S3 body signing should be disabled when using signature version v4. Body signing can only be disabled when using https. Defaults to true.

  • s3UsEast1RegionalEndpoint ('legacy'|'regional')

    when region is set to 'us-east-1', whether to send s3 request to global endpoints or 'us-east-1' regional endpoints. This config is only applicable to S3 client. Defaults to legacy

  • s3UseArnRegion (Boolean)

    whether to override the request region with the region inferred from requested resource's ARN. Only available for S3 buckets Defaults to true

  • retryDelayOptions (map)

    A set of options to configure the retry delay on retryable errors. Currently supported options are:

    • base [Integer] — The base number of milliseconds to use in the exponential backoff for operation retries. Defaults to 100 ms for all services except DynamoDB, where it defaults to 50ms.
    • customBackoff [function] — A custom function that accepts a retry count and error and returns the amount of time to delay in milliseconds. If the result is a non-zero negative value, no further retry attempts will be made. The base option will be ignored if this option is supplied. The function is only called for retryable errors.
  • httpOptions (map)

    A set of options to pass to the low-level HTTP request. Currently supported options are:

    • proxy [String] — the URL to proxy requests through
    • agent [http.Agent, https.Agent] — the Agent object to perform HTTP requests with. Used for connection pooling. Defaults to the global agent (http.globalAgent) for non-SSL connections. Note that for SSL connections, a special Agent object is used in order to enable peer certificate verification. This feature is only available in the Node.js environment.
    • connectTimeout [Integer] — Sets the socket to timeout after failing to establish a connection with the server after connectTimeout milliseconds. This timeout has no effect once a socket connection has been established.
    • timeout [Integer] — Sets the socket to timeout after timeout milliseconds of inactivity on the socket. Defaults to two minutes (120000).
    • xhrAsync [Boolean] — Whether the SDK will send asynchronous HTTP requests. Used in the browser environment only. Set to false to send requests synchronously. Defaults to true (async on).
    • xhrWithCredentials [Boolean] — Sets the "withCredentials" property of an XMLHttpRequest object. Used in the browser environment only. Defaults to false.
  • apiVersion (String, Date)

    a String in YYYY-MM-DD format (or a date) that represents the latest possible API version that can be used in all services (unless overridden by apiVersions). Specify 'latest' to use the latest possible version.

  • apiVersions (map<String, String|Date>)

    a map of service identifiers (the lowercase service class name) with the API version to use when instantiating a service. Specify 'latest' for each individual that can use the latest available version.

  • logger (#write, #log)

    an object that responds to .write() (like a stream) or .log() (like the console object) in order to log information about requests

  • systemClockOffset (Number)

    an offset value in milliseconds to apply to all signing times. Use this to compensate for clock skew when your system may be out of sync with the service time. Note that this configuration option can only be applied to the global AWS.config object and cannot be overridden in service-specific configuration. Defaults to 0 milliseconds.

  • signatureVersion (String)

    the signature version to sign requests with (overriding the API configuration). Possible values are: 'v2', 'v3', 'v4'.

  • signatureCache (Boolean)

    whether the signature to sign requests with (overriding the API configuration) is cached. Only applies to the signature version 'v4'. Defaults to true.

  • dynamoDbCrc32 (Boolean)

    whether to validate the CRC32 checksum of HTTP response bodies returned by DynamoDB. Default: true.

  • useAccelerateEndpoint (Boolean)

    Whether to use the S3 Transfer Acceleration endpoint with the S3 service. Default: false.

  • clientSideMonitoring (Boolean)

    whether to collect and publish this client's performance metrics of all its API requests.

  • endpointDiscoveryEnabled (Boolean|undefined)

    whether to call operations with endpoints given by service dynamically. Setting this

  • endpointCacheSize (Number)

    the size of the global cache storing endpoints from endpoint discovery operations. Once endpoint cache is created, updating this setting cannot change existing cache size. Defaults to 1000

  • hostPrefixEnabled (Boolean)

    whether to marshal request parameters to the prefix of hostname. Defaults to true.

  • stsRegionalEndpoints ('legacy'|'regional')

    whether to send sts request to global endpoints or regional endpoints. Defaults to 'legacy'.

  • useFipsEndpoint (Boolean)

    Enables FIPS compatible endpoints. Defaults to false.

  • useDualstackEndpoint (Boolean)

    Enables IPv6 dualstack endpoint. Defaults to false.

Property Details

endpointAWS.Endpoint (readwrite)

Returns an Endpoint object representing the endpoint URL for service requests.

Returns:

  • (AWS.Endpoint)

    an Endpoint object representing the endpoint URL for service requests.

Method Details

acceptQualificationRequest(params = {}, callback) ⇒ AWS.Request

The AcceptQualificationRequest operation approves a Worker's request for a Qualification.

Only the owner of the Qualification type can grant a Qualification request for that type.

A successful request for the AcceptQualificationRequest operation returns with no errors and an empty body.

Service Reference:

Examples:

Calling the acceptQualificationRequest operation

var params = {
  QualificationRequestId: 'STRING_VALUE', /* required */
  IntegerValue: 'NUMBER_VALUE'
};
mturk.acceptQualificationRequest(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • QualificationRequestId — (String)

      The ID of the Qualification request, as returned by the GetQualificationRequests operation.

    • IntegerValue — (Integer)

      The value of the Qualification. You can omit this value if you are using the presence or absence of the Qualification as the basis for a HIT requirement.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

approveAssignment(params = {}, callback) ⇒ AWS.Request

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.

Service Reference:

Examples:

Calling the approveAssignment operation

var params = {
  AssignmentId: 'STRING_VALUE', /* required */
  OverrideRejection: true || false,
  RequesterFeedback: 'STRING_VALUE'
};
mturk.approveAssignment(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • AssignmentId — (String)

      The ID of the assignment. The assignment must correspond to a HIT created by the Requester.

    • RequesterFeedback — (String)

      A message for the Worker, which the Worker can see in the Status section of the web site.

    • OverrideRejection — (Boolean)

      A flag indicating that an assignment should be approved even if it was previously rejected. Defaults to False.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

associateQualificationWithWorker(params = {}, callback) ⇒ AWS.Request

The AssociateQualificationWithWorker operation gives a Worker a Qualification. AssociateQualificationWithWorker does not require that the Worker submit a Qualification request. It gives the Qualification directly to the Worker.

You can only assign a Qualification of a Qualification type that you created (using the CreateQualificationType operation).

Note: Note: AssociateQualificationWithWorker does not affect any pending Qualification requests for the Qualification by the Worker. If you assign a Qualification to a Worker, then later grant a Qualification request made by the Worker, the granting of the request may modify the Qualification score. To resolve a pending Qualification request without affecting the Qualification the Worker already has, reject the request with the RejectQualificationRequest operation.

Examples:

Calling the associateQualificationWithWorker operation

var params = {
  QualificationTypeId: 'STRING_VALUE', /* required */
  WorkerId: 'STRING_VALUE', /* required */
  IntegerValue: 'NUMBER_VALUE',
  SendNotification: true || false
};
mturk.associateQualificationWithWorker(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • QualificationTypeId — (String)

      The ID of the Qualification type to use for the assigned Qualification.

    • WorkerId — (String)

      The ID of the Worker to whom the Qualification is being assigned. Worker IDs are included with submitted HIT assignments and Qualification requests.

    • IntegerValue — (Integer)

      The value of the Qualification to assign.

    • SendNotification — (Boolean)

      Specifies whether to send a notification email message to the Worker saying that the qualification was assigned to the Worker. Note: this is true by default.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

createAdditionalAssignmentsForHIT(params = {}, callback) ⇒ AWS.Request

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.

Note:
  • 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.

Examples:

Calling the createAdditionalAssignmentsForHIT operation

var params = {
  HITId: 'STRING_VALUE', /* required */
  NumberOfAdditionalAssignments: 'NUMBER_VALUE', /* required */
  UniqueRequestToken: 'STRING_VALUE'
};
mturk.createAdditionalAssignmentsForHIT(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • HITId — (String)

      The ID of the HIT to extend.

    • NumberOfAdditionalAssignments — (Integer)

      The number of additional assignments to request for this HIT.

    • UniqueRequestToken — (String)

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

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

createHIT(params = {}, callback) ⇒ AWS.Request

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.

Note: If a HIT is created with 10 or more maximum assignments, there is an additional fee. For more information, see Amazon Mechanical Turk Pricing.

Service Reference:

Examples:

Calling the createHIT operation

var params = {
  AssignmentDurationInSeconds: 'NUMBER_VALUE', /* required */
  Description: 'STRING_VALUE', /* required */
  LifetimeInSeconds: 'NUMBER_VALUE', /* required */
  Reward: 'STRING_VALUE', /* required */
  Title: 'STRING_VALUE', /* required */
  AssignmentReviewPolicy: {
    PolicyName: 'STRING_VALUE', /* required */
    Parameters: [
      {
        Key: 'STRING_VALUE',
        MapEntries: [
          {
            Key: 'STRING_VALUE',
            Values: [
              'STRING_VALUE',
              /* more items */
            ]
          },
          /* more items */
        ],
        Values: [
          'STRING_VALUE',
          /* more items */
        ]
      },
      /* more items */
    ]
  },
  AutoApprovalDelayInSeconds: 'NUMBER_VALUE',
  HITLayoutId: 'STRING_VALUE',
  HITLayoutParameters: [
    {
      Name: 'STRING_VALUE', /* required */
      Value: 'STRING_VALUE' /* required */
    },
    /* more items */
  ],
  HITReviewPolicy: {
    PolicyName: 'STRING_VALUE', /* required */
    Parameters: [
      {
        Key: 'STRING_VALUE',
        MapEntries: [
          {
            Key: 'STRING_VALUE',
            Values: [
              'STRING_VALUE',
              /* more items */
            ]
          },
          /* more items */
        ],
        Values: [
          'STRING_VALUE',
          /* more items */
        ]
      },
      /* more items */
    ]
  },
  Keywords: 'STRING_VALUE',
  MaxAssignments: 'NUMBER_VALUE',
  QualificationRequirements: [
    {
      Comparator: LessThan | LessThanOrEqualTo | GreaterThan | GreaterThanOrEqualTo | EqualTo | NotEqualTo | Exists | DoesNotExist | In | NotIn, /* required */
      QualificationTypeId: 'STRING_VALUE', /* required */
      ActionsGuarded: Accept | PreviewAndAccept | DiscoverPreviewAndAccept,
      IntegerValues: [
        'NUMBER_VALUE',
        /* more items */
      ],
      LocaleValues: [
        {
          Country: 'STRING_VALUE', /* required */
          Subdivision: 'STRING_VALUE'
        },
        /* more items */
      ],
      RequiredToPreview: true || false
    },
    /* more items */
  ],
  Question: 'STRING_VALUE',
  RequesterAnnotation: 'STRING_VALUE',
  UniqueRequestToken: 'STRING_VALUE'
};
mturk.createHIT(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • MaxAssignments — (Integer)

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

    • AutoApprovalDelayInSeconds — (Integer)

      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.

    • LifetimeInSeconds — (Integer)

      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.

    • AssignmentDurationInSeconds — (Integer)

      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.

    • Reward — (String)

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

    • Title — (String)

      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.

    • Keywords — (String)

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

    • Description — (String)

      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.

    • Question — (String)

      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.

    • RequesterAnnotation — (String)

      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.

    • QualificationRequirements — (Array<map>)

      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.

      • QualificationTypeIdrequired — (String)

        The ID of the Qualification type for the requirement.

      • Comparatorrequired — (String)

        The kind of comparison to make against a Qualification's value. You can compare a Qualification's value to an IntegerValue to see if it is LessThan, LessThanOrEqualTo, GreaterThan, GreaterThanOrEqualTo, EqualTo, or NotEqualTo the IntegerValue. You can compare it to a LocaleValue to see if it is EqualTo, or NotEqualTo the LocaleValue. You can check to see if the value is In or NotIn a set of IntegerValue or LocaleValue values. Lastly, a Qualification requirement can also test if a Qualification Exists or DoesNotExist in the user's profile, regardless of its value.

        Possible values include:
        • "LessThan"
        • "LessThanOrEqualTo"
        • "GreaterThan"
        • "GreaterThanOrEqualTo"
        • "EqualTo"
        • "NotEqualTo"
        • "Exists"
        • "DoesNotExist"
        • "In"
        • "NotIn"
      • IntegerValues — (Array<Integer>)

        The integer value to compare against the Qualification's value. IntegerValue must not be present if Comparator is Exists or DoesNotExist. IntegerValue can only be used if the Qualification type has an integer value; it cannot be used with the Worker_Locale QualificationType ID. When performing a set comparison by using the In or the NotIn comparator, you can use up to 15 IntegerValue elements in a QualificationRequirement data structure.

      • LocaleValues — (Array<map>)

        The locale value to compare against the Qualification's value. The local value must be a valid ISO 3166 country code or supports ISO 3166-2 subdivisions. LocaleValue can only be used with a Worker_Locale QualificationType ID. LocaleValue can only be used with the EqualTo, NotEqualTo, In, and NotIn comparators. You must only use a single LocaleValue element when using the EqualTo or NotEqualTo comparators. When performing a set comparison by using the In or the NotIn comparator, you can use up to 30 LocaleValue elements in a QualificationRequirement data structure.

        • Countryrequired — (String)

          The country of the locale. Must be a valid ISO 3166 country code. For example, the code US refers to the United States of America.

        • Subdivision — (String)

          The state or subdivision of the locale. A valid ISO 3166-2 subdivision code. For example, the code WA refers to the state of Washington.

      • RequiredToPreview — (Boolean)

        DEPRECATED: Use the ActionsGuarded field instead. If RequiredToPreview is true, the question data for the HIT will not be shown when a Worker whose Qualifications do not meet this requirement tries to preview the HIT. That is, a Worker's Qualifications must meet all of the requirements for which RequiredToPreview is true in order to preview the HIT. If a Worker meets all of the requirements where RequiredToPreview is true (or if there are no such requirements), but does not meet all of the requirements for the HIT, the Worker will be allowed to preview the HIT's question data, but will not be allowed to accept and complete the HIT. The default is false. This should not be used in combination with the ActionsGuarded field.

      • ActionsGuarded — (String)

        Setting this attribute prevents Workers whose Qualifications do not meet this QualificationRequirement from taking the specified action. Valid arguments include "Accept" (Worker cannot accept the HIT, but can preview the HIT and see it in their search results), "PreviewAndAccept" (Worker cannot accept or preview the HIT, but can see the HIT in their search results), and "DiscoverPreviewAndAccept" (Worker cannot accept, preview, or see the HIT in their search results). It's possible for you to create a HIT with multiple QualificationRequirements (which can have different values for the ActionGuarded attribute). In this case, the Worker is only permitted to perform an action when they have met all QualificationRequirements guarding the action. The actions in the order of least restrictive to most restrictive are Discover, Preview and Accept. For example, if a Worker meets all QualificationRequirements that are set to DiscoverPreviewAndAccept, but do not meet all requirements that are set with PreviewAndAccept, then the Worker will be able to Discover, i.e. see the HIT in their search result, but will not be able to Preview or Accept the HIT. ActionsGuarded should not be used in combination with the RequiredToPreview field.

        Possible values include:
        • "Accept"
        • "PreviewAndAccept"
        • "DiscoverPreviewAndAccept"
    • UniqueRequestToken — (String)

      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.

      Note: Note: It is your responsibility to ensure uniqueness of the token. The unique token expires after 24 hours. Subsequent calls using the same UniqueRequestToken made after the 24 hour limit could create duplicate HITs.
    • AssignmentReviewPolicy — (map)

      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.

      • PolicyNamerequired — (String)

        Name of a Review Policy: SimplePlurality/2011-09-01 or ScoreMyKnownAnswers/2011-09-01

      • Parameters — (Array<map>)

        Name of the parameter from the Review policy.

        • Key — (String)

          Name of the parameter from the list of Review Polices.

        • Values — (Array<String>)

          The list of values of the Parameter

        • MapEntries — (Array<map>)

          List of ParameterMapEntry objects.

          • Key — (String)

            The QuestionID from the HIT that is used to identify which question requires Mechanical Turk to score as part of the ScoreMyKnownAnswers/2011-09-01 Review Policy.

          • Values — (Array<String>)

            The list of answers to the question specified in the MapEntry Key element. The Worker must match all values in order for the answer to be scored correctly.

    • HITReviewPolicy — (map)

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

      • PolicyNamerequired — (String)

        Name of a Review Policy: SimplePlurality/2011-09-01 or ScoreMyKnownAnswers/2011-09-01

      • Parameters — (Array<map>)

        Name of the parameter from the Review policy.

        • Key — (String)

          Name of the parameter from the list of Review Polices.

        • Values — (Array<String>)

          The list of values of the Parameter

        • MapEntries — (Array<map>)

          List of ParameterMapEntry objects.

          • Key — (String)

            The QuestionID from the HIT that is used to identify which question requires Mechanical Turk to score as part of the ScoreMyKnownAnswers/2011-09-01 Review Policy.

          • Values — (Array<String>)

            The list of answers to the question specified in the MapEntry Key element. The Worker must match all values in order for the answer to be scored correctly.

    • HITLayoutId — (String)

      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.

    • HITLayoutParameters — (Array<map>)

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

      • Namerequired — (String)

        The name of the parameter in the HITLayout.

      • Valuerequired — (String)

        The value substituted for the parameter referenced in the HITLayout.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • HIT — (map)

        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.

        • HITId — (String)

          A unique identifier for the HIT.

        • HITTypeId — (String)

          The ID of the HIT type of this HIT

        • HITGroupId — (String)

          The ID of the HIT Group of this HIT.

        • HITLayoutId — (String)

          The ID of the HIT Layout of this HIT.

        • CreationTime — (Date)

          The date and time the HIT was created.

        • Title — (String)

          The title of the HIT.

        • Description — (String)

          A general description of the HIT.

        • Question — (String)

          The data the Worker completing the HIT uses produce the results. This is either either a QuestionForm, HTMLQuestion or an ExternalQuestion data structure.

        • Keywords — (String)

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

        • HITStatus — (String)

          The status of the HIT and its assignments. Valid Values are Assignable | Unassignable | Reviewable | Reviewing | Disposed.

          Possible values include:
          • "Assignable"
          • "Unassignable"
          • "Reviewable"
          • "Reviewing"
          • "Disposed"
        • MaxAssignments — (Integer)

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

        • Reward — (String)

          A string representing a currency amount.

        • AutoApprovalDelayInSeconds — (Integer)

          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.

        • Expiration — (Date)

          The date and time the HIT expires.

        • AssignmentDurationInSeconds — (Integer)

          The length of time, in seconds, that a Worker has to complete the HIT after accepting it.

        • RequesterAnnotation — (String)

          An arbitrary data field the Requester who created the HIT can use. This field is visible only to the creator of the HIT.

        • QualificationRequirements — (Array<map>)

          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.

          • QualificationTypeIdrequired — (String)

            The ID of the Qualification type for the requirement.

          • Comparatorrequired — (String)

            The kind of comparison to make against a Qualification's value. You can compare a Qualification's value to an IntegerValue to see if it is LessThan, LessThanOrEqualTo, GreaterThan, GreaterThanOrEqualTo, EqualTo, or NotEqualTo the IntegerValue. You can compare it to a LocaleValue to see if it is EqualTo, or NotEqualTo the LocaleValue. You can check to see if the value is In or NotIn a set of IntegerValue or LocaleValue values. Lastly, a Qualification requirement can also test if a Qualification Exists or DoesNotExist in the user's profile, regardless of its value.

            Possible values include:
            • "LessThan"
            • "LessThanOrEqualTo"
            • "GreaterThan"
            • "GreaterThanOrEqualTo"
            • "EqualTo"
            • "NotEqualTo"
            • "Exists"
            • "DoesNotExist"
            • "In"
            • "NotIn"
          • IntegerValues — (Array<Integer>)

            The integer value to compare against the Qualification's value. IntegerValue must not be present if Comparator is Exists or DoesNotExist. IntegerValue can only be used if the Qualification type has an integer value; it cannot be used with the Worker_Locale QualificationType ID. When performing a set comparison by using the In or the NotIn comparator, you can use up to 15 IntegerValue elements in a QualificationRequirement data structure.

          • LocaleValues — (Array<map>)

            The locale value to compare against the Qualification's value. The local value must be a valid ISO 3166 country code or supports ISO 3166-2 subdivisions. LocaleValue can only be used with a Worker_Locale QualificationType ID. LocaleValue can only be used with the EqualTo, NotEqualTo, In, and NotIn comparators. You must only use a single LocaleValue element when using the EqualTo or NotEqualTo comparators. When performing a set comparison by using the In or the NotIn comparator, you can use up to 30 LocaleValue elements in a QualificationRequirement data structure.

            • Countryrequired — (String)

              The country of the locale. Must be a valid ISO 3166 country code. For example, the code US refers to the United States of America.

            • Subdivision — (String)

              The state or subdivision of the locale. A valid ISO 3166-2 subdivision code. For example, the code WA refers to the state of Washington.

          • RequiredToPreview — (Boolean)

            DEPRECATED: Use the ActionsGuarded field instead. If RequiredToPreview is true, the question data for the HIT will not be shown when a Worker whose Qualifications do not meet this requirement tries to preview the HIT. That is, a Worker's Qualifications must meet all of the requirements for which RequiredToPreview is true in order to preview the HIT. If a Worker meets all of the requirements where RequiredToPreview is true (or if there are no such requirements), but does not meet all of the requirements for the HIT, the Worker will be allowed to preview the HIT's question data, but will not be allowed to accept and complete the HIT. The default is false. This should not be used in combination with the ActionsGuarded field.

          • ActionsGuarded — (String)

            Setting this attribute prevents Workers whose Qualifications do not meet this QualificationRequirement from taking the specified action. Valid arguments include "Accept" (Worker cannot accept the HIT, but can preview the HIT and see it in their search results), "PreviewAndAccept" (Worker cannot accept or preview the HIT, but can see the HIT in their search results), and "DiscoverPreviewAndAccept" (Worker cannot accept, preview, or see the HIT in their search results). It's possible for you to create a HIT with multiple QualificationRequirements (which can have different values for the ActionGuarded attribute). In this case, the Worker is only permitted to perform an action when they have met all QualificationRequirements guarding the action. The actions in the order of least restrictive to most restrictive are Discover, Preview and Accept. For example, if a Worker meets all QualificationRequirements that are set to DiscoverPreviewAndAccept, but do not meet all requirements that are set with PreviewAndAccept, then the Worker will be able to Discover, i.e. see the HIT in their search result, but will not be able to Preview or Accept the HIT. ActionsGuarded should not be used in combination with the RequiredToPreview field.

            Possible values include:
            • "Accept"
            • "PreviewAndAccept"
            • "DiscoverPreviewAndAccept"
        • HITReviewStatus — (String)

          Indicates the review status of the HIT. Valid Values are NotReviewed | MarkedForReview | ReviewedAppropriate | ReviewedInappropriate.

          Possible values include:
          • "NotReviewed"
          • "MarkedForReview"
          • "ReviewedAppropriate"
          • "ReviewedInappropriate"
        • NumberOfAssignmentsPending — (Integer)

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

        • NumberOfAssignmentsAvailable — (Integer)

          The number of assignments for this HIT that are available for Workers to accept.

        • NumberOfAssignmentsCompleted — (Integer)

          The number of assignments for this HIT that have been approved or rejected.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

createHITType(params = {}, callback) ⇒ AWS.Request

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

Service Reference:

Examples:

Calling the createHITType operation

var params = {
  AssignmentDurationInSeconds: 'NUMBER_VALUE', /* required */
  Description: 'STRING_VALUE', /* required */
  Reward: 'STRING_VALUE', /* required */
  Title: 'STRING_VALUE', /* required */
  AutoApprovalDelayInSeconds: 'NUMBER_VALUE',
  Keywords: 'STRING_VALUE',
  QualificationRequirements: [
    {
      Comparator: LessThan | LessThanOrEqualTo | GreaterThan | GreaterThanOrEqualTo | EqualTo | NotEqualTo | Exists | DoesNotExist | In | NotIn, /* required */
      QualificationTypeId: 'STRING_VALUE', /* required */
      ActionsGuarded: Accept | PreviewAndAccept | DiscoverPreviewAndAccept,
      IntegerValues: [
        'NUMBER_VALUE',
        /* more items */
      ],
      LocaleValues: [
        {
          Country: 'STRING_VALUE', /* required */
          Subdivision: 'STRING_VALUE'
        },
        /* more items */
      ],
      RequiredToPreview: true || false
    },
    /* more items */
  ]
};
mturk.createHITType(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • AutoApprovalDelayInSeconds — (Integer)

      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.

    • AssignmentDurationInSeconds — (Integer)

      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.

    • Reward — (String)

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

    • Title — (String)

      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.

    • Keywords — (String)

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

    • Description — (String)

      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.

    • QualificationRequirements — (Array<map>)

      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.

      • QualificationTypeIdrequired — (String)

        The ID of the Qualification type for the requirement.

      • Comparatorrequired — (String)

        The kind of comparison to make against a Qualification's value. You can compare a Qualification's value to an IntegerValue to see if it is LessThan, LessThanOrEqualTo, GreaterThan, GreaterThanOrEqualTo, EqualTo, or NotEqualTo the IntegerValue. You can compare it to a LocaleValue to see if it is EqualTo, or NotEqualTo the LocaleValue. You can check to see if the value is In or NotIn a set of IntegerValue or LocaleValue values. Lastly, a Qualification requirement can also test if a Qualification Exists or DoesNotExist in the user's profile, regardless of its value.

        Possible values include:
        • "LessThan"
        • "LessThanOrEqualTo"
        • "GreaterThan"
        • "GreaterThanOrEqualTo"
        • "EqualTo"
        • "NotEqualTo"
        • "Exists"
        • "DoesNotExist"
        • "In"
        • "NotIn"
      • IntegerValues — (Array<Integer>)

        The integer value to compare against the Qualification's value. IntegerValue must not be present if Comparator is Exists or DoesNotExist. IntegerValue can only be used if the Qualification type has an integer value; it cannot be used with the Worker_Locale QualificationType ID. When performing a set comparison by using the In or the NotIn comparator, you can use up to 15 IntegerValue elements in a QualificationRequirement data structure.

      • LocaleValues — (Array<map>)

        The locale value to compare against the Qualification's value. The local value must be a valid ISO 3166 country code or supports ISO 3166-2 subdivisions. LocaleValue can only be used with a Worker_Locale QualificationType ID. LocaleValue can only be used with the EqualTo, NotEqualTo, In, and NotIn comparators. You must only use a single LocaleValue element when using the EqualTo or NotEqualTo comparators. When performing a set comparison by using the In or the NotIn comparator, you can use up to 30 LocaleValue elements in a QualificationRequirement data structure.

        • Countryrequired — (String)

          The country of the locale. Must be a valid ISO 3166 country code. For example, the code US refers to the United States of America.

        • Subdivision — (String)

          The state or subdivision of the locale. A valid ISO 3166-2 subdivision code. For example, the code WA refers to the state of Washington.

      • RequiredToPreview — (Boolean)

        DEPRECATED: Use the ActionsGuarded field instead. If RequiredToPreview is true, the question data for the HIT will not be shown when a Worker whose Qualifications do not meet this requirement tries to preview the HIT. That is, a Worker's Qualifications must meet all of the requirements for which RequiredToPreview is true in order to preview the HIT. If a Worker meets all of the requirements where RequiredToPreview is true (or if there are no such requirements), but does not meet all of the requirements for the HIT, the Worker will be allowed to preview the HIT's question data, but will not be allowed to accept and complete the HIT. The default is false. This should not be used in combination with the ActionsGuarded field.

      • ActionsGuarded — (String)

        Setting this attribute prevents Workers whose Qualifications do not meet this QualificationRequirement from taking the specified action. Valid arguments include "Accept" (Worker cannot accept the HIT, but can preview the HIT and see it in their search results), "PreviewAndAccept" (Worker cannot accept or preview the HIT, but can see the HIT in their search results), and "DiscoverPreviewAndAccept" (Worker cannot accept, preview, or see the HIT in their search results). It's possible for you to create a HIT with multiple QualificationRequirements (which can have different values for the ActionGuarded attribute). In this case, the Worker is only permitted to perform an action when they have met all QualificationRequirements guarding the action. The actions in the order of least restrictive to most restrictive are Discover, Preview and Accept. For example, if a Worker meets all QualificationRequirements that are set to DiscoverPreviewAndAccept, but do not meet all requirements that are set with PreviewAndAccept, then the Worker will be able to Discover, i.e. see the HIT in their search result, but will not be able to Preview or Accept the HIT. ActionsGuarded should not be used in combination with the RequiredToPreview field.

        Possible values include:
        • "Accept"
        • "PreviewAndAccept"
        • "DiscoverPreviewAndAccept"

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • HITTypeId — (String)

        The ID of the newly registered HIT type.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

createHITWithHITType(params = {}, callback) ⇒ AWS.Request

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

Note: If a HIT is created with 10 or more maximum assignments, there is an additional fee. For more information, see Amazon Mechanical Turk Pricing.

Service Reference:

Examples:

Calling the createHITWithHITType operation

var params = {
  HITTypeId: 'STRING_VALUE', /* required */
  LifetimeInSeconds: 'NUMBER_VALUE', /* required */
  AssignmentReviewPolicy: {
    PolicyName: 'STRING_VALUE', /* required */
    Parameters: [
      {
        Key: 'STRING_VALUE',
        MapEntries: [
          {
            Key: 'STRING_VALUE',
            Values: [
              'STRING_VALUE',
              /* more items */
            ]
          },
          /* more items */
        ],
        Values: [
          'STRING_VALUE',
          /* more items */
        ]
      },
      /* more items */
    ]
  },
  HITLayoutId: 'STRING_VALUE',
  HITLayoutParameters: [
    {
      Name: 'STRING_VALUE', /* required */
      Value: 'STRING_VALUE' /* required */
    },
    /* more items */
  ],
  HITReviewPolicy: {
    PolicyName: 'STRING_VALUE', /* required */
    Parameters: [
      {
        Key: 'STRING_VALUE',
        MapEntries: [
          {
            Key: 'STRING_VALUE',
            Values: [
              'STRING_VALUE',
              /* more items */
            ]
          },
          /* more items */
        ],
        Values: [
          'STRING_VALUE',
          /* more items */
        ]
      },
      /* more items */
    ]
  },
  MaxAssignments: 'NUMBER_VALUE',
  Question: 'STRING_VALUE',
  RequesterAnnotation: 'STRING_VALUE',
  UniqueRequestToken: 'STRING_VALUE'
};
mturk.createHITWithHITType(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • HITTypeId — (String)

      The HIT type ID you want to create this HIT with.

    • MaxAssignments — (Integer)

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

    • LifetimeInSeconds — (Integer)

      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.

    • Question — (String)

      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.

    • RequesterAnnotation — (String)

      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.

    • UniqueRequestToken — (String)

      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.

      Note: Note: It is your responsibility to ensure uniqueness of the token. The unique token expires after 24 hours. Subsequent calls using the same UniqueRequestToken made after the 24 hour limit could create duplicate HITs.
    • AssignmentReviewPolicy — (map)

      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.

      • PolicyNamerequired — (String)

        Name of a Review Policy: SimplePlurality/2011-09-01 or ScoreMyKnownAnswers/2011-09-01

      • Parameters — (Array<map>)

        Name of the parameter from the Review policy.

        • Key — (String)

          Name of the parameter from the list of Review Polices.

        • Values — (Array<String>)

          The list of values of the Parameter

        • MapEntries — (Array<map>)

          List of ParameterMapEntry objects.

          • Key — (String)

            The QuestionID from the HIT that is used to identify which question requires Mechanical Turk to score as part of the ScoreMyKnownAnswers/2011-09-01 Review Policy.

          • Values — (Array<String>)

            The list of answers to the question specified in the MapEntry Key element. The Worker must match all values in order for the answer to be scored correctly.

    • HITReviewPolicy — (map)

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

      • PolicyNamerequired — (String)

        Name of a Review Policy: SimplePlurality/2011-09-01 or ScoreMyKnownAnswers/2011-09-01

      • Parameters — (Array<map>)

        Name of the parameter from the Review policy.

        • Key — (String)

          Name of the parameter from the list of Review Polices.

        • Values — (Array<String>)

          The list of values of the Parameter

        • MapEntries — (Array<map>)

          List of ParameterMapEntry objects.

          • Key — (String)

            The QuestionID from the HIT that is used to identify which question requires Mechanical Turk to score as part of the ScoreMyKnownAnswers/2011-09-01 Review Policy.

          • Values — (Array<String>)

            The list of answers to the question specified in the MapEntry Key element. The Worker must match all values in order for the answer to be scored correctly.

    • HITLayoutId — (String)

      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.

    • HITLayoutParameters — (Array<map>)

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

      • Namerequired — (String)

        The name of the parameter in the HITLayout.

      • Valuerequired — (String)

        The value substituted for the parameter referenced in the HITLayout.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)