The restnotification API allows to send message to multiple recipients in various scenarios.
http[s]://<host:port>/restnotification/application/<applicationId>
https://<HMC base URL>/restnotification/application/<applicationId>
> POST /restnotification/application/123456789 HTTP/1.1 > Authorization: Basic cHVzaDpzZWNyZXQ= > User-Agent: curl/7.36.0 > Host: localhost:8080 > Accept: */* > Content-Type: application/json;charset=utf-8 > Content-Length: 127 > { "alert": "alertval", "badge": 1, "data": "testData", "sound": "soundval" } < HTTP/1.1 201 Created < Content-Length: 0 < Date: Mon, 05 May 2014 00:29:38 GMT < Server: SAP
In this scenario, a status code 201 indicates that the server accepts the push notification request. Server forwards these requests to the external push service such as GCM, BES, BIS, APNS, WNS and so on. It does not indicate that the server has successfully delivered the notification to the devices.
400 Bad Request: The request is invalid. Verify the request body.
401 Forbidden: The user that issued the request does not have the required privileges. Ensure that the user is assigned to the "Notifcation User" role.
403 Authentication required: No or incorrect credentials is provided. Enter the correct credentials.
http[s]://<host:port>/restnotification/application/<applicationId>/user/<userID>
https://<HMC base URL>/restnotification/application/<applicationId>/user/<userID>
> POST /restnotification/application/123456789/user/timmitester HTTP/1.1 > Authorization: Basic cHVzaDpzZWNyZXQ= > User-Agent: curl/7.36.0 > Host: localhost:8080 > Accept: */* > Content-Type: application/json;charset=utf-8 > Content-Length: 127 > { "alert": "alertval", "badge": 1, "data": "testData", "sound": "soundval" } < HTTP/1.1 201 Created < Set-Cookie: X-SMP-SESSIDSSO=C05E58BE3CFC685ABB945D53C2AF14FD; Path=/; HttpOnly < Set-Cookie: X-SMP-SESSID=4CC5BC2943E5D3A9B5D924888FC28CB060034F0092911A66B9F079047077798C; Path=/; HttpOnly < Content-Length: 0 < Date: Mon, 05 May 2014 00:32:35 GMT < Server: SAP
http[s]://<host:port>/restnotification/registration/<applicationRegistrationId>
https://<HMC base URL>/restnotification/registration/<applicationRegistrationId>
> POST /restnotification/registration/9f847e51-3242-4899-9193-39b6e840d657 HTTP/1.1 > Authorization: Basic cHVzaDpzZWNyZXQ= > User-Agent: curl/7.36.0 > Host: localhost:8080 > Accept: */* > Content-Type: application/json;charset=utf-8 > Content-Length: 127 > { "alert": "alertval", "badge": 1, "data": "testData", "sound": "soundval" } < HTTP/1.1 201 Created < Set-Cookie: X-SMP-SESSIDSSO=D541E4898186AB304F506D13C0C3F1D0; Path=/; HttpOnly < Set-Cookie: X-SMP-SESSID=FDB39F9BAE8A6E1AD4373765A58E094A14B8FDFB8289CC70E51B77A284C50736; Path=/; HttpOnly < Content-Length: 0 < Date: Mon, 05 May 2014 00:36:15 GMT < Server: SAP
http[s]://<host:port>/restnotification/application/<applicationId>/user
https://<HMC base URL>/restnotification/application/<applicationId>/user
POST /restnotification/application/123456789/user HTTP/1.1 > Authorization: Basic cHVzaDpzZWNyZXQ= > User-Agent: curl/7.36.0 > Host: localhost:8080 > Accept: */* > Content-Type: application/json;charset=utf-8 > Content-Length: 277 > { "notification": { "alert": "alertval", "badge": 1, "data": "testData", "sound": "soundval" }, "users": [ "timmitester", "user1", "user2" ] } < HTTP/1.1 201 Created < Set-Cookie: X-SMP-SESSIDSSO=9AD06173C8AB9FC05FD6AA8DC55BB9AE; Path=/; HttpOnly < Set-Cookie: X-SMP-SESSID=DFB2D2AC4EBAA4903553EB7C5A0C90870BD4B8F3A3DC19A5FD984673EB1BD646; Path=/; HttpOnly < Content-Length: 0 < Date: Mon, 05 May 2014 00:38:32 GMT < Server: SAP
http[s]://<host:port>/restnotification/registration
https://<HMC base URL>/restnotification/registration
POST /restnotification/registration HTTP/1.1 > Authorization: Basic cHVzaDpzZWNyZXQ= > User-Agent: curl/7.36.0 > Host: localhost:8080 > Accept: */* > Content-Type: application/json;charset=utf-8 > Content-Length: 466 > { "notification": { "alert": "alertval", "badge": 1, "data": "testData", "sound": "soundval" }, "registrations": [ "3078e166-f144-4288-9dbc-1d192afe18d8", "9f847e51-3242-4899-9193-39b6e840d657", "4d1ccdf9-058a-42cf-a625-c4ed48944729", "f05dc905-b859-45fa-afdc-da3b630d2b48", "282be579-783e-40fb-b376-25bed5e13606" ] } < HTTP/1.1 201 Created < Set-Cookie: X-SMP-SESSIDSSO=BCA5FCB41DD7F451410E3E8BB59E8F7A; Path=/; HttpOnly < Set-Cookie: X-SMP-SESSID=2AC74022B258178ED3A88E4B2FA10AB41093F53C3D0A77976FE6FE076F1E3CC2; Path=/; HttpOnly < Content-Length: 0 < Date: Mon, 05 May 2014 00:41:52 GMT < Server: SAP
> POST /restnotification/application/XYZ HTTP/1.1 > Authorization: Basic cHVzaDpzZWNyZXQ= > User-Agent: curl/7.36.0 > Host: localhost:8080 > Accept: */* > Content-Type: application/json;charset=utf-8 > { "alert": "alertval", "badge": 1, "data": "testData", "sound": "soundval" }
> { "alert": "alertval", "badge": 1, "customParameters": { "gcm.sound": "soundforgcm" }, "data": "testData", "sound": "soundval" }