# 3. Create Web Service Endpoints

We will create a custom web service endpoint for each integration that was setup in the previous step.

{% hint style="info" %}
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.&#x20;
{% endhint %}

### Add Web Service Endpoints

To create a web service endpoint to retrieve all customers from the **data** vault, log into Integration Gateway, 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&#x20;

* **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

<figure><img src="https://688288018-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1flQ2To8tQpCQWl2Ty9U%2Fuploads%2Fbjlm9ChtZPAoW6ZDVLUt%2Fimage.png?alt=media&#x26;token=1f3e5c6c-d3df-41b5-9a02-77af3e7f0ee4" alt=""><figcaption></figcaption></figure>

Click on the **Save** button below.

You should now see the web service endpoint on the **Swagger** page.

<figure><img src="https://688288018-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1flQ2To8tQpCQWl2Ty9U%2Fuploads%2FrCSAzIl2UM8AmK85pnfH%2Fimage.png?alt=media&#x26;token=6edf9f96-65d6-4dd3-827b-56cebe294fd4" alt=""><figcaption></figcaption></figure>

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}`).&#x20;

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&#x20;

* **Path** - `get_customer/{id}`
* **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

<figure><img src="https://688288018-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1flQ2To8tQpCQWl2Ty9U%2Fuploads%2FmhJZBuDXeQjjjDIeRxfi%2Fimage.png?alt=media&#x26;token=13f477a4-ce4c-4911-8dec-93e68a57c346" alt=""><figcaption></figcaption></figure>

Follow the same steps above and view the image below to create the remaining web service endpoints.&#x20;

{% hint style="info" %}
The path name for the update customer and delete customer web service endpoints also have an Id parameter.
{% endhint %}

<figure><img src="https://688288018-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1flQ2To8tQpCQWl2Ty9U%2Fuploads%2F0MmfzE9J2GPsoMsG8B7W%2Fimage.png?alt=media&#x26;token=71b170fe-4f81-4764-af0e-dd0f0785b915" alt=""><figcaption></figcaption></figure>

<figure><img src="https://688288018-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1flQ2To8tQpCQWl2Ty9U%2Fuploads%2FJPXrVz6u07fr6zoTZ4yk%2Fimage.png?alt=media&#x26;token=2f63321b-334f-473d-8f27-aaa3209f57aa" alt=""><figcaption></figcaption></figure>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://glyue.docs.sandboxbanking.com/tutorials/building-a-restful-crud-web-service/3.-create-web-service-endpoints.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
