Jump to content

Testing notifications


bbb

Recommended Posts

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...
 
 
 
Link to comment
Share on other sites

  • 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

Link to comment
Share on other sites

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?

Link to comment
Share on other sites

  • Administrators

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.

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...