Reading a Specified Endpoint

Function

This API is used to read a specified endpoint.

URI

GET /api/v1/namespaces/{namespace}/endpoints/{name}

Table 1 Path parameters

Parameter

Description

namespace

Object name and auth scope, such as for teams and projects.

name

Name of the event.

Table 2 Query parameters

Parameter

Mandatory

Description

pretty

No

If 'true', then the output is pretty printed.

exact

No

Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'.

export

No

Should this value be exported. Export strips fields that a user cannot specify.

Request

N/A

Response

Response parameters

For the description about response parameters, see Table 135.

Example response

{
    "kind": "Endpoints",
    "apiVersion": "v1",
    "metadata": {
        "name": "cluster-test",
        "namespace": "default",
        "selfLink": "/api/v1/namespaces/default/endpoints/cluster-test",
        "uid": "81b1503d-5960-11e6-b444-286ed488fafe",
        "resourceVersion": "18186",
        "creationTimestamp": "2016-08-03T09:56:10Z"
    },
    "subsets": [
        {
            "addresses": [
                {
                    "ip": "172.16.106.152"
                },
                {
                    "ip": "172.16.79.157"
                }
            ],
            "ports": [
                {
                    "port": 1,
                    "protocol": "TCP"
                }
            ]
        }
    ]
}

Status Code

Table 3 Status code

Status Code

Description

200

This operation succeeds, and an Endpoint resource object is returned.

For more status codes, see Status Codes.