How to create a Task request using rest API to attach it to an incident request? |
This knowledge article may contain information that does not apply to version 21.05 or later which runs in a container environment. Please refer to Article Number 000385088 for more information about troubleshooting BMC products in containers. In order to utilize Rest API to create a Task and assign it to an incident request you need a few items first. You will need to following items from the incident record. TIP: You can get these by running a report and exporting the fields to CSV file for quick reference from the incident screen 1. Request ID 2. Instance ID 3. Assignee ID. You can get this from the people record the task will be assigned to. It starts with PPLxxxxxxxx Once you have the required Incident Items you will open up Postman. The first step is to get the Token from Remedy. PART ONE: Find out about REST and AR System: https://docs.bmc.com/docs/ars1902/learning-about-the-rest-api-931131942.html Get a token as required. You can obtain the token using the following documentation. https://docs.bmc.com/docs/ars1902/authentication-and-permissions-in-the-rest-api-847208964.html PART TWO: Now that you have your API KEY, Lets create the task request. Headers ....................
....................Host: ServerName:8008/api/arsys/v1 Authorization: AR-JWT <TOKEN HERE> Content-Type: application/json Body Replace highlighted values with correct entries. If it is not highlighted, set the value as the example contains. The image below will show an example from Remedy Sample data using Postman. .................... {"values": { "TaskName": "TaskName", "Summary": "Summary of Task", "TaskType": "Manual", "RootRequestID": "Incident Request ID", "Submitter": "Login ID of person submitting Task", "Notes": "Task Notes Entry", "Location Company": "Company of Task", "RootRequestInstanceID": "Incident request Instance ID", "RootRequestName": "Incident ID", "RootRequestMode": "0", "RootRequestFormName": "HPD:Help Desk", "Support Company": "Company Name", "Assignee Organization": "Organization of support group", "Assignee Group": "Support Group name", "Assignee Id": "PPL Id record of assignee", "Assignee": "First and last name of task assignee", "Assigned To": "First and last name of who is being assigned" .................... Screenshot: Click the send button, and verify the Task was created. A result in the 200 range means it was successful |