What is REST?

REST stands for Representational State Transfer. REST is built on a web standard oriented architecture, and it uses HTTP Protocol for data exchange/communication. 

REST ensures access with HTTP standard methods in all environments where each component is a resource.

REST was introduced and developed by Roy Fielding in 2000 and some of its main features are:

  • REST Server ensures access to resources
  • REST Client accesses the same resources through the server
  • Each resource is defined as URIs/ global IDs.
  • REST uses various representations to present resources:
  • Text
  • JSON
  • XML
  • JSON – the most popular format used in web services.

HTTP Methods

The following well-known HTTP methods are used in REST based architectures as well.

  • GET – Ensures read-only access to resources.

  • PUT – Used to create a new resource.

  • DELETE – Used to delete a resource.

  • POST – Used to update an existing resource or to create a new resource.

  • OPTIONS – Used to find out valid operations over the resources

RESTFul Web Services

Web Service is a collection of open protocol and standards for data exchange between applications or systems.

Software applications may be written in various languages and running on different platforms. All these applications may be running on a single device or different devices on the internet. WS are used to perform data exchange between these applications. 

This interoperability is obtained by using open standards. (e.g. Java and Python or Windows and Linux.)

Web Services based on REST architecture are known as RESTful Web Services.

These Web Services use HTTP methods to apply REST architectural concept. A RESTful web service usually defines a URI (Uniform Resource Identifier) and represents resource with JSON and HTTP methods. 

RESTFul Web Service Examples

Sr. No.

HTTP Method

URI

Operation

Operation Type

1

GET

/UserService/users

Get list of users

Read Only

2

GET

/UserService/users/1

Get User with Id 1

Read Only

3

PUT

/UserService/users/2

Insert User with Id 2

Idempotent

4

POST

/UserService/users/2

Update User with Id 2

N/A

5

DELETE

/UserService/users/1

Delete User with Id 1

Idempotent

6

OPTIONS

/UserService/users

List the supported operations in web service

Read Only

Logo REST Service

Abbreviation

LO-REST

Compatible Programs

Tiger 3, Tiger Enterprise 3

Incompatible Programs

Go Plus, Go 3Bordro, Logo Start, Tiger Plus, Tiger Enterprise

Definition

Integration Tool

Logo REST Service is a Logo ERP interface that has the basic principles of REST and where you can use the abilities of Logo Object application. It is now supported by 3 Series Logo ERP products.

Since Logo REST Service runs Logo Objects in the background, you are recommended to review Logo Objects  (ENGLISH DOC SOON) documentation.

License

Logo REST Service does not have its own license. It uses the infrastructure of Logo Objects, meaning that you will need Logo Objects license in the system in order to run Logo REST Service.

Note that Logo REST Service runs only in 3 Series products of Logo. Older products do not support Logo REST Service.

Note: Logo App has Logo REST Service support. When you run Logo REST Service in the Logo App, no license (including Logo Objects) will be required.

 Installation

 The following screen appears in the final stage of Logo product installation.

If you check “Adjust Logo Rest Service settings" box, REST service will be installed and settings will be adjusted automatically, and it will run with default settings.  

ATTENTION

If you use a proxy and/or firewall, note that the ports requested by Logo REST Service may not be authorized since default installations will be secure HTTP installation.

Service may not respond.

In this case, you need to adjust your proxy and firewall settings according to the related ports.

Port authorization settings differ by the system and custom firewall applications. However, you can review firewall and proxy settings for REST service page for simple configuration in Windows.

Note that Server and Client certificates must be installed in order to use SSL after installation.

Visit Controlling REST Service Server and Client Certificates page to learn how to check if these certificates are available to use. 

Note: If https (SSL certificates) will not be used and communication will be conducted over HTTP, certificates that are installed on server and client side become null.

Installing or controlling certificates will not be required in data exchanges that are conducted over HTTP.

Architecture

 Logo REST performs standard CRUD (Create, Read, Update, Delete) operations of software developers by using HTTP commands, and it conducts HTTP and https (secure HTTP) communication without needing IIS server.

Logo REST operation architecture can be summarized as below.

REST client license control is performed over License Server.

You perform license controls for Logo Objects client over the LogoSet.cfg file in server.

Logo App can use REST interfaces without any license control.

The followings are the basic features:

  • It is developed with.Net Framework.
  • It can use Http and https protocols and desktop, mobile and web applications that communicate through these protocols.
  • It uses JSON format for communication.
  • Data Exchange is performed via Logo Objects in the background.
  • Therefore, it has all data exchange abilities of Logo Objects.
  • It is designed to run in multi-thread mode.
  • It ensures secure communication with SSL certificates.
  • Database queries can be authorized. (For example, you can allow Select queries only and do not return insert-update calls.) 

Comparing REST Function by the Products

REST is provided in two different ways in our products.

  1. REST that is provided for Logo App
  2. REST provided over LogoObjects/NetOpenX integration tools

REST that is provided over Logo Objects has been applied a little differently in terms of functionality. These differences can be summarized as below:

  • CAPI (management interface used to add firm, terminal etc.) is read-only with REST in Logo Objects.
  • Few interfaces that are defined in Logo Objects, yet are not used, are not transferred to REST. 
  • Below is a comparison of services provided with Logo Apps and Integration Tools (Logo Objects, NetOpenX). 

 

Logo Apps REST

Logo Objects REST

NetOpenX REST

Netsis3

Tiger3

Go3

Data Object

All Data Objects

Cards+Slips

Cards

Cards+Slips

All Data Objects

Methods

All (NetOpenX)

All  (Logo Objects)

All  (Logo Objects)

All  (Except for Logo Objects Production Application )

All  (NetOpenX)

License

Not Required

Not Required

Not Required

Required

Required

Let’s summarize operational steps below.

  • Access Control

Before any operation, software developer requests an access token from service. This request contains the user name and password of a standard user that is registered in Logo product and the number of the required company. If REST service accepts this request, it returns token info in JSON format.

  • Operation

Software developer sends the required operation information to REST service along with the abovementioned token info. This operation may be any kind of data operation (e.g. order slip transfer, dispatch billing, debt closing etc.) or application object or query operation. When REST service accepts the call, it returns in JSON format.

  • Finalizing Operation

The session may be left open after the operation or it can be terminated by the software developer. Unless it is terminated, access token information that is retrieved in the first step will be disabled automatically after a period that is designated parametrically. You can give additional time for the access token with methods that we will discuss later.

Installation with LogoRestServiceSetup.exe

LogoRestServiceSetup.exe is available under the RESTServis folder in Logo product installation folder. 


SERVER INSTALLATION

  • Run RestServiceSetup.exe file with right click > Run as an administrator option.

Select “Adjust Logo Rest Service Server Settings” option and click Start

CLIENT INSTALLATION

  • Copy RESTService directory to the client.
  • Run RestServiceSetup.exe file with right click > Run as an administrator option.
  • Select "Adjust Logo Rest Service Client Settings” option and click Start.

 ATTENTION:

  • If service has already been installed, you may not be able to stop running service. In this case, you can kill the service by using LogoObjects.RestServiceWS.exe process ID.

 ( TASKKILL /PID {PID} /F ) 

  • If Logo Objects is not registered, service may be pending. (see. Registering Logo Objects
  • If you did not create an exception for firewall, localhost calls may encounter timeout error after a while, or if the firewall is disabled in the related device, yet a proxy is defined, localhost runs; however, it does not notify IP and port info. In this case, Bad gateway52 error occurs. For a solution, see. Firewall and Proxy Settings for REST Service


Firewall and Proxy Settings for REST Service

If you use a firewall and/or proxy, you need to disable the applications and authorize the ports that Logo REST Service is using for communication. We provided some basic information below. However, you’ll need to check out help pages of other custom applications you’re using.

It is in Windows Control Panel. If you want an application bypass firewall during communication, you need to add this application to exceptions list as shown below. 

Select “Allow an app or feature through Windows Firewall” and click “Allow Another App…” option. 

After that select LogoObjects.RestServiceWS.exe application in RestService folder under the installation folder. 

Select the network type in Choose Network Type window. 

Go to the Control Panel > Internet Options to disable Proxy settings.

 

You can adjust proxy settings under Connections tab > LAN Settings section. 

Controlling REST Service Server and Client Certificates

Right-click Command Prompt and click Run as administrator, and then run mmc.exe

Add a Certificates snap-in by clicking File > “Add / Remove Snap-in” in the console that opens to see the Certificates. 


After making Certificates viewable in console screen, right-click on Certificates, and select “Find Certificates…” option, and then search LOGO. CALogoDevRoot certificates for both client and server should be visible. Note that you will not see certificates of which Issued To value is localhost if you don't run in the client device or you don't run mmc.exe as administrator.

Logo REST Service Settings

Description

Screen Shots

Run LogoObjects.RestService.RestServiceWSManager.exe in RESTService folder under the installation folder of Logo product in order to open management dashboard to manage and authorize Logo REST Service.

 

After installing Logo REST Service, open service management tool and update related HTTP and/or https host addresses.

Other parameters are default settings.

After updating the settings, click Save button to save updates.

Then click Stop and Start buttons respectively to ensure that your changes will apply after restarting the service.

General Settings

Service Address (Http): It is the definition of HTTP host address information of the REST Service. It must be updated with IP address of the Service. 

Service Address (Https): It is the definition of https host address information of the REST Service. It must be updated with IP address of the Service. 

Note that certificates must have been installed to be able to use the https side.

If you run into any problems, review REST Service Installation file.

Default Query Record Limit:

It refers to the default number (unless page record number is designated exclusively for query parameters) of records that “GET” queries - requested by using pagination method - return in REST Service object queries.

Default Query Maximum Record Limit:

It refers to the maximum page record number that can be requested with pagination method in REST Service object queries.

 

Other Settings

Com Obj. Max Memory Size: It is the memory size of LObjects.exe.

In the case of exceeding default memory limit, the session is terminated and restarted.

Max. Thread Number: It is the maximum number of threads that REST Service can run in the background.

Min. Thread Number: It is the minimum number of threads that REST Service can run in the background.

Thread Duration (Queue Idle) (Min.): It designates how long, in minutes, a thread can remain idle.

Max. Thread Number Per Session: It is the maximum number of threads that can be run in the background per sessions started by User or Firm. 

 Access Token Validity Duration (min.): 

It designates access token validity time, in minutes, after user requests access token.

Refresh Token Validity Duration (min.): 

It designates refresh token validity time, in minutes, for the token user obtains after making the request.

Application Directory:  

It is the folder directory where related Tiger application is installed for the REST Service. If you don’t designate a directory, it will use the parent folder of the REST Service folder path. The default REST Service folder directory is under the installation folder of Tiger application. Example: Default application folder is “c:\Tiger” for the REST Service that is located in “C:\Tiger\RestService” folder.

Allow Advanced Queries:

It defines whether SQL query functionality of REST Service should allow queries such as INSERT, UPDATE, DELETE etc. and other detail query operations.

Allow Join Queries: 

It defines whether SQL query functionality of REST Service should allow JOIN queries.

Allow Function Queries: It defines whether SQL query functionality of REST Service should allow FUNCTION queries.

Allow Procedure Queries: It defines whether SQL query functionality of REST Service should allow PROCEDURE queries.

Allow Delete Queries: It defines whether SQL query functionality of REST Service should allow DELETE queries.

Allow Merge Queries: It defines whether SQL query functionality of REST Service should allow MERGE queries.

Allow Insert Queries: It defines whether SQL query functionality of REST Service should allow INSERT queries.

Allow Update Queries: It defines whether SQL query functionality of REST Service should allow UPDATE queries.

Create File Log: It defines whether log information that REST Service will produce in the configured level should be created in the specified directory files. 

File Log Path: 

REST Service log records are produced in the designated directory and file.

Log Level: It indicates the REST Service Log Level. The default log level is defined as “Error”.

Log levels are as below:

Fatal: Logs critical errors.

Error: Logs all types of errors.

  • Warning: Logs warnings as well.
  • Info: Logs information messages as well.
  • Verbose: Logs each step in the Service.

 

You can trace log information under Computer Management console > Event Viewer > Applications and Services Logs  > LogoObjectsRestService heading.

 









Telif HakkıKullanım KoşullarıGizlilik
Copyright © 2018 Logo Yazılım