Quick-Actions
3 min
performs quick actions for a business object for example, close, clone or resolve an incident or a problem for more information on quick actions and viewing a list of quick actions, see viewing a list of quick actions for a business object docid\ qc7s yrfjjgp1ybk v 1s base url https //{tenant url}/api/odata/businessobject/{business object name}('{business object unique key}')/{quick action name} ensure the business object name is suffixed with an "s" you can get the quick action id from the metadata api docid\ pkocqfv2d86th3l22mggy quick action example close an incident here is an example to close an incident using a quick action url https //{tenant url}/api/odata/businessobject/incidents('{incident rec id}')/close incident \<font color="#ffffff">method\</font> post header name authorization jtw token/session key/rest api key \<font color="#ffffff">request payload\</font> click to view the request payload { "actionid" "3492dbcc e502 44fd 9790 e3e45cb26c45", "shouldsave"\ true, "actionparams" { "formparams" { "actionid" "3492dbcc e502 44fd 9790 e3e45cb26c45", "actualobjecttype" "incident#", "objectid" "caa8b29a4d24464fa68dbf281d7505b9" }, "gridparams"\ null }, "promptparams" \[ { " type" "datalayer promptdata", "actionid"\ null, "actionobjectid"\ null, "promptobjectid" "caa8b29a4d24464fa68dbf281d7505b9", "actionobjecttype" "incident#", "promptobjecttype" "incident#", "value" "closed", "fieldname" "status", "isnewprompt"\ true }, { " type" "datalayer promptdata", "label" "select cause code", "actionid" "3492dbcc e502 44fd 9790 e3e45cb26c45", "actionobjectid" "caa8b29a4d24464fa68dbf281d7505b9", "promptobjectid" "caa8b29a4d24464fa68dbf281d7505b9", "actionobjecttype" "incident#", "promptobjecttype" "incident#", "value" "documentation request", "validlist" "incident cause code", "fieldname" "causecode", "fieldtype" "list", "fieldlength" 40 , "precision" 0 , "fieldareawidth" 400 , "fieldareaheight" 200 , "password"\ false, "required"\ true, "defaultvalue" "", "hidden"\ false, "isnewprompt"\ true }, { " type" "datalayer promptdata", "label" "is first call resolution?", "actionid" "3492dbcc e502 44fd 9790 e3e45cb26c45", "actionobjectid" "caa8b29a4d24464fa68dbf281d7505b9", "promptobjectid" "caa8b29a4d24464fa68dbf281d7505b9", "actionobjecttype" "incident#", "promptobjecttype" "incident#", "value"\ null, "validlist" "", "fieldname" "firstcallresolution", "fieldtype" "boolean", "fieldlength" 0 , "precision" 0 , "fieldareawidth" 0 , "fieldareaheight" 0 , "password"\ false, "required"\ false, "defaultvalue"\ null, "hidden"\ false, "isnewprompt"\ true }, { " type" "datalayer promptdata", "label" "resolution", "actionid" "3492dbcc e502 44fd 9790 e3e45cb26c45", "actionobjectid" "caa8b29a4d24464fa68dbf281d7505b9", "promptobjectid" "caa8b29a4d24464fa68dbf281d7505b9", "actionobjecttype" "incident#", "promptobjecttype" "incident#", "value" "test", "validlist" "", "fieldname" "resolution", "fieldtype" "text", "fieldlength" 4000 , "precision" 0 , "fieldareawidth" 400 , "fieldareaheight" 200 , "password"\ false, "required"\ true, "defaultvalue" "", "hidden"\ false, "isnewprompt"\ true } ] } \<font color="#ffffff">status code\</font> 200 quick action example assign an incident here is an example to assign an incident using a quick action url https //{tenant url}/api/odata/businessobject/incidents('{incident rec id')/assign incident \<font color="#ffffff">method\</font> post header name authorization jtw token/session key/rest api key \<font color="#ffffff">request payload\</font> click to view the request payload { "actionid" "ec205b17 09ab 4405 87aa 246f2dce3960", "shouldsave" true, "actionparams" { "gridparams" null, "formparams" { "actionid" "ec205b17 09ab 4405 87aa 246f2dce3960", "objectid" "c1b35dcea41542e1ad0ed58775795aba", "actualobjecttype" "incident#" } }, "promptparams" null } \<font color="#ffffff">status code\</font> 200 quick action example accept a task here is an example to accept a task using a quick action url https //{tenant url}/api/odata/businessobject/tasks('{task rec id}')/accept task \<font color="#ffffff">method\</font> post header name authorization jtw token/session key/rest api key \<font color="#ffffff">request payload\</font> click to view the request payload { "actionid" "e383dc0e 28b4 4e7a 9ac2 66248f991d71", "shouldsave" true, "actionparams" { "gridparams" { "actionid" "e383dc0e 28b4 4e7a 9ac2 66248f991d71", "recordids" \[ { "recordid" "c6cca4cec8094724900ef60993662a44", "objecttype" "task#assignment" } ] }, "formparams" null }, "promptparams" null } \<font color="#ffffff">status code\</font> 200 unsuccessful response missing mandatory information scenario trying to close an incident without providing the mandatory fields' information https //{tenant url}/api/odata/businessobject/incidents('e44d7f1b97534363b5fad9daaafaecf1')/close incident header name authorization sessionkey code ism 4000 description invalid request payload message \[ "required prompt paramter 'status' is missing", "required prompt paramter 'causecode' is missing", "required prompt paramter 'firstcallresolution' is missing", "required prompt paramter 'resolution' is missing" " ] \<font color="#ffffff">http status code\</font> 400
