Skip to content Skip to sidebar Skip to footer

How To Get Results From A Hit On Sandbox Via Mturk Api

I have created an XML file to publish a question to MTurk and the HIT is visible in the worker sandbox. A couple of my friends even submitted responses to the HIT, but I'm unable t

Solution 1:

The solution was simple:

mturk = boto3.client('mturk',
   aws_access_key_id = "blah",
   aws_secret_access_key = "blah",
   region_name='us-east-1',
   endpoint_url = MTURK_SANDBOX
)
# You will need the following library
# to help parse the XML answers supplied from MTurk
# Install it in your local environment with
# pip install xmltodict
import xmltodict
# Use the hit_id previously created
hit_id = new_hit['HIT']['HITId']
# We are only publishing this task to one Worker
# So we will get back an array with one item if it has been completed
worker_results = mturk.list_assignments_for_hit(HITId=hit_id, AssignmentStatuses=['Submitted'])

Post a Comment for "How To Get Results From A Hit On Sandbox Via Mturk Api"