Example of using the platform REST API to create an incident request
To use the REST API to create an incident request
Use the /entry/{formName} URL to create an incident entry on a form. Perform the following steps to create an entry:
- Open the Postman - REST Client.
- Create a token.
- Set the Request URL as:
http://serverName:port/api/arsys/v1/entry/HPD:IncidentInterface_Create
?fields=values(Incident Number) - Select the operation as POST.
- Click Headers.
Enter the following data as key-value pair in the header:
Key
Value
Authorization
AR-JWT <token generated>
Content-Type
application/json
- Select raw.
- From the list, select JSON.
Enter the JSON input for creating an entry:
{
"values": {
"First_Name": "Allen",
"Last_Name": "Allbrook",
"Description": "REST API: Incident Creation",
"Impact": "1-Extensive/Widespread",
"Urgency": "1-Critical",
"Status": "Assigned",
"Reported Source": "Direct Input",
"Service_Type": "User Service Restoration"
}
}(Optional) Alternatively, enter the JSON to create an incident from a template:
{
"values": {
"Description": "Summary limited to 100 characters",
"Detailed_Decription": "Notes Unlimited",
"TemplateID":"AGHAA5V0AAFM7ANPGENXBFRLQBAZSH",
"Company":"Your Company",
"First_Name":"Allen",
"Last_Name":"Allbrook",
"z1D_Action":"CREATE"
}
}
- Click Send to send the request.
- Click Headers in response.
The plug-in returns a URL in the Location section for the newly created entry.
Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*