Return a Notification
get
/mobile/system/notifications/notifications/{id}
Retrieves a specific notification by ID.
If you are using BASIC authorization, and the notification is for a different mobile backend, then the Oracle-Mobile-Backend-ID
header must identify that mobile backend, and not the backend that your app is associated with.
Permissions
To access this operation, you must be a team member with the MobileEnvironment_Notifications
role.
Request
Path Parameters
-
id: integer
The service-generated notification ID.
Response
Supported Media Types
- application/json
200 Response
The notification was successfully retrieved.
Root Schema : Stored notification
Type:
object
Title:
Stored notification
Match All
Show Source
-
object Stored notification properties
Title:
Stored notification properties
-
object User-entered notification
Title:
User-entered notification
Nested Schema : Stored notification properties
Type:
object
Title:
Show Source
Stored notification properties
-
createdOn(optional):
string
Title:
Full date and time
Pattern:([0-9][0-9][0-9][0-9])-(0[1-9]|1[012])-(0[1-9]|[12][0-9]|3[01])T([0-1][0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9]).([0-9][0-9][0-9])Z
Complete date plus hours, minutes, seconds, and a decimal fraction of a second in W3C date-time format (YYYY-MM-DDThh:mm.ss.SSSZ). -
deviceCount(optional):
integer
When the `status` is `Sending`, `Sent`, or `Warning`, this is the number of devices that this notification was sent to. Also, under some conditions, this attribute is included when the `status` is `Error`.
-
errorMessage(optional):
string
Message explaining a status of `Error` or `Warning`. If there are multiple associated problems, only the first is shown here.
-
id(optional):
integer
Service-generated identifier.
-
links(optional):
array Relationship links
Title:
Relationship links
Minimum Number of Items:1
Unique Items Required:true
-
platformCounts(optional):
array platformCounts
Minimum Number of Items:
1
Unique Items Required:true
Device counts by platform. -
processedOn(optional):
string
Title:
Full date and time
Pattern:([0-9][0-9][0-9][0-9])-(0[1-9]|1[012])-(0[1-9]|[12][0-9]|3[01])T([0-1][0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9]).([0-9][0-9][0-9])Z
Complete date plus hours, minutes, seconds, and a decimal fraction of a second in W3C date-time format (YYYY-MM-DDThh:mm.ss.SSSZ). -
status(optional):
string
Title:
Status values
Allowed Values:[ "New", "Scheduled", "Sending", "Error", "Warning", "Sent" ]
Nested Schema : User-entered notification
Type:
object
Title:
User-entered notification
Match All
Show Source
-
object Notification properties
Title:
Notification properties
-
object Notification payload
Title:
Notification payload
The payload to send. A notification can specify any combination of message, template, and unified payload. When selecting the most appropriate payload for a provider, the service uses the unified payload if it exists, then the template, if it exists, then the message (in that order).
Nested Schema : Relationship links
Type:
array
Title:
Relationship links
Minimum Number of Items:
1
Unique Items Required:
Show Source
true
-
Array of:
object Link
Title:
Link
Nested Schema : platformCounts
Type:
array
Minimum Number of Items:
1
Unique Items Required:
true
Device counts by platform.
Show Source
-
Array of:
object Device counts for a platform
Title:
Device counts for a platform
Nested Schema : Link
Type:
object
Title:
Show Source
Link
-
href:
string
A relative URL.
-
rel:
Allowed Values:
[ "self", "canonical", "prev", "next" ]
The type of link.
Nested Schema : Device counts for a platform
Type:
object
Title:
Show Source
Device counts for a platform
-
deviceCount:
integer
How many devices were selected for this platform.
-
platform:
string
Title:
Supported platforms
Allowed Values:[ "IOS", "ANDROID", "WINDOWS", "WEB" ]
-
successCount:
integer
How many devices were accepted by the underlying notification provider.
Nested Schema : Notification properties
Type:
object
Title:
Show Source
Notification properties
-
notificationTokens(optional):
array notificationTokens
Minimum Number of Items:
1
Maximum Number of Items:1000
Unique Items Required:true
Select devices to send the notification to by `notificationToken`. -
platform(optional):
string
Title:
Supported platforms
Allowed Values:[ "IOS", "ANDROID", "WINDOWS", "WEB" ]
-
provider(optional):
string
Title:
Supported notification providers
Allowed Values:[ "APNS", "GCM", "FCM", "WNS", "SYNIVERSE" ]
-
sendOn(optional):
string
Title:
Short date and time
Pattern:([0-9][0-9][0-9][0-9])-(0[1-9]|1[012])-(0[1-9]|[12][0-9]|3[01])(T([0-1][0-9]|2[0-3]):([0-5][0-9]))+Z
Complete date plus hours and minutes in W3C date-time format (YYYY-MM-DD[Thh:mm]Z). -
tag(optional):
string
User-defined tag that you use to categorize notifications.
-
users(optional):
array users
Minimum Number of Items:
1
Unique Items Required:true
Select devices to send the notification to by `user`.
Nested Schema : Notification payload
Type:
object
Title:
Notification payload
The payload to send. A notification can specify any combination of message, template, and unified payload. When selecting the most appropriate payload for a provider, the service uses the unified payload if it exists, then the template, if it exists, then the message (in that order).
Show Source
-
message(optional):
string
A simple message string. This will be used to create the payload. The maximum payload size depends on the provider. For APNS, FCM and GCM the payload size limit is 4096 bytes, for WNS the limit is 5000 bytes, and for Syniverse the limit is 1000 bytes.
-
payload(optional):
object Unified payload for notification providers
Title:
Unified payload for notification providers
-
template(optional):
object Template reference
Title:
Template reference
Name and parameters for a template from which to create the payload
Nested Schema : notificationTokens
Type:
array
Minimum Number of Items:
1
Maximum Number of Items:
1000
Unique Items Required:
true
Select devices to send the notification to by `notificationToken`.
Show Source
Nested Schema : users
Type:
array
Minimum Number of Items:
1
Unique Items Required:
true
Select devices to send the notification to by `user`.
Show Source
Nested Schema : Unified payload for notification providers
Type:
object
Title:
Show Source
Unified payload for notification providers
-
services:
object Notification payloads for specific providers
Title:
Notification payloads for specific providers
Nested Schema : Template reference
Type:
object
Title:
Template reference
Name and parameters for a template from which to create the payload
Show Source
-
name:
string
The template name.
-
parameters(optional):
object parameters
The template parameters. The required parameters are defined by the template.
Nested Schema : Notification payloads for specific providers
Type:
object
Title:
Show Source
Notification payloads for specific providers
-
apns(optional):
object apns
If specified, this payload is used for notifications sent using APNS. This object must conform to APNS requirements.
-
fcm(optional):
object fcm
If specified, this payload is used for notifications sent using FCM. An
fcm
object can contain either anotification
object or adata
object. Anotification
object has a predefined set of user-visible keys described in the FCM documentation. Adata
object has custom key-value pairs. -
gcm(optional):
object gcm
If specified, this payload is used for notifications sent using GCM. This object can contain arbitrary JSON properties.
-
syniverse(optional):
object Syniverse payload
Title:
Syniverse payload
-
wns(optional):
object WNS payload
Title:
WNS payload
Nested Schema : apns
Type:
object
If specified, this payload is used for notifications sent using APNS. This object must conform to APNS requirements.
Nested Schema : fcm
Type:
object
If specified, this payload is used for notifications sent using FCM. An
fcm
object can contain either a notification
object or a data
object. A notification
object has a predefined set of user-visible keys described in the FCM documentation. A data
object has custom key-value pairs.Nested Schema : gcm
Type:
object
If specified, this payload is used for notifications sent using GCM. This object can contain arbitrary JSON properties.
Nested Schema : Syniverse payload
Type:
object
Title:
Show Source
Syniverse payload
-
body:
string
The message to send as an SMS message.
Nested Schema : WNS payload
Type:
object
Title:
Show Source
WNS payload
-
badge(optional):
object Badge value or glyph
Title:
Badge value or glyph
-
raw(optional):
object Raw payload
Title:
Raw payload
Specifies a raw payload. This is any arbitrary JSON object. -
tile(optional):
object Base tile element
Title:
Base tile element
Base tile element, which contains a single visual element. -
toast(optional):
object Base toast element
Title:
Base toast element
Base toast element, which contains at least a single visual element.
Nested Schema : Badge value or glyph
Type:
object
Title:
Show Source
Badge value or glyph
-
value:
string
Either a numeric value or a string value that specifies a predefined badge glyph.
-
version(optional):
integer
The version of the badge XML schema that this particular payload was developed for.
Nested Schema : Raw payload
Type:
object
Title:
Raw payload
Specifies a raw payload. This is any arbitrary JSON object.
Nested Schema : Base tile element
Type:
object
Title:
Base tile element
Base tile element, which contains a single visual element.
Show Source
-
visual:
object Binding child elements
Title:
Binding child elements
Nested Schema : Base toast element
Type:
object
Title:
Base toast element
Base toast element, which contains at least a single visual element.
Show Source
-
audio(optional):
object Sound to play
Title:
Sound to play
Specifies a sound to play when a toast is displayed. This element also allows you to mute toast audio. -
commands(optional):
object Scenario commands
Title:
Scenario commands
Specifies that the toast indicates an incoming call or an alarm, with appropriate commands associated with each scenario. -
duration(optional):
string
The amount of time the toast should display.
-
launch(optional):
string
A string that is passed to the application when it is activated by the toast. The format and contents of this string are defined by the app for its own use.
-
visual:
object Single binding element that defines a toast
Title:
Single binding element that defines a toast
Nested Schema : Binding child elements
Type:
object
Title:
Binding child elements
Match All
Show Source
-
object Child element properties
Title:
Child element properties
-
object Common visual and binding properties
Title:
Common visual and binding properties
Nested Schema : Child element properties
Type:
object
Title:
Show Source
Child element properties
-
binding(optional):
array binding
Minimum Number of Items:
1
Maximum Number of Items:2
Specifies the tile template. Every notification should include one binding element for each supported tile size. -
contentId(optional):
string
Set to a sender-defined string that uniquely identifies the content of the notification.
-
version(optional):
string
The version of the tile XML schema this particular payload was developed for.
Nested Schema : Common visual and binding properties
Type:
object
Title:
Show Source
Common visual and binding properties
-
addImageQuery(optional):
boolean
Set to `true` to allow Windows to append a query string to the image URI supplied in the toast notification.
-
baseUri(optional):
string
A default base URI that is combined with relative URIs in image source attributes.
-
branding(optional):
string
The form that the tile should use to display the app's brand.
-
lang(optional):
string
The target locale of the XML payload, specified as a BCP-47 language tag such as `en-US` or `fr-FR`.
Nested Schema : binding
Type:
array
Minimum Number of Items:
1
Maximum Number of Items:
2
Specifies the tile template. Every notification should include one binding element for each supported tile size.
Show Source
-
Array of:
object Toast template
Title:
Toast template
Nested Schema : Toast template
Type:
object
Title:
Toast template
Match All
Show Source
-
object Toast template properties
Title:
Toast template properties
-
object Common visual and binding properties
Title:
Common visual and binding properties
Nested Schema : Toast template properties
Type:
object
Title:
Show Source
Toast template properties
-
fallback(optional):
string
For backward compatibility, a template to use if the primary template isn't found.
-
image(optional):
array image
Minimum Number of Items:
0
Specifies an image to use in the toast template. -
template(optional):
string
One of the provided templates on which to base the toast.
-
text(optional):
array text
Minimum Number of Items:
1
Specifies text to use in the toast template.
Nested Schema : image
Type:
array
Minimum Number of Items:
0
Specifies an image to use in the toast template.
Show Source
-
Array of:
object Image to use in a toast or tile template
Title:
Image to use in a toast or tile template
Nested Schema : text
Type:
array
Minimum Number of Items:
1
Specifies text to use in the toast template.
Show Source
Nested Schema : Image to use in a toast or tile template
Type:
object
Title:
Show Source
Image to use in a toast or tile template
-
addImageQuery(optional):
boolean
Set to `true` to allow Windows to append a query string to the image URI supplied in the toast.
-
alt(optional):
string
For users of assistive technologies, a description of the image.
-
src:
string
The URI of the image source.
Nested Schema : Sound to play
Type:
object
Title:
Sound to play
Specifies a sound to play when a toast is displayed. This element also allows you to mute toast audio.
Show Source
-
loop(optional):
boolean
Set to `true` if the sound should repeat as long as the toast is shown, and `false` to play only once.
-
silent(optional):
boolean
Set to `true` to mute the sound, and `false` to allow the toast sound to play.
-
src(optional):
string
The media file to play in place of the default sound.
Nested Schema : Scenario commands
Type:
object
Title:
Scenario commands
Specifies that the toast indicates an incoming call or an alarm, with appropriate commands associated with each scenario.
Show Source
-
commands:
array commands
Minimum Number of Items:
1
Specifies the scenario-associated buttons shown in the toast. -
scenario:
string
Specifies the intended use of the notification.
Nested Schema : Single binding element that defines a toast
Type:
object
Title:
Single binding element that defines a toast
Match All
Show Source
-
object Element properties
Title:
Element properties
-
object Common visual and binding properties
Title:
Common visual and binding properties
Nested Schema : commands
Type:
array
Minimum Number of Items:
1
Specifies the scenario-associated buttons shown in the toast.
Show Source
-
Array of:
object Scenario button
Title:
Scenario button
Specifies a scenario-associated button shown in a toast. The scenario is specified in the parent commands element.
Nested Schema : Scenario button
Type:
object
Title:
Scenario button
Specifies a scenario-associated button shown in a toast. The scenario is specified in the parent commands element.
Show Source
-
arguments(optional):
string
An argument string, which can be passed to the associated app to provide the specifics about the action that it should execute in response to the user action.
-
id:
string
Specifies one command from the system-defined command list.
Nested Schema : Element properties
Type:
object
Title:
Show Source
Element properties
-
binding(optional):
object Toast template
Title:
Toast template
-
version(optional):
string
The version of the toast XML schema that this particular payload was developed for.
Nested Schema : parameters
Type:
object
The template parameters. The required parameters are defined by the template.
Example Response (application/json)
{
"message":"This is the alert message.",
"id":1234,
"createdOn":"2014-04-02T12:34:56.789Z",
"platformCounts":[
{
"platform":"IOS",
"deviceCount":1,
"successCount":1
}
],
"status":"Sent",
"tag":"Marketing",
"notificationTokens":[
"APNSdeviceToken"
],
"links":[
{
"rel":"canonical",
"href":"/mobile/system/notifications/notifications/1234"
},
{
"rel":"self",
"href":"/mobile/system/notifications/notifications/1234"
}
],
"processedOn":"2014-04-01T12:34:56.789Z"
}
400 Response
The notification ID is missing.
Root Schema : Error
Type:
object
Title:
Error
The error JSON object returned by Mobile Cloud Service.
Show Source
-
detail:
string
Message that provides the error details.
-
o:ecid:
string
Execution context ID, which is a unique identifier to correlate events or requests that are associated with the same transaction across several components.
-
o:errorCode:
string
Mobile Cloud Service error code.
-
o:errorDetails(optional):
array o:errorDetails
Minimum Number of Items:
0
List of the issues that cause the error. Included when the error is caused by multiple issues. -
o:errorPath:
string
The relative point in the API path where the error occurred.
-
status:
integer
HTTP status code. See http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html for more details.
-
title:
string
Summary of the problem.
-
type:
string
The URI to the link that provides details about the HTTP status code.
Nested Schema : o:errorDetails
Type:
array
Minimum Number of Items:
0
List of the issues that cause the error. Included when the error is caused by multiple issues.
Show Source
-
Array of:
object Error Detail
Title:
Error Detail
Nested Schema : Error Detail
Type:
object
Title:
Show Source
Error Detail
-
instance:
string
The URI to the link that provides more detailed information about the error.
-
o:errorCode:
string
Mobile Cloud Service error code.
-
o:errorPath:
string
The relative point in the API path where the error occurred.
-
title:
string
Summary of the problem.
-
type:
string
The URI to the link that provides details about the HTTP status code.
404 Response
The notification ID wasn't found.
Root Schema : Error
Type:
object
Title:
Error
The error JSON object returned by Mobile Cloud Service.
Show Source
-
detail:
string
Message that provides the error details.
-
o:ecid:
string
Execution context ID, which is a unique identifier to correlate events or requests that are associated with the same transaction across several components.
-
o:errorCode:
string
Mobile Cloud Service error code.
-
o:errorDetails(optional):
array o:errorDetails
Minimum Number of Items:
0
List of the issues that cause the error. Included when the error is caused by multiple issues. -
o:errorPath:
string
The relative point in the API path where the error occurred.
-
status:
integer
HTTP status code. See http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html for more details.
-
title:
string
Summary of the problem.
-
type:
string
The URI to the link that provides details about the HTTP status code.
Nested Schema : o:errorDetails
Type:
array
Minimum Number of Items:
0
List of the issues that cause the error. Included when the error is caused by multiple issues.
Show Source
-
Array of:
object Error Detail
Title:
Error Detail
Nested Schema : Error Detail
Type:
object
Title:
Show Source
Error Detail
-
instance:
string
The URI to the link that provides more detailed information about the error.
-
o:errorCode:
string
Mobile Cloud Service error code.
-
o:errorPath:
string
The relative point in the API path where the error occurred.
-
title:
string
Summary of the problem.
-
type:
string
The URI to the link that provides details about the HTTP status code.
Examples
This example shows how to retrieve a specific notification by submitting a GET request on the REST resource.
curl -i \
-X GET \
-u team.user@example.com:password \
-H "Oracle-Mobile-Backend-ID: ABCD9278-091f-41aa-9cb2-184bd0586fce \
http://fif.cloud.oracle.com/mobile/system/notifications/notifications/5
Example of Response Header
Here's an example of the response header:
200 OK
Content-Type: application/json; charset=UTF-8
Date: Tue, 23 Jun 2015 00:28:16 GMT
Example of Response Body
This example shows the contents of the response body in JSON format:
{
"id": 5,
"message": "Incident service will be unavailable between 1:00 a.m. and 3:00 a.m. PST",
"users": [ ],
"roles": [ ],
"notificationTokens": [ ],
"sendOn": "2015-06-25T06:00Z",
"tag": "System",
"status": "Scheduled",
"createdOn": "2015-06-23T00:27:05.175Z",
"links": [
{
"rel": "canonical",
"href": "/mobile/system/notifications/notifications/5"
},
{
"rel": "self",
"href": "/mobile/system/notifications/notifications/5"
}
]
}