- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-18-2016 02:07 AM
Hello,
I need help please
How I can create new user in service now using rest API and assing him a role?
If possible an example will be helpful
Thank you
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-18-2016 02:46 AM
Hi Alassane,
If you have the endpoint of the post method from this form you can use that and consume the REST service in your java code like any other rest webservice by passing the variables like in any other REST webservice.
Moreover, you can refer this page as well.
Table API Java Examples - ServiceNow Wiki
Hope it helps.
Thanks and Regards,
Vikas Malhotra
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-18-2016 06:01 AM
Hi Tony,
I can't access to the curl with admin, admin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-18-2016 06:15 AM
Hi Tony,
Like that :
String postData = "{'first_name':'Alassane','user_name':'alassane.sidibe','last_name':'SIDIBE',"
+ "'title':'dgdhh','department':'ggjjjjj, 9+++++','user_password':'admin',"
+ "'password_needs_reset':'true','locked_out':'false','active':'true',"
+ "'internal_integration_user':'true','date_format':'jj/mm/aaaa','"
+ "email':'agbk@nnnn.com'}" ;