Querying a List of Services
Function
This API is used to query details about all services.
URI
GET /v2/{project_id}/edgemgr/services
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| project_id | Yes | String | Project ID. |
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| limit | No | Long | Number of records on each page during pagination query. The maximum value is 100, and the default value is 10. |
| offset | No | Long | Query offset. The default value is 0. |
| sorted | No | String | Whether the queried services are sorted based on the specified field. |
| name | No | String | Service name. |
| app | No | String | Application based on which services are queried. |
Request Parameters
None
Response Parameters
Status code: 200
| Parameter | Type | Description |
|---|---|---|
| count | Long | Number of services that meet the conditions. |
| services | Array of ServiceRespDetail objects | Service list. |
| 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. |
| 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. |
| 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. |
| 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: 500
| 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 |
| 500 | Error response. |
Error Codes
See Error Codes.
Last Article: Service Management
Next Article: Creating a Service
Did this article solve your problem?
Thank you for your score!Your feedback would help us improve the website.