All of the endpoints in the table below are inherited from Model REST API, except for Send push notification.
URI Pattern | HTTP Verb | Default Permission | Description | Arguments |
---|---|---|---|---|
| POST | Allow / Deny | Send a push notification by installation query | Query parameters: deviceQuery Request body: notification |
Send push notification
Send a pus notification by installation query.
POST /push
Arguments
- deviceQuery - Object; query parameter.
- notification - Object; request body.
Example
Request:
curl -X POST -H "Content-Type:application/json" -d '{"badge" : 5, "sound": "ping.aiff", "alert": "Hello", "messageFrom": "Ray"}' http://localhost:3000/push?deviceQuery[userId]=1
Response code: 200
Response body:
{}
Errors