Assignment Data Structure

Description

The Assignment data structure represents a single assignment of a HIT to a Worker. The assignment tracks the Worker's efforts to complete the HIT, and contains the results for later retrieval.

The Assignment data structure is used as a response element for the following operation:

Example: GetAssignmentsForHIT

The following example of an Assignment data structure could be returned by the GetAssignmentsForHIT operation. GetAssignmentsForHIT returns zero or more Assignment elements for a "reviewable" HIT.

<Assignment>
  <AssignmentId>123RVWYBAZW00EXAMPLE456RVWYBAZW00EXAMPLE</AssignmentId>
  <WorkerId>AZ3456EXAMPLE</WorkerId>
  <HITId>123RVWYBAZW00EXAMPLE</HITId>
  <AssignmentStatus>Submitted</AssignmentStatus>
  <Deadline>2005-12-01T23:59:59Z</Deadline>
  <AcceptTime>2005-12-01T12:00:00Z</AcceptTime>
  <SubmitTime>2005-12-07T23:59:59Z</SubmitTime>
  <Answer>
    &lt;QuestionFormAnswers&gt;
      [XML-encoded Answer data]
    &lt;/QuestionFormAnswers&gt;
  </Answer>
</Assignment>

Elements

The Assignment structure may contain the following elements.

Name Description Value
AssignmentId

A unique identifier for the assignment. An assignment is created and given a unique ID when a Worker accepts a HIT. It retains this ID forever, even if the Worker returns it by calling ReturnAssignment, or abandons it by allowing the deadline to pass without submitting results.

A valid assignment ID

WorkerId

The user ID of the Worker that accepted the HIT.

A valid user ID

HITId

The ID of the HIT, as returned by CreateHIT.

A valid HIT ID

AssignmentStatus

The status of the assignment.

Submitted | Approved | Rejected

AutoApprovalTime

If results have been submitted, AutoApprovalTime is the date and time the assignment's results will be 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 in the HIT by the Requester.

This value is omitted from the assignment if results have not yet been submitted.

A dateTime in the Coordinated Universal Time (Greenwich Mean Time) time zone, such as 2005-01-31T23:59:59Z

AcceptTime

The date and time the assignment was accepted by the Worker.

A dateTime in the Coordinated Universal Time (Greenwich Mean Time) time zone, such as 2005-01-31T23:59:59Z

SubmitTime

If results have been submitted by the Worker, SubmitTime is the date and time the assignment was submitted.

This value is omitted from the assignment if results have not yet been submitted by the Worker.

A dateTime in the Coordinated Universal Time (Greenwich Mean Time) time zone, such as 2005-01-31T23:59:59Z

ApprovalTime

If results have been submitted by the Worker and approved or rejected by the Requester, ApprovalTime is the date and time the Requester approved or rejected the results.

This value is omitted from the assignment if results have not yet been approved or rejected by the Requester.

A dateTime in the Coordinated Universal Time (Greenwich Mean Time) time zone, such as 2005-01-31T23:59:59Z

Deadline

The date and time of the assignment's deadline. If results are not submitted prior to this deadline, the assignment is considered "abandoned," and the HIT may become available for other Workers to accept (if the HIT has not expired). Results will not be accepted after the assignment has passed the deadline.

This value is derived from the HIT's deadline specification and the date and time the Worker accepted the HIT.

A dateTime in the Coordinated Universal Time (Greenwich Mean Time) time zone, such as 2005-01-31T23:59:59Z

Answer

The answer data submitted by the Worker via SubmitAssignment. This element is omitted if no results have been submitted for this assignment.

This value is an XML data structure. See the QuestionFormAnswers data structure for more information.

XML data for the answers, a QuestionFormAnswers data structure