Return a Notification

get

/mobile/system/notifications/notifications/{id}

Call this operation to retrieve 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 team member with either the Administrator or Developer role.

Request

Path Parameters

Response

Supported Media Types

200 Response

The notification was successfully retrieved.
Body ()
Root Schema : Stored notification
Type: object
Title: Stored notification
Match All
Show Source
Nested Schema : Stored notification properties
Type: object
Title: Stored notification properties
Show Source
  • 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).
  • 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`.
  • Message explaining a status of `Error` or `Warning`. If there are multiple associated problems, only the first is shown here.
  • Service-generated identifier.
  • Relationship links
  • platformCounts
    Minimum Number of Items: 1
    Unique Items Required: true
    Device counts by platform.
  • 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).
  • 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
  • Notification properties
    Title: Notification properties
  • 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 : platformCounts
Type: array
Minimum Number of Items: 1
Unique Items Required: true
Device counts by platform.
Show Source
Nested Schema : Device counts for a platform
Type: object
Title: Device counts for a platform
Show Source
Nested Schema : Notification properties
Type: object
Title: Notification properties
Show Source
  • notificationTokens
    Minimum Number of Items: 1
    Maximum Number of Items: 1000
    Unique Items Required: true
    Select devices to send the notification to by `notificationToken`.
  • Title: Supported platforms
    Allowed Values: [ "IOS", "ANDROID", "WINDOWS", "WEB" ]
  • Title: Supported notification providers
    Allowed Values: [ "APNS", "GCM", "FCM", "WNS", "SYNIVERSE" ]
  • 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).
  • User-defined tag that you use to categorize notifications.
  • 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
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: Unified payload for notification providers
Show Source
Nested Schema : Template reference
Type: object
Title: Template reference
Name and parameters for a template from which to create the payload
Show Source
Nested Schema : Notification payloads for specific providers
Type: object
Title: Notification payloads for specific providers
Show Source
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. This object can contain arbitrary JSON properties.
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: Syniverse payload
Show Source
Nested Schema : WNS payload
Type: object
Title: WNS payload
Show Source
Nested Schema : Badge value or glyph
Type: object
Title: Badge value or glyph
Show Source
  • Either a numeric value or a string value that specifies a predefined badge glyph.
  • 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
Nested Schema : Base toast element
Type: object
Title: Base toast element
Base toast element, which contains at least a single visual element.
Show Source
Nested Schema : Binding child elements
Type: object
Title: Binding child elements
Match All
Show Source
Nested Schema : Child element properties
Type: object
Title: Child element properties
Show Source
  • 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.
  • Set to a sender-defined string that uniquely identifies the content of the notification.
  • The version of the tile XML schema this particular payload was developed for.
Nested Schema : Common visual and binding properties
Type: object
Title: Common visual and binding properties
Show Source
  • Set to `true` to allow Windows to append a query string to the image URI supplied in the toast notification.
  • A default base URI that is combined with relative URIs in image source attributes.
  • The form that the tile should use to display the app's brand.
  • 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
Nested Schema : Toast template
Type: object
Title: Toast template
Match All
Show Source
Nested Schema : Toast template properties
Type: object
Title: Toast template properties
Show Source
  • For backward compatibility, a template to use if the primary template isn't found.
  • image
    Minimum Number of Items: 0
    Specifies an image to use in the toast template.
  • One of the provided templates on which to base the toast.
  • 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
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: Image to use in a toast or tile template
Show Source
  • Set to `true` to allow Windows to append a query string to the image URI supplied in the toast.
  • For users of assistive technologies, a description of the image.
  • 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
  • Set to `true` if the sound should repeat as long as the toast is shown, and `false` to play only once.
  • Set to `true` to mute the sound, and `false` to allow the toast sound to play.
  • 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
Nested Schema : Single binding element that defines a toast
Type: object
Title: Single binding element that defines a toast
Match All
Show Source
Nested Schema : commands
Type: array
Minimum Number of Items: 1
Specifies the scenario-associated buttons shown in the toast.
Show Source
  • 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
  • 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.
  • Specifies one command from the system-defined command list.
Nested Schema : Element properties
Type: object
Title: Element properties
Show Source
Nested Schema : parameters
Type: object
The template parameters. The required parameters are defined by the template.
Example Response (application/json)
{
    "platformCounts":[
        {
            "deviceCount":1,
            "successCount":1,
            "platform":"IOS"
        }
    ],
    "processedOn":"2014-04-01T12:34:56.789Z",
    "notificationTokens":[
        "APNSdeviceToken"
    ],
    "links":[
        {
            "rel":"canonical",
            "href":"/mobile/system/notifications/notifications/1234"
        },
        {
            "rel":"self",
            "href":"/mobile/system/notifications/notifications/1234"
        }
    ],
    "id":1234,
    "tag":"Marketing",
    "message":"This is the alert message.",
    "createdOn":"2014-04-02T12:34:56.789Z",
    "status":"Sent"
}

400 Response

The notification ID is missing.
Body ()
Root Schema : Error
Type: object
Title: Error
The error JSON object returned by the service.
Show Source
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
Nested Schema : Error Detail
Type: object
Title: Error Detail
Show Source

404 Response

The notification ID wasn't found.
Body ()
Root Schema : Error
Type: object
Title: Error
The error JSON object returned by the service.
Show Source
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
Nested Schema : Error Detail
Type: object
Title: Error Detail
Show Source

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"
    }
  ]
}