Contents

JSON Data Modification API

SAVE AS PDF

Other

JSON Data Modification API

Modify data using the JSON web service by sending an HTTPS POST request to the
instance.

The HTTP POST must contain a
sysparm_action
parameter to indicate the type of action to be performed, with the incoming JSON object post in
the body.

Note: The content-type of the POST should be application/json. It cannot be
application/x-www-form-urlencoded or multipart/form-data.

insert

Create a new record in ServiceNow. The
JSON object has to be POSTed as the body (content-type is usually application/json, although not
enforced). The response from the record creation is a JSON object of the incident that was
created.

Optionally, you may also specify the sysparm_action in the JSON object. The parameter inside
the JSON object takes precedence over the URL parameter. For
example:

{"sysparm_action":"insert","short_description":"this is a test","priority":"1"}

insertMultiple

To create multiple new records in ServiceNow, the input JSON object for the
insert function must
be an array. The response from the record creation is a JSON object of the incidents that were
created. For example, the following JSON
object:

creates two incidents. Note the fields described as an array value for the
records field.

update

Update a record or a list of records filtered by an
encoded query string
specified by the
sysparm_query
URL parameter. The JSON object has to be posted as the body (content-type is usually
application/json, although not enforced). The response from the record creation is an array of
JSON objects representing the records that were updated.

This site is scheduled for a small content update on Monday, November 19th, between the hours of 3:30pm and 5:00pm Pacific Time (Nov 19 23:30 – Nov 20 1:00 UTC). Acces to this site may be slightly delayed during that time.

Exit Preview Mode

A new experience, personalized for you.

Browse content relevant to you when you pre-set your search preferences.