Roy Teeuwen
Is it possible to get the alerts / notifications that are sent to yourself at the current moment? Either current or archived?
0
Comments
Please sign in to leave a comment.
Hey Roy,
Yep, check out the GET /events?targetedRecipients=mmcbride API call. You can include the "at" or "from" and "to" values to retrieve events for a given timeframe. Probably also not a bad idea to include the status=ACTIVE or TERMINATED as well.
What do you want to do with them?
Happy Monday!
Hey Travis,
Thanks! I found my own device and people id, but it seems that when I do a request to events?targetedRecipients, I get the following response:
{
"code": 403,
"message": "Access Denied",
"reason": "Forbidden"
}
When I retrieve a specific event id (/events/{eventId}) then I do get a response when it's my own event. So I guess its a separate permission to even retrieve your own events? What permissions would I need extra?
Hi Roy,
In fact there is specific permissions to see events you create, events you were notified in and events targeting a group you supervise. So depending on what you were looking for, customized roles could be set up so users can do this... or if you use the API call Travis mentioned with a user having REST Web Service User role permissions and proper filters you could theoretically get the same result.
If you have the option to test with a user having this REST Web Service User permission (or Company Supervisor should work too) you may see that 403 change to an actual result set.
Are you wanting the users to have permission to do this themselves or are you developing an application that will authenticate the user making the request? Just wondering what your end goal is and what you have to work with.
Happy Tuesday!
Hey Francois,
I'm actually one of the users myself, not a supervisor / someone in power to change the roles / setup. So I'm checking if there is a call I can make to see them already without changing any of my permissions. If you say there is no such REST api available at this moment without changing my role, then I of course will go to my supervisor and see what is possible :)!
What I want to achieve is that I can use a scheduled job to retrieve all my events and give me a notification on my desktop instead of having mails / sms'es. So I'm just writing a small bash script to do that but I need to know the correct calls / permissions to be able to do so
Thanks,
Roy
No problem Roy!
Based on what I can see, what you would be able to retrieve yourself is anything that you are included in for the notification, the GET Events endpoint is not working because you don't have actual permission to the Events section of the UI. Our API is tied to UI permissions and you're not yet allowed to see events.
I wouldn't say there is no such API, it's just that your current permissions don't allow you to see events from our GET Events endpoint and you'd need something slightly elevated in order to get that.
You can have your management open a support ticket as needed if this will be a new requirement for some users in your organization and we can certainly explore options from there.
Cheers!
Hey Francois,
But I do have access in the UI to my inbox. Is there a REST api so that I can retrieve my inbox? Without having permissions to the Events UI?
Thanks
Roy