Obtaining Workspace Information
Description
This API is used to obtain the workspace information of ModelArts real-time services. When source is set to custom_from_modelarts_v2 during the creation of a custom endpoint, the infer_service_id is obtained.
Constraints
This function is only supported in CN-Hong Kong.
URI
GET /v1/{project_id}/maas/services/workspace/{region_id}
Parameter | Mandatory | Type | Description |
|---|---|---|---|
project-id | Yes | String | Definition: Project ID. For details about how to obtain the project ID, see Obtaining a Project ID and Name. Constraints: N/A. Range: N/A. Default Value: N/A. |
region_id | Yes | String | Definition: Region information of ModelArts real-time services. For details about how to obtain the value, see Obtaining Region Information. Constraints: N/A. Range: N/A. Default Value: N/A. |
Request Parameters
Parameter | Mandatory | Type | Description |
|---|---|---|---|
X-Auth-Token | Yes | String | Definition: User token. The token can be obtained by calling the IAM API used to obtain a user token. The value of X-Subject-Token in the response header is the user token. For details, see Authentication. Constraints: N/A. Range: N/A. Default Value: N/A. |
Content-Type | Yes | String | Definition: Type of the message body. The value is fixed to application/json. Constraints: N/A. Range: N/A. Default Value: N/A. |
Response Parameters
Parameter | Type | Description |
|---|---|---|
total_count | Integer | Definition: Total number of workspaces that can be queried. Range: N/A. |
count | Integer | Definition: Number of workspaces returned in this query. Range: N/A. |
workspaces | Array[WorkspaceInfo] | Definition: Workspace information. Range: N/A. |
Parameter | Type | Description |
|---|---|---|
id | String | Definition: Workspace ID. Range: N/A. |
name | String | Definition: Workspace name. Range: N/A. |
description | String | Definition: Workspace description. Range: N/A. |
owner | String | Definition: Workspace owner. Range: N/A. |
create_time | String | Definition: Creation time. Range: N/A. |
update_time | String | Definition: Update time. Range: N/A. |
auth_type | String | Definition: Authentication type. Range: N/A. |
Parameter | Type | Description |
|---|---|---|
error_msg | String | Definition: Error description. Range: N/A. |
error_code | String | Definition: Error code, indicating the error type. Range: N/A. |
Response Example
- Success response. Status code: 200.
{ "total_count": 1, "count": 1, "workspaces": [ { "id": "0", "name": "default", "description": "", "owner": "******", "create_time": 1680746333000, "update_time": 1764128642000, "auth_type": "public" } ] } - Error response. Status code: 400.
{ "error_msg": "Invalid token.", "error_code": "ModelArts.0104" }
Status Codes
For details, see Status Codes.
Error Codes
For details, 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
