From zreenathmenon at gmail.com Sat May 9 07:25:36 2015 From: zreenathmenon at gmail.com (SREENATH MENON) Date: Sat, 9 May 2015 16:55:36 +0530 Subject: [arin-tech-discuss] Can't delete an IP Reassignment Message-ID: 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:* *========================* E_OBJECT_NOT_FOUNDThe referenced object does not exist.handleThe referenced object does not exist. *========================* *.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=******************* *========================* *Has anyone faced this issue earlier.* *Can someone help me out in this.* *Thanks,* *Sreenath* -------------- next part -------------- An HTML attachment was scrubbed... URL: From andy at arin.net Sat May 9 07:52:27 2015 From: andy at arin.net (Andy Newton) Date: Sat, 9 May 2015 11:52:27 +0000 Subject: [arin-tech-discuss] Can't delete an IP Reassignment In-Reply-To: Message-ID: 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: > >======================== >xmlns="http://www.arin.net/regrws/core/v1">E_OBJECT >_NOT_FOUNDThe referenced object > does not >exist.handleThe >referenced object does not exist. > >======================== > > >.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=****************** >* >**> > >======================== > > >Has anyone faced this issue earlier. > >Can someone help me out in this. > >Thanks, >Sreenath > > > > >