Notification

Description

The Notification data structure describes a HIT event notification for a HIT type.

The Notification data structure is used as a parameter for the following operations:

Elements

The Notification structure can contain the elements described in the following table. When the structure is used in a request, elements described as Required must be included for the request to succeed.

NameDescriptionRequired

Destination

The destination for notification messages.

Type: For e-mail notifications (if Transport is Email), this is an e-mail address. For web service notifications (if Transport is SOAP or REST), this is the URL end point for your application's notification receptor.

Default: None

Yes

Transport

The method Amazon Mechanical Turk uses to send the notification.

Type: String

Valid Values: Email | SOAP | REST

Default: None

Yes

Version

The version of the notification WSDL/schema to use for SOAP or REST notifications.

Type: String

Default: None

Yes

EventType

The events that should cause notifications to be sent. You can specify multiple events by repeating this parameter

Type: String

Valid Values: AssignmentAccepted | AssignmentAbandoned | AssignmentReturned | AssignmentSubmitted | HITReviewable | HITExpired

Default: None

Yes

Example

In the following example the notification specification says that when Worker returns or abandons a HIT of the HIT type whose notifications specification this is), the web service application at the given URL should be notified with a REST-style web service call, using the 2006-05-05 version of the notification message schema.

<Notification>
  <Destination>http://example.com:80/mt/notifications.cgi</Destination>
  <Transport>REST</Transport>
  <Version>2006-05-05</Version>
  <EventType>AssignmentAbandoned</EventType>
  <EventType>AssignmentReturned</EventType>
</Notification>