0
votes

Now that I have the add dns A record working, I am trying to delete the resource Record in SoftLayer DNS.

I issue the URL:

https://aoi.softlayer.com/rest/v3/SoftLayer_Dns_Domain/getByDomainName/<my domain name>.json?objectMask=mask[resourceRecordCount;resourceRecords]

I loop through the resource records looking to the host name to delete to get the resource record ID.

I issue URL:

https://api.softlayer.com/rest/v3/SoftLayer_Dns_Domain_ResourceRecord/deleteObject/<resource record id>.json

I am getting:

RC 404, MSG "not found", content "{"error":"Service does not exist","code":"SoftLayer_Exception_Public"}"

deleteObject is defined as a method under `SoftLayer_Dns_Domain_ResourceRecord.

Can you help.

1

1 Answers

2
votes

Please try the following:

  1. Get the resource record id

    https://[username]:[apikey]@api.softlayer.com/rest/v3/SoftLayer_Dns_Domain/[Dns_Domain_ID]/getResourceRecords.json
    
    Method: GET
    
  2. Delete Resource record

    https://[username]:[apikey]@api.softlayer.com/rest/v3/SoftLayer_Dns_Domain_ResourceRecord/[Resource_Record_ID]/deleteObject.json
    
    Method: GET