Details
-
Bug
-
Status: Closed
-
Minor
-
Resolution: Fixed
-
2.1.0, 1.0.0
-
None
Description
curl -X POST -d '{ "payloads": { "apple-dev": "Hello World!" } }' 'https://api.usergrid.com/brandon.apigee/baas-integration-tests/devices/*/notifications?client_id=redacted&client_secret=redacted'
throws:
{ "error": "runtime", "timestamp": 1436981233645, "duration": 0, "exception": "java.lang.RuntimeException", "error_description": "java.lang.NullPointerException" }
1) According to docs, it should work: http://apigee.com/docs/app-services/content/creating-and-managing-notifications
2) If it doesn't and isn't supposed to, it shouldn't throw an NPE.
Note that a notifier with a sandbox cert has been created with the name 'apple-dev'.
—
UPDATE
It does work with
/devices;ql=select */notifications
we should address this but also update the documentation to reflect the way in which it works.
—
UPDATE
It also appears that although the NPE is returned via the API, a notification is created in /notifications. In this particular test, there were no devices in the /devices collection:
{ "uuid": "11c5e62a-2a84-11e5-af28-65b8f0f35f5f", "type": "notifications", "created": 1436918242690, "modified": 1436918242690, "payloads": { "apple-dev": "Hello World!" }, "debug": false, "state": "CREATED", "metadata": { "path": "/notifications/11c5e62a-2a84-11e5-af28-65b8f0f35f5f", "collections": { "receipts": "/notifications/11c5e62a-2a84-11e5-af28-65b8f0f35f5f/receipts" } } }
Attachments
Issue Links
- duplicates
-
USERGRID-971 Docs to send notification to all devices are wrong
- Resolved