cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
920
Views
6
Helpful
5
Replies

Create endpoint bulk request support for description attribute

omuller
Level 1
Level 1

I'm trying to do a bulk request to create multiple endpoints at once by doing a PUT request to /ers/config/endpoint/bulk/submit using XML. Formatting the XML request or performing the request is not an issue. However, when I try to add the "description" attribute to the bulk request, I get the following error (without this attribute the request works fine):

{
  "ERSResponse" : {
    "operation" : "PUT-executeBulk-endpoint",
    "messages" : [ {
      "title" : "XML Schema Validation Failed :: at line 5, column 14 : cvc-complex-type.2.4.a: Invalid content was found starting with element 'description'. One of '{link, customAttributes, groupId, identityStore, identityStoreId, mac, mdmAttributes, portalUser, profileId, staticGroupAssignment}' is expected.",
      "type" : "ERROR",
      "code" : "Schema validation exception"
    } ],
    "link" : {
      "rel" : "related",
      "href" : "https://[SERVER]:9060/ers/config/endpoint/bulk/submit",
      "type" : "application/xml"
    }
  }
}

I saw the following post from this forum which detailed that the order of the fields in the XML mattered. Trying to change the order, however, didn't seem to fix the issue.

The XML I'm using to do the request looks like this:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<ns4:endpointBulkRequest operationType="create" resourceMediaType="vnd.com.cisco.ise.identity.endpoint.1.0+xml" xmlns:ns4="identity.ers.ise.cisco.com">
<ns4:resourcesList>
<ns4:endpoint>
<description>Test description</description>
<groupId>1be8fbe0-014c-11ee-a619-6afc9fef1d30</groupId>
<mac>11:11:11:11:11:11</mac>
<staticGroupAssignment>true</staticGroupAssignment>
<staticProfileAssignment>false</staticProfileAssignment>
</ns4:endpoint>
</ns4:resourcesList>
</ns4:endpointBulkRequest>

The version of Cisco ISE I'm currently using is version 2.7. Am I doing something wrong, or is adding the "description" attribute through a bulk request only something that is supported on later versions?

Thanks in advance.

1 Accepted Solution

Accepted Solutions

I stand corrected... I tested this in my lab with ISE 3.2 and, when using the POST method, I get a '405 Method Not Allowed' response. I tested the same with a PUT method and got the same '400 Bad Request' response that was shared above.

Although the syntax is a bit strange, I tested using the example @Arne Bier shared from the API Reference and got a '202 Accepted' response.

Here is the XML body of my PUT request:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<ns4:endpointBulkRequest operationType="create" resourceMediaType="vnd.com.cisco.ise.identity.endpoint.1.0+xml" xmlns:ns4="identity.ers.ise.cisco.com">
<ns4:resourcesList>
<ns4:endpoint description="Test description">
<groupId>221a6da0-5fda-11ed-b731-7a988ee57104</groupId>
<mac>11:11:11:11:11:11</mac>
<staticGroupAssignment>true</staticGroupAssignment>
<staticProfileAssignment>false</staticProfileAssignment>
</ns4:endpoint>
</ns4:resourcesList>
</ns4:endpointBulkRequest>

View solution in original post

5 Replies 5

Arne Bier
VIP
VIP

Hi @omuller 

I had a look at the ISE 3.2 ERS SDK (API Documentation page) and the syntax looks a bit different to the one you used in 2.7 - perhaps it was just a typo?

<ns4:endpoint description="john iphone">
            <mac>AA:BB:CC:DD:00:00</mac>
            <staticGroupAssignment>false</staticGroupAssignment>
 </ns4:endpoint>

 

Greg Gibbs
Cisco Employee
Cisco Employee

@omuller , are you trying to use the bulk operation to Update or Create the endpoints? The PUT operation is used to Update existing endpoints, where the POST operation is used to Create new endpoints.

I stand corrected... I tested this in my lab with ISE 3.2 and, when using the POST method, I get a '405 Method Not Allowed' response. I tested the same with a PUT method and got the same '400 Bad Request' response that was shared above.

Although the syntax is a bit strange, I tested using the example @Arne Bier shared from the API Reference and got a '202 Accepted' response.

Here is the XML body of my PUT request:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<ns4:endpointBulkRequest operationType="create" resourceMediaType="vnd.com.cisco.ise.identity.endpoint.1.0+xml" xmlns:ns4="identity.ers.ise.cisco.com">
<ns4:resourcesList>
<ns4:endpoint description="Test description">
<groupId>221a6da0-5fda-11ed-b731-7a988ee57104</groupId>
<mac>11:11:11:11:11:11</mac>
<staticGroupAssignment>true</staticGroupAssignment>
<staticProfileAssignment>false</staticProfileAssignment>
</ns4:endpoint>
</ns4:resourcesList>
</ns4:endpointBulkRequest>

Using the XML body you provided, I was indeed able to perform an PUT request to /ers/config/endpoint/bulk/submit to create multiple endpoints with a description using a bulk request. It seems I just overlooked the correct syntax, seeing as the ISE 2.7 ERS SDK also mentions the syntax shown by @Arne Bier to create multiple endpoints with a bulk request. Thanks!

Arne Bier
VIP
VIP

Good point - but then I am a bit confused what the SDK means here - how is it used "within" ?:

bulk-api.png