Quick-Actions
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.
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.
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 |
Method |
POST |
Header Name | Authorization: JTW Token/Session Key/REST API Key |
Request Payload |
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 } ] } |
Status Code |
200 |
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 |
Method |
POST |
Header Name | Authorization: JTW Token/Session Key/REST API Key |
Request Payload |
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 } |
Status Code |
200 |
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 |
Method |
POST |
Header Name | Authorization: JTW Token/Session Key/REST API Key |
Request Payload |
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 } |
Status Code |
200 |
Unsuccessful Response
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" " ] |
HTTP STATUS CODE |
400 |