The REST notification transport makes an HTTP connection to your notification receptor, and sends the notification message using the HTTP GET method, as a set of key-value pairs.
The Destination that you specify in your
notification
specification is the URL Mechanical Turk will use for the
HTTP request.
The HTTP request will include key-value pairs for the values
described in Elements of a Notification Message, such as
Signature,
Timestamp, and
Version.
Each event is represented in the REST request by a set of keys for
the event properties. Each property name is prefixed with
Event, a period, a number, and another
period, where the number is a counter incremented for each event
in the notification message. For example, the key
Event.1.EventTime will have the
EventTime value for the first event
described by the message.
![]() | Note |
|---|---|
Only ports 80 and 443 are supported for receiving REST notification messages. |
The following is an example notification message using the
REST transport, as an HTTP GET message (including headers).
In this example, the destination is
http://example.com:80/mt/notifications.cgi.
The "GET" path containing all of the notification parameters
(from "GET" to "HTTP/1.1") would normally appear all on one
line; the line below has been split to make it easy to read.
GET /mt/notifications.cgi?method=Notify &Signature=vH6ZbE0NhkF/hfNyxz2OgmzXYKs= &Timestamp=2006-05-23T23:22:30Z &Version=2006-05-05 &Event.1.EventType=AssignmentAccepted &Event.1.EventTime=2006-04-21T18:55:23Z &Event.1.HITTypeId=KDSFO4455LKDAF3 &Event.1.HITId=KDSFO4455LKDAF3 &Event.1.AssignmentId=KDSFO4455LKDAF3KDSFO4455LKDAF3 &Event.2.EventType=AssignmentReturned &Event.2.EventTime=2006-04-21T18:55:23Z &Event.2.HITTypeId=KDSFO4455LKDAF3 &Event.2.HITId=KDSFO4455LKDAF3KDSFO4455LKDAF3 &Event.2.AssignmentId=KDSFO4455LKDAF3KDSFO4455LKDAF3 HTTP/1.1 Content-Type: text/xml Accept: application/soap+xml, application/dime, multipart/related, text/* SOAPAction: http://soap.amazon.com User-Agent: Jakarta Commons-HttpClient/2.0final Host: example.com:80
This is similar to a request that would be caused by putting a
URL in a web browser that began with
http://example.com:80/mt/notifications.cgi?method=Notify&...
and included all of the notification message parameters above.