set user location using REST API Explorer
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-05-2016 05:36 AM
Hello,
I want to set user location using REST API Explorer while create user. But it doesn't work.
Can someone help me please?
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-05-2016 07:51 AM
Hi Alassane,
Maybe the issue is, when the sys_user record is being updated you have to specify the name of a pre-existing location record?
edit:
Ah - I see now that Lars pointed this out earlier - so the issue is already resolved by Lars?
this worked for me also, but only because there exists a location record with name = 10719 Alpharetta Highway, Roswell,GA
curl "https://xxxxxx.service-now.com/api/now/table/sys_user" \
--request POST \
--header "Accept:application/json"\
--header "Content-Type:application/json" \
--data "{\"user_name\":\"fred4\",\"location\":\"10719 Alpharetta Highway, Roswell,GA\"}" \
--user 'admin':'xxxx'
Best Regards
Tony
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-06-2016 04:47 AM
Hi,
Thanks for your response. I find the solution I use cmn_location like Tony.