Jump to content

Recommended Posts

  • Replies 3
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Posted

Please find below code which i have tried:

 

$(document).ready(function(){

$("#btn3").click(function(){

var userID = $("#userID").val();

var password = $("#password").val();

var rootURL = "http://10.107.63.43:8080/jasperserver-pro/rest_v2/users/" + userID;

alert("url is "+rootURL);

 

$.ajax({

type: 'PUT',

contentType: 'application/json',

url: rootURL,

dataType: "json",

username : "superuser",

password : "superuser",

data: {

"fullName":"joeuser",

"emailAddress":"",

"externallyDefined":false,

"enabled":true,

"tenantId":"Finance",

"username":"joeuser",

"roles":[

{"name":"ROLE_USER","externallyDefined":false}]

},

success: function(data, textStatus, jqXHR){

alert('User created successfully');

},

error: function(jqXHR, textStatus, errorThrown){

alert('User Creation error: ' + textStatus);

}

});

 

});

});

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...