PROLIN Power Server REST API *updated*
With the 2016 release of the PROLIN Smart Suite we introduced the REST API for Smart Suite enabling the GET operation.
With Smart Suite 2020 we have hugely extended the REST API functionality. We invested a significant effort to also support additional operations: POST to create, PATCH to edit and DELETE to remove items.
In addition, we have implemented the specification that allows users to edit references and reference sets, such as Service Request’s Caller, a Change’s work orders, the assignment of an item etc.
Next to that we have also implemented authentication and authorization flows to ensure that access to items and specific operations on items comply to the access rights given to users.
Compliance with the OData specification allows for a generic solution that can be integrated with and leveraged by any product conforming to this industry standard.
Use case: Getting started with the REST API.
The REST API provides the capability for the development of integrations between existing systems and PROLIN Smart Suite. Creating items such as Service Calls, Incidents, Problems, etc. from other management products (Alerts raised by network device management software for instance) leverage PROLIN Smart Suite to provide information about staff (CI, Services, etc.) to other applications or even dynamically link PROLIN Smart Suite with Workflows in other open systems.
Where the HPSD Web API required programming, the Smart Suite REST API makes the implementation of integrations a lot less complicated and far more powerful.
In this Feature Focus we want to provide a quick view of the REST API which allows you to GET information from the Smart Suite database as well as POST, UPDATE and DELETE functionality.
Getting started:
In the Server Configuration section of the PROLIN Server Management Console (see Feature Focus #10: PROLIN Server Management Console) you can activate the Service and set the Port that the REST API is communicating on. In the security section, you can control the access on the IP address to avoid unauthorized access.
Any and all authorization defined on the server applies to REST API operations in the same way it does in the Smart Client, since authentication is required for accessing the API. This means that, e.g., a user not authorized to create new items will not be allowed to create am item through the REST API.
Once the service has been activated it can connect to the REST API endpoint on the selected port.
Browse the metadata page of the rest API to see the supported entities:
http://:5181/odata
Currently supported entities are:
ServiceRequests (Service Calls)
Problems
Changes
Incidents
ConfigurationItems
Workorders
EmailServiceRequests
Services
Persons
Organizations
The URL/URI can be used to send a HTTP request to the Power Server. The Power Server will then return the information in XML format to be used for further processing.
Some examples:
To Search for a specific Service Call by ID use:
http://:5181/odata/ServiceRequests?$filter=ID Eq
This will return the information for the specific service call
http://:5181/odata/problems?$filter=Description Eq ‘’
Returns all Problems with the in the description.
The returned result can be manipulated by adding additional operators such as $orderby=Uid desc which will sort the returned result by Uid.
It is also possible to select or expand the fields returned by the operation for each item, in order to limit unneeded information returned, or to retrieve additional information and relations from the returned items, with the use of OData’s $select and $expand keywords.
Creating a new item is also simply a matter of performing a POST operation with the content of the item the user wants to create.
The url used in this case would include a POST HTTP operation. The only thing needed is to provide the required fields for creating a problem, within a json object in the POST request’s payload. E.g.
POST http://myserver:5181/odata/ServiceRequests HTTP/1.1 Content-Length: 247 Content-Type: application/json { 'Description': 'Printer is not working properly.', 'Information': 'The printer in room 14C is causing paperjams all the time.', 'Medium': { 'Text': 'External', 'Value': 12783238 }, 'Status': { 'Value': 3120234513, 'Text': 'Waiting' }, 'Impact': { 'Value': 3094610021 } }
In addition to text, date, code etc. Values it is also possible to manipulate relations and sets of relations, e.g. a service request’s workorders, caller, or the assignee person etc.
For more information about the REST API see the reference manual, available upon request.
Conclusion
The current version of the REST API supports retrieving items with the GET operation, creating items with the POST operation, updating items with the PATCH operation and removing items with the DELETE operation. It currently exposes a significant subset of the above-mentioned entities, which can also be extended according to customers’ needs.
This allows you to integrate with a wide variety of other products.
PROLIN staff are available to assist in creating basic as well as complex integrations to any application that supports REST API.