Class: AWS.MTurk
- Inherits:
-
AWS.Service
- Object
- AWS.Service
- AWS.MTurk
- 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
-
new AWS.MTurk(options = {}) ⇒ Object
constructor
Constructs a service object.
Property Summary collapse
-
endpoint ⇒ AWS.Endpoint
readwrite
An Endpoint object representing the endpoint URL for service requests.
Properties inherited from AWS.Service
Method Summary collapse
-
acceptQualificationRequest(params = {}, callback) ⇒ AWS.Request
The
AcceptQualificationRequest
operation approves a Worker's request for a Qualification. -
approveAssignment(params = {}, callback) ⇒ AWS.Request
The
ApproveAssignment
operation approves the results of a completed assignment. -
associateQualificationWithWorker(params = {}, callback) ⇒ AWS.Request
The
AssociateQualificationWithWorker
operation gives a Worker a Qualification. -
createAdditionalAssignmentsForHIT(params = {}, callback) ⇒ AWS.Request
The
CreateAdditionalAssignmentsForHIT
operation increases the maximum number of assignments of an existing HIT. -
createHIT(params = {}, callback) ⇒ AWS.Request
The
CreateHIT
operation creates a new Human Intelligence Task (HIT). -
createHITType(params = {}, callback) ⇒ AWS.Request
The
CreateHITType
operation creates a new HIT type. -
createHITWithHITType(params = {}, callback) ⇒ AWS.Request
The
CreateHITWithHITType
operation creates a new Human Intelligence Task (HIT) using an existing HITTypeID generated by theCreateHITType
operation. -
createQualificationType(params = {}, callback) ⇒ AWS.Request
The
CreateQualificationType
operation creates a new Qualification type, which is represented by aQualificationType
data structure. -
createWorkerBlock(params = {}, callback) ⇒ AWS.Request
The
CreateWorkerBlock
operation allows you to prevent a Worker from working on your HITs. -
deleteHIT(params = {}, callback) ⇒ AWS.Request
The
DeleteHIT
operation is used to delete HIT that is no longer needed. -
deleteQualificationType(params = {}, callback) ⇒ AWS.Request
The
DeleteQualificationType
deletes a Qualification type and deletes any HIT types that are associated with the Qualification type. -
deleteWorkerBlock(params = {}, callback) ⇒ AWS.Request
The
DeleteWorkerBlock
operation allows you to reinstate a blocked Worker to work on your HITs. -
disassociateQualificationFromWorker(params = {}, callback) ⇒ AWS.Request
The
DisassociateQualificationFromWorker
revokes a previously granted Qualification from a user. -
getAccountBalance(params = {}, callback) ⇒ AWS.Request
The
GetAccountBalance
operation retrieves the Prepaid HITs balance in your Amazon Mechanical Turk account if you are a Prepaid Requester. -
getAssignment(params = {}, callback) ⇒ AWS.Request
The
GetAssignment
operation retrieves the details of the specified Assignment. -
getFileUploadURL(params = {}, callback) ⇒ AWS.Request
The
GetFileUploadURL
operation generates and returns a temporary URL. -
getHIT(params = {}, callback) ⇒ AWS.Request
The
GetHIT
operation retrieves the details of the specified HIT. -
getQualificationScore(params = {}, callback) ⇒ AWS.Request
The
GetQualificationScore
operation returns the value of a Worker's Qualification for a given Qualification type. -
getQualificationType(params = {}, callback) ⇒ AWS.Request
The
GetQualificationType
operation retrieves information about a Qualification type using its ID. -
listAssignmentsForHIT(params = {}, callback) ⇒ AWS.Request
The
ListAssignmentsForHIT
operation retrieves completed assignments for a HIT. -
listBonusPayments(params = {}, callback) ⇒ AWS.Request
The
ListBonusPayments
operation retrieves the amounts of bonuses you have paid to Workers for a given HIT or assignment. -
listHITs(params = {}, callback) ⇒ AWS.Request
The
ListHITs
operation returns all of a Requester's HITs. -
listHITsForQualificationType(params = {}, callback) ⇒ AWS.Request
The
ListHITsForQualificationType
operation returns the HITs that use the given Qualification type for a Qualification requirement. -
listQualificationRequests(params = {}, callback) ⇒ AWS.Request
The
ListQualificationRequests
operation retrieves requests for Qualifications of a particular Qualification type. -
listQualificationTypes(params = {}, callback) ⇒ AWS.Request
The
ListQualificationTypes
operation returns a list of Qualification types, filtered by an optional search term. -
listReviewableHITs(params = {}, callback) ⇒ AWS.Request
The
ListReviewableHITs
operation retrieves the HITs with Status equal to Reviewable or Status equal to Reviewing that belong to the Requester calling the operation. -
listReviewPolicyResultsForHIT(params = {}, callback) ⇒ AWS.Request
The
ListReviewPolicyResultsForHIT
operation retrieves the computed results and the actions taken in the course of executing your Review Policies for a given HIT. -
listWorkerBlocks(params = {}, callback) ⇒ AWS.Request
The
ListWorkersBlocks
operation retrieves a list of Workers who are blocked from working on your HITs..
-
listWorkersWithQualificationType(params = {}, callback) ⇒ AWS.Request
The
ListWorkersWithQualificationType
operation returns all of the Workers that have been associated with a given Qualification type. -
notifyWorkers(params = {}, callback) ⇒ AWS.Request
The
NotifyWorkers
operation sends an email to one or more Workers that you specify with the Worker ID. -
rejectAssignment(params = {}, callback) ⇒ AWS.Request
The
RejectAssignment
operation rejects the results of a completed assignment. -
rejectQualificationRequest(params = {}, callback) ⇒ AWS.Request
The
RejectQualificationRequest
operation rejects a user's request for a Qualification. -
sendBonus(params = {}, callback) ⇒ AWS.Request
The
SendBonus
operation issues a payment of money from your account to a Worker. -
sendTestEventNotification(params = {}, callback) ⇒ AWS.Request
The
SendTestEventNotification
operation causes Amazon Mechanical Turk to send a notification message as if a HIT event occurred, according to the provided notification specification. -
updateExpirationForHIT(params = {}, callback) ⇒ AWS.Request
The
UpdateExpirationForHIT
operation allows you update the expiration time of a HIT. -
updateHITReviewStatus(params = {}, callback) ⇒ AWS.Request
The
UpdateHITReviewStatus
operation updates the status of a HIT. -
updateHITTypeOfHIT(params = {}, callback) ⇒ AWS.Request
The
UpdateHITTypeOfHIT
operation allows you to change the HITType properties of a HIT. -
updateNotificationSettings(params = {}, callback) ⇒ AWS.Request
The
UpdateNotificationSettings
operation creates, updates, disables or re-enables notifications for a HIT type. -
updateQualificationType(params = {}, callback) ⇒ AWS.Request
The
UpdateQualificationType
operation modifies the attributes of an existing Qualification type, which is represented by a QualificationType data structure.
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.
- min [Boolean] — Validates that a value meets the min
constraint. This is enabled by default when paramValidation is set
to
-
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 totrue
. -
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'.
Property Details
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.
-
(AWS.Response)
—
Returns:
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.
-
(AWS.Response)
—
Returns:
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).
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. Service Reference:
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.
-
(AWS.Response)
—
Returns:
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.
- 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.
Service Reference:
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.
-
(AWS.Response)
—
Returns:
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
.
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 eachQualificationRequirement
structure.QualificationTypeId
— required — (String
)The ID of the Qualification type for the requirement.
Comparator
— required — (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.
Country
— required — (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 theActionsGuarded
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
Possible values include:RequiredToPreview
field."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.
PolicyName
— required — (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.
PolicyName
— required — (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.
Name
— required — (String
)The name of the parameter in the HITLayout.
Value
— required — (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. Thedata
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 eachQualificationRequirement
structure.QualificationTypeId
— required — (String
)The ID of the Qualification type for the requirement.
Comparator
— required — (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.
Country
— required — (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 theActionsGuarded
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
Possible values include:RequiredToPreview
field."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.
-
(AWS.Response)
—
Returns:
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 eachQualificationRequirement
structure.QualificationTypeId
— required — (String
)The ID of the Qualification type for the requirement.
Comparator
— required — (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.
Country
— required — (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 theActionsGuarded
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
Possible values include:RequiredToPreview
field."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. Thedata
object has the following properties:HITTypeId
— (String
)The ID of the newly registered HIT type.
-
(AWS.Response)
—
Returns:
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
.
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.
PolicyName
— required — (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.
PolicyName
— required — (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.
Name
— required — (String
)The name of the parameter in the HITLayout.
Value
— required — (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. Thedata
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 eachQualificationRequirement
structure.QualificationTypeId
— required — (String
)The ID of the Qualification type for the requirement.
Comparator
— required — (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.
Country
— required — (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 theActionsGuarded
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
Possible values include:RequiredToPreview
field."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.
-
(AWS.Response)
—
Returns:
createQualificationType(params = {}, callback) ⇒ AWS.Request
The CreateQualificationType
operation creates a new Qualification type, which is represented by a QualificationType
data structure.
Service Reference:
Examples:
Calling the createQualificationType operation
var params = {
Description: 'STRING_VALUE', /* required */
Name: 'STRING_VALUE', /* required */
QualificationTypeStatus: Active | Inactive, /* required */
AnswerKey: 'STRING_VALUE',
AutoGranted: true || false,
AutoGrantedValue: 'NUMBER_VALUE',
Keywords: 'STRING_VALUE',
RetryDelayInSeconds: 'NUMBER_VALUE',
Test: 'STRING_VALUE',
TestDurationInSeconds: 'NUMBER_VALUE'
};
mturk.createQualificationType(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: {})
—
Name
— (String
)The name you give to the Qualification type. The type name is used to represent the Qualification to Workers, and to find the type using a Qualification type search. It must be unique across all of your Qualification types.
Keywords
— (String
)One or more words or phrases that describe the Qualification type, separated by commas. The keywords of a type make the type easier to find during a search.
Description
— (String
)A long description for the Qualification type. On the Amazon Mechanical Turk website, the long description is displayed when a Worker examines a Qualification type.
QualificationTypeStatus
— (String
)The initial status of the Qualification type.
Constraints: Valid values are: Active | Inactive
Possible values include:"Active"
"Inactive"
RetryDelayInSeconds
— (Integer
)The number of seconds that a Worker must wait after requesting a Qualification of the Qualification type before the worker can retry the Qualification request.
Constraints: None. If not specified, retries are disabled and Workers can request a Qualification of this type only once, even if the Worker has not been granted the Qualification. It is not possible to disable retries for a Qualification type after it has been created with retries enabled. If you want to disable retries, you must delete existing retry-enabled Qualification type and then create a new Qualification type with retries disabled.
Test
— (String
)The questions for the Qualification test a Worker must answer correctly to obtain a Qualification of this type. If this parameter is specified,
TestDurationInSeconds
must also be specified.Constraints: Must not be longer than 65535 bytes. Must be a QuestionForm data structure. This parameter cannot be specified if AutoGranted is true.
Constraints: None. If not specified, the Worker may request the Qualification without answering any questions.
AnswerKey
— (String
)The answers to the Qualification test specified in the Test parameter, in the form of an AnswerKey data structure.
Constraints: Must not be longer than 65535 bytes.
Constraints: None. If not specified, you must process Qualification requests manually.
TestDurationInSeconds
— (Integer
)The number of seconds the Worker has to complete the Qualification test, starting from the time the Worker requests the Qualification.
AutoGranted
— (Boolean
)Specifies whether requests for the Qualification type are granted immediately, without prompting the Worker with a Qualification test.
Constraints: If the Test parameter is specified, this parameter cannot be true.
AutoGrantedValue
— (Integer
)The Qualification value to use for automatically granted Qualifications. This parameter is used only if the AutoGranted parameter is true.
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. Thedata
object has the following properties:QualificationType
— (map
)The created Qualification type, returned as a QualificationType data structure.
QualificationTypeId
— (String
)A unique identifier for the Qualification type. A Qualification type is given a Qualification type ID when you call the CreateQualificationType operation.
CreationTime
— (Date
)The date and time the Qualification type was created.
Name
— (String
)The name of the Qualification type. The type name is used to identify the type, and to find the type using a Qualification type search.
Description
— (String
)A long description for the Qualification type.
Keywords
— (String
)One or more words or phrases that describe theQualification type, separated by commas. The Keywords make the type easier to find using a search.
QualificationTypeStatus
— (String
)The status of the Qualification type. A Qualification type's status determines if users can apply to receive a Qualification of this type, and if HITs can be created with requirements based on this type. Valid values are Active | Inactive.
Possible values include:"Active"
"Inactive"
Test
— (String
)The questions for a Qualification test associated with this Qualification type that a user can take to obtain a Qualification of this type. This parameter must be specified if AnswerKey is present. A Qualification type cannot have both a specified Test parameter and an AutoGranted value of true.
TestDurationInSeconds
— (Integer
)The amount of time, in seconds, given to a Worker to complete the Qualification test, beginning from the time the Worker requests the Qualification.
AnswerKey
— (String
)The answers to the Qualification test specified in the Test parameter.
RetryDelayInSeconds
— (Integer
)The amount of time, in seconds, Workers must wait after taking the Qualification test before they can take it again. Workers can take a Qualification test multiple times if they were not granted the Qualification from a previous attempt, or if the test offers a gradient score and they want a better score. If not specified, retries are disabled and Workers can request a Qualification only once.
IsRequestable
— (Boolean
)Specifies whether the Qualification type is one that a user can request through the Amazon Mechanical Turk web site, such as by taking a Qualification test. This value is False for Qualifications assigned automatically by the system. Valid values are True | False.
AutoGranted
— (Boolean
)Specifies that requests for the Qualification type are granted immediately, without prompting the Worker with a Qualification test. Valid values are True | False.
AutoGrantedValue
— (Integer
)The Qualification integer value to use for automatically granted Qualifications, if AutoGranted is true. This is 1 by default.
-
(AWS.Response)
—
Returns:
createWorkerBlock(params = {}, callback) ⇒ AWS.Request
The CreateWorkerBlock
operation allows you to prevent a Worker from working on your HITs. For example, you can block a Worker who is producing poor quality work. You can block up to 100,000 Workers.
Service Reference:
Examples:
Calling the createWorkerBlock operation
var params = {
Reason: 'STRING_VALUE', /* required */
WorkerId: 'STRING_VALUE' /* required */
};
mturk.createWorkerBlock(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: {})
—
WorkerId
— (String
)The ID of the Worker to block.
Reason
— (String
)A message explaining the reason for blocking the Worker. This parameter enables you to keep track of your Workers. The Worker does not see this message.
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.
-
(AWS.Response)
—
Returns:
deleteHIT(params = {}, callback) ⇒ AWS.Request
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.
Service Reference:
Examples:
Calling the deleteHIT operation
var params = {
HITId: 'STRING_VALUE' /* required */
};
mturk.deleteHIT(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 be deleted.
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.
-
(AWS.Response)
—
Returns:
deleteQualificationType(params = {}, callback) ⇒ AWS.Request
The DeleteQualificationType
deletes a Qualification type and deletes any HIT types that are associated with the Qualification type.
This operation does not revoke Qualifications already assigned to Workers because the Qualifications might be needed for active HITs. If there are any pending requests for the Qualification type, Amazon Mechanical Turk rejects those requests. After you delete a Qualification type, you can no longer use it to create HITs or HIT types.
Service Reference:
Examples:
Calling the deleteQualificationType operation
var params = {
QualificationTypeId: 'STRING_VALUE' /* required */
};
mturk.deleteQualificationType(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 QualificationType to dispose.
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.
-
(AWS.Response)
—
Returns:
deleteWorkerBlock(params = {}, callback) ⇒ AWS.Request
The DeleteWorkerBlock
operation allows you to reinstate a blocked Worker to work on your HITs. This operation reverses the effects of the CreateWorkerBlock operation. You need the Worker ID to use this operation. If the Worker ID is missing or invalid, this operation fails and returns the message “WorkerId is invalid.” If the specified Worker is not blocked, this operation returns successfully.
Service Reference:
Examples:
Calling the deleteWorkerBlock operation
var params = {
WorkerId: 'STRING_VALUE', /* required */
Reason: 'STRING_VALUE'
};
mturk.deleteWorkerBlock(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: {})
—
WorkerId
— (String
)The ID of the Worker to unblock.
Reason
— (String
)A message that explains the reason for unblocking the Worker. The Worker does not see this message.
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.
-
(AWS.Response)
—
Returns:
disassociateQualificationFromWorker(params = {}, callback) ⇒ AWS.Request
The DisassociateQualificationFromWorker
revokes a previously granted Qualification from a user.
You can provide a text message explaining why the Qualification was revoked. The user who had the Qualification can see this message.
Service Reference:
Examples:
Calling the disassociateQualificationFromWorker operation
var params = {
QualificationTypeId: 'STRING_VALUE', /* required */
WorkerId: 'STRING_VALUE', /* required */
Reason: 'STRING_VALUE'
};
mturk.disassociateQualificationFromWorker(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: {})
—
WorkerId
— (String
)The ID of the Worker who possesses the Qualification to be revoked.
QualificationTypeId
— (String
)The ID of the Qualification type of the Qualification to be revoked.
Reason
— (String
)A text message that explains why the Qualification was revoked. The user who had the Qualification sees this message.
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.
-
(AWS.Response)
—
Returns:
getAccountBalance(params = {}, callback) ⇒ AWS.Request
The GetAccountBalance
operation retrieves the Prepaid HITs balance in your Amazon Mechanical Turk account if you are a Prepaid Requester. Alternatively, this operation will retrieve the remaining available AWS Billing usage if you have enabled AWS Billing. Note: If you have enabled AWS Billing and still have a remaining Prepaid HITs balance, this balance can be viewed on the My Account page in the Requester console.
Service Reference:
Examples:
Calling the getAccountBalance operation
var params = {
};
mturk.getAccountBalance(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: {})
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. Thedata
object has the following properties:AvailableBalance
— (String
)A string representing a currency amount.
OnHoldBalance
— (String
)A string representing a currency amount.
-
(AWS.Response)
—
Returns:
getAssignment(params = {}, callback) ⇒ AWS.Request
The GetAssignment
operation retrieves the details of the specified Assignment.
Service Reference:
Examples:
Calling the getAssignment operation
var params = {
AssignmentId: 'STRING_VALUE' /* required */
};
mturk.getAssignment(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 to be retrieved.
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. Thedata
object has the following properties:Assignment
— (map
)The assignment. The response includes one Assignment element.
AssignmentId
— (String
)A unique identifier for the assignment.
WorkerId
— (String
)The ID of the Worker who accepted the HIT.
HITId
— (String
)The ID of the HIT.
AssignmentStatus
— (String
)The status of the assignment.
Possible values include:"Submitted"
"Approved"
"Rejected"
AutoApprovalTime
— (Date
)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.
AcceptTime
— (Date
)The date and time the Worker accepted the assignment.
SubmitTime
— (Date
)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.
ApprovalTime
— (Date
)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.
RejectionTime
— (Date
)If the Worker has submitted results and the Requester has rejected the results, RejectionTime is the date and time the Requester rejected the results.
Deadline
— (Date
)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.
Answer
— (String
)The 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.
RequesterFeedback
— (String
)The 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.
HIT
— (map
)The HIT associated with this assignment. The response includes one HIT element.
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 eachQualificationRequirement
structure.QualificationTypeId
— required — (String
)The ID of the Qualification type for the requirement.
Comparator
— required — (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.
Country
— required — (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 theActionsGuarded
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
Possible values include:RequiredToPreview
field."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.
-
(AWS.Response)
—
Returns:
getFileUploadURL(params = {}, callback) ⇒ AWS.Request
The GetFileUploadURL
operation generates and returns a temporary URL. You use the temporary URL to retrieve a file uploaded by a Worker as an answer to a FileUploadAnswer question for a HIT. The temporary URL is generated the instant the GetFileUploadURL operation is called, and is valid for 60 seconds. You can get a temporary file upload URL any time until the HIT is disposed. After the HIT is disposed, any uploaded files are deleted, and cannot be retrieved. Pending Deprecation on December 12, 2017. The Answer Specification structure will no longer support the FileUploadAnswer
element to be used for the QuestionForm data structure. Instead, we recommend that Requesters who want to create HITs asking Workers to upload files to use Amazon S3.
Service Reference:
Examples:
Calling the getFileUploadURL operation
var params = {
AssignmentId: 'STRING_VALUE', /* required */
QuestionIdentifier: 'STRING_VALUE' /* required */
};
mturk.getFileUploadURL(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 that contains the question with a FileUploadAnswer.
QuestionIdentifier
— (String
)The identifier of the question with a FileUploadAnswer, as specified in the QuestionForm of the HIT.
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. Thedata
object has the following properties:FileUploadURL
— (String
)A temporary URL for the file that the Worker uploaded for the answer.
-
(AWS.Response)
—
Returns:
getHIT(params = {}, callback) ⇒ AWS.Request
The GetHIT
operation retrieves the details of the specified HIT.
Service Reference:
Examples:
Calling the getHIT operation
var params = {
HITId: 'STRING_VALUE' /* required */
};
mturk.getHIT(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 be retrieved.
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. Thedata
object has the following properties:HIT
— (map
)Contains the requested HIT data.
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 eachQualificationRequirement
structure.QualificationTypeId
— required — (String
)The ID of the Qualification type for the requirement.
Comparator
— required — (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.
Country
— required — (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 theActionsGuarded
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
Possible values include:RequiredToPreview
field."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.
-
(AWS.Response)
—
Returns:
getQualificationScore(params = {}, callback) ⇒ AWS.Request
The GetQualificationScore
operation returns the value of a Worker's Qualification for a given Qualification type.
To get a Worker's Qualification, you must know the Worker's ID. The Worker's ID is included in the assignment data returned by the ListAssignmentsForHIT
operation.
Only the owner of a Qualification type can query the value of a Worker's Qualification of that type.
Service Reference:
Examples:
Calling the getQualificationScore operation
var params = {
QualificationTypeId: 'STRING_VALUE', /* required */
WorkerId: 'STRING_VALUE' /* required */
};
mturk.getQualificationScore(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 QualificationType.
WorkerId
— (String
)The ID of the Worker whose Qualification is being updated.
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. Thedata
object has the following properties:Qualification
— (map
)The Qualification data structure of the Qualification assigned to a user, including the Qualification type and the value (score).
QualificationTypeId
— (String
)The ID of the Qualification type for the Qualification.
WorkerId
— (String
)The ID of the Worker who possesses the Qualification.
GrantTime
— (Date
)The date and time the Qualification was granted to the Worker. If the Worker's Qualification was revoked, and then re-granted based on a new Qualification request, GrantTime is the date and time of the last call to the AcceptQualificationRequest operation.
IntegerValue
— (Integer
)The value (score) of the Qualification, if the Qualification has an integer value.
LocaleValue
— (map
)The Locale data structure represents a geographical region or location.
Country
— required — (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.
Status
— (String
)The status of the Qualification. Valid values are Granted | Revoked.
Possible values include:"Granted"
"Revoked"
-
(AWS.Response)
—
Returns:
getQualificationType(params = {}, callback) ⇒ AWS.Request
The GetQualificationType
operation retrieves information about a Qualification type using its ID.
Service Reference:
Examples:
Calling the getQualificationType operation
var params = {
QualificationTypeId: 'STRING_VALUE' /* required */
};
mturk.getQualificationType(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 QualificationType.
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. Thedata
object has the following properties:QualificationType
— (map
)The returned Qualification Type
QualificationTypeId
— (String
)A unique identifier for the Qualification type. A Qualification type is given a Qualification type ID when you call the CreateQualificationType operation.
CreationTime
— (Date
)The date and time the Qualification type was created.
Name
— (String
)The name of the Qualification type. The type name is used to identify the type, and to find the type using a Qualification type search.
Description
— (String
)A long description for the Qualification type.
Keywords
— (String
)One or more words or phrases that describe theQualification type, separated by commas. The Keywords make the type easier to find using a search.
QualificationTypeStatus
— (String
)The status of the Qualification type. A Qualification type's status determines if users can apply to receive a Qualification of this type, and if HITs can be created with requirements based on this type. Valid values are Active | Inactive.
Possible values include:"Active"
"Inactive"
Test
— (String
)The questions for a Qualification test associated with this Qualification type that a user can take to obtain a Qualification of this type. This parameter must be specified if AnswerKey is present. A Qualification type cannot have both a specified Test parameter and an AutoGranted value of true.
TestDurationInSeconds
— (Integer
)The amount of time, in seconds, given to a Worker to complete the Qualification test, beginning from the time the Worker requests the Qualification.
AnswerKey
— (String
)The answers to the Qualification test specified in the Test parameter.
RetryDelayInSeconds
— (Integer
)The amount of time, in seconds, Workers must wait after taking the Qualification test before they can take it again. Workers can take a Qualification test multiple times if they were not granted the Qualification from a previous attempt, or if the test offers a gradient score and they want a better score. If not specified, retries are disabled and Workers can request a Qualification only once.
IsRequestable
— (Boolean
)Specifies whether the Qualification type is one that a user can request through the Amazon Mechanical Turk web site, such as by taking a Qualification test. This value is False for Qualifications assigned automatically by the system. Valid values are True | False.
AutoGranted
— (Boolean
)Specifies that requests for the Qualification type are granted immediately, without prompting the Worker with a Qualification test. Valid values are True | False.
AutoGrantedValue
— (Integer
)The Qualification integer value to use for automatically granted Qualifications, if AutoGranted is true. This is 1 by default.
-
(AWS.Response)
—
Returns:
listAssignmentsForHIT(params = {}, callback) ⇒ AWS.Request
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.
Service Reference:
Examples:
Calling the listAssignmentsForHIT operation
var params = {
HITId: 'STRING_VALUE', /* required */
AssignmentStatuses: [
Submitted | Approved | Rejected,
/* more items */
],
MaxResults: 'NUMBER_VALUE',
NextToken: 'STRING_VALUE'
};
mturk.listAssignmentsForHIT(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.
NextToken
— (String
)Pagination token
MaxResults
— (Integer
)AssignmentStatuses
— (Array<String>
)The status of the assignments to return: Submitted | Approved | Rejected
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. Thedata
object has the following properties:NextToken
— (String
)If the previous response was incomplete (because there is more data to retrieve), Amazon Mechanical Turk returns a pagination token in the response. You can use this pagination token to retrieve the next set of results.
NumResults
— (Integer
)The number of assignments on the page in the filtered results list, equivalent to the number of assignments returned by this call.
Assignments
— (Array<map>
)The collection of Assignment data structures returned by this call.
AssignmentId
— (String
)A unique identifier for the assignment.
WorkerId
— (String
)The ID of the Worker who accepted the HIT.
HITId
— (String
)The ID of the HIT.
AssignmentStatus
— (String
)The status of the assignment.
Possible values include:"Submitted"
"Approved"
"Rejected"
AutoApprovalTime
— (Date
)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.
AcceptTime
— (Date
)The date and time the Worker accepted the assignment.
SubmitTime
— (Date
)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.
ApprovalTime
— (Date
)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.
RejectionTime
— (Date
)If the Worker has submitted results and the Requester has rejected the results, RejectionTime is the date and time the Requester rejected the results.
Deadline
— (Date
)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.
Answer
— (String
)The 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.
RequesterFeedback
— (String
)The 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.
-
(AWS.Response)
—
Returns:
listBonusPayments(params = {}, callback) ⇒ AWS.Request
The ListBonusPayments
operation retrieves the amounts of bonuses you have paid to Workers for a given HIT or assignment.
Service Reference:
Examples:
Calling the listBonusPayments operation
var params = {
AssignmentId: 'STRING_VALUE',
HITId: 'STRING_VALUE',
MaxResults: 'NUMBER_VALUE',
NextToken: 'STRING_VALUE'
};
mturk.listBonusPayments(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 associated with the bonus payments to retrieve. If not specified, all bonus payments for all assignments for the given HIT are returned. Either the HITId parameter or the AssignmentId parameter must be specified
AssignmentId
— (String
)The ID of the assignment associated with the bonus payments to retrieve. If specified, only bonus payments for the given assignment are returned. Either the HITId parameter or the AssignmentId parameter must be specified
NextToken
— (String
)Pagination token
MaxResults
— (Integer
)
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. Thedata
object has the following properties:NumResults
— (Integer
)The number of bonus payments on this page in the filtered results list, equivalent to the number of bonus payments being returned by this call.
NextToken
— (String
)If the previous response was incomplete (because there is more data to retrieve), Amazon Mechanical Turk returns a pagination token in the response. You can use this pagination token to retrieve the next set of results.
BonusPayments
— (Array<map>
)A successful request to the ListBonusPayments operation returns a list of BonusPayment objects.
WorkerId
— (String
)The ID of the Worker to whom the bonus was paid.
BonusAmount
— (String
)A string representing a currency amount.
AssignmentId
— (String
)The ID of the assignment associated with this bonus payment.
Reason
— (String
)The Reason text given when the bonus was granted, if any.
GrantTime
— (Date
)The date and time of when the bonus was granted.
-
(AWS.Response)
—
Returns:
listHITs(params = {}, callback) ⇒ AWS.Request
The ListHITs
operation returns all of a Requester's HITs. The operation returns HITs of any status, except for HITs that have been deleted of with the DeleteHIT operation or that have been auto-deleted.
Service Reference:
Examples:
Calling the listHITs operation
var params = {
MaxResults: 'NUMBER_VALUE',
NextToken: 'STRING_VALUE'
};
mturk.listHITs(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: {})
—
NextToken
— (String
)Pagination token
MaxResults
— (Integer
)
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. Thedata
object has the following properties:NextToken
— (String
)If the previous response was incomplete (because there is more data to retrieve), Amazon Mechanical Turk returns a pagination token in the response. You can use this pagination token to retrieve the next set of results.
NumResults
— (Integer
)The number of HITs on this page in the filtered results list, equivalent to the number of HITs being returned by this call.
HITs
— (Array<map>
)The list of HIT elements returned by the query.
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 eachQualificationRequirement
structure.QualificationTypeId
— required — (String
)The ID of the Qualification type for the requirement.
Comparator
— required — (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.
Country
— required — (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 theActionsGuarded
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
Possible values include:RequiredToPreview
field."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.
-
(AWS.Response)
—
Returns:
listHITsForQualificationType(params = {}, callback) ⇒ AWS.Request
The ListHITsForQualificationType
operation returns the HITs that use the given Qualification type for a Qualification requirement. The operation returns HITs of any status, except for HITs that have been deleted with the DeleteHIT
operation or that have been auto-deleted.
Service Reference:
Examples:
Calling the listHITsForQualificationType operation
var params = {
QualificationTypeId: 'STRING_VALUE', /* required */
MaxResults: 'NUMBER_VALUE',
NextToken: 'STRING_VALUE'
};
mturk.listHITsForQualificationType(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 when querying HITs.
NextToken
— (String
)Pagination Token
MaxResults
— (Integer
)Limit the number of results returned.
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. Thedata
object has the following properties:NextToken
— (String
)If the previous response was incomplete (because there is more data to retrieve), Amazon Mechanical Turk returns a pagination token in the response. You can use this pagination token to retrieve the next set of results.
NumResults
— (Integer
)The number of HITs on this page in the filtered results list, equivalent to the number of HITs being returned by this call.
HITs
— (Array<map>
)The list of HIT elements returned by the query.
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 eachQualificationRequirement
structure.QualificationTypeId
— required — (String
)The ID of the Qualification type for the requirement.
Comparator
— required — (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.
Country
— required — (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 theActionsGuarded
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
Possible values include:RequiredToPreview
field."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.
-
(AWS.Response)
—
Returns:
listQualificationRequests(params = {}, callback) ⇒ AWS.Request
The ListQualificationRequests
operation retrieves requests for Qualifications of a particular Qualification type. The owner of the Qualification type calls this operation to poll for pending requests, and accepts them using the AcceptQualification operation.
Service Reference:
Examples:
Calling the listQualificationRequests operation
var params = {
MaxResults: 'NUMBER_VALUE',
NextToken: 'STRING_VALUE',
QualificationTypeId: 'STRING_VALUE'
};
mturk.listQualificationRequests(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 QualificationType.
NextToken
— (String
)If the previous response was incomplete (because there is more data to retrieve), Amazon Mechanical Turk returns a pagination token in the response. You can use this pagination token to retrieve the next set of results.
MaxResults
— (Integer
)The maximum number of results to return in a single call.
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. Thedata
object has the following properties:NumResults
— (Integer
)The number of Qualification requests on this page in the filtered results list, equivalent to the number of Qualification requests being returned by this call.
NextToken
— (String
)If the previous response was incomplete (because there is more data to retrieve), Amazon Mechanical Turk returns a pagination token in the response. You can use this pagination token to retrieve the next set of results.
QualificationRequests
— (Array<map>
)The Qualification request. The response includes one QualificationRequest element for each Qualification request returned by the query.
QualificationRequestId
— (String
)The ID of the Qualification request, a unique identifier generated when the request was submitted.
QualificationTypeId
— (String
)The ID of the Qualification type the Worker is requesting, as returned by the CreateQualificationType operation.
WorkerId
— (String
)The ID of the Worker requesting the Qualification.
Test
— (String
)The contents of the Qualification test that was presented to the Worker, if the type has a test and the Worker has submitted answers. This value is identical to the QuestionForm associated with the Qualification type at the time the Worker requests the Qualification.
Answer
— (String
)The Worker's answers for the Qualification type's test contained in a QuestionFormAnswers document, if the type has a test and the Worker has submitted answers. If the Worker does not provide any answers, Answer may be empty.
SubmitTime
— (Date
)The date and time the Qualification request had a status of Submitted. This is either the time the Worker submitted answers for a Qualification test, or the time the Worker requested the Qualification if the Qualification type does not have a test.
-
(AWS.Response)
—
Returns:
listQualificationTypes(params = {}, callback) ⇒ AWS.Request
The ListQualificationTypes
operation returns a list of Qualification types, filtered by an optional search term.
Service Reference:
Examples:
Calling the listQualificationTypes operation
var params = {
MustBeRequestable: true || false, /* required */
MaxResults: 'NUMBER_VALUE',
MustBeOwnedByCaller: true || false,
NextToken: 'STRING_VALUE',
Query: 'STRING_VALUE'
};
mturk.listQualificationTypes(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: {})
—
Query
— (String
)A text query against all of the searchable attributes of Qualification types.
MustBeRequestable
— (Boolean
)Specifies that only Qualification types that a user can request through the Amazon Mechanical Turk web site, such as by taking a Qualification test, are returned as results of the search. Some Qualification types, such as those assigned automatically by the system, cannot be requested directly by users. If false, all Qualification types, including those managed by the system, are considered. Valid values are True | False.
MustBeOwnedByCaller
— (Boolean
)Specifies that only Qualification types that the Requester created are returned. If false, the operation returns all Qualification types.
NextToken
— (String
)If the previous response was incomplete (because there is more data to retrieve), Amazon Mechanical Turk returns a pagination token in the response. You can use this pagination token to retrieve the next set of results.
MaxResults
— (Integer
)The maximum number of results to return in a single call.
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. Thedata
object has the following properties:NumResults
— (Integer
)The number of Qualification types on this page in the filtered results list, equivalent to the number of types this operation returns.
NextToken
— (String
)If the previous response was incomplete (because there is more data to retrieve), Amazon Mechanical Turk returns a pagination token in the response. You can use this pagination token to retrieve the next set of results.
QualificationTypes
— (Array<map>
)The list of QualificationType elements returned by the query.
QualificationTypeId
— (String
)A unique identifier for the Qualification type. A Qualification type is given a Qualification type ID when you call the CreateQualificationType operation.
CreationTime
— (Date
)The date and time the Qualification type was created.
Name
— (String
)The name of the Qualification type. The type name is used to identify the type, and to find the type using a Qualification type search.
Description
— (String
)A long description for the Qualification type.
Keywords
— (String
)One or more words or phrases that describe theQualification type, separated by commas. The Keywords make the type easier to find using a search.
QualificationTypeStatus
— (String
)The status of the Qualification type. A Qualification type's status determines if users can apply to receive a Qualification of this type, and if HITs can be created with requirements based on this type. Valid values are Active | Inactive.
Possible values include:"Active"
"Inactive"
Test
— (String
)The questions for a Qualification test associated with this Qualification type that a user can take to obtain a Qualification of this type. This parameter must be specified if AnswerKey is present. A Qualification type cannot have both a specified Test parameter and an AutoGranted value of true.
TestDurationInSeconds
— (Integer
)The amount of time, in seconds, given to a Worker to complete the Qualification test, beginning from the time the Worker requests the Qualification.
AnswerKey
— (String
)The answers to the Qualification test specified in the Test parameter.
RetryDelayInSeconds
— (Integer
)The amount of time, in seconds, Workers must wait after taking the Qualification test before they can take it again. Workers can take a Qualification test multiple times if they were not granted the Qualification from a previous attempt, or if the test offers a gradient score and they want a better score. If not specified, retries are disabled and Workers can request a Qualification only once.
IsRequestable
— (Boolean
)Specifies whether the Qualification type is one that a user can request through the Amazon Mechanical Turk web site, such as by taking a Qualification test. This value is False for Qualifications assigned automatically by the system. Valid values are True | False.
AutoGranted
— (Boolean
)Specifies that requests for the Qualification type are granted immediately, without prompting the Worker with a Qualification test. Valid values are True | False.
AutoGrantedValue
— (Integer
)The Qualification integer value to use for automatically granted Qualifications, if AutoGranted is true. This is 1 by default.
-
(AWS.Response)
—
Returns:
listReviewableHITs(params = {}, callback) ⇒ AWS.Request
The ListReviewableHITs
operation retrieves the HITs with Status equal to Reviewable or Status equal to Reviewing that belong to the Requester calling the operation.
Service Reference:
Examples:
Calling the listReviewableHITs operation
var params = {
HITTypeId: 'STRING_VALUE',
MaxResults: 'NUMBER_VALUE',
NextToken: 'STRING_VALUE',
Status: Reviewable | Reviewing
};
mturk.listReviewableHITs(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 ID of the HIT type of the HITs to consider for the query. If not specified, all HITs for the Reviewer are considered
Status
— (String
)Can be either
Possible values include:Reviewable
orReviewing
. Reviewable is the default value."Reviewable"
"Reviewing"
NextToken
— (String
)Pagination Token
MaxResults
— (Integer
)Limit the number of results returned.
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. Thedata
object has the following properties:NextToken
— (String
)If the previous response was incomplete (because there is more data to retrieve), Amazon Mechanical Turk returns a pagination token in the response. You can use this pagination token to retrieve the next set of results.
NumResults
— (Integer
)The number of HITs on this page in the filtered results list, equivalent to the number of HITs being returned by this call.
HITs
— (Array<map>
)The list of HIT elements returned by the query.
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 eachQualificationRequirement
structure.QualificationTypeId
— required — (String
)The ID of the Qualification type for the requirement.
Comparator
— required — (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.
Country
— required — (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 theActionsGuarded
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
Possible values include:RequiredToPreview
field."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.
-
(AWS.Response)
—
Returns:
listReviewPolicyResultsForHIT(params = {}, callback) ⇒ AWS.Request
The ListReviewPolicyResultsForHIT
operation retrieves the computed results and the actions taken in the course of executing your Review Policies for a given HIT. For information about how to specify Review Policies when you call CreateHIT, see Review Policies. The ListReviewPolicyResultsForHIT operation can return results for both Assignment-level and HIT-level review results.
Service Reference:
Examples:
Calling the listReviewPolicyResultsForHIT operation
var params = {
HITId: 'STRING_VALUE', /* required */
MaxResults: 'NUMBER_VALUE',
NextToken: 'STRING_VALUE',
PolicyLevels: [
Assignment | HIT,
/* more items */
],
RetrieveActions: true || false,
RetrieveResults: true || false
};
mturk.listReviewPolicyResultsForHIT(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 unique identifier of the HIT to retrieve review results for.
PolicyLevels
— (Array<String>
)The Policy Level(s) to retrieve review results for - HIT or Assignment. If omitted, the default behavior is to retrieve all data for both policy levels. For a list of all the described policies, see Review Policies.
RetrieveActions
— (Boolean
)Specify if the operation should retrieve a list of the actions taken executing the Review Policies and their outcomes.
RetrieveResults
— (Boolean
)Specify if the operation should retrieve a list of the results computed by the Review Policies.
NextToken
— (String
)Pagination token
MaxResults
— (Integer
)Limit the number of results returned.
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. Thedata
object has the following properties:HITId
— (String
)The HITId of the HIT for which results have been returned.
AssignmentReviewPolicy
— (map
)The name of the Assignment-level Review Policy. This contains only the PolicyName element.
PolicyName
— required — (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 name of the HIT-level Review Policy. This contains only the PolicyName element.
PolicyName
— required — (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.
AssignmentReviewReport
— (map
)Contains both ReviewResult and ReviewAction elements for an Assignment.
ReviewResults
— (Array<map>
)A list of ReviewResults objects for each action specified in the Review Policy.
ActionId
— (String
)A unique identifier of the Review action result.
SubjectId
— (String
)The HITID or AssignmentId about which this result was taken. Note that HIT-level Review Policies will often emit results about both the HIT itself and its Assignments, while Assignment-level review policies generally only emit results about the Assignment itself.
SubjectType
— (String
)The type of the object from the SubjectId field.
QuestionId
— (String
)Specifies the QuestionId the result is describing. Depending on whether the TargetType is a HIT or Assignment this results could specify multiple values. If TargetType is HIT and QuestionId is absent, then the result describes results of the HIT, including the HIT agreement score. If ObjectType is Assignment and QuestionId is absent, then the result describes the Worker's performance on the HIT.
Key
— (String
)Key identifies the particular piece of reviewed information.
Value
— (String
)The values of Key provided by the review policies you have selected.
ReviewActions
— (Array<map>
)A list of ReviewAction objects for each action specified in the Review Policy.
ActionId
— (String
)The unique identifier for the action.
ActionName
— (String
)The nature of the action itself. The Review Policy is responsible for examining the HIT and Assignments, emitting results, and deciding which other actions will be necessary.
TargetId
— (String
)The specific HITId or AssignmentID targeted by the action.
TargetType
— (String
)The type of object in TargetId.
Status
— (String
)The current disposition of the action: INTENDED, SUCCEEDED, FAILED, or CANCELLED.
Possible values include:"Intended"
"Succeeded"
"Failed"
"Cancelled"
CompleteTime
— (Date
)The date when the action was completed.
Result
— (String
)A description of the outcome of the review.
ErrorCode
— (String
)Present only when the Results have a FAILED Status.
HITReviewReport
— (map
)Contains both ReviewResult and ReviewAction elements for a particular HIT.
ReviewResults
— (Array<map>
)A list of ReviewResults objects for each action specified in the Review Policy.
ActionId
— (String
)A unique identifier of the Review action result.
SubjectId
— (String
)The HITID or AssignmentId about which this result was taken. Note that HIT-level Review Policies will often emit results about both the HIT itself and its Assignments, while Assignment-level review policies generally only emit results about the Assignment itself.
SubjectType
— (String
)The type of the object from the SubjectId field.
QuestionId
— (String
)Specifies the QuestionId the result is describing. Depending on whether the TargetType is a HIT or Assignment this results could specify multiple values. If TargetType is HIT and QuestionId is absent, then the result describes results of the HIT, including the HIT agreement score. If ObjectType is Assignment and QuestionId is absent, then the result describes the Worker's performance on the HIT.
Key
— (String
)Key identifies the particular piece of reviewed information.
Value
— (String
)The values of Key provided by the review policies you have selected.
ReviewActions
— (Array<map>
)A list of ReviewAction objects for each action specified in the Review Policy.
ActionId
— (String
)The unique identifier for the action.
ActionName
— (String
)The nature of the action itself. The Review Policy is responsible for examining the HIT and Assignments, emitting results, and deciding which other actions will be necessary.
TargetId
— (String
)The specific HITId or AssignmentID targeted by the action.
TargetType
— (String
)The type of object in TargetId.
Status
— (String
)The current disposition of the action: INTENDED, SUCCEEDED, FAILED, or CANCELLED.
Possible values include:"Intended"
"Succeeded"
"Failed"
"Cancelled"
CompleteTime
— (Date
)The date when the action was completed.
Result
— (String
)A description of the outcome of the review.
ErrorCode
— (String
)Present only when the Results have a FAILED Status.
NextToken
— (String
)If the previous response was incomplete (because there is more data to retrieve), Amazon Mechanical Turk returns a pagination token in the response. You can use this pagination token to retrieve the next set of results.
-
(AWS.Response)
—
Returns:
listWorkerBlocks(params = {}, callback) ⇒ AWS.Request
The ListWorkersBlocks
operation retrieves a list of Workers who are blocked from working on your HITs.
Service Reference:
Examples:
Calling the listWorkerBlocks operation
var params = {
MaxResults: 'NUMBER_VALUE',
NextToken: 'STRING_VALUE'
};
mturk.listWorkerBlocks(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: {})
—
NextToken
— (String
)Pagination token
MaxResults
— (Integer
)
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. Thedata
object has the following properties:NextToken
— (String
)If the previous response was incomplete (because there is more data to retrieve), Amazon Mechanical Turk returns a pagination token in the response. You can use this pagination token to retrieve the next set of results.
NumResults
— (Integer
)The number of assignments on the page in the filtered results list, equivalent to the number of assignments returned by this call.
WorkerBlocks
— (Array<map>
)The list of WorkerBlocks, containing the collection of Worker IDs and reasons for blocking.
WorkerId
— (String
)The ID of the Worker who accepted the HIT.
Reason
— (String
)A message explaining the reason the Worker was blocked.
-
(AWS.Response)
—
Returns:
listWorkersWithQualificationType(params = {}, callback) ⇒ AWS.Request
The ListWorkersWithQualificationType
operation returns all of the Workers that have been associated with a given Qualification type.
Service Reference:
Examples:
Calling the listWorkersWithQualificationType operation
var params = {
QualificationTypeId: 'STRING_VALUE', /* required */
MaxResults: 'NUMBER_VALUE',
NextToken: 'STRING_VALUE',
Status: Granted | Revoked
};
mturk.listWorkersWithQualificationType(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 of the Qualifications to return.
Status
— (String
)The status of the Qualifications to return. Can be
Possible values include:Granted | Revoked
."Granted"
"Revoked"
NextToken
— (String
)Pagination Token
MaxResults
— (Integer
)Limit the number of results returned.
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. Thedata
object has the following properties:NextToken
— (String
)If the previous response was incomplete (because there is more data to retrieve), Amazon Mechanical Turk returns a pagination token in the response. You can use this pagination token to retrieve the next set of results.
NumResults
— (Integer
)The number of Qualifications on this page in the filtered results list, equivalent to the number of Qualifications being returned by this call.
Qualifications
— (Array<map>
)The list of Qualification elements returned by this call.
QualificationTypeId
— (String
)The ID of the Qualification type for the Qualification.
WorkerId
— (String
)The ID of the Worker who possesses the Qualification.
GrantTime
— (Date
)The date and time the Qualification was granted to the Worker. If the Worker's Qualification was revoked, and then re-granted based on a new Qualification request, GrantTime is the date and time of the last call to the AcceptQualificationRequest operation.
IntegerValue
— (Integer
)The value (score) of the Qualification, if the Qualification has an integer value.
LocaleValue
— (map
)The Locale data structure represents a geographical region or location.
Country
— required — (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.
Status
— (String
)The status of the Qualification. Valid values are Granted | Revoked.
Possible values include:"Granted"
"Revoked"
-
(AWS.Response)
—
Returns:
notifyWorkers(params = {}, callback) ⇒ AWS.Request
The NotifyWorkers
operation sends an email to one or more Workers that you specify with the Worker ID. You can specify up to 100 Worker IDs to send the same message with a single call to the NotifyWorkers operation. The NotifyWorkers operation will send a notification email to a Worker only if you have previously approved or rejected work from the Worker.
Service Reference:
Examples:
Calling the notifyWorkers operation
var params = {
MessageText: 'STRING_VALUE', /* required */
Subject: 'STRING_VALUE', /* required */
WorkerIds: [ /* required */
'STRING_VALUE',
/* more items */
]
};
mturk.notifyWorkers(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: {})
—
Subject
— (String
)The subject line of the email message to send. Can include up to 200 characters.
MessageText
— (String
)The text of the email message to send. Can include up to 4,096 characters
WorkerIds
— (Array<String>
)A list of Worker IDs you wish to notify. You can notify upto 100 Workers at a time.
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. Thedata
object has the following properties:NotifyWorkersFailureStatuses
— (Array<map>
)When MTurk sends notifications to the list of Workers, it returns back any failures it encounters in this list of NotifyWorkersFailureStatus objects.
NotifyWorkersFailureCode
— (String
)Encoded value for the failure type.
Possible values include:"SoftFailure"
"HardFailure"
NotifyWorkersFailureMessage
— (String
)A message detailing the reason the Worker could not be notified.
WorkerId
— (String
)The ID of the Worker.
-
(AWS.Response)
—
Returns:
rejectAssignment(params = {}, callback) ⇒ AWS.Request
The RejectAssignment
operation rejects the results of a completed assignment.
You can include an optional feedback message with the rejection, which the Worker can see in the Status section of the web site. When you include a feedback message with the rejection, it helps the Worker understand why the assignment was rejected, and can improve the quality of the results the Worker submits in the future.
Only the Requester who created the HIT can reject an assignment for the HIT.
Service Reference:
Examples:
Calling the rejectAssignment operation
var params = {
AssignmentId: 'STRING_VALUE', /* required */
RequesterFeedback: 'STRING_VALUE' /* required */
};
mturk.rejectAssignment(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.
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.
-
(AWS.Response)
—
Returns:
rejectQualificationRequest(params = {}, callback) ⇒ AWS.Request
The RejectQualificationRequest
operation rejects a user's request for a Qualification.
You can provide a text message explaining why the request was rejected. The Worker who made the request can see this message.
Service Reference:
Examples:
Calling the rejectQualificationRequest operation
var params = {
QualificationRequestId: 'STRING_VALUE', /* required */
Reason: 'STRING_VALUE'
};
mturk.rejectQualificationRequest(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
ListQualificationRequests
operation.Reason
— (String
)A text message explaining why the request was rejected, to be shown to the Worker who made the request.
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.
-
(AWS.Response)
—
Returns:
sendBonus(params = {}, callback) ⇒ AWS.Request
The SendBonus
operation issues a payment of money from your account to a Worker. This payment happens separately from the reward you pay to the Worker when you approve the Worker's assignment. The SendBonus operation requires the Worker's ID and the assignment ID as parameters to initiate payment of the bonus. You must include a message that explains the reason for the bonus payment, as the Worker may not be expecting the payment. Amazon Mechanical Turk collects a fee for bonus payments, similar to the HIT listing fee. This operation fails if your account does not have enough funds to pay for both the bonus and the fees.
Service Reference:
Examples:
Calling the sendBonus operation
var params = {
AssignmentId: 'STRING_VALUE', /* required */
BonusAmount: 'STRING_VALUE', /* required */
Reason: 'STRING_VALUE', /* required */
WorkerId: 'STRING_VALUE', /* required */
UniqueRequestToken: 'STRING_VALUE'
};
mturk.sendBonus(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: {})
—
WorkerId
— (String
)The ID of the Worker being paid the bonus.
BonusAmount
— (String
)The Bonus amount is a US Dollar amount specified using a string (for example, "5" represents $5.00 USD and "101.42" represents $101.42 USD). Do not include currency symbols or currency codes.
AssignmentId
— (String
)The ID of the assignment for which this bonus is paid.
Reason
— (String
)A message that explains the reason for the bonus payment. The Worker receiving the bonus can see this message.
UniqueRequestToken
— (String
)A unique identifier for this request, which allows you to retry the call on error without granting multiple bonuses. This is useful in cases such as network timeouts where it is unclear whether or not the call succeeded on the server. If the bonus 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.
-
(AWS.Response)
—
Returns:
sendTestEventNotification(params = {}, callback) ⇒ AWS.Request
The SendTestEventNotification
operation causes Amazon Mechanical Turk to send a notification message as if a HIT event occurred, according to the provided notification specification. This allows you to test notifications without setting up notifications for a real HIT type and trying to trigger them using the website. When you call this operation, the service attempts to send the test notification immediately.
Service Reference:
Examples:
Calling the sendTestEventNotification operation
var params = {
Notification: { /* required */
Destination: 'STRING_VALUE', /* required */
EventTypes: [ /* required */
AssignmentAccepted | AssignmentAbandoned | AssignmentReturned | AssignmentSubmitted | AssignmentRejected | AssignmentApproved | HITCreated | HITExpired | HITReviewable | HITExtended | HITDisposed | Ping,
/* more items */
],
Transport: Email | SQS | SNS, /* required */
Version: 'STRING_VALUE' /* required */
},
TestEventType: AssignmentAccepted | AssignmentAbandoned | AssignmentReturned | AssignmentSubmitted | AssignmentRejected | AssignmentApproved | HITCreated | HITExpired | HITReviewable | HITExtended | HITDisposed | Ping /* required */
};
mturk.sendTestEventNotification(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: {})
—
Notification
— (map
)The notification specification to test. This value is identical to the value you would provide to the UpdateNotificationSettings operation when you establish the notification specification for a HIT type.
Destination
— required — (String
)The target for notification messages. The Destination’s format is determined by the specified Transport:
-
When Transport is Email, the Destination is your email address.
-
When Transport is SQS, the Destination is your queue URL.
-
When Transport is SNS, the Destination is the ARN of your topic.
-
Transport
— required — (String
)The method Amazon Mechanical Turk uses to send the notification. Valid Values: Email | SQS | SNS.
Possible values include:"Email"
"SQS"
"SNS"
Version
— required — (String
)The version of the Notification API to use. Valid value is 2006-05-05.
EventTypes
— required — (Array<String>
)The list of events that should cause notifications to be sent. Valid Values: AssignmentAccepted | AssignmentAbandoned | AssignmentReturned | AssignmentSubmitted | AssignmentRejected | AssignmentApproved | HITCreated | HITExtended | HITDisposed | HITReviewable | HITExpired | Ping. The Ping event is only valid for the SendTestEventNotification operation.
TestEventType
— (String
)The event to simulate to test the notification specification. This event is included in the test message even if the notification specification does not include the event type. The notification specification does not filter out the test event.
Possible values include:"AssignmentAccepted"
"AssignmentAbandoned"
"AssignmentReturned"
"AssignmentSubmitted"
"AssignmentRejected"
"AssignmentApproved"
"HITCreated"
"HITExpired"
"HITReviewable"
"HITExtended"
"HITDisposed"
"Ping"
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.
-
(AWS.Response)
—
Returns:
updateExpirationForHIT(params = {}, callback) ⇒ AWS.Request
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.
Service Reference:
Examples:
Calling the updateExpirationForHIT operation
var params = {
ExpireAt: new Date || 'Wed Dec 31 1969 16:00:00 GMT-0800 (PST)' || 123456789, /* required */
HITId: 'STRING_VALUE' /* required */
};
mturk.updateExpirationForHIT(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 HIT to update.
ExpireAt
— (Date
)The date and time at which you want the HIT to expire
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.
-
(AWS.Response)
—
Returns:
updateHITReviewStatus(params = {}, callback) ⇒ AWS.Request
The 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.
Service Reference:
Examples:
Calling the updateHITReviewStatus operation
var params = {
HITId: 'STRING_VALUE', /* required */
Revert: true || false
};
mturk.updateHITReviewStatus(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 update.
Revert
— (Boolean
)Specifies how to update the HIT status. Default is
False
.-
Setting this to false will only transition a HIT from
Reviewable
toReviewing
-
Setting this to true will only transition a HIT from
Reviewing
toReviewable
-
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.
-
(AWS.Response)
—
Returns:
updateHITTypeOfHIT(params = {}, callback) ⇒ AWS.Request
The 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.
Service Reference:
Examples:
Calling the updateHITTypeOfHIT operation
var params = {
HITId: 'STRING_VALUE', /* required */
HITTypeId: 'STRING_VALUE' /* required */
};
mturk.updateHITTypeOfHIT(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 HIT to update.
HITTypeId
— (String
)The ID of the new HIT type.
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.
-
(AWS.Response)
—
Returns:
updateNotificationSettings(params = {}, callback) ⇒ AWS.Request
The UpdateNotificationSettings
operation creates, updates, disables or re-enables notifications for a HIT type. If you call the UpdateNotificationSettings operation for a HIT type that already has a notification specification, the operation replaces the old specification with a new one. You can call the UpdateNotificationSettings operation to enable or disable notifications for the HIT type, without having to modify the notification specification itself by providing updates to the Active status without specifying a new notification specification. To change the Active status of a HIT type's notifications, the HIT type must already have a notification specification, or one must be provided in the same call to UpdateNotificationSettings
.
Service Reference:
Examples:
Calling the updateNotificationSettings operation
var params = {
HITTypeId: 'STRING_VALUE', /* required */
Active: true || false,
Notification: {
Destination: 'STRING_VALUE', /* required */
EventTypes: [ /* required */
AssignmentAccepted | AssignmentAbandoned | AssignmentReturned | AssignmentSubmitted | AssignmentRejected | AssignmentApproved | HITCreated | HITExpired | HITReviewable | HITExtended | HITDisposed | Ping,
/* more items */
],
Transport: Email | SQS | SNS, /* required */
Version: 'STRING_VALUE' /* required */
}
};
mturk.updateNotificationSettings(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 ID of the HIT type whose notification specification is being updated.
Notification
— (map
)The notification specification for the HIT type.
Destination
— required — (String
)The target for notification messages. The Destination’s format is determined by the specified Transport:
-
When Transport is Email, the Destination is your email address.
-
When Transport is SQS, the Destination is your queue URL.
-
When Transport is SNS, the Destination is the ARN of your topic.
-
Transport
— required — (String
)The method Amazon Mechanical Turk uses to send the notification. Valid Values: Email | SQS | SNS.
Possible values include:"Email"
"SQS"
"SNS"
Version
— required — (String
)The version of the Notification API to use. Valid value is 2006-05-05.
EventTypes
— required — (Array<String>
)The list of events that should cause notifications to be sent. Valid Values: AssignmentAccepted | AssignmentAbandoned | AssignmentReturned | AssignmentSubmitted | AssignmentRejected | AssignmentApproved | HITCreated | HITExtended | HITDisposed | HITReviewable | HITExpired | Ping. The Ping event is only valid for the SendTestEventNotification operation.
Active
— (Boolean
)Specifies whether notifications are sent for HITs of this HIT type, according to the notification specification. You must specify either the Notification parameter or the Active parameter for the call to UpdateNotificationSettings to succeed.
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.
-
(AWS.Response)
—
Returns:
updateQualificationType(params = {}, callback) ⇒ AWS.Request
The UpdateQualificationType
operation modifies the attributes of an existing Qualification type, which is represented by a QualificationType data structure. Only the owner of a Qualification type can modify its attributes.
Most attributes of a Qualification type can be changed after the type has been created. However, the Name and Keywords fields cannot be modified. The RetryDelayInSeconds parameter can be modified or added to change the delay or to enable retries, but RetryDelayInSeconds cannot be used to disable retries.
You can use this operation to update the test for a Qualification type. The test is updated based on the values specified for the Test, TestDurationInSeconds and AnswerKey parameters. All three parameters specify the updated test. If you are updating the test for a type, you must specify the Test and TestDurationInSeconds parameters. The AnswerKey parameter is optional; omitting it specifies that the updated test does not have an answer key.
If you omit the Test parameter, the test for the Qualification type is unchanged. There is no way to remove a test from a Qualification type that has one. If the type already has a test, you cannot update it to be AutoGranted. If the Qualification type does not have a test and one is provided by an update, the type will henceforth have a test.
If you want to update the test duration or answer key for an existing test without changing the questions, you must specify a Test parameter with the original questions, along with the updated values.
If you provide an updated Test but no AnswerKey, the new test will not have an answer key. Requests for such Qualifications must be granted manually.
You can also update the AutoGranted and AutoGrantedValue attributes of the Qualification type.
Service Reference:
Examples:
Calling the updateQualificationType operation
var params = {
QualificationTypeId: 'STRING_VALUE', /* required */
AnswerKey: 'STRING_VALUE',
AutoGranted: true || false,
AutoGrantedValue: 'NUMBER_VALUE',
Description: 'STRING_VALUE',
QualificationTypeStatus: Active | Inactive,
RetryDelayInSeconds: 'NUMBER_VALUE',
Test: 'STRING_VALUE',
TestDurationInSeconds: 'NUMBER_VALUE'
};
mturk.updateQualificationType(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 update.
Description
— (String
)The new description of the Qualification type.
QualificationTypeStatus
— (String
)The new status of the Qualification type - Active | Inactive
Possible values include:"Active"
"Inactive"
Test
— (String
)The questions for the Qualification test a Worker must answer correctly to obtain a Qualification of this type. If this parameter is specified,
TestDurationInSeconds
must also be specified.Constraints: Must not be longer than 65535 bytes. Must be a QuestionForm data structure. This parameter cannot be specified if AutoGranted is true.
Constraints: None. If not specified, the Worker may request the Qualification without answering any questions.
AnswerKey
— (String
)The answers to the Qualification test specified in the Test parameter, in the form of an AnswerKey data structure.
TestDurationInSeconds
— (Integer
)The number of seconds the Worker has to complete the Qualification test, starting from the time the Worker requests the Qualification.
RetryDelayInSeconds
— (Integer
)The amount of time, in seconds, that Workers must wait after requesting a Qualification of the specified Qualification type before they can retry the Qualification request. It is not possible to disable retries for a Qualification type after it has been created with retries enabled. If you want to disable retries, you must dispose of the existing retry-enabled Qualification type using DisposeQualificationType and then create a new Qualification type with retries disabled using CreateQualificationType.
AutoGranted
— (Boolean
)Specifies whether requests for the Qualification type are granted immediately, without prompting the Worker with a Qualification test.
Constraints: If the Test parameter is specified, this parameter cannot be true.
AutoGrantedValue
— (Integer
)The Qualification value to use for automatically granted Qualifications. This parameter is used only if the AutoGranted parameter is true.
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. Thedata
object has the following properties:QualificationType
— (map
)Contains a QualificationType data structure.
QualificationTypeId
— (String
)A unique identifier for the Qualification type. A Qualification type is given a Qualification type ID when you call the CreateQualificationType operation.
CreationTime
— (Date
)The date and time the Qualification type was created.
Name
— (String
)The name of the Qualification type. The type name is used to identify the type, and to find the type using a Qualification type search.
Description
— (String
)A long description for the Qualification type.
Keywords
— (String
)One or more words or phrases that describe theQualification type, separated by commas. The Keywords make the type easier to find using a search.
QualificationTypeStatus
— (String
)The status of the Qualification type. A Qualification type's status determines if users can apply to receive a Qualification of this type, and if HITs can be created with requirements based on this type. Valid values are Active | Inactive.
Possible values include:"Active"
"Inactive"
Test
— (String
)The questions for a Qualification test associated with this Qualification type that a user can take to obtain a Qualification of this type. This parameter must be specified if AnswerKey is present. A Qualification type cannot have both a specified Test parameter and an AutoGranted value of true.
TestDurationInSeconds
— (Integer
)The amount of time, in seconds, given to a Worker to complete the Qualification test, beginning from the time the Worker requests the Qualification.
AnswerKey
— (String
)The answers to the Qualification test specified in the Test parameter.
RetryDelayInSeconds
— (Integer
)The amount of time, in seconds, Workers must wait after taking the Qualification test before they can take it again. Workers can take a Qualification test multiple times if they were not granted the Qualification from a previous attempt, or if the test offers a gradient score and they want a better score. If not specified, retries are disabled and Workers can request a Qualification only once.
IsRequestable
— (Boolean
)Specifies whether the Qualification type is one that a user can request through the Amazon Mechanical Turk web site, such as by taking a Qualification test. This value is False for Qualifications assigned automatically by the system. Valid values are True | False.
AutoGranted
— (Boolean
)Specifies that requests for the Qualification type are granted immediately, without prompting the Worker with a Qualification test. Valid values are True | False.
AutoGrantedValue
— (Integer
)The Qualification integer value to use for automatically granted Qualifications, if AutoGranted is true. This is 1 by default.
-
(AWS.Response)
—
Returns: