列举已部署的服务实例
功能介绍
列举已部署的服务实例列表。用户可通过该接口列举已部署的服务实例列表,接口支持分页查询、支持通过名称、服务实例ID、端点ID、可见性查询。支持排序。返回为符合过滤条件的服务实例列表。此接口为同步接口,无配套使用接口。支持查询公共的服务实例。
调试
您可以在API Explorer中调试该接口,支持自动认证鉴权。API Explorer可以自动生成SDK代码示例,并提供SDK代码示例调试功能。
URI
GET https://localhost.com/v1/workspaces/{workspace_id}/services/instances
参数 |
是否必选 |
参数类型 |
描述 |
---|---|---|---|
workspace_id |
是 |
String |
|
参数 |
是否必选 |
参数类型 |
描述 |
---|---|---|---|
id |
否 |
String |
|
name |
否 |
String |
|
limit |
否 |
Integer |
|
offset |
否 |
Integer |
|
endpoint_id |
否 |
String |
|
source_id |
否 |
String |
|
version_id |
否 |
String |
|
type |
否 |
String |
|
visibility |
否 |
String |
|
sort_by |
否 |
String |
|
order_by |
否 |
String |
|
请求参数
参数 |
是否必选 |
参数类型 |
描述 |
---|---|---|---|
X-Auth-Token |
否 |
String |
|
响应参数
状态码:200
参数 |
参数类型 |
描述 |
---|---|---|
total |
Integer |
|
service_instances |
Array of ServiceInstanceBriefInfo objects |
|
参数 |
参数类型 |
描述 |
---|---|---|
visibility |
String |
|
source |
SourceRef object |
|
id |
String |
|
name |
String |
|
description |
String |
|
endpoint_id |
EndpointId object |
|
status |
String |
|
create_time |
String |
|
update_time |
String |
|
duration |
Long |
|
create_user |
User object |
|
type |
ServiceType object |
|
error_code |
String |
|
error_msg |
String |
|
solution |
String |
|
config |
AppInstanceConfig object |
|
content_moderation_switch |
String |
|
content_output_moderation_switch |
String |
|
参数 |
参数类型 |
描述 |
---|---|---|
id |
String |
|
version_id |
String |
|
参数 |
参数类型 |
描述 |
---|---|---|
- |
String |
|
参数 |
参数类型 |
描述 |
---|---|---|
domain_name |
String |
|
user_name |
String |
|
参数 |
参数类型 |
描述 |
---|---|---|
- |
String |
|
参数 |
参数类型 |
描述 |
---|---|---|
model_instance_config |
ModelServiceInstanceConfig object |
|
参数 |
参数类型 |
描述 |
---|---|---|
resource |
ResourceDemand object |
|
参数 |
参数类型 |
描述 |
---|---|---|
min |
Integer |
|
max |
Integer |
|
spec_code |
String |
|
状态码:400
参数 |
参数类型 |
描述 |
---|---|---|
error_code |
String |
|
error_msg |
String |
|
solution_msg |
String |
|
状态码:401
参数 |
参数类型 |
描述 |
---|---|---|
error_code |
String |
|
error_msg |
String |
|
solution_msg |
String |
|
状态码:404
参数 |
参数类型 |
描述 |
---|---|---|
error_code |
String |
|
error_msg |
String |
|
solution_msg |
String |
|
状态码:408
参数 |
参数类型 |
描述 |
---|---|---|
error_code |
String |
|
error_msg |
String |
|
solution_msg |
String |
|
状态码:500
参数 |
参数类型 |
描述 |
---|---|---|
error_code |
String |
|
error_msg |
String |
|
solution_msg |
String |
|
请求示例
无
响应示例
状态码:200
查询service instance列表的响应体。
{ "total" : 1, "service_instances" : [ { "visibility" : "PRIVATE", "source" : { "id" : "0b5633ba2b904511ad514346f4d23d4b", "version_id" : "0b5633ba2b904511ad514346f4d23d4b" }, "id" : "0b5633ba2b904511ad514346f4d23d4b", "name" : "serviceInstanceName1", "description" : "description", "endpoint_id" : "b935d0ef-f4eb-4b95-aff1-9d33ae9f57b6", "status" : "", "create_time" : "2023-05-30T12:24:30.401Z", "update_time" : "2023-05-30T12:24:30.401Z", "duration" : 0, "create_user" : { "domain_name" : "string", "user_name" : "string" }, "type" : "LLM_MODEL", "error_code" : "lakehouse.00010003", "error_msg" : "failed", "solution" : "failed", "config" : { "model_instance_config" : { "resource" : { "min" : 1, "max" : 1000, "spec_code" : "string" } } }, "content_moderation_switch" : "ON", "content_output_moderation_switch" : "OFF" } ] }
状态码:400
BadRequest
{ "error_code" : "common.01000001", "error_msg" : "failed to read http request, please check your input, code: 400, reason: Type mismatch., cause: TypeMismatchException" }
状态码:401
Unauthorized
{ "error_code" : "APIG.1002", "error_msg" : "Incorrect token or token resolution failed" }
状态码:403
Forbidden
{ "error" : { "code" : "403", "message" : "X-Auth-Token is invalid in the request", "title" : "Forbidden" }, "error_code" : 403, "error_msg" : "X-Auth-Token is invalid in the request", "title" : "Forbidden" }
状态码:404
NotFound
{ "error_code" : "common.01000001", "error_msg" : "response status exception, code: 404" }
状态码:408
Request Time-out
{ "error_code" : "common.00000408", "error_msg" : "timeout exception occurred" }
状态码:500
InternalServerError
{ "error_code" : "common.00000500", "error_msg" : "internal error" }
状态码
状态码 |
描述 |
---|---|
200 |
查询service instance列表的响应体。 |
400 |
BadRequest |
401 |
Unauthorized |
403 |
Forbidden |
404 |
NotFound |
408 |
Request Time-out |
500 |
InternalServerError |
错误码
请参见错误码。