cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
2172
Views
0
Helpful
1
Replies

Create Internal user with curl and json with windows command line

Richie20
Level 1
Level 1

Hi Everyone

I am trying to Create an Internal User with cURL and JSON on window command prompt  for cisco ISE. prompt  but I am  getting  these errors over again . can anyone help me out

this is curl command
curl --insecure --include --user ers-admin:Admin22@# --header "Content-Type:application/json" --header "Accept: application/json" https://192.168.31.16:9060/ers/config/internaluser --data @internaluser.json}' 

 

this is my error 

HTTP/1.1 400
Set-Cookie: JSESSIONIDSSO=21F0E7399C2908B8E3D6F47578D0E82E; Path=/; Secure; HttpOnly
Set-Cookie: APPSESSIONID=1E9ED3FFD9C8A99774BE5DCF72638F2E; Path=/ers; Secure; HttpOnly
Cache-Control: no-cache, no-store, must-revalidate
Pragma: no-cache
Expires: Thu, 01 Jan 1970 00:00:00 GMT
X-Frame-Options: SAMEORIGIN
Strict-Transport-Security: max-age=31536000; includeSubDomains
X-Content-Type-Options: nosniff
X-Content-Security-Policy: default-src 'self'; script-src 'self' 'unsafe-inline' 'unsafe-eval'; style-src 'self' 'unsafe-inline'; img-src 'self' data:;
X-WebKit-CSP: default-src 'self'; script-src 'self' 'unsafe-inline' 'unsafe-eval'; style-src 'self' 'unsafe-inline'; img-src 'self' data:;
Content-Security-Policy: default-src 'self'; script-src 'self' 'unsafe-inline' 'unsafe-eval'; style-src 'self' 'unsafe-inline'; img-src 'self' data:;
X-XSS-Protection: 1; mode=block
Date: Mon, 17 May 2021 12:06:44 GMT
Content-Type: application/json;charset=utf-8
Transfer-Encoding: chunked
Connection: close
Server:

{
"ERSResponse" : {
"operation" : "POST-create-internaluser",
"messages" : [ {
"title" : "Invalid JSON Input: Unexpected end-of-input: expected close marker for OBJECT (from [Source: java.io.StringReader@15fa68a; line: 1, column: 0])\n at [Source: java.io.StringReader@15fa68a; line: 1, column: 237]",
"type" : "ERROR",
"code" : "Application resource validation exception"
} ],
"link" : {
"rel" : "related",
"href" : "https://192.168.30.13:9060/ers/config/internaluser",
"type" : "application/xml"
}
}
}

 

this the content of json test file

{
"InternalUser" : {
"name" : "Kwame",
"password" : "C1sco1234",
"changePassword" : false
}

1 Accepted Solution

Accepted Solutions

Greg Gibbs
Cisco Employee
Cisco Employee

Your JSON is missing a closing brace. Try using this content:

{
"InternalUser": {
"name": "Kwame",
"password": "C1sco1234}",
"changePassword": false
}
}

View solution in original post

1 Reply 1

Greg Gibbs
Cisco Employee
Cisco Employee

Your JSON is missing a closing brace. Try using this content:

{
"InternalUser": {
"name": "Kwame",
"password": "C1sco1234}",
"changePassword": false
}
}
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: