文档

GetWorkspace - 查询工作空间详情

更新时间:

查询工作空间基本信息。

调试

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

授权信息

当前API暂无授权信息透出。

请求语法

GET /api/workspaces/{workspaceId}

请求参数

名称类型必填描述示例值
workspaceIdstring

工作空间唯一标识,字符串形式,可在云效 DevStudio 访问空间链接中获取

6ed82817-ab75-4563-865d-81e60dxxxxxx

返回参数

名称类型描述示例值
object

Schema of Response

workspaceobject

工作空间信息

codeVersionstring

代码版本,支持 commitSHA、分支、标签

master
codeUrlstring

代码来源 URL

https://codeup.aliyun.com/demo/group/Codeup-Demo.git
namestring

工作空间名称

Demo
specstring

机器规格

2::4::60
statusstring

空间状态,枚举:CREATING-创建中, SUCCESS-运行中, FROZEN-冻结中, RECOVERING-恢复中

SUCCESS
templatestring

工作空间模板

all-in-one
idstring

工作空间唯一标识,字符串形式,可在云效 DevStudio 访问空间链接中获取

6ed82817-ab75-4563-865d-81e60dxxxxxx
userIdstring

用户阿里云 PK

1470227819xxxxxx
createTimestring

创建时间戳

1628564442000
successboolean

请求是否成功

true
errorCodestring

错误码

InvalidWorkspace.NotFound
errorMessagestring

错误信息

The workspace is not found.
requestIdstring

请求 ID

F7B85D1B-D1C2-140F-A039-341859F130B9

示例

正常返回示例

JSON格式

{
  "workspace": {
    "codeVersion": "master",
    "codeUrl": "https://codeup.aliyun.com/demo/group/Codeup-Demo.git",
    "name": "Demo",
    "spec": "2::4::60",
    "status": "SUCCESS",
    "template": "all-in-one",
    "id": "6ed82817-ab75-4563-865d-81e60dxxxxxx",
    "userId": "1470227819xxxxxx",
    "createTime": "1628564442000"
  },
  "success": true,
  "errorCode": "InvalidWorkspace.NotFound",
  "errorMessage": "The workspace is not found.",
  "requestId": "F7B85D1B-D1C2-140F-A039-341859F130B9"
}

错误码

HTTP status code错误码错误信息描述
403Forbidden.AccessDeniedThe user is not authorized to perform the operation.用户无权限执行相关操作
404InvalidWorkspace.NotFoundThe workspace is not found.工作空间不存在

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

  • 本页导读 (0)
文档反馈