Replace Destinations For Route

Replace Destinations For Route
Replace all destinations for a route

Replaces all destinations for a route, removing any destinations not included in the provided list.

Weighted destinations are deprecated. Development of the experimental Istio Service Mesh routing layer was discontinued in 2020 and is no longer supported by the platform. Specifying a weight for a destination will take no effect.

If weighted destinations are provided, however, all destinations provided here must have a weight specified, and all weights for this route must sum to 100. If not, all provided destinations must not have a weight. Mixing weighted and unweighted destinations for a route is not allowed.

Request
URI
PUT
https://api.example.local/v3/routes/{guid}/destinations
COPY
Path Parameters
string
guid
Required

The unique identifier for the resource


Request Body

A list of route destinations

RouteDestinations of type(s) application/json
Optional
{
    "destinations": [
        {
            "guid": "string",
            "app": {
                "guid": "string",
                "process": {
                    "type": "string"
                }
            },
            "weight": 0,
            "port": 0,
            "protocol": "string",
            "created_at": "string",
            "updated_at": "string",
            "metadata": {
                "labels": {
                    "labels": "string"
                },
                "annotations": {
                    "annotations": "string"
                }
            },
            "links": {
                "self": {
                    "href": "string",
                    "method": "string"
                },
                "route": {
                    "href": "string",
                    "method": "string"
                }
            }
        }
    ]
}
Authentication
This operation uses the following authentication methods.
Responses
200

List of destinations for the route

Returns RouteDestinationList of type(s) application/json
{
    "pagination": {
        "total_results": 0,
        "total_pages": 0,
        "first": {
            "href": "string",
            "method": "string"
        },
        "last": {
            "href": "string",
            "method": "string"
        },
        "next": {
            "href": "string",
            "method": "string"
        },
        "previous": {
            "href": "string",
            "method": "string"
        }
    },
    "destinations": [
        {
            "guid": "string",
            "app": {
                "guid": "string",
                "process": {
                    "type": "string"
                }
            },
            "weight": 0,
            "port": 0,
            "protocol": "string",
            "created_at": "string",
            "updated_at": "string",
            "metadata": {
                "labels": {
                    "labels": "string"
                },
                "annotations": {
                    "annotations": "string"
                }
            },
            "links": {
                "self": {
                    "href": "string",
                    "method": "string"
                },
                "route": {
                    "href": "string",
                    "method": "string"
                }
            }
        }
    ]
}
object
pagination
Optional

Pagination is a technique used to divide a large set of results into smaller, more manageable sets. This allows clients to retrieve results in smaller chunks, reducing the amount of data transferred and improving performance. The pagination object is a JSON object that contains information about the pagination state of the results. It includes the total number of results available, the total number of pages available, and links to the first, last, next, and previous pages of results.

array of object
destinations
Optional

A route destination is a specification for where traffic on a route should be directed.


400

Bad Request

Returns BadRequest of type(s) application/json
{
    "errors": [
        {
            "code": 0,
            "detail": "string",
            "title": "string"
        }
    ]
}
array of object
errors
Optional

errors


401

Unauthorized

Returns Unauthorized of type(s) application/json
{
    "errors": [
        {
            "code": 0,
            "detail": "string",
            "title": "string"
        }
    ]
}
array of object
errors
Optional

errors


403

Forbidden

Returns Forbidden of type(s) application/json
{
    "errors": [
        {
            "code": 0,
            "detail": "string",
            "title": "string"
        }
    ]
}
array of object
errors
Optional

errors


422

Unprocessable Entity

Returns UnprocessableEntity of type(s) application/json
{
    "errors": [
        {
            "code": 0,
            "detail": "string",
            "title": "string"
        }
    ]
}
array of object
errors
Optional

errors


500

Internal Server Error

Returns 500 of type(s) application/json
{
    "errors": [
        {
            "code": 0,
            "detail": "string",
            "title": "string"
        }
    ]
}
array of object
errors
Optional

errors


Code Samples
COPY
                    curl -X PUT -H 'Authorization: <value>' -H 'Content-Type: application/json' -d '{}' https://{api_host}/v3/routes/{guid}/destinations