Notifications

10 views

Description

We are currently using an API to create incidents. When we use the REST API Explorer all the fields display all values as applied. Although when we use an external API with the same values, 3 fields (category, subcategory, cmdb_ci) display with null value. We have followed Docs (https://developer.servicenow.com/app.do#!/rest_api_doc?v=madrid&id=r_TableAPI-POST) and using user "muleIntegrationUser" although it is producing errors. Payload below is from REST API Explorer

Steps to Reproduce :
curl "https://<instance_url>/api/now/table/incident" \
--request POST \
--header "Accept:application/json" \
--header "Content-Type:application/json" \
--data "{\"category\":\"Enterprise Shared Platforms\",\"subcategory\":\"Outbound Comms Management\",\"cmdb_ci\":\"c937df924fcf2200081cfe501310c774\",\"assignment_group\":\"05f614684fc36200081cfe501310c7f4\",\"caller_id\":\"72d392914fba1fc0081cfe501310c7e2\",\"opened_by\":\"72d392914fba1fc0081cfe501310c7e2\",\"short_description\":\"Test Incident\",\"state\":\"2\",\"comments\":\"more comment\"}" \
--user '<user_name>':'<password>'

Release or Environment

London P10

Cause

ACL issue, User has to be granted ITIL role to access the REST API further. 

Resolution

Created a user with ITIL role or provide role Integration_manger to update the mandatory fields.

Additional Information

KB0535048

Article Information

Last Updated:2020-02-07 22:18:36
Published:2020-02-08