list_services
Retrieve a list of services under a specified namespace, with or without instance details. Optimize memory and network usage by controlling the withInstances
parameter for efficient data retrieval. Supports pagination and filtering by group or service name patterns.
Instructions
This interface retrieves the list of services under a specified namespace. The response format depends on the withInstances
parameter:withInstances=true
: Returns service details with instances (ServiceDetailInfo
objects). withInstances=false
: Returns service metadata without instances (ServiceView
objects). **NOTE: ** When withInstances=true
, The API may cost too much memory and networks, If Only want get instance list with little or one service, Suggest use withInstances=false
with List Service Instances
.
Input Schema
Name | Required | Description | Default |
---|---|---|---|
groupNameParam | No | The groupName pattern of services, default null means all group if missing. if not null, server will search all service match groupName both prefix and subfix, such as: input `test`, groupName `test`, `atest`, `testb`, `atestb` will all matched | |
ignoreEmptyService | No | Whether ignore the empty service in result, default is true | |
namespaceId | No | The namespaceId of services, default is `public` if missing | |
pageNo | Yes | The current page number, default is 1. | |
pageSize | Yes | The size of services in each page, default is 100 | |
serviceNameParam | No | The serviceName pattern of services, default null means all service if missing. if not null, server will search all service match serviceName both prefix and subfix, such as: input `test`, serviceName `test`, `atest`, `testb`, `atestb` will all matched | |
withInstances | No | Whether contain instances under each services in result, recommend and default is false |