3. Create Web Service Endpoints
Last updated
Last updated
We will create a custom web service endpoint for each integration that was setup in the previous step.
All integrations can be exposed via the standard integrations/execute/..
HTTP endpoint. However, a custom web service endpoint will allow you to choose a specific RESTful method (e.g. GET, POST, PUT, PATCH, and DELETE) so that the method reflects the type of web service being called.
To create a web service endpoint to retrieve all customers from the data vault, log into Glyue, if necessary and navigate to the Admin site.
Scroll to the Configuration section, locate Web service endpoints and click Add.
On the Add Web service endpoint page, fill in the fields with the following information
Path - get_all_customers
Method - Get
Prefix - api
Integration - get_all_customers
Description - This endpoint will retrieve all customers from the data vault.
Response content type - application/json
Click on the Save button below.
You should now see the web service endpoint on the Swagger page.
The web service endpoint to retrieve a specific customer requires a path parameter for the Id number. In the path field of a web service endpoint, parameters are enclosed with curly braces (e.g. path/{parameter}
).
To create the web service endpoint to retrieve a specific customer by Id, add another integration config and fill in the fields with the following information
Path - get_customer
Method - Get
Prefix - api
Integration - get_customer
Description - This endpoint will retrieve a specific customer from the data vault using their Id.
Response content type - application/json
Follow the same steps above and view the image below to create the remaining web service endpoints.
The path name for the update customer and delete customer web service endpoints also have an Id parameter.