This chapter describes the Oracle Communications Services Gatekeeper OneAPI Multimedia Messaging/MM7 communication service in detail.
Applications use the RESTful OneAPI MMS interface to send multimedia messages (MMS messages), to retrieve MMS messages and delivery status reports, and to start and stop notifications.
When the request body for an MMS operation contains a request for a delivery receipt, the application provides a notifyURL correlator for the message being sent and includes an endpoint address for returning the delivery notification.
The Services Gatekeeper OneAPI MMS interface complies with Open Mobile Alliance (OMA) specifications. See the discussion about OneAPI multimedia messaging compliance in Services Gatekeeper Statement of Compliance for a reference to the supported specification and RESTful bindings schema.
See "Using the OneAPI RESTful Interface" in Services Gatekeeper Application Developer's Guide for general information on creating applications using the OneAPI RESTful interface.
The information provided in this document is based on the OneAPI specification and is provided here for convenience.
When the Administration Server for your Services Gatekeeper domain is in the running state, the REST service descriptions of these operations are located in:
http://host:port/oneapi/1/messaging/application.wadl
Where host and port are the host name and port of the machine on which the Services Services Gatekeeper Application Developer's GuideGatekeeper Access Tier (AT) is installed.
To send an MMS message, provide the OneAPI-formatted URI of the addresses which must receive the message in the request body. If the sender requires a delivery receipt, specify the required parameters for the receipt.
If the Send MMS operation is successful, the response will contain the request identifier in the response body for this operation).
If the application requires a receipt for delivery of the message, the application can provide the notifyURL in the message body, to which notifications are to be sent.
http://host:port/oneapi/1/messaging/outbound/senderAddress/requests
Where:
host and port are the host name and port of the machine on which the Services Gatekeeper Access Tier is installed.
The senderAddress is the subscriber for which the message is being sent.
The request body for the OneAPI Send MMS operation accepts the following parameters:
address: String. At least one address is the (optionally) URL-escaped enduser ID; in this case the MSISDN including the 'tel:' protocol identifier and the country code optionally preceded by ’+'. For example, tel:+15415550100.
message: String. Must be URL-escaped as per RFC 1738.
senderAddress: String. The address to whom a responding MMS may be sent.
senderName: String. The URL-escaped name of the sender to appear on the terminal. This is the address to whom a responding MMS may be sent.
clientCorrelator: String. Optional. Uniquely identifies this create MMS request. If there is a communication failure during the request, using the same client correlator when retrying the request allows the operator to avoid sending the same MMS twice.
notifyURL: anyURL. The URL-escaped URL to which you want a notification of delivery sent. The format of this notification is shown in Example 13-1.
callbackData: String. will be passed back in this notification, so you can use it to identify the message the receipt relates to, or any other useful data, such as a function name.
The Location header field contains the URI:
http://host:port/oneapi/1/messaging/outbound/senderAddress/requests/requestID
where requestID is the string identifier returned in the response body.
If the request fails, the Status-Line header field will contain the status code and the reason for the failure. For more information, see "Errors and Exceptions" in the discussion about One API Multimedia messaging in Services Gatekeeper Application Developer's Guide.
The body of the response contains the request identifier as the string value for the resourceReference attribute. It is the request identifier returned in the Location header field of the response message. The application uses this request identifier to retrieve the delivery status for the sent message.
The response body for this operation is represented by the following JSON structure, where the value part of the name/value pair indicates its data type:
{"resourceReference": {"resourceURL": "URL"}}
Example 13-1 shows a sample of a OneAPI Send MMS request.
Example 13-1 OneAPI Send MMS Request
POST http://example.com/oneapi/1/messaging/outbound/tel%3A%2B5550102/requests HTTP/1.1 Content-Length: 12345 Content-Type: multipart/form-data; boundary="===============123456=="; MIME-Version: 1.0 Host: www.example.com Date: Thu, 04 Jun 2009 02:51:59 GMT --===============123456== Content-Disposition: form-data; name=”root-fields” Content-Type: application/x-www-form-urlencoded; address=tel%3A%2B15415550100& address=tel%3A%2B15415550101& senderAddress=tel:%2B5550102& &senderName=ExampleCompany Subject=My%20message& notifyURL=http://example-application.com/notifications/DeliveryInfoNotification/54311 &callbackData= &clientCorrelator=123456 --===============123456== Content-Disposition: form-data; name=”attachments”; filename=”picture.jpg” Content-Type: image/gif GIF89a...binary image data... --===============123456==
Example 13-2 shows a sample of a OneAPI Send MMS response.
Example 13-2 OneAPI Send MMS Response
HTTP/1.1 201 Created Content-Type: application/json Location: http://example.com/oneapi/1/messaging/outbound/ tel%3A%2B5550102/requests/abc123 Content-Length: 12345 Date: Thu, 04 Jun 2009 02:51:59 GMT {"resourceReference": {"resourceURL": " http://example.com/1/messaging/outbound/ tel%3A%2B5550102/requests/abc123"}}
The Query Delivery Status operation retrieves the delivery status of a message that was previously sent using the system-generated requestID returned when the message was created.
If the Query Delivery Status is successful, the response body contains the delivery status for each of the addresses contained in the original send MMS request.
http://host:port/oneapi/1/messaging/outbound/senderAddress/requests/requestID/deliveryInfos
Where:
host and port are the host name and port of the machine on which the Services Gatekeeper Access Tier is installed.
senderAddress is the address to which a responding message may be sent.
requestID is the identifier returned in the result object of the corresponding Send operation.
Standard header fields. If the request fails, the Status-Line header field will contain the status code and the reason for the failure. For more information, see "Errors and Exceptions" in the discussion about Using the OneAPI RESTful Interfaces.
The response body contains an array of structures as the value for deliveryInfo. Each element in the array contains values for the following parameters.
address: String. The telephone number to which the initial message was sent.
deliveryStatus: Enumeration value. Table 13-1 lists the possible statuses:
Table 13-1 Enumeration Values for Delivery Status
Value | Description |
---|---|
DeliveredToNetwork |
Successful delivery to the network. For concatenated messages, returned only when all the MMS-parts have been successfully delivered to the network. |
DeliveryUncertain |
Delivery status unknown, for example, if it was handed off to another network. |
DeliveryImpossible |
Unsuccessful delivery; the message could not be delivered before it expired. |
DeliveredToTerminal |
Successful delivery to the terminal. For concatenated messages, returned only when all the MMS-parts have been successfully delivered to the terminal. |
MessageWaiting |
The message is still queued for delivery. This is a temporary state, pending transition to one of the preceding states. |
resourceURL: A reference to the response.
The response body for this operation is represented by the following JSON data structure, where the value part of each name/value pair indicates its data type:
{"deliveryInfoNotification": { "deliveryInfo": [ { "address": "String", "deliveryStatus": "String"}, { "address": "String", "deliveryStatus": "String"}], "resourceURL": " http://example.com/oneapi/1/messaging/outbound/senderAddress/requests/requestID/deliveryInfos" }}
Example 13-3 shows a sample of a OneAPI Query Delivery Status request.
Example 13-3 OneAPI Query Delivery Status Request
GET http://example.com/oneapi/1/messaging/outbound/tel%3A%2B5550100/requests/abc123/deliveryInfos HTTP/1.1 Accept: application/json Host: example.com:80
Example 13-4 shows a sample of a OneAPI Query Delivery Status response.
Example 13-4 OneAPI Query Delivery Status Response
HTTP/1.1 200 OK Content-Type: application/json Date: Thu, 04 Jun 2009 02:51:59 GMT {"deliveryInfoNotification": { "deliveryInfo": [ { "address": "tel:15415550101", "deliveryStatus": "MessageWaiting" }, { "address": "tel:15415550102", "deliveryStatus": "MessageWaiting" } ], "resourceURL": " http://example.com/oneapi/1/messaging/outbound/tel%3A%2B5550100/requests/abc123/deliveryInfos" }}
The Subscribe to MMS Delivery Notification operation creates a subscription to delivery notifications for an application.
To set up an MMS notification, provide a notifyURL for the delivery of the notifications. The request body contains the correlator for the notification, the notifyURL to which the call direction notifications must be sent and, optionally, the callbackData (a string to identify the notification).
If the subscription request is successful:
The response header contains the URI of the publish/subscribe server.
A data object associated with the result of the multimedia message operation is sent to the notifyURL address specified in the request body. This data object contains the appropriate notification (that the message was received or a delivery receipt for the call).
In addition, the delivery report notification sent to the application contains the callback data that the application provided when it sent the message.
http://host:port/oneapi/1/messaging/outbound/senderAddress/subscriptions
Where:
host and port are the host name and port of the machine on which the Services Gatekeeper Access Tier is installed.
senderAddress is the address to whom a responding MMS may be sent.
The MIME-type for the Content-Type header field is application/x-www-form-urlencoded or application/json.
The request body for the subscription operation accepts the following parameters:
notifyURL: URL. This will be used by the server to POST the notifications to you, so include the URL of your own listener application.
clientCorrelator: String. Optional. Uniquely identifies this create subscription request. If there is a communication failure during the request, using the same client correlator when retrying the request allows the operator to avoid creating a duplicate subscription.
callbackData: String. Optional. A function name or other data that you would like included when the POST is received. This value is returned with the notification message.
The Location header field contains the URI of the publish/subscribe server:
http://host:port/oneapi/1/messaging/outbound/subscriptions/subscriptionID
Where:
host and port are the host name and port of the machine on which the Services Gatekeeper AT is installed.
subscriptionID is the reference to the created subscription.
If the request fails, the Status-Line header field contains the status code and the reason for the failure. For more information, see "Errors and Exceptions" in Using the OneAPI RESTful Interfaces.
The response body contains a confirmation deliveryReceiptSubscription JSON data structure consisting of the parameters supplied in the subscription request.
{"deliveryReceiptSubscription": { "callbackReference": { "callbackData": "String", "notifyURL": " www.yourURL.here ", }, "resourceURL": " URL "}}
A resourceURL is included as a reference to the response.
Notification Data Object for MMS Delivery Receipt Sent to notifyURL
After a OneAPI MMS subscription is made, Services Gatekeeper delivers a message receipt notification to the notifyURL specified in the subscription request.
This nested JSON object contains the following as the value of the attribute name deliveryInfoNotification:
deliveryInfo: Array. Contains the following two parameters:
address: String. The message recipient's subscriber ID.
deliveryStatus: Enumeration value. Table 13-2 lists the possible statuses:
Table 13-2 Enumeration Values for Delivery Status
Value | Description |
---|---|
DeliveredToNetwork |
Successful delivery to the network. For concatenated messages, returned only when all the MMS-parts have been successfully delivered to the network. |
DeliveryUncertain |
Delivery status unknown; for example, if it was handed off to another network. |
DeliveryImpossible |
Unsuccessful delivery; the message could not be delivered before it expired. |
DeliveredToTerminal |
Successful delivery to the terminal. For concatenated messages, returned only when all the MMS-parts have been successfully delivered to the terminal. |
link: Refers to the message URL (that was returned when the message was originally created).
The notification data object delivered to the notifyURL address is represented by the following JSON data structure, where the value part of each name/value pair indicates its data type:
{"deliveryInfoNotification": { "deliveryInfo": [ { "address": "String" "deliveryStatus": "String"}, ], "link": { "href": "URL", "rel": "String" }, "resourceURL":"URL" }}
Example 13-5 shows a sample of a OneAPI Subscribe to MMS Delivery Notifications request.
Example 13-5 OneAPI Subscribe to MMS Delivery Notifications Request
POST http://example.com/oneapi/1/messaging/outbound/tel%3A%2B5550100/subscriptions HTTP/1.1 Accept: application/json Content-Type: application/json; charset=UTF-8 Host: example.com:80 {"deliveryReceiptSubscription": { "callbackReference": { "callbackData": " 12345()", "notifyURL": "http://www.oracle.com" } }}
Example 13-6 shows a sample of a OneAPI Subscribe to MMS Delivery Notifications response.
Example 13-6 OneAPI Subscribe to MMS Delivery Notifications Response
HTTP/1.1 201 Created Content-Type: application/json Location: http://example.com/oneapi/1/messaging/outbound/subscriptions/sub789 Date: Thu, 04 Jun 2009 02:51:59 GMT {"deliveryReceiptSubscription": { "callbackReference": { "callbackData": "doSomething()", "notifyURL": " www.oracle.com " }, "resourceURL": " http://example.com/oneapi/1/messaging/outbound/subscriptions/sub789"}}
Example 13-7 shows a sample of a OneAPI MMS Delivery Notification Message.
Example 13-7 OneAPI MMS Delivery Notification Message
{"deliveryInfoNotification": { "deliveryInfo": [ { "address": "tel:15415550101", "deliveryStatus": "DeliveredToTerminal"}, { "address": "tel:15415550102", "deliveryStatus": "DeliveredToTerminal"} ], "link": { "href": "http://example.com/oneapi/1/messaging/outbound/tel%3A%2B5550100/requests/{requestId}", "rel": "OutboundMessageRequest" }, "resourceURL": http://example.com/oneapi/1/messaging/outbound/tel%3A%2B5550100/requests/req123/DeliveryInfos }
The Stop Subscription to Delivery Notification operation terminates a previously set up MMS notification for the application.
To stop a previously set up MMS notification, provide the correlator for the notification passed earlier in the Subscribe to MMS Delivery Notification request.
There is no request or response body for the Stop Subscription to Delivery Notification operation. If the request fails, the body of the error response contains the identifier for the notification and the type of exception.
http://host:port/oneapi/1/messaging/outbound/subscriptions/subscriptionID
Where:
host and port are the host name and port of the machine on which the Services Gatekeeper Access Tier is installed.
subscriptionID is the reference to the created subscription.
Standard header fields. If the request fails, the Status-Line header field contains the status code and the reason for the failure. For more information, see "Errors and Exceptions" in Using the OneAPI RESTful Interfaces.
Example 13-8 shows a sample of a OneAPI Stop Subscription to Delivery Notification request.
Example 13-8 OneAPI Stop Subscription to Deliver Notification Request
DELETE http://example.com/oneapi/1/messaging/outbound/subscriptions/sub789 HTTP/1.1 Accept: application/json Host: example.com:80
Example 13-9 shows a sample of a OneAPI Stop Subscription to Delivery Notification response.
The OneAPI Retrieve Messages Sent to Web Application operation polls Services Gatekeeper for the MMS messages that have been received from the network for an application.
The request header for the Retrieve Messages Sent to Web application operation contains the registration identifier necessary to retrieve the MMS messages intended for the application. This registration value should have been set up with the off-line provisioning step that enables the application to receive notification that MMS messages were received.
There is no request body.
If the Retrieve Messages Sent to Web Application operation is successful, the response body contains the message, the URI of the sender, the MMS service activation number, and the date and time when the message was sent.
http://host:port/oneapi/1/messaging/inbound/registrations/registrationID/messages?maxBatchSize=?
Where:
host and port are the host name and port of the machine on which the Services Gatekeeper Access Tier is installed.
registrationId is the value previously set up to enable the application to receive notification that MMS messages have been received, according to specified criteria.
matchBatchSize specifies the maximum number of messages to retrieve in the request batch.
The MIME-type for the Content-Type header field is application/x-www-form-urlencoded or application/json.
Standard header fields. If the request fails, the Status-Line header field will contain the status code and the reason for the failure. For more information, see "Errors and Exceptions" in Using the OneAPI RESTful Interfaces.
The response body is an inboundMessageList containing an array of structures as the value for inboundMessage. The response body also contains the following parameters:
inboundMessage: Array. Contains the following parameters:
dateTime: dateTime. The date and time when the message was received.
destinationAddress: String. The registration ID of the application.
messageID: String. A server generated message identifier.
inboundMMSMessage: String. Contains the subject of the message, which may determine whether you want to retrieve the entire MMS message.
resourceURL: URL. Link to the message.
senderAddress: String. The MSISDN of the sender.
numberOfMessagesInThisBatch: Integer. The total number of messages in the batch.
resourceURL: URL Self-referring resource URL.
The response body for this operation is represented by the following JSON data structure, where the value part of each name/value pair indicates its data type:
"inboundMessage": [ "dateTime": "dateTime", "destinationAddress": "String", "messageId": "String", "inboundMMSMessage": "String", "resourceURL": "URL", "senderAddress": "String"}, ]
If an application needs to retrieve an entire MMS message, a separate GET operation is required. Use the following operation to retrieve a full message, specifying the messageID from the inboundMessageList.
http://host:port/oneapi/1/messaging/inbound/registrations/registrationID/messages/messageID?resFormat=JSON
Where:
host and port are the host name and port of the machine on which the Services Gatekeeper Access Tier is installed.
registrationId is the value previously set up to enable the application to receive notification that MMSs have been received, according to specified criteria.
messageID specifies the MMS from the inboundMessageList to be retrieved.
The resFormat=JSON portion of the URI ensures that the response content-type is JSON.
Standard header fields. If the request fails, the Status-Line header field contains the status code and the reason for the failure. For more information, see "Errors and Exceptions" in Using the OneAPI RESTful Interfaces.
The response body is an inboundMessageList containing an array of structures as the value for inboundMessage. The response body also contains the following parameters:
inboundMessage: Array. Contains the following parameters:
dateTime: dateTime. The date and time when the message was received.
destinationAddress: String. The registration ID of the application.
messageID: String. A server generated message identifier.
inboundMMSMessage: String. Contains the subject of the message, which may determine whether you want to retrieve the entire MMS message.
resourceURL: URL. Link to the message.
senderAddress: String. The MSISDN of the sender.
numberOfMessagesInThisBatch: Integer. The total number of messages in the batch.
resourceURL: URL Self-referring resource URL.
The response body for this operation is represented by the following JSON data structure, where the value part of each name/value pair indicates its data type:
"inboundMessage": [ { "dateTime": "dateTime", "destinationAddress": "String", "messageId": "String", "inboundMMSMessage": "String", "resourceURL": "URL", "senderAddress": "String"}, ====Content Divider==== One or more attachments
Example 13-10 shows a sample of a OneAPI Retrieve Messages request.
Example 13-10 OneAPI Retrieve Messages Request
GET http://example.com/oneapi/1/messaging/inbound/registrations/3456/messages?maxBatchSize=2 HTTP/1.1 Host: example.com:80 Accept: application/json
Example 13-11 shows a sample of a OneAPI Retrieve Messages response.
Example 13-11 OneAPI Retrieve Messages Response
HTTP/1.1 200 OK Content-Type: application/json Content-Length: 12345 Date: Thu, 04 Jun 2009 02:51:59 GMT {"inboundMessageList": { "inboundMessage": [ { "dateTime": "2010-11-19T12:00:00", "destinationAddress": "6789", "inboundMMSMessage": {"subject": "Rock Festival 2010"}, "messageId": "msg1", "resourceURL": "http://example.com/oneapi/1/messaging/inbound/registrations/3456/messages/msg1", "senderAddress": "tel:+5550100" }, { "dateTime": "2010-11-19T12:15:00", "destinationAddress": "6789", "inboundMMSMessage": {"subject": "London Marathon"}, "messageId": "msg2”, "resourceURL": " http://example.com/oneapi/1/messaging/inbound/registrations/sub789/messages/msg2", "senderAddress": "tel:+5550101" } ], "numberOfMessagesInThisBatch": "2", "resourceURL": " http://example.com/1/messaging/inbound/registrations/3456/messages?maxBatchSize=2 ", "totalNumberOfPendingMessages": "20" }
Example 13-12 shows a sample of a OneAPI Retrieve Full Message request.
Example 13-12 OneAPI Retrieve Full Message Request
GET http://example.com/oneapi/1/messaging/inbound/registrations/3456/messages/msg1?resFormat=JSON HTTP/1.1 Host: example.com:80
Example 13-13 shows a sample of a OneAPI Retrieve Full Messages response.
Example 13-13 OneAPI Retrieve Full Message Response
HTTP/1.1 200 OK Content-Type: multipart/form-data; boundary=”=====12345====” Content-Length: 12345 Date: Thu, 04 Jun 2009 02:51:59 GMT ====12345==== Content-Disposition=multipart/form-data; name=”root-fields” Content-Type=application/json Content-Length: nnnn {"inboundMessage": { "dateTime": "2010-11-19T12:00:00", "destinationAddress": "6789", "messageId": "msg1", "inboundMMSMessage": {"subject": Rock Festival 2010"}, "resourceURL": " http://example.com/oneapi/1/messaging/inbound/registrations/3456/messages/msg1", "senderAddress": " tel:+5550100" }} ====12345==== Content-Disposition: form-data; name=”attachments” Content-Type: multipart/mixed; boundary=”====aaabbb” ====aaabbb Content-Disposition:attachments;filename=”textBody.txt”; Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8 bit Look at the attached picture ====aaabbb Content-Disposition:attachments;filename=”image1.gif”; Content-Type: image/gif MIME-Version: 1.0 Content-ID: <99334422@example.com> GIF89a...binary image data... ====12345====
The Subscribe to Notifications Sent to Application operation creates a subscription to delivery notifications for when an application receives a message.
To set up an application notification, provide the destinationAddress which triggers notifications and a notifyURL for the delivery of the notifications. The destinationAddress is the MSISDN, or code set up in Services Gatekeeper, to which subscribers may send an MMS to your application.
If the subscription request is successful:
The response header contains the URI of the publish/subscribe server.
The response body contains a resourceURL indicating the URI of the newly created subscription.
http://host:port/oneapi/1/messaging/inbound/subscriptions
Where:
host and port are the host name and port of the machine on which the Services Gatekeeper Access Tier is installed.
The MIME-type for the Content-Type header field is application/json or application/x-www-form-urlencoded.
The request body for the subscription operation accepts the following parameters:
destinationAddress: String. The MSISDN, or code agreed upon by the operator, to which people may send an MMS to your application.
notifyURL: URL. This is used by the server to POST the notifications to you, so include the URL of your own listener application.
criteria: String. Optional. Case-insensitive text to match against the first word of the message, ignoring any leading whitespace. This allows you to reuse a short code among various applications, each of which can register its own subscription with different criteria.
notificationFormat: Content Type. Optional. The content type that notifications will be sent; for OneAPI, only JSON is supported.
clientCorrelator: String. Optional. Uniquely identifies this create subscription request. If there is a communication failure during the request, using the same client correlator when retrying the request allows the operator to avoid creating a duplicate subscription.
callbackData: String. Optional. A function name or other data that you would like included when the POST is received.
The Location header field contains the URI of the publish/subscribe server:
http://host:port/oneapi/1/messaging/inbound/subscriptions/subscriptionID
Where:
host and port are the host name and port of the machine on which the Services Gatekeeper Access Tier is installed.
subscriptionID is the reference to the created subscription.
If the request fails, the Status-Line header field will contain the status code and the reason for the failure. For more information, see "Errors and Exceptions" in Using the OneAPI RESTful Interfaces.
The response body contains a confirmation resourceReference JSON data structure consisting of the parameters supplied in the subscription request.
{"resourceReference": {"resourceURL": "URL"}}
The resourceURL indicates the URI of the newly created subscription.
Notification Data Object for Application Notification Message Sent to notifyURL
After a OneAPI Application Notification subscription is made, Services Gatekeeper will deliver a message receipt notification to the specified notifyURL in the subscription request for every MMS received. If callbackData was provided in the subscription request, the notification contains this information.
This nested JSON object contains the following parameters as the value of the attribute name inboundMMSMessageNotification:
callbackData: String. The correlator used to identify the notification.
inboundMessage: Array. Contains the following parameters:
destinationAddress: String. The number or shortcode for the application.
messageID: String. A server-generated message identifier.
inboundMMSMessage: String. Message subject or text.
link: URL. The URL of the subscription that received this message.
resourceURL: URL. Link to the message.
senderAddress: String. The MSISDN of the sender.
The notification data object delivered to the notifyURL address is represented by the following JSON data structure, where the value part of each name/value pair indicates its data type:
{"inboundMessageNotification": { "callbackData": "String", "inboundMMSMessage": { "destinationAddress": "String", "messageId": "String", "inboundMMSMessage": "String", "link": { "href": "String", "rel": "String", "resourceURL": "String", "senderAddress": "String" } }}}
Example 13-14 shows a sample of a OneAPI Subscribe to Notifications of Messages Sent to Applications request.
Example 13-14 OneAPI Subscribe to Notifications of Messages Sent to Applications Request
POST http://example.com/oneapi/1/messaging/inbound/subscriptions HTTP/1.1 Host: example.com:80 Content-Type: application/x-www-form-urlencoded Accept: application/json destinationAddress=3456& notifyURL=http://www.yoururl.here/notifications/DeliveryInfoNotification& criteria=Vote& notificationFormat=JSON& callbackData=doSomething()& clientCorrelator=12345
Example 13-15 shows a sample of a OneAPI Subscribe to Notifications of Messages Sent to Applications response.
Example 13-15 OneAPI Subscribe to Notifications of Messages Sent to Application Response
HTTP/1.1 201 Created Content-Type: application/json Location: http://example.com/oneapi/1/messaging/inbound/subscriptions/sub123 Content-Length: 254 Date: Thu, 04 Jun 2009 02:51:59 GMT {"resourceReference": {"resourceURL": " http://example.com/oneapi/1/messaging/inbound/subscriptions/sub123”}}
Example 13-16 shows a sample of a OneAPI Application Notification Message.
Example 13-16 OneAPI Application Notification Message
{"inboundMessageNotification": {"inboundMessage": { "destinationAddress": "tel:+1-555-0100", "messageId": "msg123", "inboundMMSMessage": {"subject": "That Chili Relleno was delicious?"}, "link": { "href": "http://example.com/oneapi/1/messaging/inbound/subscriptions/sub123", "rel": "Subscription" }, "resourceURL": "http://example.com/oneapi/1/ messaging/inbound/registrations/reg123/messages/msg123", "senderAddress": "tel:+5550101" }}}
The Stop Subscription to Application Message Notification operation terminates a previously set up subscription to an application message notification.
To stop a previously set up subscription, provide the correlator for the notification passed earlier in the Subscribe to Notifications of Messages Sent to Application request.
There is no request or response body for the Stop Subscription to Notifications of Messages Sent to Application operation. If the request fails, the body of the error response will contain the identifier for the notification and the type of exception.
http://host:port/oneapi/1/messaging/inbound/subscriptions/subscriptionID
Where:
host and port are the host name and port of the machine on which the Services Gatekeeper Access Tier is installed.
subscriptionID is the reference to the created subscription.
Standard header fields. If the request fails, the Status-Line header field contains the status code and the reason for the failure. See "Errors and Exceptions" in Using the OneAPI RESTful Interfaces for more information.
Example 13-17 shows a sample of a OneAPI Stop Subscription to Notifications of Messages Sent to Application request.
Example 13-17 OneAPI Stop Subscription to Notifications of Messages Sent to Application Request
DELETE http://example.com/oneapi/1/messaging/inbound/subscriptions/sub123 HTTP/1.1 Accept: application/json Host: example.com:80
Example 13-18 shows a sample of a OneAPI Stop Subscription to Notifications of Messages Sent to Application response.