cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1970
Views
5
Helpful
2
Replies

Debugging ISE ERS errors

kevink707
Level 1
Level 1

I'm trying to use the ISE ERS to create a networkdevice (ISE 2.2).  Any hints debugging a "405 Method Not Allowed" response?  I'm guessing my JSON data is bad, but a pointer to what is wrong would be very helpful.

 

 

2 Replies 2

Jatin Katyal
Cisco Employee
Cisco Employee

Reading through the error details:

10.4.6 405 Method Not Allowed

The method specified in the Request-Line is not allowed for the resource identified by the Request-URI. The response MUST include an Allow header containing a list of valid methods for the requested resource.

 

I'd suggest you to match your ERS query with this document:

https://www.network-node.com/blog/2016/4/19/ise-rest-api-goodbye-click-click-click-click-part-2

~Jatin

I tried the create network device group example in https://www.network-node.com/blog/2016/4/19/ise-rest-api-goodbye-click-click-click-click-part-2 and still get a 405 Method Not Allowed.

 

Here is my script:

#! /usr/bin/perl

# Create a network device group in Cisco ISE

use warnings;
use strict;
use LWP::UserAgent;
use Data::Dumper;

$ENV{PERL_LWP_SSL_VERIFY_HOSTNAME} = 0; # Do not check SSL certs

my $myname = $0;
$myname =~ s/.*\///;

my $username = shift;
my $password = shift;
my $hostname = shift;
die "Usage: $myname username password hostname" unless ($username && $password && $hostname);

my $url = "https://${username}:${password}\@${hostname}:9060/ers/config/networkdevicegroup";

my $group_xml = '
    <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
    <ns4:networkdevicegroup 
        description="Campus Switches" 
        id="000000011" 
        name="Device Type#All Device Types#Switches" 
        xmlns:ers="ers.ise.cisco.com" 
        xmlns:xs="http://www.w3.org/2001/XMLSchema" 
        xmlns:ns4="network.ers.ise.cisco.com">
    <type>Device Type</type>
    </ns4:networkdevicegroup>
';

my $ua = LWP::UserAgent->new;
$ua->agent("$myname/1.0 ");
$ua->default_header('Accept' => 'application/xml');
$ua->default_header('Content-Type' => 'application/vnd.com.cisco.ise.identity.internaluser.1.0+xml;charset=UTF-8');

my $res = $ua->put($url,Content => $group_xml);
if (!$res->is_success) {
    die "Update using $url failed with: ".$res->status_line;
}

print Dumper($res->content);

 

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: