You are browsing the documentation for a deprecated version ('2014-08-15') of the Amazon Mechanical Turk Requester API. This version of the API will be deprecated and will be rendered unusable as of June 1st, 2019. If you request against a legacy API version (https://docs.aws.amazon.com/AWSMechTurk/latest/AWSMturkAPI-legacy/Welcome.html) on or after June 1, 2019, you will receive the following response:
The latest version of our API ('2017-01-17') provides you with additional tool choices and enables you to select from nine AWS Software Development Kits This version also updates naming conventions used in the API and adopts the AWS standard of Signature Version 4 to authenticate requests securely. The API uses REST requests and no longer requires that developers be familiar with SOAP protocol. These changes make the MTurk API consistent with AWS APIs, simplifying the on-boarding process for both new and existing AWS developers. The legacy MTurk Command Line Tools and .NET, Java, Ruby, and Perl SDKs were marked as deprecated in January 2018. We will be deprecating the legacy APIs as of June 1, 2019. If you are on a legacy API, you must migrate to the latest
version of our API. You can find documentation for the latest API here and the AWS SDKs here For support, contact requestor-apilegacydeprecation-support@amazon.com |
GetAssignment
Description
The GetAssignment
operation retrieves an assignment with an
AssignmentStatus
value of Submitted
, Approved
, or Rejected
,
using the assignment's ID. Requesters can only retrieve their own
assignments for HITs that they have not disposed of.
For more information about the AssignmentStatus
element, see
the Assignment data structure.
For more information about assignments, see
Creating and Managing Assignments.
Request Parameters
The GetAssignment
operation accepts parameters common to all operations.
Some common parameters are required. For more information, see Common Parameters.
The following parameters are specific to the GetAssignment
operation:
Name | Description | Required |
---|---|---|
|
The name of the operation. Type: String Valid Values: GetAssignment Default: None |
Yes |
|
The ID of the assignment that is being requested. Type: String Default: None. |
Yes |
Response Elements
A successful request for the GetAssignment
operation has a
GetAssignmentResult
element in the response.
The GetAssignmentResult
element contains the following elements:
Name | Description |
---|---|
|
This element is present only if the Request
|
|
The assignment. The response includes one
Type: An Assignment data structure |
|
The HIT associated with this assignment. The response includes
one Type: A HIT data structure |
Examples
The following example shows how to use the GetAssignment
operation.
Sample Request
The following example retrieves an assignment using the assignment's ID.
https://mechanicalturk.amazonaws.com/?Service=AWSMechanicalTurkRequester &AWSAccessKeyId=
[the Requester's Access Key ID]
&Version=2017-01-17 &Operation=GetAssignment &Signature=[signature for this request]
&Timestamp=[your system's local time]
&AssignmentId=GYFTRHZ5J3DZREY48WNZE38ZR9RR1ZPMXGWE7WE0
Sample Response
The following is an example response.
<GetAssignmentResult> <Request> <IsValid>True</IsValid> </Request> <Assignment> <AssignmentId>GYFTRHZ5J3DZREY48WNZE38ZR9RR1ZPMXGWE7WE0</AssignmentId> <WorkerId>AD20WXZZP9XXK</WorkerId> <HITId>GYFTRHZ5J3DZREY48WNZ</HITId> <AssignmentStatus>Approved</AssignmentStatus> <AutoApprovalTime>2012-08-12T19:21:54Z</AutoApprovalTime> <AcceptTime>2012-07-13T19:21:40Z</AcceptTime> <SubmitTime>2012-07-13T19:21:54Z</SubmitTime> <ApprovalTime>2012-07-13T19:27:54Z</ApprovalTime> <Answer> <?xml version="1.0" encoding="UTF-8"?> <QuestionFormAnswers xmlns="http://mechanicalturk.amazonaws.com/AWSMechanicalTurkDataSchemas/2005-10-01/QuestionFormAnswers.xsd"> <Answer> <QuestionIdentifier>Question100</QuestionIdentifier> <FreeText>Move to X.</FreeText> </Answer> </QuestionFormAnswers> </Answer> </Assignment> <HIT> <HITId>GYFTRHZ5J3DZREY48WNZ</HITId> <HITTypeId>NYVZTQ1QVKJZXCYZCZVZ</HITTypeId> <CreationTime>2012-07-07T00:56:40Z</CreationTime> <Title>Location</Title> <Description>Answer this Question</Description> <Question> <QuestionForm xmlns="http://mechanicalturk.amazonaws.com/AWSMechanicalTurkDataSchemas/2005-10-01/QuestionForm.xsd"> <Question> <QuestionIdentifier>Question100</QuestionIdentifier> <DisplayName>My Question</DisplayName> <IsRequired>true</IsRequired> <QuestionContent> <Binary> <MimeType> <Type>image</Type> <SubType>gif</SubType> </MimeType> <DataURL>http://tictactoe.amazon.com/game/01523/board.gif</DataURL> <AltText>The game board, with "X" to move.</AltText> </Binary> </QuestionContent> <AnswerSpecification><FreeTextAnswer/></AnswerSpecification> </Question> </QuestionForm> </Question> <HITStatus>Assignable</HITStatus> <MaxAssignments>1</MaxAssignments> <Reward> <Amount>5.00</Amount> <CurrencyCode>USD</CurrencyCode> <FormattedPrice>$5.00</FormattedPrice> </Reward> <AutoApprovalDelayInSeconds>2592000</AutoApprovalDelayInSeconds> <Expiration>2012-07-14T00:56:40Z</Expiration> <AssignmentDurationInSeconds>30</AssignmentDurationInSeconds> <HITReviewStatus>NotReviewed</HITReviewStatus> </HIT> </GetAssignment>