7

In Amazon Mechanical Turk, when creating an External Question then it will send you each assignment like this:

http://tictactoe.amazon.com/gamesurvey.cgi?gameid=01523
&hitId=123RVWYBAZW00EXAMPLE
&assignmentId=123RVWYBAZW00EXAMPLE456RVWYBAZW00EXAMPLE

Surprisingly, it doesn't send me the workerId and I can't find any way to do this. The closest method is GetAssignmentsForHIT which only gives me the assignment already submitted but I need to render the assignment based on the worker history.

apokryfos
  • 38,771
  • 9
  • 70
  • 114
msha
  • 163
  • 3
  • 10

3 Answers3

1

A recent addition to the API is the GetAssignment call, which takes the assignment ID as an argument and will return the Worker ID inside the Assignment data structure.

puzzlement
  • 548
  • 5
  • 10
  • 4
    This is wrong. GetAssignment only works for assignments with status Submitted | Approved | Rejected. When processing the external question the assignment has status none. So GetAssignment will result in a InvalidAssignmentState exception – Robsdedude Sep 25 '13 at 15:28
1

As msha points out, the sending of a workerID parameter to an ExternalQuestion page seems to be deprecated, or at least taken out of the latest version of the documentation.

However, a fellow researcher who's been using MTurk a lot says: "People seem to be using it in the forums. I would go ahead with it...if it ever actually disappears, I'm sure that the developer community will yell very loudly. :) "

I tried it empirically today (2011-08-19), and indeed a workerID is being sent to the ExternalQuestion page I set up on my own server, after the HIT has been accepted. This was in the sandbox. My ExternalQuestion page contained a Java Web Start button (as described here: http://download.oracle.com/javase/tutorial/deployment/deploymentInDepth/createWebStartLaunchButtonFunction.html ); I don't know if that made any difference.

  • How did you retrieve the workerID? For the hitID etc., I can grab them from the URL itself (like above), but that isn't possible with the workerID. – Amyunimus Mar 28 '12 at 19:09
0

According to the MTurk docs here,

When a Worker accepts your HIT, you can get the ID of the Worker. If your HIT contains a Java Applet, an IFrame, or embedded binary data, the URL contains a value for the workerId. If your HIT does not contain these types of data, or if a Worker has not accepted the HIT, the workerId element doesn't appear.

Haven't tried to confirm this myself yet.

VMAtm
  • 27,943
  • 17
  • 79
  • 125
  • I think the link you sent is pointing to the deprecated API. http://docs.amazonwebservices.com/AWSMechTurk/latest/AWSMturkAPI/ is the new one which doesn't have the "Accept mode". – msha Mar 15 '11 at 22:51