Skip to main content
This content has been updated. Click here to continue your progress on the latest version.

Exposing an application as a service

Exposing an application as a service

The two most common ways to expose your application as a service are: to create a web service or to leverage the Pega API.

Conceptually, these two options work the same way: a request is made to a URL, and a response is returned. The difference is how you communicate with the service.

Leveraging the Pega API

The Pega API provides a standard set of services that includes new case creation, assignment processing, and access to data pages. These built-in REST/JSON services enable the rapid implementation of Pega-powered mobile and client applications.

rest service

You can call any of the Pega API services by using standard HTTP methods (for example, GET, POST, or PUT). Refer to the Pega API resources page in Dev Studio or App Studio to see details of the request and response data requirements. 

Tip: In Dev Studio, click the Resources menu > Pega API. In App Studio, click Interfaces > Pega API.
Resourses pega api updates

This documentation is also available in JSON format in the Docs API (GET/docs).

Resource Description
Assignment API Provides the ability to obtain a list of assignments for a user, obtain the details of any specific assignment, and perform an assignment action
Authenticate API Allows you to verify user credentials
Cases API Provides the ability to obtain a list of cases for a user, create a new case, obtain case details, and update a specific case
Casetypes API Provides the ability to obtain a list of case types for the authenticated user
Data API Facilitates the process of obtaining the contents of a data page and obtaining the metadata for a specific data page
Docs API Provides access to the complete documentation for the Pega API

You can learn more about the Pega API on Pega Community at Pega APIs and services.

Creating a SOAP service

When you have a requirement to implement a SOAP web service to expose your application to other applications, you do this by creating a service. SOAP web services communicate using the SOAP protocol and pass XML messages from one application to another. Your application needs to convert that XML message to Pega objects to process them and then convert those Pega objects back to XML after the processing is complete.

soap service

A SOAP service uses a combination of rules to process a request. The rules you use are:

Rule Description
Service activity Provides the processing for a service rule
XML Parser Maps data from an XML message into clipboard property values
XML Stream Assembles and sends an XML document in an email message, a SOAP message, a file, or other types of messages
Service Package Groups one or more service rules that are designed to be developed, tested, and deployed together

These rules work together to process a request and send a response back to another application. The following diagram shows how Pega processes a service request.

service processing
  1. A client application sends a request to your application.
  2. The service listener listens for incoming requests. This functionality is provided by either the Web Server, Application Server, or Pega Listener.
  3. The service listener receives the request and instantiates the Service API to provide communication with Pega. Then, the Service API hands control over to Pega.
  4. Pega looks up the service package and related service rule, using the access group specified in the service package.
  5. Pega then establishes the service requestor and optionally performs authentication based on security credentials that are passed in the request. Once authenticated, service processing continues using the authenticated user’s access group, not the access group that is contained in the service package.
  6. The request is mapped, using the instance of an XML Parser rule, onto the clipboard according to the specifications contained in the service rule.
  7. Control is passed to the service activity, which provides the logic for the service.
  8. The service rule maps the clipboard data to form the response data, using the XML Stream rule.
  9. The service listener receives the response from the Service API.
  10. The service listener sends the response back to the application that made the request.
  11. The client application receives the request.
Note: Both service package and service listeners perform authentication. The authentication that you define on the service listener helps connect Pega Platform to an external source. The authentication that you define on the service package helps to connect an external source to the Pega Platform.
If you are having problems with your training, please review the Pega Academy Support FAQs.

Did you find this content helpful?

100% found this content useful

Want to help us improve this content?

We'd prefer it if you saw us at our best.

Pega Academy has detected you are using a browser which may prevent you from experiencing the site as intended. To improve your experience, please update your browser.

Close Deprecation Notice