Deleting an SMTP server¶
To unregister an SMTP server from IBM Spectrum Protect Plus, you must delete the SMTP server.
Method and URI¶
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 the SMTP server 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.