GetService - 获取服务详情

更新时间:
复制 MD 格式

Get Service Details。

调试

您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。

调试

授权信息

下表是API对应的授权信息,可以在RAM权限策略语句的Action元素中使用,用来给RAM用户或RAM角色授予调用此API的权限。具体说明如下:

  • 操作:是指具体的权限点。

  • 访问级别:是指每个操作的访问级别,取值为写入(Write)、读取(Read)或列出(List)。

  • 资源类型:是指操作中支持授权的资源类型。具体说明如下:

    • 对于必选的资源类型,用前面加 * 表示。

    • 对于不支持资源级授权的操作,用全部资源表示。

  • 条件关键字:是指云产品自身定义的条件关键字。

  • 关联操作:是指成功执行操作所需要的其他权限。操作者必须同时具备关联操作的权限,操作才能成功。

操作

访问级别

资源类型

条件关键字

关联操作

apig:GetService

none

*Service

acs:apig:{#regionId}:{#accountId}:service/{#ServiceId}

  • apig:GatewayId

请求语法

GET /v1/services/{serviceId} HTTP/1.1

路径参数

名称

类型

必填

描述

示例值

serviceId

string

服务唯一 ID

svc-cr6pk4tlhtgm58e***

请求参数

名称

类型

必填

描述

示例值

当前API无需请求参数

返回参数

名称

类型

描述

示例值

object

响应结果

requestId

string

Request ID.

8FA9BB94-915B-5299-A694-49FCC7F5DD00

code

string

响应状态码

Ok

message

string

响应信息

success

data Service

服务详情数据

示例

正常返回示例

JSON格式

{
  "requestId": "8FA9BB94-915B-5299-A694-49FCC7F5DD00",
  "code": "Ok",
  "message": "success",
  "data": {
    "serviceId": "svc-cr6pk4tlhtgm***",
    "sourceType": "MSE_NACOS",
    "name": "user-service",
    "namespace": "PUBLIC",
    "healthCheck": {
      "protocol": "TCP",
      "timeout": 5,
      "interval": 10,
      "healthyThreshold": 2,
      "unhealthyThreshold": 3,
      "httpPath": "/health",
      "httpHost": "example.com",
      "enable": true
    },
    "healthStatus": "Healthy",
    "qualifier": "LATEST",
    "createTimestamp": 1725617840096,
    "updateTimestamp": 1725868548440,
    "protocol": "HTTP",
    "gatewayId": "gw-xxxx",
    "modelProviderId": "mp-xxxx",
    "resourceGroupId": "rg-xxx",
    "groupName": "publich",
    "aiServiceConfig": {
      "provider": "qwen\nmoonshot\nbaichuan\nyi\nzhipuai\n360ai\nhunyuan\nstepfun\nspark\nopenai\nclaude\nanthropic\ndoubao\nminimax\ngemini\nazure\ndeepseek\ncustom\npai-eas\nbedrock\nvertex",
      "address": "https://dashscope.aliyun.com",
      "enableHealthCheck": true,
      "paiEASServiceConfig": {
        "workspaceId": "cb89d4de30042df4459442589664e00d",
        "serviceId": "svc-cvaeb0um1hkqp79k72v0",
        "serviceName": "auto-ai-service",
        "endpointType": "\"public\",\"private\""
      },
      "bedrockServiceConfig": {
        "awsRegion": "us-east-1",
        "awsAccessKey": "AKIAIOSFODNN7EXAMPLE",
        "awsSecretKey": "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY"
      },
      "ApiKeyGenerateMode": "Custom",
      "defaultModelName": "gpt-4",
      "enableOutlierDetection": true,
      "vertexServiceConfig": {
        "vertexAuthKey": "{\\\"type\\\":\\\"service_account\\\",\\\"project_id\\\":\\\"my-project\\\",\\\"private_key\\\":\\\"-----BEGIN PRIVATE KEY-----...\\\",\\\"client_email\\\":\\\"xxx@xxx.iam.gserviceaccount.com\\\",\\\"token_uri\\\":\\\"https://oauth2.googleapis.com/token\\\"}",
        "vertexRegion": "us-central1",
        "vertexProjectId": "my-project",
        "vertexAuthServiceName": "google-oauth2",
        "geminiSafetySetting": {
          "key": "{\"BLOCK_NONE\": \"true\"}"
        },
        "vertexTokenRefreshAhead": 300
      },
      "protocols": [
        "OpenAI/v1"
      ],
      "apiKeys": [
        "sk-xxx"
      ],
      "compatibleProtocols": [
        "\"openai\", \"anthropic\""
      ]
    },
    "agentServiceConfig": {
      "address": "https://dashscope.aliyuncs.com/api/v1",
      "dashScopeConfig": {
        "appCredentials": [
          {
            "apiKey": "sk-xxx",
            "appId": "app-xxx"
          }
        ]
      },
      "enableHealthCheck": true,
      "provider": "qwen",
      "difyConfig": {
        "botType": "chatflow",
        "apiKey": "app-xxx"
      },
      "enableOutlierDetection": true,
      "customConfig": {
        "apiKey": "app-xxx\n",
        "apiKeyGenerateMode": "Reference"
      },
      "protocols": [
        "DashScope"
      ]
    },
    "expressType": "StartExecution",
    "addresses": [
      "127.0.0.1:8080"
    ],
    "ports": [
      {
        "port": 8080,
        "name": "user-service",
        "protocol": "TCP"
      }
    ],
    "unhealthyEndpoints": [
      "192.168.1.12:8080"
    ],
    "outlierEndpoints": [
      "[\"10.0.0.2:8080\"]"
    ],
    "labelDetails": [
      {
        "key": "version",
        "values": [
          "[\"v1.0.0\", \"v2.0.0\"]"
        ]
      }
    ],
    "runtimeDetailStatus": "Available",
    "runtimeDetailErrorCode": "RuntimeEndpointTimeout",
    "dnsServers": [
      ""
    ],
    "healthyPanicThreshold": 0,
    "outlierDetection": {
      "enable": true,
      "baseEjectionTime": 0,
      "interval": 0,
      "failurePercentageThreshold": 0,
      "failurePercentageMinimumHosts": 0
    },
    "versions": [
      {
        "name": "v1",
        "labels": [
          {
            "key": "version",
            "value": "v1"
          }
        ]
      }
    ]
  }
}

错误码

访问错误中心查看更多错误码。

变更历史

更多信息,参考变更详情