Can Number be used instead of sys_id when using Rest Call Put Method?

quiksilver
Mega Guru

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

7 REPLIES 7

Alikutty A
Tera Sage

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


HI Alikutty,



Thanks for your reply, how do you create import set for rest ? is this done on target or consumer end?



Thanks



Broderick


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.


find_real_file.png



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


Has this changed in 5 years time or we still need to use the sys id?