How to set 'priority' field on new incident when using REST API
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-22-2015 04:07 PM
We are trying to create an incident using the REST table API. When creating a new incident, we are always getting the priority field returned as blank...an empty string. When we bring up the incident in the UI, the priority is shown as '1 - Critical' which is not what we want. I have played around with passing various values (using '1' for impact, the integer value 1, '1 - High') to the API but nothing seems to work.
I have tried all combinations of the 'sysparm_input_display_value' and 'sysparm_display_value' querystring values with no results. We always get the same result, which is the ticket gets created as intended, but the 'priority' field always comes back as an empty string.
We have read in the docs, and observed in the UI, that the priority should be set based on the values provided in the 'impact' and 'urgency' field, but that does not appear to be happening.
Any advice?
Thanks,
William
- Labels:
-
Integrations
-
Scripting and Coding
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-06-2018 12:40 PM
Another solution is to create an ACL with write access only for "rest_service" role since this will be needed for all REST API calls.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-29-2016 08:36 AM
We are on Helsinki and experienced this same issue. To solve the issue I gave rest_service role access to write to task.priority. The user we were using had the rest_service role. That solved the issue for us.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-29-2016 08:52 AM
Under System Policy application you can look at "Data Lookup Definitions" as well as the "Priority Lookup Rules." This is (at least for incident out of box) where priority gets set based on the policy and look ups.