Querying Service Details

Function

This API is used to query details about a service.

URI

GET /v2/{project_id}/edgemgr/services/{service_id}

Table 1 Path parameters

Parameter

Mandatory

Type

Description

project_id

Yes

String

Project ID.

service_id

Yes

String

Service ID.

Request Parameters

None

Response Parameters

Status code: 200

Table 2 Response body parameters

Parameter

Type

Description

service

ServiceRespDetail object

Service details.

Table 3 ServiceRespDetail

Parameter

Type

Description

created_at

String

Time when the service is created.

id

String

Service ID.

meta_data

SvcMetadata object

Static properties of the service.

project_id

String

Tenant ID.

spec

SvcSpec object

Dynamic properties of the service.

updated_at

String

Time when the service is updated.

Table 4 SvcMetadata

Parameter

Type

Description

labels

Map<String,String>

List of customized labels.

name

String

Service name. Enter a maximum of 64 characters starting with a letter and ending with a letter or digit. Only lowercase letters, digits, and hyphens (-) are allowed.

Table 5 SvcSpec

Parameter

Type

Description

cluster_ip

String

IP address of a virtual service.

external_ips

Array of strings

List of external IP addresses. This parameter is not supported currently.

external_name

String

External domain name. This parameter is not supported currently.

ports

Array of SvcPort objects

List of service ports to be exposed.

selector

Map<String,String>

Label selector, which is used to select the pods with the specified labels for management.

type

String

Service type.

Table 6 SvcPort

Parameter

Type

Description

name

String

Port name.

node_port

String

Port number mapped to the physical machine when spec.type is set to NodePort.

port

String

Port on which the service listens.

protocol

String

Protocol, for example, TCP.

target_port

String

Port number of the backend pod to which requests are forwarded.

Status code: 404

Table 7 Response body parameters

Parameter

Type

Description

error_code

String

Error code.

error_message

String

Error description.

Status code: 500

Table 8 Response body parameters

Parameter

Type

Description

error_code

String

Error code.

error_message

String

Error description.

Example Requests

None

Example Responses

None

Status Codes

Status Code

Description

200

OK

404

Error response.

500

Error response.

Error Codes

See Error Codes.