Deleting an SMTP server¶
Unregister an SMTP server from IBM Spectrum Protect Plus.
Method and URI¶
Although IBM Spectrum Protect Plus supports up to one SMTP server, you have to specify it using {smtpId}
. To unregister an SMTP server, use a DELETE method and a URI:
DELETE https://{hostname|IPv4}/api/smtp/{smtpId}
Tip
To get an {smtpId}
value based on its name, follow the instructions in Getting an {smtpId}.
Parameters¶
None.
Data¶
None.
Example: Unregister an SMTP server¶
Assume that you have an SMTP server 10.0.0.121 and you want to unregister it. You get the {smtpId}
: 1002.
A Python snippet that is similar to the following example can be used to unregister the SMTP server:
smtp_id = "1002"
requests.delete('https://' + spp_ipv4 + '/api/smtp/' + smtp_id,
headers={...}, params="", data="", verify=...)
After you run the Python snippet, ensure that you get a response with the HTTP status of 204 (No Content) and that you no longer see the SMTP server 10.0.0.121. The response body is empty.