Listing Deployed Service Instances
Function
This API is used to list deployed service instances. You can call this API to list deployed service instances, supporting paginated queries and filtering by name, service instance ID, endpoint ID, and visibility. It also lets you sort search results. The API returns a list of service instances that meet the filter criteria. This API is synchronous with no accompanying APIs. It allows you to query public service instances.
URI
GET /v1/workspaces/{workspace_id}/services/instances
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
workspace_id |
Yes |
String |
Definition: Workspace ID. Constraints: N/A. Range: 1 to 36 characters. Only letters, digits, and hyphens (-) are allowed. Default Value: N/A. |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
id |
No |
String |
Definition: Service instance ID, allowing you to search for service instances by their ID. Constraints: N/A. Range: 1 to 36 characters. Only letters, digits, and hyphens (-) are allowed. Default Value: N/A. |
name |
No |
String |
Definition: Service instance name, allowing you to search for service instances by their name. Fuzzy search is supported. Constraints: N/A. Range: 1 to 36 characters. Only letters, digits, and hyphens (-) are allowed. Default Value: N/A. |
limit |
No |
Integer |
Definition: Maximum number of records returned on each page. Constraints: N/A. Range: [1, 100]. Default Value: 10. |
offset |
No |
Integer |
Definition: Offset where a query starts. Constraints: N/A. Range: [0, 1000000000]. Default Value: 0. |
endpoint_id |
No |
String |
Definition: Endpoint ID, allowing you to search for endpoints by their ID. Constraints: N/A. Range: 1 to 36 characters. Only letters, digits, and hyphens (-) are allowed. Default Value: N/A. |
source_id |
No |
String |
Definition: Service ID or model ID. Constraints: N/A. Range: 1 to 36 characters. Only letters, digits, and hyphens (-) are allowed. Default Value: N/A. |
version_id |
No |
String |
Definition: Service version ID or model version ID. Constraints: N/A. Range: 1 to 36 characters. Only letters, digits, and hyphens (-) are allowed. Default Value: N/A. |
type |
No |
String |
Definition: Service type. Constraints: N/A. Range: LLM_MODEL (large language model) or PGSQL_SERVICE (deprecated). Default Value: N/A. |
visibility |
No |
String |
Definition: Visibility search parameter. Constraints: N/A. Range:
Default Value: By default, this parameter is left blank. If left blank, the visibility of the current user is queried, including PRIVATE and PUBLIC. |
sort_by |
No |
String |
Definition: Field for sorting. Constraints: N/A. Range: CREATE_TIME (creation time). Default Value: N/A. |
order_by |
No |
String |
Definition: Sorting mode. Constraints: N/A. Range: ASC (ascending order) or DESC (descending order). Default Value: DESC. |
Request Parameters
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
X-Auth-Token |
No |
String |
Definition: Tenant token. Constraints: N/A. Range: N/A. Default Value: N/A. |
Response Parameters
Status code: 200
Parameter |
Type |
Description |
---|---|---|
total |
Integer |
Definition: Total number of service instances that meet the filter criteria. Constraints: N/A. Range: [0, 10000]. Default Value: N/A. |
service_instances |
Array of ServiceInstanceBriefInfo objects |
Definition: List of service instances that meet the filter criteria. Constraints: [0,1000]. |
Parameter |
Type |
Description |
---|---|---|
visibility |
String |
Definition: Visibility. Constraints: N/A. Range:
Default Value: PRIVATE. |
source |
SourceRef object |
Definition: Source, including service and model. Constraints: N/A. |
id |
String |
Definition: Service instance ID. For details about how to obtain a service instance ID, see [Obtaining an Inference Instance ID] (dataartsfabric_03_0025.xml). Constraints: N/A. Range: 32 to 36 characters. Only letters, digits, and hyphens (-) are allowed. Default Value: N/A. |
name |
String |
Definition: Service instance name. Constraints: N/A. Range: 1 to 64 characters. Only letters, digits, hyphens (-), underscores (_), periods (.), and spaces are allowed. Default Value: N/A. |
description |
String |
Definition: Description. Constraints: N/A. Range: 0 to 1,024 characters, excluding the following characters: !<>=&''' Default Value: N/A. |
endpoint_id |
String |
|
status |
String |
Definition: Status. Constraints: N/A. Range:
Default Value: N/A. |
create_time |
String |
Definition: Creation time. Constraints: N/A. |
update_time |
String |
Definition: Update time. Constraints: N/A. |
duration |
Long |
Definition: Runtime. Constraints: N/A. Range: N/A. Default Value: N/A. |
create_user |
User object |
Definition: Tenant information, including the account name and username. Constraints: N/A. |
type |
ServiceType object |
Definition: Service type. Constraints: N/A. Range:
Default Value: N/A. |
error_code |
String |
Definition: Error code. Constraints: N/A. Range: [8, 36]. Default Value: N/A. |
error_msg |
String |
Definition: Error message. Constraints: N/A. Range: [2, 4096]. Default Value: N/A. |
solution |
String |
Definition: Solution. Constraints: N/A. Range: [0, 4096]. Default Value: N/A. |
config |
AppInstanceConfig object |
Definition: Configuration input when an application instance is started. Constraints: N/A. |
content_moderation_switch |
String |
Definition: Whether to moderate model content. Constraints: N/A. Range:
Default Value: N/A. |
content_output_moderation_switch |
String |
Definition: Whether to moderate model content. Constraints: N/A. Range:
Default Value: N/A. |
Parameter |
Type |
Description |
---|---|---|
id |
String |
Definition: Source ID. There are different types. For an inference service instance, it refers to the model ID. Constraints: N/A. Range: 1 to 36 characters. Only letters, digits, and hyphens (-) are allowed. Default Value: N/A. |
version_id |
String |
Definition: Version ID. There are different types. For an inference service instance, it refers to the model version ID. Constraints: N/A. Range: 1 to 36 characters. Only letters, digits, and hyphens (-) are allowed. Default Value: N/A. |
Parameter |
Type |
Description |
---|---|---|
domain_name |
String |
Definition: Account name. Constraints: N/A. Range: [0, 64]. Default Value: N/A. |
user_name |
String |
Definition: Username. Constraints: N/A. Range: [0, 64]. Default Value: N/A. |
Parameter |
Type |
Description |
---|---|---|
- |
String |
Definition: Service type. Constraints: N/A. Range:
Default Value: N/A. |
Parameter |
Type |
Description |
---|---|---|
model_instance_config |
ModelServiceInstanceConfig object |
Definition: Configuration of a model service instance, which is used in DeployService. Constraints: N/A. |
Parameter |
Type |
Description |
---|---|---|
resource |
ResourceDemand object |
Definition: Resource requirement configuration. Constraints: N/A. |
Parameter |
Type |
Description |
---|---|---|
min |
Integer |
Definition: Minimum number. Constraints: N/A. Range: [1, 1000]. Default Value: N/A. |
max |
Integer |
Definition: Maximum number. Constraints: N/A. Range: [1, 1000]. Default Value: N/A. |
spec_code |
String |
Definition: Resource specifications, which are queried from the specification list. Constraints: N/A. Range: [1, 64]. Default Value: N/A. |
Status code: 400
Parameter |
Type |
Description |
---|---|---|
error_code |
String |
Definition: Error code. Constraints: N/A. Range: [8, 36]. Default Value: N/A. |
error_msg |
String |
Definition: Error message. Constraints: N/A. Range: [2, 4096]. Default Value: N/A. |
solution_msg |
String |
Definition: Solution description. Constraints: N/A. Range: [2, 4096]. Default Value: N/A. |
Status code: 401
Parameter |
Type |
Description |
---|---|---|
error_code |
String |
Definition: Error code. Constraints: N/A. Range: [8, 36]. Default Value: N/A. |
error_msg |
String |
Definition: Error message. Constraints: N/A. Range: [2, 4096]. Default Value: N/A. |
solution_msg |
String |
Definition: Solution description. Constraints: N/A. Range: [2, 4096]. Default Value: N/A. |
Status code: 404
Parameter |
Type |
Description |
---|---|---|
error_code |
String |
Definition: Error code. Constraints: N/A. Range: [8, 36]. Default Value: N/A. |
error_msg |
String |
Definition: Error message. Constraints: N/A. Range: [2, 4096]. Default Value: N/A. |
solution_msg |
String |
Definition: Solution description. Constraints: N/A. Range: [2, 4096]. Default Value: N/A. |
Status code: 408
Parameter |
Type |
Description |
---|---|---|
error_code |
String |
Definition: Error code. Constraints: N/A. Range: [8, 36]. Default Value: N/A. |
error_msg |
String |
Definition: Error message. Constraints: N/A. Range: [2, 4096]. Default Value: N/A. |
solution_msg |
String |
Definition: Solution description. Constraints: N/A. Range: [2, 4096]. Default Value: N/A. |
Status code: 500
Parameter |
Type |
Description |
---|---|---|
error_code |
String |
Definition: Error code. Constraints: N/A. Range: [8, 36]. Default Value: N/A. |
error_msg |
String |
Definition: Error message. Constraints: N/A. Range: [2, 4096]. Default Value: N/A. |
solution_msg |
String |
Definition: Solution description. Constraints: N/A. Range: [2, 4096]. Default Value: N/A. |
Example Requests
None
Example Responses
Status code: 200
The service instance list is queried.
{ "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" } ] }
Status code: 400
BadRequest
{ "error_code" : "common.01000001", "error_msg" : "failed to read http request, please check your input, code: 400, reason: Type mismatch., cause: TypeMismatchException" }
Status code: 401
Unauthorized
{ "error_code" : "APIG.1002", "error_msg" : "Incorrect token or token resolution failed" }
Status code: 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" }
Status code: 404
NotFound
{ "error_code" : "common.01000001", "error_msg" : "response status exception, code: 404" }
Status code: 408
Request Time-out
{ "error_code" : "common.00000408", "error_msg" : "timeout exception occurred" }
Status code: 500
InternalServerError
{ "error_code" : "common.00000500", "error_msg" : "internal error" }
Status Codes
Status Code |
Description |
---|---|
200 |
The service instance list is queried. |
400 |
BadRequest |
401 |
Unauthorized |
403 |
Forbidden |
404 |
NotFound |
408 |
Request Time-out |
500 |
InternalServerError |
Error Codes
See Error Codes.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot