Security

Upcoming community maintenance Oct. 27th through Oct. 29th
For more info click here
Reply
Highlighted
Frequent Contributor I

Re: Delete Endpoint via API

Here is a workable 2 step script that successfuly deletes the Endpoint.  Soluiton came from TAC and has been tested in my lab on ClearPass 6.5.2.

 

Delete Endpoint with MAC Address:  00eebdad6094

 

1.  Create an XML file test2.xml with the following content.

 

<TipsApiRequest xmlns="http://www.avendasys.com/tipsapiDefs/1.0">
<TipsHeader version="6.4"/>
<Filter entity="Endpoint">
<Criteria fieldName="macAddress" filterString="00eebdad6094" match="contains"/>
</Filter>
</TipsApiRequest>

 

2.  Send HTML request to server with the above XML file to Retrieve <Element-Id> to delete.

 

curl -k -X POST https://10.238.32.32/tipsapi/config/deleteConfirm/Endpoint -u admin:eTIPS123 -H "Content-Type: text/xml" -d@test2.xml

 

<?xml version="1.0" encoding="UTF-8" standalone="yes"?><TipsApiResponse xmlns="http://www.avendasys.com/tipsapiDefs/1.0"><TipsHeader exportTime="Fri Feb 12 10:05:42 EST 2016" version="6.5"/><StatusCode>Success</StatusCode><EntityMaxRecordCount>1</EntityMaxRecordCount><Endpoints><Endpoint macVendor="Intel Corporate" macAddress="fcf8ae7787ab" status="Unknown"><element-id>Endpoint_fcf8ae7787ab_5cc</element-id><EndpointProfile updatedAt="Sep 02, 2015 09:16:54 EDT" addedAt="Aug 17, 2015 09:02:40 EDT" fingerprint="{&quot;host&quot;: {&quot;os_type&quot;: &quot;Windows 7&quot;}}" conflict="false" name="Windows 7" family="Windows" category="Computer" hostname="81CLTZ1.Limited.brands.com" staticIP="true" ipAddress="10.23.70.91"/></Endpoint></Endpoints></TipsApiResponse>

 

3.  Create XML file test3.xml with the content that includes the Element-Id (case sensentive)

 

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<TipsApiRequest xmlns="http://www.avendasys.com/tipsapiDefs/1.0">
<TipsHeader version="6.4"/>
<Delete>
<Element-Id>Endpoint_fcf8ae7787ab_5cc</Element-Id>
</Delete>
</TipsApiRequest>

 

4.  Send HTML request to delete the endpoint

 

curl -k -X POST https://10.238.32.32/tipsapi/config/delete/Endpoint -u admin:eTIPS123 -H "Content-Type: text/xml" -d@test3.xml

 

<?xml version="1.0" encoding="UTF-8" standalone="yes"?><TipsApiResponse xmlns="http://www.avendasys.com/tipsapiDefs/1.0"><TipsHeader exportTime="Fri Feb 12 10:07:25 EST 2016" version="6.5"/><StatusCode>Success</StatusCode><LogMessages><Message>Endpoint deleted successfully</Message></LogMessages></TipsApiResponse>

 

 

 

Search Airheads
cancel
Showing results for 
Search instead for 
Did you mean: