RESTful SAP Business One
RESTful SAP Business One services
KB1REST is a web service to provide Simple Customer REST Functionality for SAP Business One. KB1REST supports SAP Items and AP/AR document types, utilizing standard REST commands like GET to retrieve data and PUT/POST to update or insert data. The KB1REST uses JSON as the preferred structured format for its size, portability and ease of use.
KB1REST Design Model
KB1REST was created utilizing remote-service best-practices. Its message-based design provides the most advantages for remote services exchange of data between systems.
Being developed on top of raw ASP.NET HTTP Handlers has many benefits. One of them is that we're built on top of the ASP.NET HTTP abstractions, so we're able to easily integrate with other ASP.NET frameworks like ASP.NET MVC.
KB1REST deploys Google's Fast Protocol Buffer Format for high-performance, compact binary wire format. This format was invented by Google who uses it for almost all of its internal RPC protocols and file formats.
Along with the standard security and restrictions already built into IIS, KB1REST includes the ability to limit the visibility and accessibility of services by groups.
These fine-grained restriction scenarios are defined through SAP Business One Add-on which is included in the KB1REST solution. The restriction scenarios allow for read only, read/write or no access permissions at a group level for each service.
Service groups can be customized to meet the needs of the business. Assigning users to groups simplifies maintaining, adding and restricting services.
As validation and error handling is an essential part of services, KB1REST provides a rich array of error handling options and messaging that work out-of-the-box, emitting the appropriate HTTP Status Codes and error responses detailing data format and validation errors on the wire.
The message response contains more than just validations and errors and is configured in the SAP Business One Add-on to include additional information. Example: The remote system sends a new sales order to be added to SAP. The newly created SAP document number DocEntry and DocNum are returned in the message response for storage in the remote system.
All transaction requests that make it to the Web Services are logged, giving complete visibility to inbound requests to the Web service from remote systems. Errors, warnings and other event types can be configured to send information to users via the “Messages/Alerts Overview” form in SAP Business One.
POST or PUT
When sending a POST or PUT, all writable fields in the SAP Business One document are available including UDFs. For the remote system to add data to SAP fields or UDFs, it simply needs to add the field name and data value to the JSON.
When a GET request is made to the Web Service, data from SAP Business One is gathered and sent to the remote system.
To limit data size returned to just the data needed or to protect sensitive data, profiles are created through the KB1REST Add-on. Only the database fields selected in the configuration are returned to the remote system.
KB1REST SAP Business One Add-on
The SAP Business One Add-on has a rich set of tools for configuration and maintenance of the KB1REST solution. The GUI interface is designed to simplify setup, security, profiles and more, right from the SAP Business One client application.
Users are defined as individuals or a remote system of the Web Services.
Each user has a unique set of credentials that identify that user. In addition, each user is assigned a unique hash key to identify them in the system. This hash key is passed with each service request to validate access rights for the service requested.
Groups are a collection of users with defined access rights to use each web service. A group can be granted read, read/write or no access to each web service. This allows a company to expose only the data required by the remote system.
A Profile defines the GET request data fields that will be returned to the remote system. Each web service offered to the remote system can have multiple profiles for the same web service.
Youtube demo of an old version of the KB1REST product for your entertainment and me laughing at myself (Technical people can be so... technical).
We created a custom RESTful service in 2013 for a client believing it was going to be a one time deal. There was already similar types of solutions being offered for SAP Business One. To date we have now created 3 custom versions of Restful services to meet individual client needs. The feedback we have received lead us to believe the KB1REST would make for a great SAP Business One community product.
You can cast a vote on this product by sharing this page with the hashtag #KB1REST .The shares are counted to gauge interest in this product.
Your participation is greatly welcomed and your constructive input and ideas very much appreciated. We'd love to hear what you think. Share your thoughts with us by writing your comments below.