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

balaji_charapal
Kilo Guru

Hi,



You can use Number for updating record, because duplicate number will not allow in servicenow, also you can make coalesce true on transform map, it will take care of update or insert also.


mahi4889Snow
Tera Contributor

This can be possible, please see below,

 

https://dev233.service-now.com/incident.do?JSONv2&sysparm_query=number=INC0002343&sysparm_action=update

Payload: {"state":"6","closure_notes":"Ticket can be closed"}

Method: POST

Hitoshi Ozawa
Giga Sage
Giga Sage

Hi Quiksilver,

To update a record using a Table API, table name and sys_id is required. This is because not all tables have field Number.

It is possible update a particular table using Number by creating a Scripted REST API.

https://docs.servicenow.com/bundle/sandiego-application-development/page/integrate/custom-web-servic...

User used in REST API usually is different from user to login using web browser and have different role and less privileges.