How to set 'priority' field on new incident when using REST API

williaml_
Kilo Explorer

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

12 REPLIES 12

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.


abrahams
Kilo Sage

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.


howellm
Kilo Expert

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.