获取服务列表。
调试
您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。
授权信息
下表是API对应的授权信息,可以在RAM权限策略语句的Action元素中使用,用来给RAM用户或RAM角色授予调用此API的权限。具体说明如下:
- 操作:是指具体的权限点。
 - 访问级别:是指每个操作的访问级别,取值为写入(Write)、读取(Read)或列出(List)。
 - 资源类型:是指操作中支持授权的资源类型。具体说明如下:
- 对于必选的资源类型,用前面加 * 表示。
 - 对于不支持资源级授权的操作,用
全部资源表示。 
 - 条件关键字:是指云产品自身定义的条件关键字。
 - 关联操作:是指成功执行操作所需要的其他权限。操作者必须同时具备关联操作的权限,操作才能成功。
 
| 操作 | 访问级别 | 资源类型 | 条件关键字 | 关联操作 | 
|---|---|---|---|---|
| apig:ListServices | none | *Service acs:apig:{#regionId}:{#accountId}:service/* | 
  | 无 | 
请求语法
GET /v1/services HTTP/1.1
请求参数
| 名称 | 类型 | 必填 | 描述 | 示例值 | 
|---|---|---|---|---|
| pageNumber | integer | 否 | 分页页码,从 1 开始,不填默认 1.  | 1 | 
| pageSize | integer | 否 | 分页大小,有效范围[1, 100],不填默认 10。  | 10 | 
| name | string | 否 | 根据服务名精确查询。  | user-service | 
| sourceType | string | 否 | 根据服务来源类型查询, 服务来源: 
 枚举值: 
  | MSE_NACOS | 
| gatewayId | string | 否 | 云原生 API 网关 ID。  | gw-cpv4sqdl***** | 
| resourceGroupId | string | 否 | 资源组 ID。  | rg-acfmxxe5rc6cvla | 
返回参数
示例
正常返回示例
JSON格式
{
  "requestId": "585657D2-1C20-5B8A-AF17-D727C6490BE4",
  "code": "Ok",
  "message": "success",
  "data": {
    "pageNumber": 1,
    "pageSize": 10,
    "totalSize": 18,
    "items": [
      {
        "serviceId": "svc-cr6pk4tlhtgm***",
        "sourceType": "MSE_NACOS",
        "name": "user-service",
        "namespace": "PUBLIC",
        "addresses": [
          "127.0.0.1:8080"
        ],
        "ports": [
          {
            "port": 8080,
            "name": "user-service",
            "protocol": "TCP"
          }
        ],
        "unhealthyEndpoints": [
          "192.168.1.12:8080"
        ],
        "outlierEndpoints": [
          ""
        ],
        "healthCheck": {
          "protocol": "TCP",
          "timeout": 0,
          "interval": 0,
          "healthyThreshold": 0,
          "unhealthyThreshold": 0,
          "httpPath": "",
          "httpHost": "",
          "enable": true
        },
        "healthStatus": "Healthy",
        "qualifier": "LATEST",
        "createTimestamp": 1725617840096,
        "updateTimestamp": 1725868548440,
        "protocol": "HTTP",
        "gatewayId": "gw-xxxx",
        "resourceGroupId": "rg-xxx",
        "groupName": "publich",
        "aiServiceConfig": {
          "provider": "qwen",
          "address": "https://dashscope.aliyun.com",
          "enableHealthCheck": true,
          "paiEASServiceConfig": {
            "workspaceId": "",
            "serviceId": "",
            "serviceName": "",
            "endpointType": ""
          },
          "bedrockServiceConfig": {
            "awsRegion": "",
            "awsAccessKey": "",
            "awsSecretKey": ""
          },
          "protocols": [
            "OpenAI/v1"
          ],
          "apiKeys": [
            "sk-xxx"
          ],
          "ApiKeyGenerateMode": ""
        },
        "labelDetails": [
          {
            "key": "",
            "values": [
              ""
            ]
          }
        ],
        "agentServiceConfig": {
          "protocols": [
            "DashScope"
          ],
          "address": "https://dashscope.aliyuncs.com/api/v1",
          "dashScopeConfig": {
            "appCredentials": [
              {
                "apiKey": "",
                "appId": ""
              }
            ]
          },
          "enableHealthCheck": true,
          "provider": "",
          "difyConfig": {
            "botType": "",
            "apiKey": ""
          }
        },
        "expressType": "StartExecution"
      }
    ]
  }
}错误码
访问错误中心查看更多错误码。
变更历史
| 变更时间 | 变更内容概要 | 操作 | 
|---|---|---|
| 2025-04-14 | OpenAPI 入参发生变更 | 查看变更详情 | 
