Retrieving work information related to an incident
To retrieve work information related to an incident, use the HPD:Help Desk form to get the HPD:INC:Worklog. To get the details of all the associations, you retrieve the Entry ID for the corresponding incident on the HPD:Help Desk form and then retrieve the associations related to the work information, that is the HPD:INC:Worklog.
The following video (6.25) demonstrates how to use the Postman REST API client to search for an entry.
The video was recorded using an earlier version of AR System, but is valid for AR System 9.x and later versions.
Use the following steps to get the Entry ID for a corresponding incident, from the HPD:Help Desk form.
- Open the Postman - REST Client.
- Create a token.
- Set the Request URL as http://serverName/api/arsys/v1/entry/HPD:Help Desk.
- Click URL Params.
Add a parameter q to search for incident number.
Ensure the value for the parameter is encoded properly. (See https://www.w3schools.com/html/html_urlencode.asp .)
For example, after adding qualification based on “Incident Number” field, the URL should look something like this:http://serverName/api/arsys/v1/entry/HPD:Help Desk?q=%27Incident+Number%27+%3D+%22INC000000000701%22
- Select the operation as GET.
- Click Headers.
Enter the following data as key value pair in the header:
Key Value Authorization AR-JWT <token generated> Content-Type application/json Click Send.
The plug-in returns a URL in the Location section for the related entry, for example:"_links": { "self": [ { "href": "http://<server-name>/api/arsys/v1/entry/HPD:Help%20Desk/INC000000000604" } ] }
To retrieve the Work Info Logs associated for an Incident number
The following video (5:14) describes how to use the Postman REST API client to get related entries by using associations..
The video was recorded using an earlier version of AR System, but is valid for AR System 9.x and later versions.
Use the following steps to retrieve all the related work information logs for the incident:
- Open the Postman - REST Client.
- Create a token.
- Set the Request URL returned in the previous procedure, for example:
http://serverName/api/arsys/v1/entry/HPD:Help%20Desk/INC000000000604 - Select the operation as GET.
- Click Headers.
Enter the following data as key value pair in the header:
Key Value Authorization AR-JWT <token generated> Content-Type application/json To fetch child entries via association, such as Work Info Logs, in our case, provide additional request parameters to include association name (can be found from dev studio) using URL parameter “fields”. For example, fields=assoc(HPD:INC:Worklog).
Click Send.
The plug-in returns a URL in the Location section to all related work information logs that are related to the corresponding incident, for example:Request URLhttp://<server name>/api/arsys/v1/entry/HPD:Help%20Desk/INC000000000027?fields=assoc(HPD:INC:Worklog)
"_links": { "self": [ { "href": "http://<server_name>/api/arsys/v1/entry/HPD:Help%20Desk/INC000000000604" } ], "assoc-HPD:INC:Worklog": [ { "href": "http://<server_name>/api/arsys/v1/entry/HPD:WorkLog/WLG000000000602" }, { "href": "http://<server_name>/api/arsys/v1/entry/HPD:WorkLog/WLG000000000603" } ] }
Related topic
Integrating AR System forms with a third-party application by using the REST API
Comments
Log in or register to comment.