Posted July 31, 201410 yr Hi, I'm using the Publish API to create a system, which shows up on the dashboard. I then send a notification using curl:  https://api.pulseway.com/v1/publish -H Content-Type:application/json -u <user;key> -X POST -d '{"instance_id":"v7black","title":"Test error","message":"Running out of disk space","priority":"critical"}' which gets a valid response: {"response_code":200,"error_message":null}  But I can't see any notification on the dashboard/mobile The name/description/group I used in publish seems to have been lost  I put the publish again, and the group/description is back... however once the 'refresh interval' expires it greys out but there is no notification.  thanks for any pointers...   Â
July 31, 201410 yr Administrators Hey there,  It seems to me that you are using the wrong endpoint: https://api.pulseway.com/v1/publish should only be used for Publish and https://api.pulseway.com/v1/notify should be used for Notify.  I believe that the reason you are getting a successful response (HTTP 200) is because they are allowing you to publish with empty contents. So if you specify a valid instance_id the publish will succeed. (@Pulseway: correct me if I'm wrong).  I just tested your request with the correct endpoint and it seems to be working here.  Paul
July 31, 201410 yr Author Thanks Paul - yes, I didn't notice that but it works fine now!  Do you know about notifications if the refresh-interval expires?
July 31, 201410 yr An offline notification will be sent, please set the notify_when_offline to true as specified here: http://www.pulseway.com/restapi/#publish  Once the instance goes offline it could take up to 15 minutes for the notification to be fired.  Marius
July 31, 201410 yr Author A couple more queries... Â If I send a notification I can't see the title in the dashboard/mobile (but it does show on the email subject). On the dashboard I see the date/time and no reference to the title text at all. If I send HTML tags they are ignored (or rather the tags are shown as text) in the description of the dashboard/mobile, but are interpreted as tags in my gmail - I'm guessing this is gmail's doing - but having some sort of text highlighting would be useful - is there any I can use?
July 31, 201410 yr You cannot send HTML tags - this is a push notification(s) limit and cannot be changed.
July 31, 201410 yr Author An offline notification will be sent, please set the notify_when_offline to true as specified here: http://www.pulseway.com/restapi/#publish  Once the instance goes offline it could take up to 15 minutes for the notification to be fired.  Marius   Thanks but I can't see any mention of that - just this:  "next_refresh_interval_minutes": 5
July 31, 201410 yr Author Perfect... thanks. Â Re. the title of the notification - is that meant to appear on the dashboard notification?
July 31, 201410 yr Title is used for push notifications and email subject only. Â Please use the message field as well for a more detailed description of the notification. This is the one that will appear on the Dashboard.
Create an account or sign in to comment