Service REST methods
You can use the following methods when you configure Service REST rules.
- GET – Retrieve the current state of the data.
- POST – Create a data object. For example, you can create a new contact for a new employee.
- PUT – Update an entire data object. For example, you can change all the information contained in a contact, such as name, phone number, and address.
- PATCH – Partially update a data object, for example, to change the last name of a contact.
- DELETE – Delete the data object.
For each method, you map data for the request, and then specify how the service rule constructs the response that Pega Platform sends in reply to the request.
- Creating a request for GET and DELETE methods by using an activity implementation
Create a request for your service so that you can define an external API over REST that customers can call for their application. To create the request, select an activity, and map the request headers, resource path parameters, and query string parameters to the parameters or primary page of the activity.
- Creating a request for GET and DELETE methods by using an automation implementation
Create a request for your service so that you can define an external API over REST that customers can call for their application. To create the request, select an automation, and map the request headers, resource path parameters, and query string parameters to the inputs of the automation.
- Creating a request for POST, PUT, and PATCH methods by using an activity implementation
Create a request for your service so that you can define an external API over REST that customers can call for their application. To create the request, select an activity, and map the request headers, resource path parameters, query string parameters, and request message data to the parameters or primary page of the activity.
- Creating a request for POST, PUT, and PATCH methods by using an automation implementation
Create a request for your service so that you can define an external API over REST that customers can call for their application. To create the request, select an automation, and map the request headers, resource path parameters, and query string parameters, and request message data to the inputs of the automation.
- Creating a response for Service REST methods by using an activity implementation
For the GET, PUT, POST, PATCH, and DELETE methods, specify how the service rule constructs the response that Pega Platform sends in reply to the request. You can set up more than one response, based on conditions. You can also specify additional HTTP response codes to send with the response.
- Creating a response for Service REST methods by using an automation implementation
For the GET, PUT, POST, PATCH, and DELETE methods, specify how the service rule constructs the response that Pega Platform sends in reply to the request. You can set up more than one response, based on conditions. You can also specify additional HTTP response codes to send with the response.
Previous topic Defining resource and processing details for a Service REST rule Next topic Creating a request for GET and DELETE methods by using an activity implementation