Introduction to Web Services

It’s important for apps on different machines to communicate. To enable this, an app can expose APIs so remote components (other apps or devices) can access the app’s features. For example, one service could have a client app presenting information to users, a server app processing data in B2B setting, and an IoT device requesting data to do its work. Exposing web APIs lets external applications or devices communicate with yours.

Because Liferay DXP contains so many apps and features, it’s prudent for Liferay to let developers access those apps and features from external apps and devices by exposing their APIs. Additionally, Liferay’s development platform makes it easy to extend them and create new ones.

There are three different approaches for clients to connect to Liferay DXP’s web APIs:

Headless REST APIs: You can consume RESTful web services independent of Liferay DXP’s front end (hence headless). These APIs conform to the OpenAPI specification. This is the modern, preferred way to work with web services in Liferay DXP.

GraphQL: All the power of doing multiple queries in a unique request following GraphQL specification.

Plain Web/REST Services: This is the old way to build and consume web services in Liferay DXP, but is still supported.

You can also create your own Headless REST and GraphQL APIs through the REST builder.

Was this article helpful?
0 out of 0 found this helpful