Routes
A route is a rule that maps an incoming request to a specific backend service.
This tag groups all operations for routes.
This endpoint enables retrieving all Routes using pagination and optional filters.
The ID (UUID) of the Gateway.
0620c174-dd3c-5eb4-87c8-e2b516553a00
The first element (of the total list of elements) to include in the response. Use together with limit for pagination.
0
Example: 0
The maximum number of elements to return. Use together with offset for pagination.
100
Example: 100
The field to order the results by. If not provided, the results will be ordered by the default field.
-createdDate
Possible values: GET /gateways/{apigatewayId}/routes HTTP/1.1
Host: apigateway.de-txl.ionos.com
Authorization: Bearer JWT
Accept: */*
{
"id": "38ec142f-7b7b-5707-83ba-4db7f8286cfb",
"type": "collection",
"href": "/gateways/{apigatewayId}/routes",
"items": [
{
"id": "50982018-bb17-5cb9-bcd4-97f8bbc7dc23",
"type": "route",
"href": "/gateways/{apigatewayId}/routes/50982018-bb17-5cb9-bcd4-97f8bbc7dc23",
"metadata": {
"createdDate": "2020-12-10T13:37:50+01:00",
"createdBy": "ionos:identity:::users/87f9a82e-b28d-49ed-9d04-fba2c0459cd3",
"createdByUserId": "87f9a82e-b28d-49ed-9d04-fba2c0459cd3",
"lastModifiedDate": "2020-12-11T13:37:50+01:00",
"lastModifiedBy": "ionos:identity:::users/87f9a82e-b28d-49ed-9d04-fba2c0459cd3",
"lastModifiedByUserId": "87f9a82e-b28d-49ed-9d04-fba2c0459cd3",
"resourceURN": "ionos:<product>:<location>:<contract>:<resource-path>",
"status": "AVAILABLE",
"statusMessage": null,
"publicEndpoint": "jf8u4tgr73sd-ag.87uhr654gq90.apigateway.de-txl.ionos.com"
},
"properties": {
"name": "example-route",
"type": "http",
"paths": [
"/foo/*",
"/bar"
],
"methods": [
"GET",
"POST"
],
"websocket": false,
"upstreams": [
{
"scheme": "http",
"loadbalancer": "roundrobin",
"host": "www.example.com",
"port": 80,
"weight": 100
}
],
"cache": {
"enable": true,
"httpMethods": [
"GET"
],
"httpCodes": [
200
]
}
}
}
],
"offset": 0,
"limit": 42,
"_links": {
"prev": "http://PREVIOUS-PAGE-URI",
"self": "http://THIS-PAGE-URI",
"next": "http://NEXT-PAGE-URI"
}
}
Creates a new Route.
The full Route needs to be provided to create the object. Optional data will be filled with defaults or left empty.
The ID (UUID) of the Gateway.
0620c174-dd3c-5eb4-87c8-e2b516553a00
Metadata
POST /gateways/{apigatewayId}/routes HTTP/1.1
Host: apigateway.de-txl.ionos.com
Authorization: Bearer JWT
Content-Type: application/json
Accept: */*
Content-Length: 308
{
"metadata": {},
"properties": {
"name": "example-route",
"type": "http",
"paths": [
"/foo/*",
"/bar"
],
"methods": [
"GET",
"POST"
],
"websocket": false,
"upstreams": [
{
"scheme": "http",
"loadbalancer": "roundrobin",
"host": "www.example.com",
"port": 80,
"weight": 100
}
],
"cache": {
"enable": true,
"httpMethods": [
"GET"
],
"httpCodes": [
200
]
}
}
}
{
"id": "50982018-bb17-5cb9-bcd4-97f8bbc7dc23",
"type": "route",
"href": "/gateways/{apigatewayId}/routes/50982018-bb17-5cb9-bcd4-97f8bbc7dc23",
"metadata": {
"createdDate": "2020-12-10T13:37:50+01:00",
"createdBy": "ionos:identity:::users/87f9a82e-b28d-49ed-9d04-fba2c0459cd3",
"createdByUserId": "87f9a82e-b28d-49ed-9d04-fba2c0459cd3",
"lastModifiedDate": "2020-12-11T13:37:50+01:00",
"lastModifiedBy": "ionos:identity:::users/87f9a82e-b28d-49ed-9d04-fba2c0459cd3",
"lastModifiedByUserId": "87f9a82e-b28d-49ed-9d04-fba2c0459cd3",
"resourceURN": "ionos:<product>:<location>:<contract>:<resource-path>",
"status": "AVAILABLE",
"statusMessage": null,
"publicEndpoint": "jf8u4tgr73sd-ag.87uhr654gq90.apigateway.de-txl.ionos.com"
},
"properties": {
"name": "example-route",
"type": "http",
"paths": [
"/foo/*",
"/bar"
],
"methods": [
"GET",
"POST"
],
"websocket": false,
"upstreams": [
{
"scheme": "http",
"loadbalancer": "roundrobin",
"host": "www.example.com",
"port": 80,
"weight": 100
}
],
"cache": {
"enable": true,
"httpMethods": [
"GET"
],
"httpCodes": [
200
]
}
}
}
Returns the Route by ID.
The ID (UUID) of the Gateway.
0620c174-dd3c-5eb4-87c8-e2b516553a00
The ID (UUID) of the Route.
50982018-bb17-5cb9-bcd4-97f8bbc7dc23
GET /gateways/{apigatewayId}/routes/{routeId} HTTP/1.1
Host: apigateway.de-txl.ionos.com
Authorization: Bearer JWT
Accept: */*
{
"id": "50982018-bb17-5cb9-bcd4-97f8bbc7dc23",
"type": "route",
"href": "/gateways/{apigatewayId}/routes/50982018-bb17-5cb9-bcd4-97f8bbc7dc23",
"metadata": {
"createdDate": "2020-12-10T13:37:50+01:00",
"createdBy": "ionos:identity:::users/87f9a82e-b28d-49ed-9d04-fba2c0459cd3",
"createdByUserId": "87f9a82e-b28d-49ed-9d04-fba2c0459cd3",
"lastModifiedDate": "2020-12-11T13:37:50+01:00",
"lastModifiedBy": "ionos:identity:::users/87f9a82e-b28d-49ed-9d04-fba2c0459cd3",
"lastModifiedByUserId": "87f9a82e-b28d-49ed-9d04-fba2c0459cd3",
"resourceURN": "ionos:<product>:<location>:<contract>:<resource-path>",
"status": "AVAILABLE",
"statusMessage": null,
"publicEndpoint": "jf8u4tgr73sd-ag.87uhr654gq90.apigateway.de-txl.ionos.com"
},
"properties": {
"name": "example-route",
"type": "http",
"paths": [
"/foo/*",
"/bar"
],
"methods": [
"GET",
"POST"
],
"websocket": false,
"upstreams": [
{
"scheme": "http",
"loadbalancer": "roundrobin",
"host": "www.example.com",
"port": 80,
"weight": 100
}
],
"cache": {
"enable": true,
"httpMethods": [
"GET"
],
"httpCodes": [
200
]
}
}
}
Ensures that the Route with the provided ID is created or modified. The full Route needs to be provided to ensure (either update or create) the Route. Non present data will only be filled with defaults or left empty, but not take previous values into consideration.
The ID (UUID) of the Gateway.
0620c174-dd3c-5eb4-87c8-e2b516553a00
The ID (UUID) of the Route.
50982018-bb17-5cb9-bcd4-97f8bbc7dc23
The ID (UUID) of the Route.
50982018-bb17-5cb9-bcd4-97f8bbc7dc23
Metadata
PUT /gateways/{apigatewayId}/routes/{routeId} HTTP/1.1
Host: apigateway.de-txl.ionos.com
Authorization: Bearer JWT
Content-Type: application/json
Accept: */*
Content-Length: 352
{
"id": "50982018-bb17-5cb9-bcd4-97f8bbc7dc23",
"metadata": {},
"properties": {
"name": "example-route",
"type": "http",
"paths": [
"/foo/*",
"/bar"
],
"methods": [
"GET",
"POST"
],
"websocket": false,
"upstreams": [
{
"scheme": "http",
"loadbalancer": "roundrobin",
"host": "www.example.com",
"port": 80,
"weight": 100
}
],
"cache": {
"enable": true,
"httpMethods": [
"GET"
],
"httpCodes": [
200
]
}
}
}
{
"id": "50982018-bb17-5cb9-bcd4-97f8bbc7dc23",
"type": "route",
"href": "/gateways/{apigatewayId}/routes/50982018-bb17-5cb9-bcd4-97f8bbc7dc23",
"metadata": {
"createdDate": "2020-12-10T13:37:50+01:00",
"createdBy": "ionos:identity:::users/87f9a82e-b28d-49ed-9d04-fba2c0459cd3",
"createdByUserId": "87f9a82e-b28d-49ed-9d04-fba2c0459cd3",
"lastModifiedDate": "2020-12-11T13:37:50+01:00",
"lastModifiedBy": "ionos:identity:::users/87f9a82e-b28d-49ed-9d04-fba2c0459cd3",
"lastModifiedByUserId": "87f9a82e-b28d-49ed-9d04-fba2c0459cd3",
"resourceURN": "ionos:<product>:<location>:<contract>:<resource-path>",
"status": "AVAILABLE",
"statusMessage": null,
"publicEndpoint": "jf8u4tgr73sd-ag.87uhr654gq90.apigateway.de-txl.ionos.com"
},
"properties": {
"name": "example-route",
"type": "http",
"paths": [
"/foo/*",
"/bar"
],
"methods": [
"GET",
"POST"
],
"websocket": false,
"upstreams": [
{
"scheme": "http",
"loadbalancer": "roundrobin",
"host": "www.example.com",
"port": 80,
"weight": 100
}
],
"cache": {
"enable": true,
"httpMethods": [
"GET"
],
"httpCodes": [
200
]
}
}
}
Deletes the specified Route.
The ID (UUID) of the Gateway.
0620c174-dd3c-5eb4-87c8-e2b516553a00
The ID (UUID) of the Route.
50982018-bb17-5cb9-bcd4-97f8bbc7dc23
DELETE /gateways/{apigatewayId}/routes/{routeId} HTTP/1.1
Host: apigateway.de-txl.ionos.com
Authorization: Bearer JWT
Accept: */*
No content
Was this helpful?