Templates
Applies a template to a business object. For example, when creating an incident, you can choose to apply a template which is a frequently occurring incident such as outlook not working, printer not working, or emails bouncing. When the template is applied, most of the fields are auto-filled as per the template.
You can get the template name from the Metadata API.
Base URL:
https://{tenant url}/api/odata/businessobject/{business object name}('{business object unique key}')/{template name}
Ensure the business object name is suffixed with an "s".
Here is an example to apply Backup Failure template to an incident.
| URL | 
                                                                 https://{tenant url}/api/odata/businessobject/incidents ('7133EDB8A33D42E9B3F6FC440BDDD19A')/Backup_Failure  | 
                                                        
| 
                                                                 Method  | 
                                                            
                                                                 POST  | 
                                                        
| Header Name | Authorization: JTW Token/Session Key/REST API Key | 
| 
                                                                 Request Payload  | 
                                                            
                                                                 { "ActionId":"e8522ea7-ca0b-4656-beb5-ea708f1b56eb", "shouldSave":true,"data":null,"actionParams":{"GridParams":null,"FormParams": {"actionId":"e8522ea7-ca0b-4656-beb5-ea708f1b56eb","objectId": "7133EDB8A33D42E9B3F6FC440BDDD19A","actualObjectType": "Incident#"}},"promptParams":null }  | 
                                                        
| 
                                                                 Status Code  | 
                                                            
                                                                 200  | 
                                                        
Unsuccessful Response
Scenario: Trying to apply a template to an incident with blank Action ID in the request body.
https://{tenant url}/api/odata/businessobject/incidents('7133EDB8A33D42E9B3F6FC440BDDD19A')/Backup_Failure
Header Name:
Authorization: Sessionkey
| Code | ISM_4000 | 
| Description | Invalid Request Payload | 
| Message | 
                                                                 [ "Action ID cannot be blank, please provide a valid Action ID and try again" ]  | 
                                                        
| 
                                                                 HTTP STATUS CODE  | 
                                                            
                                                                 400  |