Jump to content

Testing notifications


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 post
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 post
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 post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...