If you want to expose methods to allow other systems to retrieve or manipulate information, you can do it using a REST API.
Create the REST API Service
- In the Logic tab, open the Integrations folder.
- Right-click REST and select Expose REST API...
- Set the name of your REST API. Example:
Create the REST API Method
- Right-click your REST API and choose Add REST API Method.
- Set the name of your REST API method. Examples:
- Make sure the HTTP Method property is set to the HTTP verb corresponding to the action your method will perform:
- GET – Read
- POST – Create
- PUT – Update
- DELETE – Delete
- Design the method as an action that retrieves or manipulates the data you are exposing.
GetContactswill return the list of all Contacts,
UpdateContactwill receive a "Contact" record and return the "Id" of the created or updated contact.
After deploying the application, your REST API endpoints will be accessible.
||Gets all contacts.|
||Gets a contact.|
||Creates a contact.|
||Updates a contact.|
||Deletes a contact.|
||Gets all addresses of a contact.|
The default endpoints are based in the HTTP Method (
DELETE) and the name of the REST API Methods, but you can customize the endpoints according to your needs.
For manipulation methods where the input parameter is a Record (such as
PUT), you will have to add the "Content-Type" header to the request, with the value