Note: For up-to-date product documentation, see the IBM MobileFirst Foundation Developer Center.

Push Message (GET)

Retrieves the message details by messageId.

Description

Requires the following JNDI properties to be set for MobileFirst Push:
  • imfpush/mfp.push.messages.persist.size (Queue size to store messages before writing to database).
  • imfpush/mfp.push.messages.persist.delay.mins (Delay in minutes to write sent messages in database).

Method

GET

Path

/apps/applicationId/messages/messageId

Example

https://example.com:443/imfpush/v1/apps/myapp/messages/mymessage

Path Parameters

applicationId
The name or identifier of the application.
messageId
The identifier of the message.

Header Parameters

Some header parameters are optional.

Accept-Language
(Optional) The preferred language to use for error messages. Default:en-US
Authorization
The token with the scope `messages.read` and `push.application.<applicationId>` obtained using the confidential client in the format bearer token. This is a mandatory parameter.

Produces

application/json

Response

The details of the message that is retrieved.

JSON Example

{
  "alert" : "TestMessage",
  "messageId" : "1234",
}

Response Properties

The response has the following properties:

alert
The message text.
messageId
The unique identifier of the message.

Errors

401
Unauthorized - The caller is either not authenticated or not authorized to make this request.
404
The message with the specified messageId is not found.
406
Unsupported Accept type - The content type specified in Accept header is not application/json.
500
An internal error occurred.