The SendTestEventNotification
operation causes Amazon Mechanical
Turk to send a notification message as if a HIT event occurred, according to the
provided notification specification. This allows you to test your notification receptor
logic without setting up notifications for a real HIT type and trying to trigger them
using the web site.
When you call this operation, the service sends the test notification immediately. If the destination of your test notification is a web service, Amazon Mechanical Turk waits until your web service has responded, then returns a status report as its response to this operaton. Amazon Amazon Mechanical Turk returns an appropriate error message if your web service could not be contacted using the notification specification you provided.
The SendTestEventNotification
operation accepts parameters
common to all operations. Some common parameters are required. See Common Parameters for more
information.
The following parameters are specific to the SendTestEventNotification
operation:
Name | Description | Required |
---|---|---|
|
The name of the operation Type: String Valid Values: SendTestEventNotification Default: None |
Yes |
|
The notification specification to test. This value is identical to the value you would provide to the SetHITTypeNotification operation when you establish the notification specification for a HIT type. Type: a Notification data structure Default: None |
Yes |
|
The event to simulate to test the notification specification. This event is included in the test message even if the notification specification does not include the event type. The notification specification does not filter out the test event. Type: an Default: None |
Yes |
A successful request for the SendTestEventNotification
operation
returns with no errors. The response includes the elements described in the following
table. The operation returns no other data.
Name | Description |
---|---|
|
Contains a |
The following example shows how to use the SendTestEventNotification
operation.
The following example sends a notification message for a simulated AssignmentSubmitted
event to be sent to a web service using the
REST transport.
http://mechanicalturk.amazonaws.com/?Service=AWSMechanicalTurkRequester &AWSAccessKeyId=[the Requester's Access Key ID]
&Operation=SendTestEventNotification &Signature=[signature for this request]
&Timestamp=[your system's local time]
&Notification.1.Destination=http://example.com:80/mt/notifications.cgi &Notification.1.Transport=REST &Notification.1.Version=2006-05-05 &Notification.1.EventType=AssignmentSubmitted &TestEventType=AssignmentSubmitted
The following is an example response.
<SendTestEventNotificationResult> <Request> <IsValid>True</IsValid> </Request> </SendTestEventNotificationResult>