[arin-tech-discuss] Can't delete an IP Reassignment
Andy Newton
andy at arin.net
Sat May 9 07:52:27 EDT 2015
Sreenath,
I¹m unfamiliar with using the curl library directly, but I noticed two
candidate issues:
1) Your library code is setting the Content-Type header to
application/json while your command line is using application/xml.
2) Your examples are using different IP addresses. Of course, that maybe
out of necessity but just in caseŠ
If these are not the issues, let us know.
Andy Newton,
Chief Engineer, ARIN
>
>Hi,
>
>Hope someone will help me out in this.
>
>I was able to successfully reassign IP's from my company to our users
>using ARIN's documentation.
>
>Now, I need to delete some of those reassignments(since they have
>canceled their services) and reassign it to some other users.
>
>I am using DELETE METHOD.
>
>I am not able to delete the reassignments from backend
>
>My code is :
>
>===========================
>$url =
>"https://reg.arin.net/rest/net/104-153-72-4-1?apikey=API-***************";
>$ch = curl_init();
>curl_setopt($ch, CURLOPT_URL, $url);
>curl_setopt($curl, CURLOPT_CUSTOMREQUEST, "DELETE");
>curl_setopt($curl, CURLOPT_HEADER, false);
>curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
>curl_setopt($curl, CURLOPT_HTTPHEADER, array('Content-Type:
>application/json',"OAuth-Token: $token"));
>
>$response = curl_exec($curl);
>
>============================
>
>
>It's returning the following response:
>
>========================
><?xml version="1.0" encoding="UTF-8" standalone="yes"?><error
>xmlns="http://www.arin.net/regrws/core/v1"><additionalInfo/><code>E_OBJECT
>_NOT_FOUND</code><components><component><message>The referenced object
> does not
>exist.</message><name>handle</name></component></components><message>The
>referenced object does not exist.</message></error>
>
>========================
>
>
>.ie. the error message is "The referenced object does not exist.".
>
>When I try to execute the same directly from terminal via curl command,
>it's working.
>
>========================
>
>curl -v -H "Content-Type: application/xml" -X DELETE
>https://reg.arin.net/rest/net/NET-104-153-72-2-1?apikey=******************
>*
><https://reg.arin.net/rest/net/NET-104-153-72-2-1?apikey=*****************
>**>
>
>========================
>
>
>Has anyone faced this issue earlier.
>
>Can someone help me out in this.
>
>Thanks,
>Sreenath
>
>
>
>
>
More information about the arin-tech-discuss
mailing list