# Configure Routes and Upstreams

Once you have created an API instance in the API Gateway, the next step is adding and editing routes to define how your API handles incoming requests.

### Edit Routes

1. Go to **Menu** > **Management** > **API Gateway**.
2. In the list of your created instances choose one instance and go to **OPTIONS** - **Edit routes**.

![Edit Routes](https://1737632334-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MifAzdGvKLDTtvJP8sm%2Fuploads%2Fgit-blob-9e338b7d98eee2b5d782992ade6ed0d5549cadd3%2Fapigw-edit-routes.png?alt=media)

3. Enter the following details in the **Routes** window:

* **Route Properties:**
* Route name: Provide an appropriate name.
* Path: Define the endpoint for the route.
* Methods: Choose the HTTP method (GET, POST, PUT, DELETE) the route will support.
* Web Socket: on/off
* Protocol: HTTP

![Route Properties](https://1737632334-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MifAzdGvKLDTtvJP8sm%2Fuploads%2Fgit-blob-f0a7e346828e716e34ae203b639de7ecd031425f%2Fapigw-route-properties.png?alt=media)

* **Upstreams:**

{% hint style="info" %}
**Note:**

* You should add at least one upstream to your route.

* The hostname must be publicly accessible and [<mark style="color:blue;">RFC 1123</mark>](https://docs.ionos.com/support/general-information/contact-information) compatible.
  {% endhint %}

* Host: Enter IP or public URL

* Load balancer Algorithm: Choose between roundrobin and least\_connections

* Weight (optional)

* Scheme: Choose a scheme, such as HTTPS, GRPC, etc.

* Port

4. Click **Save** to create the route.

![Click Save](https://1737632334-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MifAzdGvKLDTtvJP8sm%2Fuploads%2Fgit-blob-e3402fc7c5e64a75531b700fd2e177487c77f749%2Fapigw-create-route-save.png?alt=media)

{% hint style="info" %}
**Result:** Your route is now created.
{% endhint %}

You can now add new routes and edit the existing ones.


---

# 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://docs.ionos.com/cloud/~/revisions/AMiYziCllTKB2y2lmONY/serverless/api-gateway/dcd-how-tos/configure-routes.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.
