The SendTestEventNotification operation
causes 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 the operation is called, the service sends the test
notification immediately. If your test notification's
destination is a web service, Mechanical Turk will wait until
your web service has responded, then return a status report as
its response to the call to
SendTestEventNotification. Mechanical Turk
will return an appropriate error message if your web service
could not be contacted using the notification specification you
provided.
Mechanical Turk always includes a "Ping" event in the
notification message sent from a call to
SendTestEventNotification. You can also
specify a specific event type to be included in the message, as
if an event of that type occurred.
The following example of a call to the
SendTestEventNotification operation sends
a notification message for a simulated
"AssignmentSubmitted" event (as well as a
"Ping" event), to be sent to a web service using the
REST transport.
http://mechanicalturk.amazonaws.com/onca/xml?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:8080/mt/notifications.cgi &Notification.1.Transport=REST &Notification.1.Version=2006-10-31 &Notification.1.EventType=AssignmentSubmitted &TestEventType=AssignmentSubmitted
A request to the Mechanical Turk Service includes parameters that control its behavior and the data it returns. Required parameters must be included for the request to succeed.
SendTestEventNotification 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 | Type | Value |
|---|---|---|---|
Operation
|
The operation you would like to call. To access the
| Required |
|
Notification
|
The notification specification to test. This value is
identical to the value you would provide to the
| Required |
A Notification data structure. For more information on the data structure of a notification specification, see the Notification Data Structure. |
TestEventType
|
The event to simulate to test the notification specification. | Optional |
A valid event type. See the
Notification Data Structure (the
The event specified by
This parameter is optional. If not provided, only the "Ping" event message will be sent. |