What is the overhaul? The mpro5 system has been providing an integration API facility for a while now using the SOAP (Simple Object Access Protocol) standard. Microsoft developed SOAP and it communicates using the XML format. While SOAP originally solved a lot of problems and has been the standard for a long time, i t has issues of its own. Some being – having to write lots of code to create the basic request structure and when you send a request through JavaScript the JSON format isn’t supported, meaning your requests have to use XML are larger and can affect speed.
Our API service now follows the REST (Representational State Transfer) Architectural style. This is a stateless client-server architecture where web services are resources and can be identified by their URIs. The benefits include it being : lightweight, stateless, easily testable and has an easy learning curve. However, REST is the architecture, not the protocol we are using. OData is the new protocol we are using. OData(v4) service s use JSON for the format of requests and have metadata provided about the service. The biggest benefit is the ability to query the GET endpoints which allow you to filter and build your own response from the server, reducing the number of requests you need to make and the code you need to write to construct your objects out of those responses. Another new feature is Swagger documentation – a framework for describing your API using a common language . The big benefit of this is that you will be able to navigate to the Swagger web page and get a list of all the endpoints that are available to use along with the required parameters. This documentation also generates automatically so you don’t have to worry about it becoming outdated.
The new service doesn’t yet have full coverage of all entities in the mpro5 system but we’ve got most of the big ones in such as: Jobs, Forms, Audits, Invoices etc. W e are continuing to add more entities all the time. We haven’t discontinued the SOAP services yet, but we are encouraging the use of the new services wherever possible.