Skip to content

aws.mturk.list_assignments_for_hit

Example SQL Queries

SELECT * FROM
aws.mturk.list_assignments_for_hit
WHERE
"hit_id" = 'VALUE';

Description

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.

Table Definition

Column NameColumn Data Type
hit_id Required Input Column

The ID of the HIT.

VARCHAR
assignment_statuses Input Column

The status of the assignments to return: Submitted | Approved | Rejected

VARCHAR[]
Show child fields
assignment_statuses[]
_aws_profile Input Column

The AWS profile defines the AWS identity used. It can be defined via credentials or by assuming a IAM role.

STRUCT(
"type" VARCHAR,
"name" VARCHAR,
"account_id" VARCHAR,
"via_profile_name" VARCHAR,
"assumed_role_arn" VARCHAR,
"organization" STRUCT(
"account_name" VARCHAR,
"id" VARCHAR,
"tags" STRUCT(
"key" VARCHAR,
"value" VARCHAR
)[],
"master_account" STRUCT(
"id" VARCHAR,
"email" VARCHAR
),
"parents" STRUCT(
"type" VARCHAR,
"id" VARCHAR,
"name" VARCHAR,
"tags" STRUCT(
"key" VARCHAR,
"value" VARCHAR
)[]
)[]
)
)
Show child fields
_aws_profile.account_id

The AWS account id

_aws_profile.assumed_role_arn

The ARN of the assumed role

_aws_profile.name

The unique name of the profile.

_aws_profile.organization

Information about this profile's membership in the AWS organization.

Show child fields
_aws_profile.organization.account_name

The name of account speciifed by the organization

_aws_profile.organization.id

The organization id

_aws_profile.organization.master_account
Show child fields
_aws_profile.organization.master_account.email

The organization master account email address

_aws_profile.organization.master_account.id

The organization master account id

_aws_profile.organization.parents[]
Show child fields
_aws_profile.organization.parents[].id

The id of the parent

_aws_profile.organization.parents[].name

The name of the parent

_aws_profile.organization.parents[].tags[]
Show child fields
_aws_profile.organization.parents[].tags[].key
_aws_profile.organization.parents[].tags[].value
_aws_profile.organization.parents[].type

The type of parent can be an organization unit or a root

_aws_profile.organization.tags[]
Show child fields
_aws_profile.organization.tags[].key
_aws_profile.organization.tags[].value
_aws_profile.type

The type of profile, either 'credentials' or 'assumed_role'

_aws_profile.via_profile_name

This IAM role for this profile is assumed by first utilizing another profile with this name to obtain credentials.

assignments

The collection of Assignment data structures returned by this call.

STRUCT(
"assignment_id" VARCHAR,
"worker_id" VARCHAR,
"hit_id" VARCHAR,
"assignment_status" VARCHAR,
"auto_approval_time" TIMESTAMP_S,
"accept_time" TIMESTAMP_S,
"submit_time" TIMESTAMP_S,
"approval_time" TIMESTAMP_S,
"rejection_time" TIMESTAMP_S,
"deadline" TIMESTAMP_S,
"answer" VARCHAR,
"requester_feedback" VARCHAR
)[]
Show child fields
assignments[]
Show child fields
assignments[].accept_time

The date and time the Worker accepted the assignment.

assignments[].answer

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.

assignments[].approval_time

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.

assignments[].assignment_id

A unique identifier for the assignment.

assignments[].assignment_status

The status of the assignment.

assignments[].auto_approval_time

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.

assignments[].deadline

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.

assignments[].hit_id

The ID of the HIT.

assignments[].rejection_time

If the Worker has submitted results and the Requester has rejected the results, RejectionTime is the date and time the Requester rejected the results.

assignments[].requester_feedback

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.

assignments[].submit_time

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.

assignments[].worker_id

The ID of the Worker who accepted the HIT.

num_results

The number of assignments on the page in the filtered results list, equivalent to the number of assignments returned by this call.

BIGINT