Return Notifications by Query

get

/mobile/system/notifications/notifications/

Retrieves the notifications that match the query parameters. Only notifications that match ALL specific query parameters are returned.

If you are using BASIC authorization, and the notifications are 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

Query Parameters
Back to Top

Response

Supported Media Types

200 Response

The notification was retrieved successsfully.
Body ()
Root Schema : Notifications with paging information
Type: object
Title: Notifications with paging information
Match All
Show Source
Nested Schema : Notifications array
Type: object
Title: Notifications array
Show Source
Nested Schema : Pagination information
Type: object
Title: Pagination information
Match All
Show Source
Nested Schema : Notifications
Type: array
Title: Notifications
Minimum Number of Items: 0
Show Source
Nested 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
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. 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: 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
Nested Schema : Common visual and binding properties
Type: object
Title: Common visual and binding properties
Show Source
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
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
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
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.
Nested Schema : Paging properties
Type: object
Title: Paging properties
Show Source
Example Response (application/json)
{
    "hasMore":false,
    "items":[
        {
            "id":1234,
            "message":"This is the alert message.",
            "createdOn":"2014-04-02T12:34:56.789Z",
            "status":"New",
            "tag":"Marketing",
            "notificationTokens":[
                "APNSdeviceToken"
            ],
            "links":[
                {
                    "rel":"canonical",
                    "href":"/mobile/system/notifications/notifications/1234"
                },
                {
                    "rel":"self",
                    "href":"/mobile/system/notifications/notifications/1234"
                }
            ]
        },
        {
            "message":"Update required.",
            "id":1235,
            "createdOn":"2014-04-03T58:24:12.345Z",
            "platformCounts":[
                {
                    "platform":"IOS",
                    "deviceCount":1,
                    "successCount":1
                }
            ],
            "status":"Sent",
            "tag":"System",
            "notificationTokens":[
                "APNSdeviceToken"
            ],
            "links":[
                {
                    "rel":"canonical",
                    "href":"/mobile/system/notifications/notifications/1235"
                },
                {
                    "rel":"self",
                    "href":"/mobile/system/notifications/notifications/1235"
                }
            ],
            "processedOn":"2014-04-01T12:34:56.789Z"
        }
    ],
    "links":[
        {
            "rel":"canonical",
            "href":"/mobile/system/notifications/notifications?offset=0&limit=2"
        },
        {
            "rel":"self",
            "href":"/mobile/system/notifications/notifications?offset=0&limit=1000"
        }
    ]
}

400 Response

The query contains an invalid parameter.
Body ()
Root Schema : Error
Type: object
Title: Error
The error JSON object returned by Mobile Cloud 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
Back to Top

Examples

This example shows how to retrieve notifications 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/?orderBy=sendOn,tag 

Example of Response Header

Here's an example of the response header:

200 OK
Date: Tue, 23 Jun 2015 00:53:24 GMT
Content-Type: application/json; charset=UTF-8

Example of Response Body

This example shows the contents of the response body in JSON format:

{
  "items": [
    {
      "id": 4,
      "message": "Reminder: Status on incident 1548 is due",
      "users": [
        "technician21@fif.com",
        "technician14@fif.com"
      ],
      "roles": [ ],
      "notificationTokens": [ ],
      "sendOn": "2015-06-25T06:00Z",
      "tag": "Incidents",
      "status": "Scheduled",
      "createdOn": "2015-06-23T00:26:30.019Z",
      "links": [
        {
          "rel": "canonical",
          "href": "/mobile/system/notifications/notifications/4"
        },
        {
          "rel": "self",
          "href": "/mobile/system/notifications/notifications/4"
        }
      ]
    },
    {
      "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"
        }
      ]
    }
  ],
  "hasMore": false,
  "limit": 2,
  "count": 2,
  "links": [
    {
      "rel": "canonical",
      "href": "/mobile/system/notifications/notifications/?orderBy=sendOn%2Ctag&offset=0&limit=2"
    },
    {
      "rel": "self",
      "href": "/mobile/system/notifications/notifications/?orderBy=sendOn%2Ctag"
    }
  ]
}
Back to Top