Can Number be used instead of sys_id when using Rest Call Put Method?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-19-2017 01:03 AM
Looking at wiki of Table API
http://wiki.servicenow.com/index.php?title=Table_API#gsc.tab=0
it is written there to use sys id in the endpoint in order for you to update specific record
can this be changed to number instead?
Thanks
Broderick
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-19-2017 07:21 AM
It is not possible during the Direct Rest API, The sys_id is mandatory for put and you cannot submit a PUT request without a sys_id. This would add an additional overhead of saving the sys_id in external systems but we have a work around. You need to create a web service import set and set the number as the coalesce. Once you do so, send a post request to the import table with the number to update records.
POST will do the job of modifying a record when number is provided as coalesce on your transform map.
Thank You
Please Hit Like, Helpful or Correct depending on the impact of response
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-21-2017 03:44 PM
HI Alikutty,
Thanks for your reply, how do you create import set for rest ? is this done on target or consumer end?
Thanks
Broderick
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-22-2017 12:17 AM
It is the same way you create a web service import set for SOAP. See the navigation link I have shown, it will be an inbound connection in your Service Now instance.
Once you setup a web service import set, it gives you an import table name on which you can apply the same REST API queries.
Here is its documentation for your reference: Creating an import set web service
Thank You
Please Hit Like, Helpful or Correct depending on the impact of response
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-22-2022 11:56 PM
Has this changed in 5 years time or we still need to use the sys id?