rturk 2.0.2 → 2.0.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (122) hide show
  1. data/README.markdown +3 -2
  2. data/Rakefile +10 -4
  3. data/VERSION +1 -1
  4. data/aws_docs/ApiReference_AnswerKeyDataStructureArticle.html +98 -0
  5. data/aws_docs/ApiReference_ApproveAssignmentOperation.html +75 -0
  6. data/aws_docs/ApiReference_AssignQualificationOperation.html +107 -0
  7. data/aws_docs/ApiReference_AssignmentDataStructureArticle.html +171 -0
  8. data/aws_docs/ApiReference_BlockWorkerOperation.html +70 -0
  9. data/aws_docs/ApiReference_ChangeHITTypeOfHITOperation.html +68 -0
  10. data/aws_docs/ApiReference_CommonParametersArticle.html +119 -0
  11. data/aws_docs/ApiReference_CreateHITOperation.html +330 -0
  12. data/aws_docs/ApiReference_CreateQualificationTypeOperation.html +190 -0
  13. data/aws_docs/ApiReference_DataStructuresArticle.html +7 -0
  14. data/aws_docs/ApiReference_DisableHITOperation.html +63 -0
  15. data/aws_docs/ApiReference_DisposeHITOperation.html +56 -0
  16. data/aws_docs/ApiReference_DisposeQualificationTypeOperation.html +52 -0
  17. data/aws_docs/ApiReference_ExtendHITOperation.html +86 -0
  18. data/aws_docs/ApiReference_ExternalQuestionArticle.html +125 -0
  19. data/aws_docs/ApiReference_ForceExpireHITOperation.html +61 -0
  20. data/aws_docs/ApiReference_FormattedContentXHTMLArticle.html +289 -0
  21. data/aws_docs/ApiReference_GetAccountBalanceOperation.html +51 -0
  22. data/aws_docs/ApiReference_GetAssignmentsForHITOperation.html +166 -0
  23. data/aws_docs/ApiReference_GetBonusPaymentsOperation.html +160 -0
  24. data/aws_docs/ApiReference_GetFileUploadURLOperation.html +75 -0
  25. data/aws_docs/ApiReference_GetHITOperation.html +89 -0
  26. data/aws_docs/ApiReference_GetHITsForQualificationTypeOperation.html +137 -0
  27. data/aws_docs/ApiReference_GetQualificationRequestsOperation.html +155 -0
  28. data/aws_docs/ApiReference_GetQualificationScoreOperation.html +68 -0
  29. data/aws_docs/ApiReference_GetQualificationTypeOperation.html +57 -0
  30. data/aws_docs/ApiReference_GetQualificationsForQualificationTypeOperation.html +134 -0
  31. data/aws_docs/ApiReference_GetRequesterStatisticOperation.html +315 -0
  32. data/aws_docs/ApiReference_GetReviewableHITsOperation.html +155 -0
  33. data/aws_docs/ApiReference_GrantBonusOperation.html +95 -0
  34. data/aws_docs/ApiReference_GrantQualificationOperation.html +69 -0
  35. data/aws_docs/ApiReference_HITDataStructureArticle.html +302 -0
  36. data/aws_docs/ApiReference_HelpOperation.html +125 -0
  37. data/aws_docs/ApiReference_LocaleDataStructureArticle.html +29 -0
  38. data/aws_docs/ApiReference_NotificationAPI_BuildingANotificationReceptor.html +36 -0
  39. data/aws_docs/ApiReference_NotificationAPI_ElementsOfANotification.html +40 -0
  40. data/aws_docs/ApiReference_NotificationDataStructureArticle.html +73 -0
  41. data/aws_docs/ApiReference_NotificationReceptorAPIArticle.html +9 -0
  42. data/aws_docs/ApiReference_NotificationReceptorAPI_RESTTransportArticle.html +39 -0
  43. data/aws_docs/ApiReference_NotificationReceptorAPI_SOAPTransportArticle.html +45 -0
  44. data/aws_docs/ApiReference_NotifyWorkersOperation.html +82 -0
  45. data/aws_docs/ApiReference_OperationsArticle.html +8 -0
  46. data/aws_docs/ApiReference_PriceDataStructureArticle.html +65 -0
  47. data/aws_docs/ApiReference_QualificationDataStructureArticle.html +89 -0
  48. data/aws_docs/ApiReference_QualificationRequestDataStructureArticle.html +102 -0
  49. data/aws_docs/ApiReference_QualificationRequirementDataStructureArticle.html +176 -0
  50. data/aws_docs/ApiReference_QualificationTypeDataStructureArticle.html +198 -0
  51. data/aws_docs/ApiReference_QuestionAnswerDataArticle.html +8 -0
  52. data/aws_docs/ApiReference_QuestionFormAnswersDataStructureArticle.html +54 -0
  53. data/aws_docs/ApiReference_QuestionFormDataStructureArticle.html +796 -0
  54. data/aws_docs/ApiReference_RegisterHITTypeOperation.html +149 -0
  55. data/aws_docs/ApiReference_RejectAssignmentOperation.html +66 -0
  56. data/aws_docs/ApiReference_RejectQualificationRequestOperation.html +61 -0
  57. data/aws_docs/ApiReference_RevokeQualificationOperation.html +78 -0
  58. data/aws_docs/ApiReference_SearchHITsOperation.html +164 -0
  59. data/aws_docs/ApiReference_SearchQualificationTypesOperation.html +211 -0
  60. data/aws_docs/ApiReference_SendTestEventNotificationOperation.html +78 -0
  61. data/aws_docs/ApiReference_SetHITAsReviewingOperation.html +73 -0
  62. data/aws_docs/ApiReference_SetHITTypeNotificationOperation.html +99 -0
  63. data/aws_docs/ApiReference_UnblockWorkerOperation.html +67 -0
  64. data/aws_docs/ApiReference_UpdateQualificationScoreOperation.html +77 -0
  65. data/aws_docs/ApiReference_UpdateQualificationTypeOperation.html +180 -0
  66. data/aws_docs/ApiReference_WsdlLocationArticle.html +95 -0
  67. data/aws_docs/ApiReference_XMLParameterValuesArticle.html +37 -0
  68. data/aws_docs/Welcome.html +125 -0
  69. data/aws_docs/WhatsNew.html +16 -0
  70. data/aws_docs/_title.html +28 -0
  71. data/aws_docs/_toc.html +749 -0
  72. data/aws_docs/aws-docs-IE.css +419 -0
  73. data/aws_docs/aws-docs.css +455 -0
  74. data/aws_docs/copyrightinfo.html +14 -0
  75. data/aws_docs/frameset.js +12 -0
  76. data/aws_docs/images/Feedback_link.gif +0 -0
  77. data/aws_docs/images/caution.png +0 -0
  78. data/aws_docs/images/home.gif +0 -0
  79. data/aws_docs/images/important.png +0 -0
  80. data/aws_docs/images/next.gif +0 -0
  81. data/aws_docs/images/note.png +0 -0
  82. data/aws_docs/images/prev.gif +0 -0
  83. data/aws_docs/images/tip.png +0 -0
  84. data/aws_docs/images/title-swoosh-logo.gif +0 -0
  85. data/aws_docs/images/toc_bullet.gif +0 -0
  86. data/aws_docs/images/toc_plus.gif +0 -0
  87. data/aws_docs/index.html +18 -0
  88. data/aws_docs/toc.js +84 -0
  89. data/lib/rturk.rb +2 -2
  90. data/lib/rturk/adapter.rb +11 -0
  91. data/lib/rturk/adapters/assignment.rb +13 -50
  92. data/lib/rturk/adapters/hit.rb +21 -9
  93. data/lib/rturk/adapters/worker.rb +23 -0
  94. data/lib/rturk/operation.rb +1 -1
  95. data/lib/rturk/operations/create_hit.rb +10 -54
  96. data/lib/rturk/operations/register_hit_type.rb +68 -0
  97. data/lib/rturk/operations/search_hits.rb +44 -0
  98. data/lib/rturk/parser.rb +8 -0
  99. data/lib/rturk/parsers/answer_parser.rb +29 -0
  100. data/lib/rturk/parsers/assignment_parser.rb +49 -0
  101. data/lib/rturk/parsers/hit_parser.rb +50 -0
  102. data/lib/rturk/{response.rb → parsers/response.rb} +7 -2
  103. data/lib/rturk/{responses → parsers/responses}/create_hit_response.rb +2 -2
  104. data/lib/rturk/{responses → parsers/responses}/get_account_balance_response.rb +0 -0
  105. data/lib/rturk/{responses → parsers/responses}/get_assignments_for_hit_response.rb +3 -3
  106. data/lib/rturk/{responses → parsers/responses}/get_hit_response.rb +9 -16
  107. data/lib/rturk/{responses → parsers/responses}/get_reviewable_hits_response.rb +3 -5
  108. data/lib/rturk/parsers/responses/register_hit_type_response.rb +17 -0
  109. data/lib/rturk/parsers/responses/search_hits_response.rb +65 -0
  110. data/lib/rturk/xml_utilities.rb +14 -3
  111. data/rturk.gemspec +112 -12
  112. data/spec/adapters/hit_spec.rb +10 -0
  113. data/spec/fake_responses/register_hit_type.xml +6 -0
  114. data/spec/fake_responses/search_hits.xml +50 -0
  115. data/spec/operations/create_hit_spec.rb +2 -2
  116. data/spec/operations/get_hit_spec.rb +1 -1
  117. data/spec/operations/register_hit_type_spec.rb +24 -0
  118. data/spec/{adapters/answers_spec.rb → parsers/answer_parser_spec.rb} +2 -2
  119. data/spec/parsers/hit_parser_spec.rb +41 -0
  120. data/spec/xml_parse_spec.rb +2 -2
  121. metadata +111 -11
  122. data/lib/rturk/adapters/answers.rb +0 -38
@@ -0,0 +1,51 @@
1
+ <html xmlns:fo="http://www.w3.org/1999/XSL/Format"><head>
2
+ <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
3
+ <title>GetAccountBalance</title><link rel="stylesheet" href="aws-docs-IE.css" type="text/css"><meta name="generator" content="DocBook XSL Stylesheets V1.74.0"><link rel="home" href="#top" title="Amazon Mechanical Turk"><link rel="up" href="ApiReference_OperationsArticle.html" title="Chapter&nbsp;5.&nbsp;Operations"><link rel="prev" href="ApiReference_ForceExpireHITOperation.html" title="ForceExpireHIT"><link rel="next" href="ApiReference_GetAssignmentsForHITOperation.html" title="GetAssignmentsForHIT"><!--[if !IE]>--><link rel="stylesheet" href="aws-docs.css" type="text/css"><meta name="generator" content="DocBook XSL Stylesheets V1.74.0"><!--<![endif]--><meta xmlns="http://www.w3.org/1999/xhtml" http-equiv="Content-Type" content="text/html; charset=utf-8"></meta><script src="/urchin.js" type="text/javascript"></script><script type="text/javascript">
4
+ urchinTracker();
5
+ </script><script xmlns="http://www.w3.org/1999/xhtml" type="text/javascript" src="frameset.js"> //
6
+ </script></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header" cellspacing="0" cellpadding="2"><tr><td width="30%" align="left"><a accesskey="p" href="ApiReference_ForceExpireHITOperation.html"><img src="images/prev.gif" alt="Prev"></a> </td><td width="40%" align="center"><a href="http://survey.amazonwebservices.com/survey/s?s=559&amp;opdata_page=Mturk_API_2008-08-02_ApiReference_GetAccountBalanceOperation">Documentation Feedback</a></td><td width="30%" align="right"> <a accesskey="n" href="ApiReference_GetAssignmentsForHITOperation.html"><img src="images/next.gif" alt="Next"></a></td></tr></table><div class="breadcrumb"><a href="Welcome.html">Welcome</a><a href=""></a> &raquo; <a href="ApiReference_OperationsArticle.html">Operations</a> &raquo; <strong>GetAccountBalance</strong></div></div><div class="section" lang="en"><div class="titlepage"><div><div><h1 class="topictitle">GetAccountBalance</h1></div></div></div><a class="indexterm" name="d0e4592"></a><a class="indexterm" name="d0e4595"></a><a class="indexterm" name="d0e4600"></a><a class="indexterm" name="d0e4605"></a><a class="indexterm" name="d0e4610"></a><div class="section" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both" id="d0e4615">Description</h2></div></div></div><p> The <code class="function">GetAccountBalance</code> operation retrieves the amount of money in
7
+ your Amazon Mechanical Turk account. </p></div><div class="section" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both" id="d0e4623">Request Parameters</h2></div></div></div><p> The <code class="function">GetAccountBalance</code> operation accepts parameters common to all
8
+ operations. Some common parameters are required. See <a class="link" href="ApiReference_CommonParametersArticle.html" title="Chapter&nbsp;4.&nbsp;Common Parameters">Common Parameters</a> for more
9
+ information. </p><p> The following parameter is specific to the <code class="function">GetAccountBalance</code>
10
+ operation: </p><div class="informaltable"><table cellspacing="0" border="0"><colgroup><col><col><col></colgroup><thead><tr><th>Name</th><th>Description</th><th>Required</th></tr></thead><tbody><tr><td>
11
+ <p class="simpara">
12
+ <em class="parameter"><code>Operation</code></em>
13
+ </p>
14
+ </td><td>
15
+ <p class="simpara">The name of the operation</p>
16
+ <p class="simpara">Type: String</p>
17
+ <p class="simpara">Valid Values: GetAccountBalance</p>
18
+ <p class="simpara">Default: None</p>
19
+ </td><td>
20
+ <p class="simpara">Yes</p>
21
+ </td></tr></tbody></table></div></div><div class="section" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both" id="d0e4681">Response Elements</h2></div></div></div><p> A successful request for the <code class="function">GetAccountBalance</code> operation returns
22
+ with a <em class="parameter"><code>GetAccountBalanceResult</code></em> element in the response. </p><p> The <em class="parameter"><code>GetAccountBalanceResult</code></em> element contains the following
23
+ elements: </p><div class="informaltable"><table cellspacing="0" border="0"><colgroup><col><col></colgroup><thead><tr><th>Name</th><th>Description</th></tr></thead><tbody><tr><td>
24
+ <p class="simpara">AvailableBalance</p>
25
+ </td><td>
26
+ <p class="simpara"> The amount available to pay for assignments. This is your
27
+ current balance minus any outstanding payments, fees or bonuses you
28
+ owe. </p>
29
+ <p class="simpara"> Type: <a class="link" href="ApiReference_PriceDataStructureArticle.html" title="Price">Price</a> data structure </p>
30
+ </td></tr><tr><td>
31
+ <p class="simpara">OnHoldBalance</p>
32
+ </td><td>
33
+ <p class="simpara"> Not used. This value is always 0. </p>
34
+ <p class="simpara"> Type: <a class="link" href="ApiReference_PriceDataStructureArticle.html" title="Price">Price</a> data structure </p>
35
+ </td></tr></tbody></table></div></div><div class="section" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both" id="d0e4742">Examples</h2></div></div></div><p>The following example shows how to use the <code class="function">GetAccountBalance</code>
36
+ operation.</p><div class="section" lang="en"><div class="titlepage"><div><div><h3 class="title" id="d0e4750">Sample Request</h3></div></div></div><p>The following example retrieves the Requester's account balance.</p><pre class="programlisting">http://mechanicalturk.amazonaws.com/?Service=AWSMechanicalTurkRequester
37
+ &amp;AWSAccessKeyId=<em class="replaceable"><code>[the Requester's Access Key ID]</code></em>
38
+ &amp;Version=2008-08-02
39
+ &amp;Operation=GetAccountBalance
40
+ &amp;Signature=<em class="replaceable"><code>[signature for this request]</code></em>
41
+ &amp;Timestamp=<em class="replaceable"><code>[your system's local time]</code></em>
42
+ </pre></div><div class="section" lang="en"><div class="titlepage"><div><div><h3 class="title" id="d0e4766">Sample Response</h3></div></div></div><p>The following is an example response.</p><pre class="programlisting">&lt;GetAccountBalanceResult&gt;
43
+ &lt;Request&gt;
44
+ &lt;IsValid&gt;True&lt;/IsValid&gt;
45
+ &lt;/Request&gt;
46
+ &lt;AvailableBalance&gt;
47
+ &lt;Amount&gt;10000.000&lt;/Amount&gt;
48
+ &lt;CurrencyCode&gt;USD&lt;/CurrencyCode&gt;
49
+ &lt;FormattedPrice&gt;$10,000.00&lt;/FormattedPrice&gt;
50
+ &lt;/AvailableBalance&gt;
51
+ &lt;/GetAccountBalanceResult&gt;</pre></div></div></div><div class="navfooter"><table width="100%" summary="Navigation footer" cellspacing="0" cellpadding="2"><tr><td width="30%" align="left"><a accesskey="p" href="ApiReference_ForceExpireHITOperation.html"><img src="images/prev.gif" alt="Prev"></a> </td><td width="40%" align="center"><a href="http://survey.amazonwebservices.com/survey/s?s=559&amp;opdata_page=Mturk_API_2008-08-02_ApiReference_GetAccountBalanceOperation">Documentation Feedback</a><br><a href="copyrightinfo.html">Copyright Information</a></td><td width="30%" align="right"> <a accesskey="n" href="ApiReference_GetAssignmentsForHITOperation.html"><img src="images/next.gif" alt="Next"></a></td></tr><tr><td width="30%" align="left" valign="top">&nbsp;</td><td width="40%" align="center"><a accesskey="h" href="#top"><img src="images/home.gif" alt="Home"></a></td><td width="30%" align="right" valign="top">&nbsp;</td></tr></table></div></body></html>
@@ -0,0 +1,166 @@
1
+ <html xmlns:fo="http://www.w3.org/1999/XSL/Format"><head>
2
+ <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
3
+ <title>GetAssignmentsForHIT</title><link rel="stylesheet" href="aws-docs-IE.css" type="text/css"><meta name="generator" content="DocBook XSL Stylesheets V1.74.0"><link rel="home" href="#top" title="Amazon Mechanical Turk"><link rel="up" href="ApiReference_OperationsArticle.html" title="Chapter&nbsp;5.&nbsp;Operations"><link rel="prev" href="ApiReference_GetAccountBalanceOperation.html" title="GetAccountBalance"><link rel="next" href="ApiReference_GetBonusPaymentsOperation.html" title="GetBonusPayments"><!--[if !IE]>--><link rel="stylesheet" href="aws-docs.css" type="text/css"><meta name="generator" content="DocBook XSL Stylesheets V1.74.0"><!--<![endif]--><meta xmlns="http://www.w3.org/1999/xhtml" http-equiv="Content-Type" content="text/html; charset=utf-8"></meta><script src="/urchin.js" type="text/javascript"></script><script type="text/javascript">
4
+ urchinTracker();
5
+ </script><script xmlns="http://www.w3.org/1999/xhtml" type="text/javascript" src="frameset.js"> //
6
+ </script></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header" cellspacing="0" cellpadding="2"><tr><td width="30%" align="left"><a accesskey="p" href="ApiReference_GetAccountBalanceOperation.html"><img src="images/prev.gif" alt="Prev"></a> </td><td width="40%" align="center"><a href="http://survey.amazonwebservices.com/survey/s?s=559&amp;opdata_page=Mturk_API_2008-08-02_ApiReference_GetAssignmentsForHITOperation">Documentation Feedback</a></td><td width="30%" align="right"> <a accesskey="n" href="ApiReference_GetBonusPaymentsOperation.html"><img src="images/next.gif" alt="Next"></a></td></tr></table><div class="breadcrumb"><a href="Welcome.html">Welcome</a><a href=""></a> &raquo; <a href="ApiReference_OperationsArticle.html">Operations</a> &raquo; <strong>GetAssignmentsForHIT</strong></div></div><div class="section" lang="en"><div class="titlepage"><div><div><h1 class="topictitle">GetAssignmentsForHIT</h1></div></div></div><a class="indexterm" name="d0e4777"></a><a class="indexterm" name="d0e4780"></a><a class="indexterm" name="d0e4783"></a><a class="indexterm" name="d0e4788"></a><a class="indexterm" name="d0e4793"></a><a class="indexterm" name="d0e4798"></a><a class="indexterm" name="d0e4803"></a><a class="indexterm" name="d0e4808"></a><div class="section" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both" id="d0e4813">Description</h2></div></div></div><p> The <code class="function">GetAssignmentsForHIT</code> operation retrieves completed
7
+ assignments for a HIT. You can use this operation to retrieve the results for a HIT. </p><p> You can get assignments for a HIT at any time, even if the HIT is not yet <span class="guilabel">Reviewable</span>. If a HIT requested multiple assignments, and has received
8
+ some results but has not yet become <span class="guilabel">Reviewable</span>, you can still
9
+ retrieve the partial results with this operation. </p><p> Use the <em class="parameter"><code>AssignmentStatus</code></em> parameter to control which set of
10
+ assignments for a HIT are returned. The <code class="function">GetAssignmentsForHIT</code>
11
+ operation can return submitted assignments awaiting approval, or it can return
12
+ assignments that have already been approved or rejected. </p><p> Only the Requester who created the HIT can retrieve the assignments for that HIT. </p><p> Results are sorted and divided into numbered pages and the operation returns a single
13
+ page of results. You can use the parameters of the operation to control sorting and
14
+ pagination. </p></div><div class="section" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both" id="d0e4841">Request Parameters</h2></div></div></div><p> The <code class="function">GetAssignmentsForHIT</code> operation accepts parameters common to
15
+ all operations. Some common parameters are required. See <a class="link" href="ApiReference_CommonParametersArticle.html" title="Chapter&nbsp;4.&nbsp;Common Parameters">Common Parameters</a> for more
16
+ information. </p><p> The following parameters are specific to the <code class="function">GetAssignmentsForHIT</code> operation: </p><div class="informaltable"><table cellspacing="0" border="0"><colgroup><col><col><col></colgroup><thead><tr><th>Name</th><th>Description</th><th>Required</th></tr></thead><tbody><tr><td>
17
+ <p class="simpara">
18
+ <em class="parameter"><code>Operation</code></em>
19
+ </p>
20
+ </td><td>
21
+ <p class="simpara">The name of the operation</p>
22
+ <p class="simpara">Type: String</p>
23
+ <p class="simpara">Valid Values: GetAssignmentsForHIT</p>
24
+ <p class="simpara">Default: None</p>
25
+ </td><td>
26
+ <p class="simpara">Yes</p>
27
+ </td></tr><tr><td>
28
+ <p class="simpara">
29
+ <em class="parameter"><code>HITId</code></em>
30
+ </p>
31
+ </td><td>
32
+ <p class="simpara">The ID of the HIT for which completed assignments are
33
+ requested.</p>
34
+ <p class="simpara">Type: String</p>
35
+ <p class="simpara">Default: None</p>
36
+ </td><td>
37
+ <p class="simpara">Yes</p>
38
+ </td></tr><tr><td>
39
+ <p class="simpara">
40
+ <em class="parameter"><code>AssignmentStatus</code></em>
41
+ </p>
42
+ </td><td>
43
+ <p class="simpara">The status of the assignments to return.</p>
44
+ <p class="simpara">
45
+ </p>
46
+ <p class="simpara">Type: String</p>
47
+ <p class="simpara">Valid Values: Submitted | Approved | Rejected</p>
48
+ <p class="simpara">Default: None. If not specified, the operation returns all
49
+ assignments that have been submitted, including those that have been
50
+ approved or rejected. </p>
51
+ </td><td>
52
+ <p class="simpara">No</p>
53
+ </td></tr><tr><td>
54
+ <p class="simpara">
55
+ <em class="parameter"><code>SortProperty</code></em>
56
+ </p>
57
+ </td><td>
58
+ <p class="simpara"> The field on which to sort the results returned by the
59
+ operation. </p>
60
+ <p class="simpara">Type: String</p>
61
+ <p class="simpara">Valid Values: AcceptTime | SubmitTime |
62
+ AssignmentStatus</p>
63
+ <p class="simpara">Default: SubmitTime</p>
64
+ </td><td>
65
+ <p class="simpara"></p>
66
+ </td></tr><tr><td>
67
+ <p class="simpara">
68
+ <em class="parameter"><code>SortDirection</code></em>
69
+ </p>
70
+ </td><td>
71
+ <p class="simpara"> The direction of the sort used with the field specified by the
72
+ <em class="parameter"><code>SortProperty</code></em> parameter. </p>
73
+ <p class="simpara">Type: String</p>
74
+ <p class="simpara">Valid Values: Ascending | Descending</p>
75
+ <p class="simpara">Default: Ascending</p>
76
+ </td><td>
77
+ <p class="simpara">No</p>
78
+ </td></tr><tr><td>
79
+ <p class="simpara">
80
+ <em class="parameter"><code>PageSize</code></em>
81
+ </p>
82
+ </td><td>
83
+ <p class="simpara"> The number of assignments to include in a page of results. The
84
+ complete sorted result set is divided into pages of this many
85
+ assignments. </p>
86
+ <p class="simpara">Type: positive integer</p>
87
+ <p class="simpara">Valid Values: any integer between 1 and 100</p>
88
+ <p class="simpara">Default: 10</p>
89
+ </td><td>
90
+ <p class="simpara">No</p>
91
+ </td></tr><tr><td>
92
+ <p class="simpara">
93
+ <em class="parameter"><code>PageNumber</code></em>
94
+ </p>
95
+ </td><td>
96
+ <p class="simpara"> The page of results to return. Once the assignments have been
97
+ filtered, sorted, and divided into pages of size <em class="parameter"><code>PageSize</code></em>, the page corresponding to <em class="parameter"><code>PageNumber</code></em> is returned as the results of the
98
+ operation. </p>
99
+ <p class="simpara">Type: positive integer</p>
100
+ <p class="simpara">Default: 1</p>
101
+ </td><td>
102
+ <p class="simpara">No</p>
103
+ </td></tr></tbody></table></div></div><div class="section" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both" id="d0e5072">Response Elements</h2></div></div></div><p> A successful request for the <code class="function">GetAssignmentsForHIT</code> operation has
104
+ a <em class="parameter"><code>GetAssignmentsForHITResult</code></em> element in the response. </p><p> The <em class="parameter"><code>GetAssignmentsForHITResult</code></em> element contains the following
105
+ elements: </p><div class="informaltable"><table cellspacing="0" border="0"><colgroup><col><col></colgroup><thead><tr><th>Name</th><th>Description</th></tr></thead><tbody><tr><td>
106
+ <p class="simpara">NumResults</p>
107
+ </td><td>
108
+ <p class="simpara"> The number of assignments on the page in the filtered results
109
+ list, equivalent to the number of assignments returned by this call. </p>
110
+ <p class="simpara">Type: non-negative integer</p>
111
+ </td></tr><tr><td>
112
+ <p class="simpara">PageNumber</p>
113
+ </td><td>
114
+ <p class="simpara">The number of the page in the filtered results list being
115
+ returned.</p>
116
+ <p class="simpara">Type: positive integer</p>
117
+ </td></tr><tr><td>
118
+ <p class="simpara">TotalNumResults</p>
119
+ </td><td>
120
+ <p class="simpara">The total number of HITs in the filtered results list based on
121
+ this call.</p>
122
+ <p class="simpara">Type: positive integer</p>
123
+ </td></tr><tr><td>
124
+ <p class="simpara">Assignment</p>
125
+ </td><td>
126
+ <p class="simpara"> The assignment. The response includes one <em class="parameter"><code>Assignment</code></em> element for each HIT returned by the
127
+ query. </p>
128
+ <p class="simpara"> Type: an <a class="link" href="ApiReference_AssignmentDataStructureArticle.html" title="Assignment">Assignment</a> data structure </p>
129
+ </td></tr></tbody></table></div></div><div class="section" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both" id="d0e5161">Examples</h2></div></div></div><p>The following example shows how to use the <code class="function">GetAssignmentsForHIT</code>
130
+ operation.</p><div class="section" lang="en"><div class="titlepage"><div><div><h3 class="title" id="d0e5169">Sample Request</h3></div></div></div><p> The following example retrieves five assignments for a HIT, using the default
131
+ sort order (<code class="code">SubmitTime</code>) and direction (<code class="code">Ascending</code>). </p><pre class="programlisting">http://mechanicalturk.amazonaws.com/xml?Service=AWSMechanicalTurkRequester
132
+ &amp;AWSAccessKeyId=<em class="replaceable"><code>[the Requester's Access Key ID]</code></em>
133
+ &amp;Version=2008-08-02
134
+ &amp;Operation=GetAssignmentsForHIT
135
+ &amp;Signature=<em class="replaceable"><code>[signature for this request]</code></em>
136
+ &amp;Timestamp=<em class="replaceable"><code>[your system's local time]</code></em>
137
+ &amp;HITId=123RVWYBAZW00EXAMPLE
138
+ &amp;PageSize=5
139
+ &amp;PageNumber=1
140
+ </pre></div><div class="section" lang="en"><div class="titlepage"><div><div><h3 class="title" id="d0e5191">Sample Response</h3></div></div></div><p>The following is an example response.</p><pre class="programlisting">&lt;GetAssignmentsForHITResult&gt;
141
+ &lt;Request&gt;
142
+ &lt;IsValid&gt;True&lt;/IsValid&gt;
143
+ &lt;/Request&gt;
144
+ &lt;NumResults&gt;1&lt;/NumResults&gt;
145
+ &lt;TotalNumResults&gt;1&lt;/TotalNumResults&gt;
146
+ &lt;PageNumber&gt;1&lt;/PageNumber&gt;
147
+ &lt;Assignment&gt;
148
+ &lt;AssignmentId&gt;GYFTRHZ5J3DZREY48WNZE38ZR9RR1ZPMXGWE7WE0&lt;/AssignmentId&gt;
149
+ &lt;WorkerId&gt;AD20WXZZP9XXK&lt;/WorkerId&gt;
150
+ &lt;HITId&gt;GYFTRHZ5J3DZREY48WNZ&lt;/HITId&gt;
151
+ &lt;AssignmentStatus&gt;Approved&lt;/AssignmentStatus&gt;
152
+ &lt;AutoApprovalTime&gt;2009-08-12T19:21:54Z&lt;/AutoApprovalTime&gt;
153
+ &lt;AcceptTime&gt;2009-07-13T19:21:40Z&lt;/AcceptTime&gt;
154
+ &lt;SubmitTime&gt;2009-07-13T19:21:54Z&lt;/SubmitTime&gt;
155
+ &lt;ApprovalTime&gt;2009-07-13T19:27:54Z&lt;/ApprovalTime&gt;
156
+ &lt;Answer&gt;
157
+ &lt;?xml version="1.0" encoding="UTF-8"?&gt;
158
+ &lt;QuestionFormAnswers xmlns="http://mechanicalturk.amazonaws.com/AWSMechanicalTurkDataSchemas/2005-10-01/QuestionFormAnswers.xsd"&gt;
159
+ &lt;Answer&gt;
160
+ &lt;QuestionIdentifier&gt;Question100&lt;/QuestionIdentifier&gt;
161
+ &lt;FreeText&gt;Move to X.&lt;/FreeText&gt;
162
+ &lt;/Answer&gt;
163
+ &lt;/QuestionFormAnswers&gt;
164
+ &lt;/Answer&gt;
165
+ &lt;/Assignment&gt;
166
+ &lt;/GetAssignmentsForHITResult&gt;</pre></div></div></div><div class="navfooter"><table width="100%" summary="Navigation footer" cellspacing="0" cellpadding="2"><tr><td width="30%" align="left"><a accesskey="p" href="ApiReference_GetAccountBalanceOperation.html"><img src="images/prev.gif" alt="Prev"></a> </td><td width="40%" align="center"><a href="http://survey.amazonwebservices.com/survey/s?s=559&amp;opdata_page=Mturk_API_2008-08-02_ApiReference_GetAssignmentsForHITOperation">Documentation Feedback</a><br><a href="copyrightinfo.html">Copyright Information</a></td><td width="30%" align="right"> <a accesskey="n" href="ApiReference_GetBonusPaymentsOperation.html"><img src="images/next.gif" alt="Next"></a></td></tr><tr><td width="30%" align="left" valign="top">&nbsp;</td><td width="40%" align="center"><a accesskey="h" href="#top"><img src="images/home.gif" alt="Home"></a></td><td width="30%" align="right" valign="top">&nbsp;</td></tr></table></div></body></html>
@@ -0,0 +1,160 @@
1
+ <html xmlns:fo="http://www.w3.org/1999/XSL/Format"><head>
2
+ <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
3
+ <title>GetBonusPayments</title><link rel="stylesheet" href="aws-docs-IE.css" type="text/css"><meta name="generator" content="DocBook XSL Stylesheets V1.74.0"><link rel="home" href="#top" title="Amazon Mechanical Turk"><link rel="up" href="ApiReference_OperationsArticle.html" title="Chapter&nbsp;5.&nbsp;Operations"><link rel="prev" href="ApiReference_GetAssignmentsForHITOperation.html" title="GetAssignmentsForHIT"><link rel="next" href="ApiReference_GetFileUploadURLOperation.html" title="GetFileUploadURL"><!--[if !IE]>--><link rel="stylesheet" href="aws-docs.css" type="text/css"><meta name="generator" content="DocBook XSL Stylesheets V1.74.0"><!--<![endif]--><meta xmlns="http://www.w3.org/1999/xhtml" http-equiv="Content-Type" content="text/html; charset=utf-8"></meta><script src="/urchin.js" type="text/javascript"></script><script type="text/javascript">
4
+ urchinTracker();
5
+ </script><script xmlns="http://www.w3.org/1999/xhtml" type="text/javascript" src="frameset.js"> //
6
+ </script></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header" cellspacing="0" cellpadding="2"><tr><td width="30%" align="left"><a accesskey="p" href="ApiReference_GetAssignmentsForHITOperation.html"><img src="images/prev.gif" alt="Prev"></a> </td><td width="40%" align="center"><a href="http://survey.amazonwebservices.com/survey/s?s=559&amp;opdata_page=Mturk_API_2008-08-02_ApiReference_GetBonusPaymentsOperation">Documentation Feedback</a></td><td width="30%" align="right"> <a accesskey="n" href="ApiReference_GetFileUploadURLOperation.html"><img src="images/next.gif" alt="Next"></a></td></tr></table><div class="breadcrumb"><a href="Welcome.html">Welcome</a><a href=""></a> &raquo; <a href="ApiReference_OperationsArticle.html">Operations</a> &raquo; <strong>GetBonusPayments</strong></div></div><div class="section" lang="en"><div class="titlepage"><div><div><h1 class="topictitle">GetBonusPayments</h1></div></div></div><a class="indexterm" name="d0e5202"></a><a class="indexterm" name="d0e5205"></a><a class="indexterm" name="d0e5208"></a><a class="indexterm" name="d0e5213"></a><a class="indexterm" name="d0e5218"></a><a class="indexterm" name="d0e5223"></a><a class="indexterm" name="d0e5228"></a><div class="section" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both" id="d0e5233">Description</h2></div></div></div><p> The <code class="function">GetBonusPayments</code> operation retrieves the amounts of bonuses
7
+ you have paid to Workers for a given HIT or assignment. </p></div><div class="section" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both" id="d0e5241">Request Parameters</h2></div></div></div><p> The <code class="function">GetBonusPayments</code> operation accepts parameters common to all
8
+ operations. Some common parameters are required. See <a class="link" href="ApiReference_CommonParametersArticle.html" title="Chapter&nbsp;4.&nbsp;Common Parameters">Common Parameters</a> for more information. </p><p> The following parameters are specific to the <code class="function">GetBonusPayments</code>
9
+ operation: </p><div class="informaltable"><table cellspacing="0" border="0"><colgroup><col><col><col></colgroup><thead><tr><th>Name</th><th>Description</th><th>Required</th></tr></thead><tbody><tr><td>
10
+ <p class="simpara">
11
+ <em class="parameter"><code>Operation</code></em>
12
+ </p>
13
+ </td><td>
14
+ <p class="simpara">The name of the operation</p>
15
+ <p class="simpara">Type: String</p>
16
+ <p class="simpara">Valid Values: GetBonusPayments</p>
17
+ <p class="simpara">Default: None</p>
18
+ </td><td>
19
+ <p class="simpara">Yes</p>
20
+ </td></tr><tr><td>
21
+ <p class="simpara">
22
+ <em class="parameter"><code>HITId</code></em>
23
+ </p>
24
+ </td><td>
25
+ <p class="simpara"> The ID of the HIT associated with the bonus payments to
26
+ retrieve. If not specified, all bonus payments for all assignments
27
+ for the given HIT are returned. </p>
28
+ <p class="simpara">Type: String</p>
29
+ <p class="simpara">Default: None</p>
30
+ <p class="simpara"> Conditions: Either the <em class="parameter"><code>HITId</code></em> parameter
31
+ or the <em class="parameter"><code>AssignmentId</code></em> parameter must be
32
+ specified. </p>
33
+ </td><td>
34
+ <p class="simpara">Conditional</p>
35
+ </td></tr><tr><td>
36
+ <p class="simpara">
37
+ <em class="parameter"><code>AssignmentId</code></em>
38
+ </p>
39
+ </td><td>
40
+ <p class="simpara"> The ID of the assignment associated with the bonus payments to
41
+ retrieve. If specified, only bonus payments for the given assignment
42
+ are returned. </p>
43
+ <p class="simpara">Type: String</p>
44
+ <p class="simpara">Default: None</p>
45
+ <p class="simpara"> Conditions: Either the <em class="parameter"><code>HITId</code></em> parameter
46
+ or the <em class="parameter"><code>AssignmentId</code></em> parameter must be
47
+ specified. </p>
48
+ </td><td>
49
+ <p class="simpara">Conditional</p>
50
+ </td></tr><tr><td>
51
+ <p class="simpara">
52
+ <em class="parameter"><code>PageSize</code></em>
53
+ </p>
54
+ </td><td>
55
+ <p class="simpara"> The number of bouns payments to include in a page of results.
56
+ The complete result set is divided into pages of this many bonus
57
+ payments. </p>
58
+ <p class="simpara">Type: positive integer</p>
59
+ <p class="simpara">Valid Values: any integer between 1 and 100</p>
60
+ <p class="simpara">Default: 10</p>
61
+ </td><td>
62
+ <p class="simpara">No</p>
63
+ </td></tr><tr><td>
64
+ <p class="simpara">
65
+ <em class="parameter"><code>PageNumber</code></em>
66
+ </p>
67
+ </td><td>
68
+ <p class="simpara"> The page of results to return. Once the list of bonus payments
69
+ has been divided into pages of size <em class="parameter"><code>PageSize</code></em>,
70
+ the page corresponding to <em class="parameter"><code>PageNumber</code></em> is
71
+ returned as the results of the operation. </p>
72
+ <p class="simpara">Type: positive integer</p>
73
+ <p class="simpara">Default: 1</p>
74
+ </td><td>
75
+ <p class="simpara">No</p>
76
+ </td></tr></tbody></table></div></div><div class="section" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both" id="d0e5425">Response Elements</h2></div></div></div><p> A successful request for the <code class="function">GetBonusPayments</code> operation has a
77
+ <em class="parameter"><code>GetBonusPaymentsResult</code></em> element in the response. </p><p> The <em class="parameter"><code>GetBonusPaymentsResult</code></em> element contains the following
78
+ elements: </p><div class="informaltable"><table cellspacing="0" border="0"><colgroup><col><col></colgroup><thead><tr><th>Name</th><th>Description</th></tr></thead><tbody><tr><td>
79
+ <p class="simpara">PageNumber</p>
80
+ </td><td>
81
+ <p class="simpara"> The page of results to return. Once the list of bonus payments
82
+ has been divided into pages of size <em class="parameter"><code>PageSize</code></em>,
83
+ the page corresponding to the <em class="parameter"><code>PageNumber</code></em>
84
+ parameter is returned as the results of the operation. </p>
85
+ <p class="simpara">Type: positive integer</p>
86
+ </td></tr><tr><td>
87
+ <p class="simpara">NumResults</p>
88
+ </td><td>
89
+ <p class="simpara"> The number of bonus payments on this page in the filtered
90
+ results list, equivalent to the number of bonus payments being
91
+ returned by this call. </p>
92
+ <p class="simpara">Type: non-negative integer</p>
93
+ </td></tr><tr><td>
94
+ <p class="simpara">TotalNumResults</p>
95
+ </td><td>
96
+ <p class="simpara"> The total number of bonus payments in the filtered results
97
+ list based on this call. </p>
98
+ <p class="simpara">Type: non-negative integer</p>
99
+ </td></tr><tr><td>
100
+ <p class="simpara">BonusPayment</p>
101
+ </td><td>
102
+ <p class="simpara"> A bonus payment. The response includes one <em class="parameter"><code>BonusPayment</code></em> element for each bonus payment
103
+ returned by the query. </p>
104
+ <p class="simpara">Type: A BonusPayment data structure, described in the next
105
+ table.</p>
106
+ </td></tr></tbody></table></div><p> Each <em class="parameter"><code>BonusPayment</code></em> is a data structure with the following
107
+ elements: </p><div class="informaltable"><table cellspacing="0" border="0"><colgroup><col><col><col></colgroup><thead><tr><th>Name</th><th>Description</th><td class="auto-generated">&nbsp;</td></tr></thead><tbody><tr><td>
108
+ <p class="simpara">
109
+ <em class="parameter"><code>WorkerId</code></em>
110
+ </p>
111
+ </td><td>
112
+ <p class="simpara"> The ID of the Worker to whom the bonus was paid. </p>
113
+ <p class="simpara">Type: String</p>
114
+ </td><td class="auto-generated">&nbsp;</td></tr><tr><td>
115
+ <p class="simpara">
116
+ <em class="parameter"><code>BonusAmount</code></em>
117
+ </p>
118
+ </td><td>
119
+ <p class="simpara">The amount of the bonus payment.</p>
120
+ <p class="simpara"> Type: A <a class="link" href="ApiReference_PriceDataStructureArticle.html" title="Price">Price</a> data structure </p>
121
+ </td><td class="auto-generated">&nbsp;</td></tr><tr><td>
122
+ <p class="simpara">
123
+ <em class="parameter"><code>AssignmentId</code></em>
124
+ </p>
125
+ </td><td>
126
+ <p class="simpara"> The ID of the assignment associated with this bonus payment </p>
127
+ <p class="simpara">Type: String</p>
128
+ </td><td class="auto-generated">&nbsp;</td></tr><tr><td>
129
+ <p class="simpara">
130
+ <em class="parameter"><code>Reason</code></em>
131
+ </p>
132
+ </td><td>
133
+ <p class="simpara"> The <span class="guilabel">Reason</span> text given when the bonus was
134
+ granted, if any. </p>
135
+ <p class="simpara">Type: String</p>
136
+ </td><td class="auto-generated">&nbsp;</td></tr><tr><td>
137
+ <p class="simpara">
138
+ <em class="parameter"><code>GrantTime</code></em>
139
+ </p>
140
+ </td><td>
141
+ <p class="simpara">The date and time of when the bonus was granted.</p>
142
+ <p class="simpara"> Type: A <a class="ulink" href="http://www.w3.org/TR/xmlschema-2/#dateTime" target="_blank">dateTime</a> structure in the Coordinated Universal Time
143
+ (Greenwich Mean Time) time zone, such as <strong class="userinput"><code>2005-01-31T23:59:59Z</code></strong>. </p>
144
+ </td><td class="auto-generated">&nbsp;</td></tr></tbody></table></div></div><div class="section" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both" id="d0e5630">Examples</h2></div></div></div><p>The following example shows how to use the <code class="function">GetBonusPayments</code>
145
+ operation.</p><div class="section" lang="en"><div class="titlepage"><div><div><h3 class="title" id="d0e5638">Sample Request</h3></div></div></div><p> The following example retrieves all bonus payments associated with the specified
146
+ HIT. </p><pre class="programlisting">http://mechanicalturk.amazonaws.com/?Service=AWSMechanicalTurkRequester
147
+ &amp;AWSAccessKeyId=<em class="replaceable"><code>[the Requester's Access Key ID]</code></em>
148
+ &amp;Version=2008-08-02
149
+ &amp;Operation=GetBonusPayments
150
+ &amp;Signature=<em class="replaceable"><code>[signature for this request]</code></em>
151
+ &amp;Timestamp=<em class="replaceable"><code>[your system's local time]</code></em>
152
+ &amp;HITId=123RVWYBAZW00EXAMPLE
153
+ </pre></div><div class="section" lang="en"><div class="titlepage"><div><div><h3 class="title" id="d0e5654">Sample Response</h3></div></div></div><p>The following is an example response.</p><pre class="programlisting">&lt;GetBonusPaymentsResult&gt;
154
+ &lt;Request&gt;
155
+ &lt;IsValid&gt;True&lt;/IsValid&gt;
156
+ &lt;/Request&gt;
157
+ &lt;NumResults&gt;0&lt;/NumResults&gt;
158
+ &lt;TotalNumResults&gt;0&lt;/TotalNumResults&gt;
159
+ &lt;PageNumber&gt;1&lt;/PageNumber&gt;
160
+ &lt;/GetBonusPaymentsResult&gt;</pre></div></div></div><div class="navfooter"><table width="100%" summary="Navigation footer" cellspacing="0" cellpadding="2"><tr><td width="30%" align="left"><a accesskey="p" href="ApiReference_GetAssignmentsForHITOperation.html"><img src="images/prev.gif" alt="Prev"></a> </td><td width="40%" align="center"><a href="http://survey.amazonwebservices.com/survey/s?s=559&amp;opdata_page=Mturk_API_2008-08-02_ApiReference_GetBonusPaymentsOperation">Documentation Feedback</a><br><a href="copyrightinfo.html">Copyright Information</a></td><td width="30%" align="right"> <a accesskey="n" href="ApiReference_GetFileUploadURLOperation.html"><img src="images/next.gif" alt="Next"></a></td></tr><tr><td width="30%" align="left" valign="top">&nbsp;</td><td width="40%" align="center"><a accesskey="h" href="#top"><img src="images/home.gif" alt="Home"></a></td><td width="30%" align="right" valign="top">&nbsp;</td></tr></table></div></body></html>
@@ -0,0 +1,75 @@
1
+ <html xmlns:fo="http://www.w3.org/1999/XSL/Format"><head>
2
+ <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
3
+ <title>GetFileUploadURL</title><link rel="stylesheet" href="aws-docs-IE.css" type="text/css"><meta name="generator" content="DocBook XSL Stylesheets V1.74.0"><link rel="home" href="#top" title="Amazon Mechanical Turk"><link rel="up" href="ApiReference_OperationsArticle.html" title="Chapter&nbsp;5.&nbsp;Operations"><link rel="prev" href="ApiReference_GetBonusPaymentsOperation.html" title="GetBonusPayments"><link rel="next" href="ApiReference_GetHITOperation.html" title="GetHIT"><!--[if !IE]>--><link rel="stylesheet" href="aws-docs.css" type="text/css"><meta name="generator" content="DocBook XSL Stylesheets V1.74.0"><!--<![endif]--><meta xmlns="http://www.w3.org/1999/xhtml" http-equiv="Content-Type" content="text/html; charset=utf-8"></meta><script src="/urchin.js" type="text/javascript"></script><script type="text/javascript">
4
+ urchinTracker();
5
+ </script><script xmlns="http://www.w3.org/1999/xhtml" type="text/javascript" src="frameset.js"> //
6
+ </script></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header" cellspacing="0" cellpadding="2"><tr><td width="30%" align="left"><a accesskey="p" href="ApiReference_GetBonusPaymentsOperation.html"><img src="images/prev.gif" alt="Prev"></a> </td><td width="40%" align="center"><a href="http://survey.amazonwebservices.com/survey/s?s=559&amp;opdata_page=Mturk_API_2008-08-02_ApiReference_GetFileUploadURLOperation">Documentation Feedback</a></td><td width="30%" align="right"> <a accesskey="n" href="ApiReference_GetHITOperation.html"><img src="images/next.gif" alt="Next"></a></td></tr></table><div class="breadcrumb"><a href="Welcome.html">Welcome</a><a href=""></a> &raquo; <a href="ApiReference_OperationsArticle.html">Operations</a> &raquo; <strong>GetFileUploadURL</strong></div></div><div class="section" lang="en"><div class="titlepage"><div><div><h1 class="topictitle">GetFileUploadURL</h1></div></div></div><a class="indexterm" name="d0e5665"></a><a class="indexterm" name="d0e5668"></a><a class="indexterm" name="d0e5671"></a><a class="indexterm" name="d0e5674"></a><a class="indexterm" name="d0e5677"></a><a class="indexterm" name="d0e5682"></a><a class="indexterm" name="d0e5687"></a><div class="section" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both" id="d0e5692">Description</h2></div></div></div><p> The <code class="function">GetFileUploadURL</code> operation generates and returns a temporary
7
+ URL. You use the temporary URL to retrieve a file uploaded by a Worker as an answer to a
8
+ <em class="parameter"><code>FileUploadAnswer</code></em> question for a HIT. For information about
9
+ the <em class="parameter"><code>FileUploadAnswer</code></em> answer, see <a class="link" href="ApiReference_QuestionFormDataStructureArticle.html" title="QuestionForm">QuestionForm</a>. </p><p> The temporary URL is generated the instant the <code class="function">GetFileUploadURL</code>
10
+ operation is called, and is valid for 60 seconds. </p><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Note"><tr><td rowspan="2" align="center" valign="top" width="25"><img alt="[Note]" src="images/note.png"></td><th align="left">Note</th></tr><tr><td align="left" valign="top"><p> URL expiration allows your application to retrieve the file without credentials,
11
+ but still retain control over who can access your data, because you need an access
12
+ key ID and signature to get the temporary URL. If you need to retrieve the file
13
+ after the URL has expired, call <code class="function">GetFileUploadURL</code> again to get a
14
+ new URL. </p></td></tr></table></div><p> You can get a temporary file upload URL any time until the HIT is disposed. After the
15
+ HIT is disposed, any uploaded files are deleted, and cannot be retrieved. </p></div><div class="section" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both" id="d0e5722">Request Parameters</h2></div></div></div><p> The <code class="function">GetFileUploadURL</code> operation accepts parameters common to all
16
+ operations. Some common parameters are required. See <a class="link" href="ApiReference_CommonParametersArticle.html" title="Chapter&nbsp;4.&nbsp;Common Parameters">Common Parameters</a> for more information. </p><p> The following parameters are specific to the <code class="function">GetFileUploadURL</code>
17
+ operation: </p><div class="informaltable"><table cellspacing="0" border="0"><colgroup><col><col><col></colgroup><thead><tr><th>Name</th><th>Description</th><th>Required</th></tr></thead><tbody><tr><td>
18
+ <p class="simpara">
19
+ <em class="parameter"><code>Operation</code></em>
20
+ </p>
21
+ </td><td>
22
+ <p class="simpara">The name of the operation</p>
23
+ <p class="simpara">Type: String</p>
24
+ <p class="simpara">Valid Values: GetFileUploadURL</p>
25
+ <p class="simpara">Default: None</p>
26
+ </td><td>
27
+ <p class="simpara">Yes</p>
28
+ </td></tr><tr><td>
29
+ <p class="simpara">
30
+ <em class="parameter"><code>AssignmentId</code></em>
31
+ </p>
32
+ </td><td>
33
+ <p class="simpara"> The ID of the assignment that contains the question with a
34
+ <em class="parameter"><code>FileUploadAnswer</code></em>. </p>
35
+ <p class="simpara">Type: String</p>
36
+ <p class="simpara">Default: None</p>
37
+ </td><td>
38
+ <p class="simpara">Yes</p>
39
+ </td></tr><tr><td>
40
+ <p class="simpara">
41
+ <em class="parameter"><code>QuestionIdentifier</code></em>
42
+ </p>
43
+ </td><td>
44
+ <p class="simpara"> The identifier of the question with a <em class="parameter"><code>FileUploadAnswer</code></em>, as specified in the <a class="link" href="ApiReference_QuestionFormDataStructureArticle.html" title="QuestionForm">QuestionForm</a> of the HIT. </p>
45
+ <p class="simpara">Type: String</p>
46
+ <p class="simpara">Default: None</p>
47
+ </td><td>
48
+ <p class="simpara">Yes</p>
49
+ </td></tr></tbody></table></div></div><div class="section" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both" id="d0e5838">Response Elements</h2></div></div></div><p> A successful request for the <code class="function">GetFileUploadURL</code> operation has a
50
+ <em class="parameter"><code>GetFileUploadURLResult</code></em> element in the response. </p><p> The <em class="parameter"><code>GetFileUploadURLResult</code></em> element includes the elements
51
+ described in the following table. </p><div class="informaltable"><table cellspacing="0" border="0"><colgroup><col><col></colgroup><thead><tr><th>Name</th><th>Description</th></tr></thead><tbody><tr><td>
52
+ <p class="simpara">
53
+ <em class="parameter"><code>FileUploadURL</code></em>
54
+ </p>
55
+ </td><td>
56
+ <p class="simpara"> A temporary URL for the file that the Worker uploaded for the
57
+ answer. </p>
58
+ <p class="simpara">Type: URL</p>
59
+ </td></tr></tbody></table></div></div><div class="section" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both" id="d0e5882">Examples</h2></div></div></div><p>The following example shows how to use the <code class="function">GetFileUploadURL</code>
60
+ operation.</p><div class="section" lang="en"><div class="titlepage"><div><div><h3 class="title" id="d0e5890">Sample Request </h3></div></div></div><p> The following example of a call to the <code class="function">GetFileUploadURL</code>
61
+ operation retrieves the temporary URL for a file-upload answer to the given question
62
+ in the given assignment. </p><pre class="programlisting">http://mechanicalturk.amazonaws.com/?Service=AWSMechanicalTurkRequester
63
+ &amp;AWSAccessKeyId=<em class="replaceable"><code>[the Requester's Access Key ID]</code></em>
64
+ &amp;Version=2008-08-02
65
+ &amp;Operation=GetFileUploadURL
66
+ &amp;Signature=<em class="replaceable"><code>[signature for this request]</code></em>
67
+ &amp;Timestamp=<em class="replaceable"><code>[your system's local time]</code></em>
68
+ &amp;AssignmentId=123RVWYBAZW00EXAMPLE456RVWYBAZW00EXAMPLE
69
+ &amp;QuestionIdentifier=ReadAloudAudio
70
+ </pre></div><div class="section" lang="en"><div class="titlepage"><div><div><h3 class="title" id="d0e5909">Sample Response</h3></div></div></div><p>The following is an example response.</p><pre class="programlisting">&lt;GetFileUploadURLResult&gt;
71
+ &lt;Request&gt;
72
+ &lt;IsValid&gt;True&lt;/IsValid&gt;
73
+ &lt;/Request&gt;
74
+ &lt;FileUploadURL&gt;http://s3.amazonaws.com/TestAnswers/puppy.jpg&lt;/FileUploadURL&gt;
75
+ &lt;/GetFileUploadURLResult&gt;</pre></div></div></div><div class="navfooter"><table width="100%" summary="Navigation footer" cellspacing="0" cellpadding="2"><tr><td width="30%" align="left"><a accesskey="p" href="ApiReference_GetBonusPaymentsOperation.html"><img src="images/prev.gif" alt="Prev"></a> </td><td width="40%" align="center"><a href="http://survey.amazonwebservices.com/survey/s?s=559&amp;opdata_page=Mturk_API_2008-08-02_ApiReference_GetFileUploadURLOperation">Documentation Feedback</a><br><a href="copyrightinfo.html">Copyright Information</a></td><td width="30%" align="right"> <a accesskey="n" href="ApiReference_GetHITOperation.html"><img src="images/next.gif" alt="Next"></a></td></tr><tr><td width="30%" align="left" valign="top">&nbsp;</td><td width="40%" align="center"><a accesskey="h" href="#top"><img src="images/home.gif" alt="Home"></a></td><td width="30%" align="right" valign="top">&nbsp;</td></tr></table></div></body></html>