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

This community is for technical, feature, configuration and deployment questions.
For production deployment issues, please contact the TAC! We will not comment or assist with your TAC case in these forums.
Please see How to Ask the Community for Help for other best practices.

976
Views
0
Helpful
1
Replies
Richie20
Beginner

Create Internal user with curl and json with windows command line

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

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

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

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

View solution in original post

Create
Recognize Your Peers
Polls
Which of these topics should we host an event in the Community?

Top Choice: ISE- Guest and Posture Troubleshooting (36%)

Content for Community-Ad

ISE Webinars



Did you miss a previous ISE webinar?

CiscoISE YouTube Channel