postmanlabs / postman-app-support

Postman is an API platform for building and using APIs. Postman simplifies each step of the API lifecycle and streamlines collaboration so you can create better APIs—faster.
https://www.postman.com
5.82k stars 839 forks source link

Add ability to specify monitor alert recipients via the API #3420

Open gaieges opened 7 years ago

gaieges commented 7 years ago

App Details:

Postman Pro Webapp

Feature request

Currently, the API has no ability to modify or specify any target email addresses (or other methods of notification in the Postman Pro API. This makes the user have to be a distribution list which is sometimes counter intuitive when considering security.

This ticket is requesting the ability to specify the target recipients via email for a specific monitor, when creating it. Perhaps something along the lines of:

curl --request PUT \
  --url 'https://api.getpostman.com/monitors/{{monitor_uid}}' \
  --header 'content-type: application/json' \
  --header 'x-api-key: {{postman_api_key}}' \
  --data '{
    "monitor": {
        "alert": {
            recipient: "my@email.com"
        }
    }
}'
sdnts commented 7 years ago

@gaieges I'm afraid I don't understand your request completely. Which notifications are you talking about? For monitors, you should already be able to configure recipients who receive an email when your monitor fails.

gaieges commented 7 years ago

@madebysid - my understanding is that you cant via the API. Or its just not documented:

https://docs.api.getpostman.com/#beb9fb2b-2f36-5394-84d0-5010933d8d7b

sdnts commented 7 years ago

Ah, indeed. setting notifications from the Postman API isn't possible right now, but I'm adding this as a feature request. We'll look into this!

sankalp0o commented 5 years ago

@gaieges I don't understand the security considerations you're talking about. Can you elaborate on that?

gaieges commented 5 years ago

I don't recall the original context I was considering this in, but I can imagine a case where you want different alerts to go to different people / DL's, and not have to make various DL's just for a single alert. Hence the ask to allow to specify the alert recipients in a programmatic way.

davidespihernandez commented 1 year ago

To me, even more than 5 years later, this is a valid feature request. The monitor creation using the UI allows users to specify a list of email recipients for run failures and errors, and we allow the monitor creation via the Postman API, so the Postman API should also allow this possibility. The current Monitors endpoint (https://www.postman.com/postman/workspace/postman-public-workspace/request/12959542-419dd5ae-5fb8-476b-b070-c05accc3aaba) doesn't allow that, or at least it's not documented. I'm creating a feature request for this to study if it's possible and do it.