用户资源
查询成员实时作业列表
1.接口说明
接口路径:/ac/openapi/v2/clusters/{clusterId}/groups/{groupId}/clusterUserNames/{clusterUserName}/jobs
请求方式:GET
请求数据类型:
接口描述:查询成员实时作业列表
2.请求消息
请求参数:
Headers:
| 名称 | 类型 | 必填 | 描述 |
|---|---|---|---|
| token | string | 是 | 令牌 |
参数:
| 名称 | 类型 | 必填 | 描述 |
|---|---|---|---|
| clusterId | Long | 是 | 区域ID |
| groupId | Long | 是 | 组ID |
| clusterUserName | String | 是 | 区域用户名 |
3.请求示例
cURL请求示例
shell
curl --location 'https://scnet-demo.accloud.cn/ac/openapi/v2/clusters/11112/groups/533686286955839488/clusterUserNames/test/jobs' \
--header 'token: <Token>'Java请求示例
java
import okhttp3.*;
public class QueryUserJobListDemo {
public static final String TOKEN = "<Token>";
public static void main(String[] args) throws Exception {
OkHttpClient client = new OkHttpClient().newBuilder()
.build();
Request request = new Request.Builder()
.url("https://scnet-demo.accloud.cn/ac/openapi/v2/clusters/11112/groups/533686286955839488/clusterUserNames/test/jobs")
.method("GET", null)
.addHeader("token", TOKEN)
.build();
Response response = client.newCall(request).execute();
System.out.println(response.body().string());
}
}Python请求示例
python
import requests
url = "https://scnet-demo.accloud.cn/ac/openapi/v2/clusters/11112/groups/533686286955839488/clusterUserNames/test/jobs"
payload = {}
headers = {
"token": "<Token>"
}
response = requests.request("GET", url, headers=headers, data=payload)
print(response.text)4.响应消息
返回参数
| 名称 | 类型 | 说明 | 示例 |
|---|---|---|---|
| msg | string | 信息 | success |
| code | string | 状态码 | 0 |
| data | array | 实时作业信息集合 | |
| id | string | 作业ID | 1466591 |
| name | string | 作业名称 | COMSOL_GUI_1031_103150 |
| status | string | 作业状态 | statR |
| nodeNumReq | Long | 请求的节点数 | 1 |
| cpuCore | Long | 实际使用的CPU数 | 1 |
| procNumReq | Long | 请求的CPU数 | 1 |
| gpuNum | Long | 实际使用的GPU数 | 1 |
| gpuNumReq | Long | 请求的GPU数 | 1 |
| dcuNumUsed | Long | 实际使用的DCU数 | 1 |
| dcuNumReq | Long | 请求的DCU数 | 1 |
返回示例:
json
{
"code":"0",
"msg":"success",
"data":[
{
"id":"1466591",
"name":"COMSOL_GUI_1031_103150",
"status":"statR",
"nodeNumReq":1,
"cpuCore":2,
"procNumReq":1,
"gpuNumReq":0,
"gpuNum":0,
"dcuNumReq":0,
"dcuNumUsed":0
}
]
}5.错误码
| 错误码 | 说明 |
|---|---|
| 10001 | 内部错误 |
| 10003 | 参数不全 |
| 10004 | 参数无效 |
| 10008 | 权限不足 |
| 10009 | 没有权限访问接口 |
| 0 | 接口调用成功 |