Alerts API - DELETE an alert recipient

Applies to NAM 2019

Deletes the recipient specified by ID.

DELETE
  • url https://{console-host}:{console-port}/cxf/api/v1/config/alerts/recipients/{id}

Parameters

Parameter Type Description In Required
id

The recipient to be removed.

path required

Response format

A successful request doesn't return any content.

Response codes

Code Description
200 The recipient was removed successfully.
400 The request was invalid.

Example

In this example response, we used

GET https://console-address-and-port/cxf/api/v1/config/alerts/recipients/

to get a list of recipients. Two recipients were returned.


[
    {
        "user": {
            "login": "test-user-01",
            "firstName": "test-user-01's first name",
            "lastName": "test-user-01's last name",
            "email": "test-user-01@dynatrace.com"
        },
        "username": "test-user-01",
        "recipientType": "USER",
        "id": 15,
        "enabled": true
    },
    {
        "user": {
            "login": "test-user-02",
            "firstName": "test-user-02's first name",
            "lastName": "test-user-02's last name",
            "email": "test-user-02@dynatrace.com"
        },
        "username": "test-user-02",
        "recipientType": "USER",
        "id": 17,
        "enabled": true
    },
]

To delete a recipient, use the id value. We can see from response above that test-user-01 has an id of 15, so now we issue a DELETE request for just that recipient:

DELETE https://console-address-and-port/cxf/api/v1/config/alerts/recipients/15