Consuming a staging table endpoint & transform map using REST

whilst below works, developer site actually recommends the format:
/api/now/import/<staging table_name>!/rest_api_doc?v=kingston&id=c_ImportSetAPI


web service endpoint created in a remote ServiceNow instance via system web services> create new,
where the staging table name is u_staging_table_xyz and the requests are processed to the target table via a transform map

SOAP wsdl to consume from another ServiceNow instance might be


format for consuming this on REST would be:


Example test harness for a POST operation

 go to REST messages and create a new REST message as a test harness, and create a new http POST method:

set up a basic authentication profile and configure the authentication profile to use as credentials (use a test user in the target instance with the REST role) below example highlights how to pull in variable substitutions into the content using "field_name": "${variable_sub}", format

[copy JSON:
"u_code": "${u_code}",
"u_short_description": "this is a test",
"u_vendor_reference": "${u_vendor_reference}",
"u_vendor_reference_sys_id": "c0d2d2b2db2ce7804735323239961993",
"u_short_description": "test",
"u_work_notes": "test update",
"u_state": "15",
"u_number": "${u_number}",
"u_caller_id": ""


note: the transform map might be configured to coalesce on the 3rd party reference number and to reject updates if the u_number element is not populated with a pre-existing number


Popular posts from this blog

GlideRecord setValue

Running transform maps asynchronously

variable advanced reference qualifier example