bbb Posted July 31, 2014 Posted July 31, 2014 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...
Administrators Paul Posted July 31, 2014 Administrators Posted July 31, 2014 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
bbb Posted July 31, 2014 Author Posted July 31, 2014 Thanks Paul - yes, I didn't notice that but it works fine now! Do you know about notifications if the refresh-interval expires?
Marius Posted July 31, 2014 Posted July 31, 2014 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
bbb Posted July 31, 2014 Author Posted July 31, 2014 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?
Marius Posted July 31, 2014 Posted July 31, 2014 You cannot send HTML tags - this is a push notification(s) limit and cannot be changed.
bbb Posted July 31, 2014 Author Posted July 31, 2014 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
Marius Posted July 31, 2014 Posted July 31, 2014 Try refreshing the web page, we've just updated the documentation.
bbb Posted July 31, 2014 Author Posted July 31, 2014 Perfect... thanks. Re. the title of the notification - is that meant to appear on the dashboard notification?
Marius Posted July 31, 2014 Posted July 31, 2014 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. Paul 1
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now