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('E44D7F1B97534363B5FAD9DAAAFAECF1')/ 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": false, "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 |
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 |