并行 ParaCloud API 整合文档

接口 35 · 冲突/差异标注 7
当前显示 35

关于本文档

本文由三份零散材料去重合并而成,正文以最新来源优先为原则,冲突与差异处已在对应接口下方标注。

来源版本日期优先级收录接口
作业提交API文档.md2024/5/101(最高)10
提交作业流程0312.pdf未标注(文件名 0312)24
ParaCloud API文档.pdf2024/1/31330
作业提交API文档.md 最新,冲突时以其为准 提交作业流程0312.pdf 补充提交流程与版本限制接口 ParaCloud API文档.pdf 覆盖面最广,提供文件与队列资源接口

提交作业标准流程 流程

来自《提交作业流程0312.pdf》,是提交一个作业应遵循的调用顺序。

  1. 1
    获取队列资源
    /api/app/resource 主要获取当前用户有哪些队列资源和应用
  2. 2
    获取应用版本限制核心
    api/app/version/limit 获取不同版本的限制
  3. 3
    获取应用模板
    /api/app/template 获取应用的提交模板,主要是页面的提交选项
  4. 4
    填写作业参数
  5. 5
    提交作业
    查询应用的资源 接口地址: /api/app/resource 请求方式: GET 请求数据类型: application/x-www-form-urlencoded 响应数据类型: */* 接口描述: 请求参数: 请求参数: 响应状态: 状态码 说明 schema 200 successfully VoUserAppResource 401 You are not authorized to view the resource 403 Accessing the resource you were trying to reach is forbidden 404 The resource you were trying to reach is not found 500 error 响应参数: 参数名称 参数说明 类型 schema appCode 应用编码 string appResourceId 应用资源 id integer(int64) integer(int64) appSubmitType 可用值 :CALCULATE,VIEW string appVersionOrder 应用版本排序字段 integer(int32) integer(int32) changeQueue 是否可以切换队列 boolean cluster 集群 string coresPending 排队核心数 integer(int64) integer(int64) coresPrep 准备核心数 integer(int64) integer(int64) coresRemaining 剩余核心数 integer(int64) integer(int64) coresRunning 运行核心数 integer(int64) integer(int64) coresTotal 总的核心数 integer(int64) integer(int64) cpus 核数 integer(int64) integer(int64) cpusLimit cpu 上限 integer(int64) integer(int64) defaultPendingChangeQueueMinutes 默认排队多少分钟切换队列 integer(int64) integer(int64) elasticityQueue 是否为弹性队列 boolean elasticityQueueInfos 这个字段可忽略 array VoElasticityQueueInfo cluster string coresPending integer(int64) coresPrep integer(int64) coresRemaining integer(int64) coresRunning integer(int64) coresTotal integer(int64) cpus integer(int64) gpus integer(int64) gpusPending integer(int64) gpusRemaining integer(int64) gpusRunning integer(int64) gpusTotal integer(int64) maxRunResNcpus integer(int64) name string nodeRmaining integer(int64) nodeRunning integer(int64) nodeTotal integer(int64) paraUid string platform string queue string queueInfo string 参数名称 参数说明 类型 schema queueName string reserve boolean zone string zoneUser string elasticityQueues 弹性队列 string enableEditFastCalculationTime 是否启用编辑快算时间 boolean enableForceFastCalculation 是否启用强制快速 boolean enableLimit 是否启用上限 boolean enablePendingChangeQueueMinutes 是否启用等待切换队列 boolean gpus gpus 卡数 integer(int64) integer(int64) gpusPending 排队卡数 integer(int64) integer(int64) gpusRemaining 剩余卡数 integer(int64) integer(int64) gpusRunning 运行卡数 integer(int64) integer(int64) gpusTotal 总的卡数 integer(int64) integer(int64) maxElasticityQueueCoresPending 最大弹性队列排队核心数 integer(int64) integer(int64) maxElasticityQueueCoresRemaining 最大弹性队列剩余核心数 integer(int64) integer(int64) maxElasticityQueueCoresRunning 最大弹性队列运行核心数 integer(int64) integer(int64) maxElasticityQueueCoresTotal 最大弹性队列总的核心数 integer(int64) integer(int64) maxElasticityQueueGpusPending 最大弹性队列排队 gpu 卡数 integer(int64) integer(int64) maxElasticityQueueGpusRemaining 最大弹性队列排队 gpu 卡数 integer(int64) integer(int64) maxElasticityQueueGpusRunning 最大弹性队列运行 gpu 卡数 integer(int64) integer(int64) maxElasticityQueueGpusTotal 最大弹性队列总的 gpu 卡数 integer(int64) integer(int64) maxNoSameElasticityQueueCoresPending 最大不同弹性队列排队核心数 integer(int64) integer(int64) maxNoSameElasticityQueueCoresRemaining 最大不同弹性队列剩余核心数 integer(int64) integer(int64) maxNoSameElasticityQueueCoresRunning 最大不同弹性队列运行核心数 integer(int64) integer(int64) maxNoSameElasticityQueueCoresTotal 最大不同弹性队列总的核心数 integer(int64) integer(int64) maxNoSameElasticityQueueGpusPending 最大不同弹性队列剩余 gpu 卡数 integer(int64) integer(int64) maxNoSameElasticityQueueGpusRemaining 最大不同弹性队列剩余 gpu 卡数 integer(int64) integer(int64) maxNoSameElasticityQueueGpusRunning 最大不同弹性队列剩余 gpu 卡数 integer(int64) integer(int64) maxNoSameElasticityQueueGpusTotal 最大不同弹性队列剩余 gpu 卡数 integer(int64) integer(int64) maxRunResNcpus 最大运行资源核心数 integer(int64) integer(int64) maxSameElasticityQueueCoresPending 最大相同弹性队列排队核心数 integer(int64) integer(int64) maxSameElasticityQueueCoresRemaining 最大相同弹性队列剩余核心数 integer(int64) integer(int64) maxSameElasticityQueueCoresRunning 最大相同弹性队列运行核心数 integer(int64) integer(int64) maxSameElasticityQueueCoresTotal 最大相同弹性队列总的核心数 integer(int64) integer(int64) maxSameElasticityQueueGpusPending 最大相同弹性队列排队卡数 integer(int64) integer(int64) maxSameElasticityQueueGpusRemaining 最大相同弹性队列剩余卡数 integer(int64) integer(int64) 参数名称 参数说明 类型 schema maxSameElasticityQueueGpusRunning 最大相同弹性队列运行卡数 integer(int64) integer(int64) maxSameElasticityQueueGpusTotal 最大相同弹性队列总的卡数 integer(int64) integer(int64) name 队列名称 string ngpusLimit gpu 核心上限 integer(int64) integer(int64) nodeRmaining 剩余节点 integer(int64) integer(int64) nodeRunning 运行节点 integer(int64) integer(int64) nodeTotal 总的节点 integer(int64) integer(int64) platform 平台 string queue 队列 string queueInfo 队列信息 string queueName 队列名称 string queueOrder 队列排序字段 integer(int32) integer(int32) reserve 此字段没有作用 boolean singleJobMaxCores 单个作业最大核心数 integer(int64) integer(int64) type 可用值 :CPU,GPU string version 版本 string voLicenseModelDataList array VoLicenseModelData licenseAppCode string licenseAppModelName string licenseTotal integer(int64) licenseUsed integer(int64) zone 区域 string zoneAccessType 可用值 :INTERNET,LOCAL_AREA_NETWORK,PARA_GATEWAY string zoneUser string 响应示例: [ { "appCode": "", "appResourceId": 0, "appSubmitType": "", "appVersionOrder": 0, "changeQueue": true, "cluster": "", "coresPending": 0, "coresPrep": 0, "coresRemaining": 0, "coresRunning": 0, "coresTotal": 0, "cpus": 0, "cpusLimit": 0, "defaultPendingChangeQueueMinutes": 0, "elasticityQueue": true, "elasticityQueueInfos": [ { "cluster": "", "coresPending": 0, "coresPrep": 0, "coresRemaining": 0, "coresRunning": 0, "coresTotal": 0, "cpus": 0, "gpus": 0, "gpusPending": 0, "gpusRemaining": 0, "gpusRunning": 0, "gpusTotal": 0, "maxRunResNcpus": 0, "name": "", "nodeRmaining": 0, "nodeRunning": 0, "nodeTotal": 0, "paraUid": "", "platform": "", "queue": "", "queueInfo": "", "queueName": "", "reserve": true, "zone": "", "zoneUser": "" } ], "elasticityQueues": "", "enableEditFastCalculationTime": true, "enableForceFastCalculation": true, "enableLimit": true, "enablePendingChangeQueueMinutes": true, "gpus": 0, "gpusPending": 0, "gpusRemaining": 0, "gpusRunning": 0, "gpusTotal": 0, "maxElasticityQueueCoresPending": 0, "maxElasticityQueueCoresRemaining": 0, "maxElasticityQueueCoresRunning": 0, "maxElasticityQueueCoresTotal": 0, "maxElasticityQueueGpusPending": 0, "maxElasticityQueueGpusRemaining": 0, "maxElasticityQueueGpusRunning": 0, "maxElasticityQueueGpusTotal": 0, "maxNoSameElasticityQueueCoresPending": 0, "maxNoSameElasticityQueueCoresRemaining": 0, "maxNoSameElasticityQueueCoresRunning": 0, "maxNoSameElasticityQueueCoresTotal": 0, "maxNoSameElasticityQueueGpusPending": 0, "maxNoSameElasticityQueueGpusRemaining": 0, "maxNoSameElasticityQueueGpusRunning": 0, "maxNoSameElasticityQueueGpusTotal": 0, "maxRunResNcpus": 0, "maxSameElasticityQueueCoresPending": 0, "maxSameElasticityQueueCoresRemaining": 0, 参数名称 参数说明 请求类型 是否必须 数据类型 schema appCode appCode query true string version version query true string 查询用户指定版本的规模提交限制 接口地址: /api/app/version/limit 请求方式: GET 请求数据类型: application/x-www-form-urlencoded 响应数据类型: */* 接口描述: 请求参数: 请求参数: "maxSameElasticityQueueCoresRunning": 0, "maxSameElasticityQueueCoresTotal": 0, "maxSameElasticityQueueGpusPending": 0, "maxSameElasticityQueueGpusRemaining": 0, "maxSameElasticityQueueGpusRunning": 0, "maxSameElasticityQueueGpusTotal": 0, "name": "", "ngpusLimit": 0, "nodeRmaining": 0, "nodeRunning": 0, "nodeTotal": 0, "platform": "", "queue": "", "queueInfo": "", "queueName": "", "queueOrder": 0, "reserve": true, "singleJobMaxCores": 0, "type": "", "version": "", "voLicenseModelDataList": [ { "licenseAppCode": "", "licenseAppModelName": "", "licenseTotal": 0, "licenseUsed": 0 } ], "zone": "", "zoneAccessType": "", "zoneUser": "" } ] 状态码 说明 schema 200 successfully VoAppLimit 401 You are not authorized to view the resource 403 Accessing the resource you were trying to reach is forbidden 404 The resource you were trying to reach is not found 500 error 参数名称 参数说明 类型 schema userCores integer(int64) integer(int64) 参数名称 参数说明 请求类型 是否必须 数据类型 schema appCode appCode query true string version version query true string 响应状态: 响应参数: 响应示例: 查询应用的模板 接口地址: /api/app/template 请求方式: GET 请求数据类型: application/x-www-form-urlencoded 响应数据类型: */* 接口描述: 这个接口主要是给前端页面动态渲染表单用的,主要是 cmd 参数和 param 参数。 cmd 参数: 公共参数,主要为一些 核心数 资源信息; param 参数:作业提交参数,比如作业标签等信息。具体可以 查看 管理控制台 \ 应用中心 \ 版本模板 点击 更新,有个模板字段 请求参数: 请求参数: 响应状态: { "userCores": 0 } 状态码 说明 schema 200 successfully 401 You are not authorized to view the resource 403 Accessing the resource you were trying to reach is forbidden 404 The resource you were trying to reach is not found 500 error 参数名称 参数说明 请求类型 是否必须 数据类型 schema queue queue query false string 状态码 说明 schema 200 successfully FileStorage 401 You are not authorized to view the resource 403 Accessing the resource you were trying to reach is forbidden 404 The resource you were trying to reach is not found 500 error 响应参数: 暂无 响应示例: 提交作业可用的存储基本路径 接口地址: /api/storage 请求方式: GET 请求数据类型: application/x-www-form-urlencoded 响应数据类型: */* 接口描述: 请求参数: 请求参数: 响应状态: 响应参数: 参数名称 参数说明 类型 schema cloud 是否为云端 boolean cluster 集群 string paraUid string paths array zone 区域 string zoneAccessType 可用值 :INTERNET,LOCAL_AREA_NETWORK,PARA_GATEWAY string zoneClusterDisks 区域集群磁盘路径 array VoZoneClusterDisk cluster 集群 string diskPath 磁盘路径 string hardDiskLimit 允许分配的磁盘容量( Byte ) integer(int64) hardDiskPath 磁盘挂载路径 string hardDiskRatio 磁盘使用比例(百分比) number(float) hardDiskUsage 磁盘已使用容量( Byte ) integer(int64) id integer(int64) name 名称 string order 排序字段 integer(int64) path string type 可用值 :BACKUP_DIR,DEPARTMENT_DIR,GLOBAL_DIR,SHARE_DIR,TMP_DIR,WORK_DIR string zone 区域 string zoneUser 区域用户 string 响应示例: [ { "cloud": true, "cluster": "", "paraUid": "", "paths": [], "zone": "", "zoneAccessType": "", "zoneClusterDisks": [ { "cluster": "", "diskPath": "", "hardDiskLimit": 0, "hardDiskPath": "", "hardDiskRatio": 0, "hardDiskUsage": 0, "id": 0, "name": "", "order": 0, "path": "", "type": "", "zone": "" }
POST/api/user/login
作业提交API文档.mdParaCloud API文档.pdf

用户登录接口 #1

差异《作业提交API文档.md》(2024/5/10)记录 4 个请求参数,《ParaCloud API文档.pdf》记录 25 个;本文采用前者。

请求示例: javascript { "password": "", "username": "", "verifyCode": "" }

请求类型 application/x-www-form-urlencoded,application/json响应类型 */*

请求参数 4

参数名称参数说明位置必须类型
loginParamLoginParambodytrueLoginParam
password密码truestring
username用户名truestring
verifyCode验证码(如果没有启动验证,可忽)falsestring

响应状态

状态码说明schema
200successfullyVoUserGroup
201Created
401You are not authorized to view the resource
403Accessing the resource you were trying to reach is forbidden
404The resource you were trying to reach is not found
500error
50001登录剩余尝试次数。示例:{"code":50001,"msg":"剩余尝试次数","params":["4"]}
50002验证码错误
50004认证错误(账号密码不匹配)
50097账号已被锁住
响应参数(33)
参数名称参数说明类型schema
accountExpireRemindboolean
accountExpireRemindDayinteger(int64)integer(int64)
accountExpiresstring(date-time)string(date-time)
allowDownloadboolean
changePasswordboolean
createdDate创建时间string(date-time)string(date-time)
descriptionstring
disable是否禁用用户boolean
disableDatestring(date-time)string(date-time)
emailstring
expandDateFirststring(date-time)string(date-time)
expandFirststring
expandSecondstring
gidinteger(int64)integer(int64)
groupNmestring
homeDirectorystring
idinteger(int64)integer(int64)
initboolean
isDeletedboolean
passwordExpiresstring(date-time)string(date-time)
quotaMonthCpuTimeConsumeinteger(int64)integer(int64)
quotaMonthCpuTimeTotalinteger(int64)integer(int64)
quotaMonthGpuTimeConsumeinteger(int64)integer(int64)
quotaMonthGpuTimeTotalinteger(int64)integer(int64)
resignboolean
resignDatestring(date-time)string(date-time)
roleId角色idinteger(int64)integer(int64)
sidstring
uid用户uidstring
updatedDate更新时间string(date-time)string(date-time)
userScope可用值:EXTERNAL,INTERNALstring
userSecurityLevel可用值:CORE,GENERAL,IMPORTANT,NONEstring
usernamestring
响应示例
json
{
	"accountExpireRemind": true,
	"accountExpireRemindDay": 0,
	"accountExpires": "",
	"allowDownload": true,
	"changePassword": true,
	"createdDate": "",
	"description": "",
	"disable": true,
	"disableDate": "",
	"email": "",
	"expandDateFirst": "",
	"expandFirst": "",
	"expandSecond": "",
	"gid": 0,
	"groupNme": "",
	"homeDirectory": "",
	"id": 0,
	"init": true,
	"isDeleted": true,
	"passwordExpires": "",
	"quotaMonthCpuTimeConsume": 0,
	"quotaMonthCpuTimeTotal": 0,
	"quotaMonthGpuTimeConsume": 0,
	"quotaMonthGpuTimeTotal": 0,
	"resign": true,
	"resignDate": "",
	"roleId": 0,
	"sid": "",
	"uid": "",
	"updatedDate": "",
	"userScope": "",
	"userSecurityLevel": "",
	"username": ""
}
请求示例
json
{
  "password": "",
  "username": "",
  "verifyCode": ""
}
Java / OkHttp 示例
java
import okhttp3.*;

import java.io.IOException;

public class Main {
    public static void main(String[] args) throws IOException {
        OkHttpClient client = new OkHttpClient().newBuilder()
                .build();
        MediaType mediaType = MediaType.parse("application/json");
        RequestBody body = RequestBody.create(mediaType, "{\r\n  \"password\": \"xxx\",\r\n  \"username\": \"xxx\"\r\n}");
        Request request = new Request.Builder()
                .url("https://pc.paratera.com:10443/api/user/login")
                .method("POST", body)
                .addHeader("Content-Type", "application/json")
                .addHeader("Cookie", "PAA_TOKEN=CC98603D656B4369B56CE9AB76FA50CEPCADMIN_1717659651692; SESSION=YWE5MzY5YjAtODM0Ni00MzY5LWE2ZmEtMTQ0YWQxZGQ2YmZk")
                .build();
        Response response = client.newCall(request).execute();
        System.out.println("response = " + response.toString());
    }
}
Python / requests 示例
python
import requests
import json

url = "https://pc.paratera.com:10443/api/user/login"

payload = json.dumps({
  "password": "xxx",
  "username": "xxx"
})
headers = {
  'Content-Type': 'application/json',
  'Cookie': 'PAA_TOKEN=CC98603D656B4369B56CE9AB76FA50CEPCADMIN_1717659651692; SESSION=YWE5MzY5YjAtODM0Ni00MzY5LWE2ZmEtMTQ0YWQxZGQ2YmZk'
}

response = requests.request("POST", url, headers=headers, data=payload)

print(response.text)
GET/api/app/resource
作业提交API文档.md提交作业流程0312.pdfParaCloud API文档.pdf

查询应用的资源 #2

差异《作业提交API文档.md》(2024/5/10)记录 3 个请求参数,《ParaCloud API文档.pdf》记录 1 个;本文采用前者。

请求参数: | 参数名称 | 参数说明 | 请求类型 | 是否必须 | 数据类型 | schema | | ------------- | ----------------------------------- | -------- | -------- | -------- | ------ | | appCode | appCode | query | true | string | | | version | version | query | false | string | | | appSubmitType | appSubmitType,可用值:CALCULATE,VIEW | query | false | string | |

请求类型 application/x-www-form-urlencoded响应类型 */*

请求参数 3

参数名称参数说明位置必须类型
appCodeappCodequerytruestring
versionversionqueryfalsestring
appSubmitTypeappSubmitType,可用值:CALCULATE,VIEWqueryfalsestring

响应状态

状态码说明schema
200successfullyVoUserAppResource
401You are not authorized to view the resource
403Accessing the resource you were trying to reach is forbidden
404The resource you were trying to reach is not found
500error
响应参数(89)
参数名称参数说明类型schema
appCodestring
appResourceIdinteger(int64)integer(int64)
appSubmitType可用值:CALCULATE,VIEWstring
appVersionOrderinteger(int32)integer(int32)
changeQueueboolean
clusterstring
coresPendinginteger(int64)integer(int64)
coresPrepinteger(int64)integer(int64)
coresRemaininginteger(int64)integer(int64)
coresRunninginteger(int64)integer(int64)
coresTotalinteger(int64)integer(int64)
cpusinteger(int64)integer(int64)
cpusLimitinteger(int64)integer(int64)
defaultPendingChangeQueueMinutesinteger(int64)integer(int64)
elasticityQueueboolean
elasticityQueueInfosarrayVoElasticityQueueInfo
gpusinteger(int64)
gpusPendinginteger(int64)
gpusRemaininginteger(int64)
gpusRunninginteger(int64)
gpusTotalinteger(int64)
maxRunResNcpusinteger(int64)
namestring
nodeRmaininginteger(int64)
nodeRunninginteger(int64)
nodeTotalinteger(int64)
paraUidstring
platformstring
queuestring
queueInfostring
queueNamestring
reserveboolean
zonestring
zoneUserstring
elasticityQueuesstring
enableEditFastCalculationTimeboolean
enableForceFastCalculationboolean
enableLimitboolean
enablePendingChangeQueueMinutesboolean
maxElasticityQueueCoresPendinginteger(int64)integer(int64)
maxElasticityQueueCoresRemaininginteger(int64)integer(int64)
maxElasticityQueueCoresRunninginteger(int64)integer(int64)
maxElasticityQueueCoresTotalinteger(int64)integer(int64)
maxElasticityQueueGpusPendinginteger(int64)integer(int64)
maxElasticityQueueGpusRemaininginteger(int64)integer(int64)
maxElasticityQueueGpusRunninginteger(int64)integer(int64)
maxElasticityQueueGpusTotalinteger(int64)integer(int64)
maxNoSameElasticityQueueCoresPendinginteger(int64)integer(int64)
maxNoSameElasticityQueueCoresRemaininginteger(int64)integer(int64)
maxNoSameElasticityQueueCoresRunninginteger(int64)integer(int64)
maxNoSameElasticityQueueCoresTotalinteger(int64)integer(int64)
maxNoSameElasticityQueueGpusPendinginteger(int64)integer(int64)
maxNoSameElasticityQueueGpusRemaininginteger(int64)integer(int64)
maxNoSameElasticityQueueGpusRunninginteger(int64)integer(int64)
maxNoSameElasticityQueueGpusTotalinteger(int64)integer(int64)
maxSameElasticityQueueCoresPendinginteger(int64)integer(int64)
maxSameElasticityQueueCoresRemaininginteger(int64)integer(int64)
maxSameElasticityQueueCoresRunninginteger(int64)integer(int64)
maxSameElasticityQueueCoresTotalinteger(int64)integer(int64)
maxSameElasticityQueueGpusPendinginteger(int64)integer(int64)
maxSameElasticityQueueGpusRemaininginteger(int64)integer(int64)
maxSameElasticityQueueGpusRunninginteger(int64)integer(int64)
maxSameElasticityQueueGpusTotalinteger(int64)integer(int64)
ngpusLimitinteger(int64)integer(int64)
queueOrderinteger(int32)integer(int32)
queueResourceIdinteger(int64)integer(int64)
queueResourceNamestring
singleJobMaxCoresinteger(int64)integer(int64)
type可用值:CPU,GPUstring
userAppFastCalculationConfUserAppFastCalculationConfUserAppFastCalculationConf
appSubmitStrategyType可用值:DEFAULT,FORCE_FREE_RESOURCEstring
appTimeSubmitStrategyAppTimeSubmitStrategyAppTimeSubmitStrategy
etime策略结束时间integer
pcqm切换队列时长integer
stime策略开始时间integer
strategy应用时间提交策略,DEFAULT 默认 FORCE_FREE_RESOURCE,强制必须有资源,可用值:DEFAULT,FORCE_FREE_RESOURCEstring
enableFastCalculationTimeEndinteger(int32)
enableFastCalculationTimeStartinteger(int32)
fastCalculationboolean
fastCalculationTimeboolean
fastCalculationType可用值:DISABLE,FORCE,NORMALstring
pendingChangeQueueMinutesinteger(int64)
versionstring
voLicenseModelDataListarrayVoLicenseModelData
licenseAppCodestring
licenseAppModelNamestring
licenseTotalinteger(int64)
licenseUsedinteger(int64)
zoneAccessType可用值:INTERNET,LOCAL_AREA_NETWORK,PARA_GATEWAYstring
响应示例
json
[
	{
		"appCode": "",
		"appResourceId": 0,
		"appSubmitType": "",
		"appVersionOrder": 0,
		"changeQueue": true,
		"cluster": "",
		"coresPending": 0,
		"coresPrep": 0,
		"coresRemaining": 0,
		"coresRunning": 0,
		"coresTotal": 0,
		"cpus": 0,
		"cpusLimit": 0,
		"defaultPendingChangeQueueMinutes": 0,
		"elasticityQueue": true,
		"elasticityQueueInfos": [
			{
				"cluster": "",
				"coresPending": 0,
				"coresPrep": 0,
				"coresRemaining": 0,
				"coresRunning": 0,
				"coresTotal": 0,
				"cpus": 0,
				"gpus": 0,
				"gpusPending": 0,
				"gpusRemaining": 0,
				"gpusRunning": 0,
				"gpusTotal": 0,
				"maxRunResNcpus": 0,
				"name": "",
				"nodeRmaining": 0,
				"nodeRunning": 0,
				"nodeTotal": 0,
				"paraUid": "",
				"platform": "",
				"queue": "",
				"queueInfo": "",
				"queueName": "",
				"reserve": true,
				"zone": "",
				"zoneUser": ""
			}
		],
		"elasticityQueues": "",
		"enableEditFastCalculationTime": true,
		"enableForceFastCalculation": true,
		"enableLimit": true,
		"enablePendingChangeQueueMinutes": true,
		"gpus": 0,
		"gpusPending": 0,
		"gpusRemaining": 0,
		"gpusRunning": 0,
		"gpusTotal": 0,
		"maxElasticityQueueCoresPending": 0,
		"maxElasticityQueueCoresRemaining": 0,
		"maxElasticityQueueCoresRunning": 0,
		"maxElasticityQueueCoresTotal": 0,
		"maxElasticityQueueGpusPending": 0,
		"maxElasticityQueueGpusRemaining": 0,
		"maxElasticityQueueGpusRunning": 0,
		"maxElasticityQueueGpusTotal": 0,
		"maxNoSameElasticityQueueCoresPending": 0,
		"maxNoSameElasticityQueueCoresRemaining": 0,
		"maxNoSameElasticityQueueCoresRunning": 0,
		"maxNoSameElasticityQueueCoresTotal": 0,
		"maxNoSameElasticityQueueGpusPending": 0,
		"maxNoSameElasticityQueueGpusRemaining": 0,
		"maxNoSameElasticityQueueGpusRunning": 0,
		"maxNoSameElasticityQueueGpusTotal": 0,
		"maxRunResNcpus": 0,
		"maxSameElasticityQueueCoresPending": 0,
		"maxSameElasticityQueueCoresRemaining": 0,
		"maxSameElasticityQueueCoresRunning": 0,
		"maxSameElasticityQueueCoresTotal": 0,
		"maxSameElasticityQueueGpusPending": 0,
		"maxSameElasticityQueueGpusRemaining": 0,
		"maxSameElasticityQueueGpusRunning": 0,
		"maxSameElasticityQueueGpusTotal": 0,
		"name": "",
		"ngpusLimit": 0,
		"nodeRmaining": 0,
		"nodeRunning": 0,
		"nodeTotal": 0,
		"platform": "",
		"queue": "",
		"queueInfo": "",
		"queueName": "",
		"queueOrder": 0,
		"queueResourceId": 0,
		"queueResourceName": "",
		"reserve": true,
		"singleJobMaxCores": 0,
		"type": "",
		"userAppFastCalculationConf": {
			"appSubmitStrategyType": "",
			"appTimeSubmitStrategy": {
				"etime": 0,
				"pcqm": 0,
				"stime": 0,
				"strategy": ""
			},
			"defaultPendingChangeQueueMinutes": 0,
			"enableEditFastCalculationTime": true,
			"enableFastCalculationTimeEnd": 0,
			"enableFastCalculationTimeStart": 0,
			"fastCalculation": true,
			"fastCalculationTime": true,
			"fastCalculationType": "",
			"pendingChangeQueueMinutes": 0
		},
		"version": "",
		"voLicenseModelDataList": [
			{
				"licenseAppCode": "",
				"licenseAppModelName": "",
				"licenseTotal": 0,
				"licenseUsed": 0
			}
		],
		"zone": "",
		"zoneAccessType": "",
		"zoneUser": ""
	}
]
Java / OkHttp 示例
java
import okhttp3.*;

import java.io.IOException;

public class Main {
    public static void main(String[] args) throws IOException {
        OkHttpClient client = new OkHttpClient().newBuilder()
                .build();
        Request request = new Request.Builder()
                .url("https://pc.paratera.com:10443/api/app/resource?appCode=starccm&version=17.02.007-R8-DEMO&appSubmitType=CALCULATE")
                .addHeader("Cookie", "PAA_TOKEN=CC98603D656B4369B56CE9AB76FA50CEPCADMIN_1717659651692; SESSION=YWE5MzY5YjAtODM0Ni00MzY5LWE2ZmEtMTQ0YWQxZGQ2YmZk")
                .build();
        Response response = client.newCall(request).execute();
        System.out.println("response = " + response.toString());
    }
}
Python / requests 示例
python
import requests

url = "https://pc.paratera.com:10443/api/app/resource?appCode=starccm&version=17.02.007-R8-DEMO&appSubmitType=CALCULATE"

payload = {}
headers = {
  'Cookie': 'PAA_TOKEN=CC98603D656B4369B56CE9AB76FA50CEPCADMIN_1717659651692; SESSION=YWE5MzY5YjAtODM0Ni00MzY5LWE2ZmEtMTQ0YWQxZGQ2YmZk'
}

response = requests.request("GET", url, headers=headers, data=payload)

print(response.text)
GET/api/app/template
作业提交API文档.md提交作业流程0312.pdf

查询应用的模板 #3

差异《作业提交API文档.md》(2024/5/10)记录 2 个请求参数,《提交作业流程0312.pdf》记录 1 个;本文采用前者。

请求参数: | 参数名称 | 参数说明 | 请求类型 | 是否必须 | 数据类型 | schema | | -------- | -------- | -------- | -------- | -------- | ------ | | appCode | appCode | query | true | string | | | version | version | query | true | string | |

请求类型 application/x-www-form-urlencoded响应类型 */*

请求参数 2

参数名称参数说明位置必须类型
appCodeappCodequerytruestring
versionversionquerytruestring

响应状态

状态码说明schema
200successfully
401You are not authorized to view the resource
403Accessing the resource you were trying to reach is forbidden
404The resource you were trying to reach is not found
500error
响应示例
json
接口描述: 这个接口主要是给前端页面动态渲染表单用的,主要是  cmd 参数和  param 参数。 cmd 参数:
公共参数,主要为一些  核心数  资源信息; param 参数:作业提交参数,比如作业标签等信息。具体可以
查看  管理控制台 \ 应用中心 \ 版本模板   点击  更新,有个模板字段
提交作业可用的存储基本路径
Java / OkHttp 示例
java
import okhttp3.*;

import java.io.IOException;

public class Main {
    public static void main(String[] args) throws IOException {
        OkHttpClient client = new OkHttpClient().newBuilder()
                .build();
        Request request = new Request.Builder()
                .url("https://pc.paratera.com:10443/api/app/template?appCode=starccm&version=17.02.007-R8-DEMO")
                .addHeader("Cookie", "PAA_TOKEN=CC98603D656B4369B56CE9AB76FA50CEPCADMIN_1717659651692; SESSION=YWE5MzY5YjAtODM0Ni00MzY5LWE2ZmEtMTQ0YWQxZGQ2YmZk")
                .build();
        Response response = client.newCall(request).execute();
        System.out.println("response = " + response.toString());
    }
}
Python / requests 示例
python
import requests

url = "https://pc.paratera.com:10443/api/app/template?appCode=starccm&version=17.02.007-R8-DEMO"

payload = {}
headers = {
  'Cookie': 'PAA_TOKEN=CC98603D656B4369B56CE9AB76FA50CEPCADMIN_1717659651692; SESSION=YWE5MzY5YjAtODM0Ni00MzY5LWE2ZmEtMTQ0YWQxZGQ2YmZk'
}

response = requests.request("GET", url, headers=headers, data=payload)

print(response.text)
GET/api/app/version
作业提交API文档.md

查询应用可使用的版本 #4

差异《提交作业流程0312.pdf》另有独立接口 /api/app/version/limit(查询指定版本的规模提交限制),二者非同一接口,已分别收录。

请求参数: | 参数名称 | 参数说明 | 请求类型 | 是否必须 | 数据类型 | schema | | -------- | -------- | -------- | -------- | -------- | ------ | | appCode | appCode | query | true | string | |

请求类型 application/x-www-form-urlencoded响应类型 */*

请求参数 1

参数名称参数说明位置必须类型
appCodeappCodequerytruestring

响应状态

状态码说明schema
200successfullyAppVersion
401You are not authorized to view the resource
403Accessing the resource you were trying to reach is forbidden
404The resource you were trying to reach is not found
500error
响应参数(11)
参数名称参数说明类型schema
appCodestring
appSubmitType可用值:CALCULATE,VIEWstring
appVersionstring
appVersionOrderinteger(int32)integer(int32)
createdDate创建时间string(date-time)string(date-time)
enableSscElasticity是否启用ssc弹性, 1:是, 0: 否boolean
idinteger(int64)integer(int64)
licenseAppModelstring
singleJobMaxCoresinteger(int64)integer(int64)
type可用值:CPU,GPUstring
updatedDate更新时间string(date-time)string(date-time)
响应示例
json
[
	{
		"appCode": "",
		"appSubmitType": "",
		"appVersion": "",
		"appVersionOrder": 0,
		"createdDate": "",
		"enableSscElasticity": false,
		"id": 0,
		"licenseAppModel": "",
		"singleJobMaxCores": 0,
		"type": "",
		"updatedDate": ""
	}
]
Java / OkHttp 示例
java
import okhttp3.*;

import java.io.IOException;

public class Main {
    public static void main(String[] args) throws IOException {
        OkHttpClient client = new OkHttpClient().newBuilder()
                .build();
        Request request = new Request.Builder()
                .url("https://pc.paratera.com:10443/api/app/version?appCode=starccm")
                .addHeader("Cookie", "PAA_TOKEN=CC98603D656B4369B56CE9AB76FA50CEPCADMIN_1717659651692; SESSION=YWE5MzY5YjAtODM0Ni00MzY5LWE2ZmEtMTQ0YWQxZGQ2YmZk")
                .build();
        Response response = client.newCall(request).execute();
        System.out.println("response = " + response.toString());
    }
}
Python / requests 示例
python
import requests

url = "https://pc.paratera.com:10443/api/app/version?appCode=starccm"

payload = {}
headers = {
  'Cookie': 'PAA_TOKEN=CC98603D656B4369B56CE9AB76FA50CEPCADMIN_1717659651692; SESSION=YWE5MzY5YjAtODM0Ni00MzY5LWE2ZmEtMTQ0YWQxZGQ2YmZk'
}

response = requests.request("GET", url, headers=headers, data=payload)

print(response.text)
GET/api/app/version/limit
提交作业流程0312.pdf

查询用户指定版本的规模提交限制 #5

请求类型 application/x-www-form-urlencoded响应类型 */*

请求参数 2

参数名称参数说明位置必须类型
appCodeappCodequerytruestring
versionversionquerytruestring
响应参数(1)
参数名称参数说明类型schema
userCoresinteger(int64)integer(int64)
响应示例
json
{
    "userCores": 0
}
GET/api/storage
作业提交API文档.md提交作业流程0312.pdf

查询提交作业可用的存储基本路径 #6

请求参数: | 参数名称 | 参数说明 | 请求类型 | 是否必须 | 数据类型 | schema | | -------- | -------- | -------- | -------- | -------- | ------ | | queue | queue | query | false | string | |

请求类型 application/x-www-form-urlencoded响应类型 */*

请求参数 1

参数名称参数说明位置必须类型
queuequeuequeryfalsestring

响应状态

状态码说明schema
200successfullyFileStorage
401You are not authorized to view the resource
403Accessing the resource you were trying to reach is forbidden
404The resource you were trying to reach is not found
500error
响应参数(18)
参数名称参数说明类型schema
cloudboolean
clusterstring
paraUidstring
pathsarray
zonestring
zoneAccessType可用值:INTERNET,LOCAL_AREA_NETWORK,PARA_GATEWAYstring
zoneClusterDisksarrayVoZoneClusterDisk
diskPath磁盘路径string
hardDiskLimit允许分配的磁盘容量(Byte)integer(int64)
hardDiskPath磁盘挂载路径string
hardDiskRatio磁盘使用比例(百分比)number(float)
hardDiskUsage磁盘已使用容量(Byte)integer(int64)
idinteger(int64)
name目录名称string
order该目录前端展示的优先级integer(int64)
path集群用户文件目录路径(base路径)string
type可用值:BACKUP_DIR,DEPARTMENT_DIR,GLOBAL_DIR,SHARE_DIR,TMP_DIR,WORK_DIRstring
zoneUserstring
响应示例
json
[
	{
		"cloud": true,
		"cluster": "",
		"paraUid": "",
		"paths": [],
		"zone": "",
		"zoneAccessType": "",
		"zoneClusterDisks": [
			{
				"cluster": "",
				"diskPath": "",
				"hardDiskLimit": 0,
				"hardDiskPath": "",
				"hardDiskRatio": 0,
				"hardDiskUsage": 0,
				"id": 0,
				"name": "",
				"order": 0,
				"path": "",
				"type": "",
				"zone": ""
			}
		],
		"zoneUser": ""
	}
]
Java / OkHttp 示例
java
import okhttp3.*;

import java.io.IOException;

public class Main {
    public static void main(String[] args) throws IOException {
        OkHttpClient client = new OkHttpClient().newBuilder()
                .build();
        Request request = new Request.Builder()
                .url("https://pc.paratera.com:10443/api/storage")
                .addHeader("Cookie", "PAA_TOKEN=CC98603D656B4369B56CE9AB76FA50CEPCADMIN_1717659651692; SESSION=YWE5MzY5YjAtODM0Ni00MzY5LWE2ZmEtMTQ0YWQxZGQ2YmZk")
                .build();
        Response response = client.newCall(request).execute();
        System.out.println("response = " + response.toString());
    }
}
Python / requests 示例
python
import requests

url = "https://pc.paratera.com:10443/api/storage"

payload = {}
headers = {
  'Cookie': 'PAA_TOKEN=CC98603D656B4369B56CE9AB76FA50CEPCADMIN_1717659651692; SESSION=YWE5MzY5YjAtODM0Ni00MzY5LWE2ZmEtMTQ0YWQxZGQ2YmZk'
}

response = requests.request("GET", url, headers=headers, data=payload)

print(response.text)
GET/api/job/tag/option/query
作业提交API文档.md

查询仿真项 #7

请求参数: | 参数名称 | 参数说明 | 请求类型 | 是否必须 | 数据类型 | schema | | ---------------------- | ---------------------- | -------- | -------- | -------------- | ------ | | key | key | query | true | string | | | jobTagOptionNameSearch | jobTagOptionNameSearch | query | false | string | | | page | page | query | false | integer(int32) | | | size | size | query | false | integer(int32) | | | order | order,可用值:ASC,DESC | query | false | string | | | orderBy | orderBy | query | false | string | |

请求类型 application/x-www-form-urlencoded响应类型 */*

请求参数 6

参数名称参数说明位置必须类型
keykeyquerytruestring
jobTagOptionNameSearchjobTagOptionNameSearchqueryfalsestring
pagepagequeryfalseinteger(int32)
sizesizequeryfalseinteger(int32)
orderorder,可用值:ASC,DESCqueryfalsestring
orderByorderByqueryfalsestring

响应状态

状态码说明schema
200successfullyPage«VoJobTagOption»
401You are not authorized to view the resource
403Accessing the resource you were trying to reach is forbidden
404The resource you were trying to reach is not found
500error
响应参数(8)
参数名称参数说明类型schema
dataarrayVoJobTagOption
jobTagOptionName仿真项名称string
jobTagOptionOrder排序标识integer(int32)
jobTagOptionValue仿真项keystring
pageinteger(int32)integer(int32)
sizeinteger(int32)integer(int32)
totalinteger(int64)integer(int64)
totalPageinteger(int32)integer(int32)
响应示例
json
{
	"data": [
		{
			"jobTagOptionName": "",
			"jobTagOptionOrder": 0,
			"jobTagOptionValue": ""
		}
	],
	"page": 0,
	"size": 0,
	"total": 0,
	"totalPage": 0
}
Java / OkHttp 示例
java
import okhttp3.*;

import java.io.IOException;

public class Main {
    public static void main(String[] args) throws IOException {
        OkHttpClient client = new OkHttpClient().newBuilder()
                .build();
        Request request = new Request.Builder()
                .url("https://pc.paratera.com:10443/api/job/tag/option/query?key=simulation&order=ASC")
                .addHeader("Cookie", "PAA_TOKEN=CC98603D656B4369B56CE9AB76FA50CEPCADMIN_1717659651692; SESSION=YWE5MzY5YjAtODM0Ni00MzY5LWE2ZmEtMTQ0YWQxZGQ2YmZk")
                .build();
        Response response = client.newCall(request).execute();
        System.out.println("response = " + response.toString());
    }
}
Python / requests 示例
python
import requests

url = "https://pc.paratera.com:10443/api/job/tag/option/query?key=simulation&order=ASC"

payload = {}
headers = {
  'Cookie': 'PAA_TOKEN=CC98603D656B4369B56CE9AB76FA50CEPCADMIN_1717659651692; SESSION=YWE5MzY5YjAtODM0Ni00MzY5LWE2ZmEtMTQ0YWQxZGQ2YmZk'
}

response = requests.request("GET", url, headers=headers, data=payload)

print(response.text)
GET/api/project/list
作业提交API文档.md

查询所有可用项目 #8

请求参数: | 参数名称 | 参数说明 | 请求类型 | 是否必须 | 数据类型 | schema | | ----------------- | ------------------------ | -------- | -------- | -------------- | ------ | | projectNameSearch | 项目名称(支持模糊查询) | query | false | string | | | page | page | query | false | integer(int32) | | | size | size | query | false | integer(int32) | | | order | order,可用值:ASC,DESC | query | false | string | | | orderBy | orderBy | query | false | string | |

请求类型 application/x-www-form-urlencoded响应类型 */*

请求参数 5

参数名称参数说明位置必须类型
projectNameSearch项目名称(支持模糊查询)queryfalsestring
pagepagequeryfalseinteger(int32)
sizesizequeryfalseinteger(int32)
orderorder,可用值:ASC,DESCqueryfalsestring
orderByorderByqueryfalsestring

响应状态

状态码说明schema
200successfullyPage«Project»
401You are not authorized to view the resource
403Accessing the resource you were trying to reach is forbidden
404The resource you were trying to reach is not found
500error
响应参数(13)
参数名称参数说明类型schema
dataarrayProject
createdDate创建时间string(date-time)
description项目描述string
disabled是否已禁用boolean
idinteger(int64)
name项目名称string
openboolean
sid项目sidstring
updatedDate更新时间string(date-time)
pageinteger(int32)integer(int32)
sizeinteger(int32)integer(int32)
totalinteger(int64)integer(int64)
totalPageinteger(int32)integer(int32)
响应示例
json
{
	"data": [
		{
			"createdDate": "",
			"description": "",
			"disabled": true,
			"id": 0,
			"name": "",
			"open": true,
			"sid": "",
			"updatedDate": ""
		}
	],
	"page": 0,
	"size": 0,
	"total": 0,
	"totalPage": 0
}
Java / OkHttp 示例
java
import okhttp3.*;

import java.io.IOException;

public class Main {
    public static void main(String[] args) throws IOException {
        OkHttpClient client = new OkHttpClient().newBuilder()
                .build();
        Request request = new Request.Builder()
                .url("https://pc.paratera.com:10443/api/project/list?order=ASC")
                .addHeader("Cookie", "PAA_TOKEN=CC98603D656B4369B56CE9AB76FA50CEPCADMIN_1717659651692; SESSION=YWE5MzY5YjAtODM0Ni00MzY5LWE2ZmEtMTQ0YWQxZGQ2YmZk")
                .build();
        Response response = client.newCall(request).execute();
        System.out.println("response = " + response.toString());
    }
}
Python / requests 示例
python
import requests

url = "https://pc.paratera.com:10443/api/project/list?order=ASC"

payload = {}
headers = {
  'Cookie': 'PAA_TOKEN=CC98603D656B4369B56CE9AB76FA50CEPCADMIN_1717659651692; SESSION=YWE5MzY5YjAtODM0Ni00MzY5LWE2ZmEtMTQ0YWQxZGQ2YmZk'
}

response = requests.request("GET", url, headers=headers, data=payload)

print(response.text)
GET/api/job/list/speed
ParaCloud API文档.pdf

作业列表 #9

请求类型 application/x-www-form-urlencoded响应类型 */*

请求参数 0

源文档未记录请求参数。

响应状态

状态码说明schema
200successfully Page«JobTaskSpeed»
401You are not authorized to view the resource
403Accessing the resource you were trying to reach is forbidden
404The resource you were trying to reach is not found
500error
响应参数(148)
参数名称参数说明类型schema
dataarrayJobTaskSpeed
activeManualTransferboolean
allChildJobEndboolean
appCode应用编码string
appSubmitType作业提交方式 , 可用值 :CALCULATE,VIEWstring
averageDownlondSpeedinteger(int64)
averageUploadSpeedinteger(int64)
batchId批量作业 IDstring
batchName批量作业组名string
batchNo批量作业编号integer(int64)
billingType计费类型 , 可用值 :FIXED_LEASE,FIXED_YEAR_LEASE,JOB_CORES,NONEstring
calculationAccuracy计算精度string
changeQueue是否转换队列boolean
childJobTasksarrayJobTask
cloud是否是云端作业, 1 :是 , 0: 否boolean
cluster作业集群string
codeinteger
comment作业描述string
cpuTimecpu 核时integer
createdDate创建时间string
delete是否删除boolean
departmentTag部门标签string
done作业是否完成boolean
doneUnZip是否对结果文件进行解压boolean
downloadEndDate下载结束时间string
downloadStartDate下载开始时间string
downloadTime文件下载时间integer
elasticityQueue是否是弹性队列boolean
endTime结束时间integer
executionTime作业定时开始时间integer
exitCode作业退出状态string
fileDelete文件删除状态integer
gid用户组integer
gpuTimegpu 卡时integer
groupFirst否为第一条作业boolean
higher作业优先级integer
isBatch是否批量提交boolean
jobDesc作业备注string
jobId作业编号string
jobName作业名称string
jobOriginalStatus作业原始状态string
jobSecurityLevel作业密级 , 可用值 :CONFIDENTIAL,INTERNAL,PUBLIC,RESTRICTEDstring
jobStatus作业状态string
jobTaskPriority节点优先级 , 可用值 :HIGH,LOW,MEDIUMstring
jobType作业类型 , 可用值 :CMD,GUIstring
jobUser作业提交账号string
lastAccessDatestring
lazyDeleteFileTime作业文件延迟删除时间integer
localLogPath本地日志路径string
localOutputCluster作业本地输出集群string
localOutputZone作业本地输出区域string
localPath作业本地同步路径string
localPathBase作业本地同步基础路径string
localStartTime作业本地开始运行时间integer
logPath作业日志路径string
mpimpi 类型string
msgstring
nextAccessDatestring
ngpus作业 gpu 核数integer
nodes作业节点string
outPutPath作业输出目录string
outPutPathTmp作业输出临时目录string
outputFileDoneMatch输出文件匹配规则string
outputFileExcludeDoneMatch输出文件排除匹配规则string
outputFileExcludeRunMatch输出文件运行排除匹配规则string
outputFileRunMatch输出文件运行匹配规则string
parentJobId父作业 IDstring
payGid支付用户组 idinteger
payProjectId支付项目组 idinteger
payUid支付用户 idstring
pbsPlatformPBS 平台string
pendReason排队原因string
pendReasonDesc排队原因原文string
pendReasonKey排队原因类型string
pendingChangeQueueTime切换队列等待时长integer
pendingOrder队列排队次序integer
pendingSlots队列排队核数integer
pendingTime排队时间integer
platform作业平台别名string
preStatus作业任务上一个状态 , 可用值 :CANCEL,DOWNLOADING,DOWNLOAD_ERROR,DOWNLOAD_INIT,DOWNLOAD_PEND,DOWNLOAD_SUSPEND,END,ERROR,INIT,JOB_END,PREP,RUN,SUBMIT_PEND,UPLOADING,UPLOAD_ERROR,UPLOAD_PEND,UPLOAD_SUSPENDstring
priority节点优先级integer
projectId项目 IDinteger
projectName项目名string
queue队列string
queueType队列类型 , 可用值 :CPU,GPUstring
rawJobId真实作业编号string
reason作业原因string
rootRawJobId真实作业根编号string
showSyncStatus作业同步状态 , 可用值 :DOWNLOADING,DOWNLOAD_CANCEL,DOWNLOAD_END,DOWNLOAD_ERROR,DOWNLOAD_PEND,DOWNLOAD_SUSPEND,DOWNLOAD_UN,UPLOADING,UPLOAD_CANCEL,UPLOAD_END,UPLOAD_ERROR,UPLOAD_PEND,UPLOAD_SUSPEND,UPLOAD_UNstring
slots作业核数integer
slotsRequested作业申请核数integer
software作业软件string
softwareModule软件模块string
startTime作业开始时间integer
status作业任务状态 , 可用值 :CANCEL,DOWNLOADING,DOWNLOAD_ERROR,DOWNLOAD_INIT,DOWNLOAD_PEND,DOWNLOAD_SUSPEND,END,ERROR,INIT,JOB_END,PREP,RUN,SUBMIT_PEND,UPLOADING,UPLOAD_ERROR,UPLOAD_PEND,UPLOAD_SUSPENDstring
submitTime提交时间integer
totalInputFileCount作业输入文件数量integer
totalInputFileSize作业输入文件大小integer
totalOutputFileCount作业输出文件数量integer
totalOutputFileSize作业输出文件大小integer
totalSyncFileCount作业同步文件大小数量integer
totalSyncFileSize作业同步文件大小integer
uidstring
updatedDate更新时间string
uploadBasePath作业上传基本路径string
uploadEndDate上传结束时间string
uploadStartDate上传开始时间string
uploadTime文件上传时间integer
version应用版本string
walltime作业运行时长 ( 单位 : 秒 )integer
workDir作业工作目录string
zone作业区域string
zoneAccessType集群接入类型 , 可用值 :INTERNET,LOCAL_AREA_NETWORK,PARA_GATEWAYstring
downloadTransferPriority可用值 :NORMAL,URGENTstring
downlondPendingTimeinteger(int64)
downlondTimeinteger(int64)
eventAppliesarrayEventApply
applyAction可用值 :CITRIX_SESSION,DCV_SESSION,JOB_APPLY_CHANGE_QUEUE,JOB_APPLY_HIGHER,JOB_MEMORY_UTILIZATION,JOB_NODE_UTILIZATION,JOB_PERFORMANCE,JOB_STATUS,STORAGE_RATEstring
applyHigherinteger
applyQueuestring
eventIdstring
eventStatus可用值 :APPROVAL,PASS,REJECTstring
idinteger
notifyEventType可用值 :JOB_3DVNC_NODE,JOB_CANCEL,JOB_CPU_NODE_UTILIZATION,JOB_DONE,JOB_FAIL,JOB_MEMORY_NODE_UTILIZATION,JOB_PENDING,JOB_PENDING_INTERVAL,JOB_RUNTIME_KILL,JOB_RUN_INTERVAL,JOB_RUN_TIMEOUT,JOB_RUN_UNIT_HOUR,JOB_WAITING,STORAGE_RATE_EXCESSIVEstring
uuidstring
jobParamsstring
jobTaskTagsarrayJobTaskTag
jobTagOptionNamestring
jobTagOptionValuestring
jobTagTypeIdinteger
jobTagTypeKeystring
jobTagTypeNamestring
statisticExpandType可用值 :EXPAND1,EXPAND2,EXPAND3,EXPAND4,EXPAND5string
logPathTmpstring
percentagenumber(float)
runTotalCurrentinteger(int64)
runTotalLengthinteger(int64)
speedType可用值 :DOWNLOAD,UPLOADstring
totalSpeednumber(float)
updateTimeinteger(int64)
uploadPendingTimeinteger(int64)
uploadTransferPriority可用值 :NORMAL,URGENTstring
viewChildAppVersionstring
viewRemindboolean
pageinteger(int32)integer(int32)
sizeinteger(int32)integer(int32)
totalinteger(int64)integer(int64)
totalPageinteger(int32)integer(int32)
响应示例
json
"projectId": 0,
            "projectName": "",
            "queue": "",
            "queueType": "",
            "rawJobId": "",
            "reason": "",
            "rootRawJobId": "",
            "runTotalCurrent": 0,
            "runTotalLength": 0,
            "showSyncStatus": "",
            "slots": 0,
            "slotsRequested": 0,
            "software": "",
            "softwareModule": "",
            "speedType": "",
            "startTime": 0,
            "status": "",
            "submitTime": 0,
            "totalInputFileCount": 0,
            "totalInputFileSize": 0,
            "totalOutputFileCount": 0,
            "totalOutputFileSize": 0,
            "totalSpeed": 0,
            "totalSyncFileCount": 0,
            "totalSyncFileSize": 0,
            "uid": "",
            "updateTime": 0,
            "updatedDate": "",
            "uploadBasePath": "",
            "uploadEndDate": "",
            "uploadPendingTime": 0,
            "uploadStartDate": "",
            "uploadTime": 0,
            "uploadTransferPriority": "",
            "version": "",
            "viewChildAppVersion": "",
            "viewRemind": true,
            "walltime": 0,
            "workDir": "",
            "zone": "",
            "zoneAccessType": ""
        }
    ],
    "page": 0,
    "size": 0,
    "total": 0,
    "totalPage": 0
}
POST/api/job/submit
作业提交API文档.mdParaCloud API文档.pdf

提交作业 #10

差异《作业提交API文档.md》(2024/5/10)记录 22 个请求参数,《ParaCloud API文档.pdf》记录 3 个;本文采用前者。

请求示例: javascript { "appCode": "", "basePath": "", "batchKey": "", "batchName": "", "batchNo": 0, "cmd": [], "jobDesc": "", "jobName": "", "jobSecurityLevel": "", "lazyDeleteFileHour": 0, "mainFilePath": "", "model": "", "outputPath": "", "params": [], "parentJobId": "", "pendingChangeQueueMinutes": 0, "projectId": 0, "queue": "", "queueName": "", "queueResourceId": 0, "version": "" }

请求类型 application/x-www-form-urlencoded,application/json响应类型 */*

请求参数 22

参数名称参数说明位置必须类型
jobSubmitParamReq作业提交参数bodytrueJobSubmitParamReq
appCode应用编码falsestring
basePathbasePathfalsestring
batchKey批量作业Keyfalsestring
batchName批量作业名称falsestring
batchNo批量作业Nofalseinteger(int64)
cmdcmdfalsearray
jobDesc作业描述falsestring
jobName作业名称falsestring
jobSecurityLevel作业密集,可用值:CONFIDENTIAL,INTERNAL,PUBLIC,RESTRICTEDfalsestring
lazyDeleteFileHour延迟多少小时删除作业文件falseinteger(int64)
mainFilePath主文件路径falsestring
modelmodelfalsestring
outputPath作业输出文件路径falsestring
paramsparams 参数falsearray
parentJobId父作业jobIdfalsestring
pendingChangeQueueMinutes暂停多少分钟后切换队列falseinteger(int64)
projectId项目idfalseinteger(int64)
queue队列falsestring
queueNamefalsestring
queueResourceId提交资源ID,优先于队列falseinteger(int64)
version应用版本falsestring

响应状态

状态码说明schema
200successfullyJobTask
201Created
401You are not authorized to view the resource
403Accessing the resource you were trying to reach is forbidden
404The resource you were trying to reach is not found
500error
响应参数(107)
参数名称参数说明类型schema
appCode应用编码string
appSubmitType作业提交方式,可用值:CALCULATE,VIEWstring
batchId批量作业IDstring
batchName批量作业组名string
batchNo批量作业编号integer(int64)integer(int64)
billingType计费类型,可用值:FIXED_LEASE,FIXED_YEAR_LEASE,JOB_CORES,NONEstring
calculationAccuracy计算精度string
changeQueue是否转换队列boolean
cloud是否是云端作业, 1:是, 0: 否boolean
cluster作业集群string
codeinteger(int32)integer(int32)
comment作业描述string
cpuTimecpu核时integer(int64)integer(int64)
createdDate创建时间string(date-time)string(date-time)
delete是否删除boolean
departmentTag部门标签string
done作业是否完成boolean
doneUnZip是否对结果文件进行解压boolean
downloadEndDate下载结束时间string(date-time)string(date-time)
downloadStartDate下载开始时间string(date-time)string(date-time)
downloadTime文件下载时间integer(int64)integer(int64)
elasticityQueue是否是弹性队列boolean
endTime结束时间integer(int64)integer(int64)
executionTime作业定时开始时间integer(int64)integer(int64)
exitCode作业退出状态string
fileDelete文件删除状态integer(int32)integer(int32)
gid用户组integer(int64)integer(int64)
gpuTimegpu卡时integer(int64)integer(int64)
groupFirst否为第一条作业boolean
higher作业优先级integer(int64)integer(int64)
isBatch是否批量提交boolean
jobDesc作业备注string
jobId作业编号string
jobName作业名称string
jobOriginalStatus作业原始状态string
jobSecurityLevel作业密级,可用值:CONFIDENTIAL,INTERNAL,PUBLIC,RESTRICTEDstring
jobStatus作业状态string
jobTaskPriority节点优先级,可用值:HIGH,LOW,MEDIUMstring
jobType作业类型,可用值:CMD,GUIstring
jobUser作业提交账号string
lastAccessDatestring(date-time)string(date-time)
lazyDeleteFileTime作业文件延迟删除时间integer(int64)integer(int64)
localLogPath本地日志路径string
localOutputCluster作业本地输出集群string
localOutputZone作业本地输出区域string
localPath作业本地同步路径string
localPathBase作业本地同步基础路径string
localStartTime作业本地开始运行时间integer(int64)integer(int64)
logPath作业日志路径string
mpimpi类型string
msgstring
nextAccessDatestring(date-time)string(date-time)
ngpus作业gpu核数integer(int64)integer(int64)
nodes作业节点string
outPutPath作业输出目录string
outPutPathTmp作业输出临时目录string
outputFileDoneMatch输出文件匹配规则string
outputFileExcludeDoneMatch输出文件排除匹配规则string
outputFileExcludeRunMatch输出文件运行排除匹配规则string
outputFileRunMatch输出文件运行匹配规则string
parentJobId父作业IDstring
payGid支付用户组idinteger(int64)integer(int64)
payProjectId支付项目组idinteger(int64)integer(int64)
payUid支付用户idstring
pbsPlatformPBS平台string
pendReason排队原因string
pendReasonDesc排队原因原文string
pendReasonKey排队原因类型string
pendingChangeQueueTime切换队列等待时长integer(int64)integer(int64)
pendingOrder队列排队次序integer(int64)integer(int64)
pendingSlots队列排队核数integer(int64)integer(int64)
pendingTime排队时间integer(int64)integer(int64)
platform作业平台别名string
preStatus作业任务上一个状态,可用值:CANCEL,DOWNLOADING,DOWNLOAD_ERROR,DOWNLOAD_INIT,DOWNLOAD_PEND,DOWNLOAD_SUSPEND,END,ERROR,INIT,JOB_END,PREP,RUN,SUBMIT_PEND,UPLOADING,UPLOAD_ERROR,UPLOAD_PEND,UPLOAD_SUSPENDstring
priority节点优先级integer(int64)integer(int64)
projectId项目IDinteger(int64)integer(int64)
projectName项目名string
queue队列string
queueType队列类型,可用值:CPU,GPUstring
rawJobId真实作业编号string
reason作业原因string
rootRawJobId真实作业根编号string
showSyncStatus作业同步状态,可用值:DOWNLOADING,DOWNLOAD_CANCEL,DOWNLOAD_END,DOWNLOAD_ERROR,DOWNLOAD_PEND,DOWNLOAD_SUSPEND,DOWNLOAD_UN,UPLOADING,UPLOAD_CANCEL,UPLOAD_END,UPLOAD_ERROR,UPLOAD_PEND,UPLOAD_SUSPEND,UPLOAD_UNstring
slots作业核数integer(int64)integer(int64)
slotsRequested作业申请核数integer(int64)integer(int64)
software作业软件string
softwareModule软件模块string
startTime作业开始时间integer(int64)integer(int64)
status作业任务状态,可用值:CANCEL,DOWNLOADING,DOWNLOAD_ERROR,DOWNLOAD_INIT,DOWNLOAD_PEND,DOWNLOAD_SUSPEND,END,ERROR,INIT,JOB_END,PREP,RUN,SUBMIT_PEND,UPLOADING,UPLOAD_ERROR,UPLOAD_PEND,UPLOAD_SUSPENDstring
submitTime提交时间integer(int64)integer(int64)
totalInputFileCount作业输入文件数量integer(int64)integer(int64)
totalInputFileSize作业输入文件大小integer(int64)integer(int64)
totalOutputFileCount作业输出文件数量integer(int64)integer(int64)
totalOutputFileSize作业输出文件大小integer(int64)integer(int64)
totalSyncFileCount作业同步文件大小数量integer(int64)integer(int64)
totalSyncFileSize作业同步文件大小integer(int64)integer(int64)
uidstring
updatedDate更新时间string(date-time)string(date-time)
uploadBasePath作业上传基本路径string
uploadEndDate上传结束时间string(date-time)string(date-time)
uploadStartDate上传开始时间string(date-time)string(date-time)
uploadTime文件上传时间integer(int64)integer(int64)
version应用版本string
walltime作业运行时长(单位:秒)integer(int64)integer(int64)
workDir作业工作目录string
zone作业区域string
zoneAccessType集群接入类型,可用值:INTERNET,LOCAL_AREA_NETWORK,PARA_GATEWAYstring
响应示例
json
{
	"appCode": "",
	"appSubmitType": "",
	"batchId": "",
	"batchName": "",
	"batchNo": 0,
	"billingType": "",
	"calculationAccuracy": "",
	"changeQueue": false,
	"cloud": false,
	"cluster": "",
	"code": 0,
	"comment": "",
	"cpuTime": 0,
	"createdDate": "",
	"delete": false,
	"departmentTag": "",
	"done": false,
	"doneUnZip": false,
	"downloadEndDate": "",
	"downloadStartDate": "",
	"downloadTime": 0,
	"elasticityQueue": false,
	"endTime": 0,
	"executionTime": 0,
	"exitCode": "",
	"fileDelete": 0,
	"gid": 0,
	"gpuTime": 0,
	"groupFirst": false,
	"higher": 0,
	"isBatch": false,
	"jobDesc": "",
	"jobId": "",
	"jobName": "",
	"jobOriginalStatus": "",
	"jobSecurityLevel": "",
	"jobStatus": "",
	"jobTaskPriority": "",
	"jobType": "",
	"jobUser": "",
	"lastAccessDate": "",
	"lazyDeleteFileTime": 0,
	"localLogPath": "",
	"localOutputCluster": "",
	"localOutputZone": "",
	"localPath": "",
	"localPathBase": "",
	"localStartTime": 0,
	"logPath": "",
	"mpi": "",
	"msg": "",
	"nextAccessDate": "",
	"ngpus": 0,
	"nodes": "",
	"outPutPath": "",
	"outPutPathTmp": "",
	"outputFileDoneMatch": "",
	"outputFileExcludeDoneMatch": "",
	"outputFileExcludeRunMatch": "",
	"outputFileRunMatch": "",
	"parentJobId": "",
	"payGid": 0,
	"payProjectId": 0,
	"payUid": "",
	"pbsPlatform": "",
	"pendReason": "",
	"pendReasonDesc": "",
	"pendReasonKey": "",
	"pendingChangeQueueTime": 0,
	"pendingOrder": 0,
	"pendingSlots": 0,
	"pendingTime": 0,
	"platform": "",
	"preStatus": "",
	"priority": 0,
	"projectId": 0,
	"projectName": "",
	"queue": "",
	"queueType": "",
	"rawJobId": "",
	"reason": "",
	"rootRawJobId": "",
	"showSyncStatus": "",
	"slots": 0,
	"slotsRequested": 0,
	"software": "",
	"softwareModule": "",
	"startTime": 0,
	"status": "",
	"submitTime": 0,
	"totalInputFileCount": 0,
	"totalInputFileSize": 0,
	"totalOutputFileCount": 0,
	"totalOutputFileSize": 0,
	"totalSyncFileCount": 0,
	"totalSyncFileSize": 0,
	"uid": "",
	"updatedDate": "",
	"uploadBasePath": "",
	"uploadEndDate": "",
	"uploadStartDate": "",
	"uploadTime": 0,
	"version": "",
	"walltime": 0,
	"workDir": "",
	"zone": "",
	"zoneAccessType": ""
}
请求示例
json
{
  "appCode": "",
  "basePath": "",
  "batchKey": "",
  "batchName": "",
  "batchNo": 0,
  "cmd": [],
  "jobDesc": "",
  "jobName": "",
  "jobSecurityLevel": "",
  "lazyDeleteFileHour": 0,
  "mainFilePath": "",
  "model": "",
  "outputPath": "",
  "params": [],
  "parentJobId": "",
  "pendingChangeQueueMinutes": 0,
  "projectId": 0,
  "queue": "",
  "queueName": "",
  "queueResourceId": 0,
  "version": ""
}
Java / OkHttp 示例
java
import okhttp3.*;

import java.io.IOException;

public class Main {
    public static void main(String[] args) throws IOException {
        OkHttpClient client = new OkHttpClient().newBuilder()
                .build();
        MediaType mediaType = MediaType.parse("application/json");
        RequestBody body = RequestBody.create(mediaType, "{\r\n    \"appCode\": \"starccm\",\r\n    \"jobName\": \"Test_S1.sim\",\r\n    \"version\": \"15.02.007-R8\",\r\n    \"mainFilePath\": \"prn:pcadmin:lpcs:sftp:LOCAL:LOCAL:pcadmin:file:/data/home/pcadmin/xt/starccm/Test_S1.sim\",\r\n    \"queueResourceId\": 64,\r\n    \"queue\": \"prn:pcadmin:lpcs:hpc:Z2:Z2:z1u002:queue:eqae2h-1x\",\r\n    \"cmd\": [\r\n        {\r\n            \"--job-name\": \"Test_S1.sim\"\r\n        },\r\n        {\r\n            \"--ntask\": \"64\"\r\n        },\r\n        {\r\n            \"--nodes\": \"1\"\r\n        },\r\n        {\r\n            \"--auto\": \"yes\"\r\n        }\r\n    ],\r\n    \"params\": [\r\n        {\r\n            \"--job-tag-simulation\": \"SimulationItem1\"\r\n        },\r\n        {\r\n            \"--job-tag-milestone\": \"p7\"\r\n        },\r\n        {\r\n            \"--mpi\": \"openmpi\"\r\n        },\r\n        {\r\n            \"--input\": \"prn:pcadmin:lpcs:sftp:LOCAL:LOCAL:pcadmin:file:/data/home/pcadmin/xt/starccm/Test_S1.sim\"\r\n        }\r\n    ],\r\n    \"projectId\": \"27\"\r\n}");
        Request request = new Request.Builder()
                .url("https://pc.paratera.com:10443/api/job/submit")
                .method("POST", body)
                .addHeader("Content-Type", "application/json")
                .addHeader("Cookie", "PAA_TOKEN=CC98603D656B4369B56CE9AB76FA50CEPCADMIN_1717659651692; SESSION=YWE5MzY5YjAtODM0Ni00MzY5LWE2ZmEtMTQ0YWQxZGQ2YmZk")
                .build();
        Response response = client.newCall(request).execute();
        System.out.println("response = " + response.toString());
    }
}
Python / requests 示例
python
import requests
import json

url = "https://pc.paratera.com:10443/api/job/submit"

payload = json.dumps({
  "appCode": "starccm",
  "jobName": "Test_S1.sim",
  "version": "15.02.007-R8",
  "mainFilePath": "prn:pcadmin:lpcs:sftp:LOCAL:LOCAL:pcadmin:file:/data/home/pcadmin/xt/starccm/Test_S1.sim",
  "queueResourceId": 64,
  "queue": "prn:pcadmin:lpcs:hpc:Z2:Z2:z1u002:queue:eqae2h-1x",
  "cmd": [
    {
      "--job-name": "Test_S1.sim"
    },
    {
      "--ntask": "64"
    },
    {
      "--nodes": "1"
    },
    {
      "--auto": "yes"
    }
  ],
  "params": [
    {
      "--job-tag-simulation": "SimulationItem1"
    },
    {
      "--job-tag-milestone": "p7"
    },
    {
      "--mpi": "openmpi"
    },
    {
      "--input": "prn:pcadmin:lpcs:sftp:LOCAL:LOCAL:pcadmin:file:/data/home/pcadmin/xt/starccm/Test_S1.sim"
    }
  ],
  "projectId": "27"
})
headers = {
  'Content-Type': 'application/json',
  'Cookie': 'PAA_TOKEN=CC98603D656B4369B56CE9AB76FA50CEPCADMIN_1717659651692; SESSION=YWE5MzY5YjAtODM0Ni00MzY5LWE2ZmEtMTQ0YWQxZGQ2YmZk'
}

response = requests.request("POST", url, headers=headers, data=payload)

print(response.text)
GET/api/job/{jobId}
作业提交API文档.mdParaCloud API文档.pdf

查询作业详情 #11

请求参数: | 参数名称 | 参数说明 | 请求类型 | 是否必须 | 数据类型 | schema | | ------------- | ---------------- | -------- | -------- | -------- | ------ | | jobId | 作业id | path | true | string | | | showJobParams | 是否显示作业参数 | query | false | boolean | | | showChild | 是否显示子作业 | query | false | boolean | |

请求类型 application/x-www-form-urlencoded响应类型 */*

请求参数 3

参数名称参数说明位置必须类型
jobId作业idpathtruestring
showJobParams是否显示作业参数queryfalseboolean
showChild是否显示子作业queryfalseboolean

响应状态

状态码说明schema
200successfullyJobTaskSpeed
401You are not authorized to view the resource
403Accessing the resource you were trying to reach is forbidden
404The resource you were trying to reach is not found
500error
响应参数(145)
参数名称参数说明类型schema
activeManualTransferboolean
allChildJobEndboolean
appCode应用编码string
appSubmitType作业提交方式,可用值:CALCULATE,VIEWstring
averageDownlondSpeedinteger(int64)integer(int64)
averageUploadSpeedinteger(int64)integer(int64)
batchId批量作业IDstring
batchName批量作业组名string
batchNo批量作业编号integer(int64)integer(int64)
billingType计费类型,可用值:FIXED_LEASE,FIXED_YEAR_LEASE,JOB_CORES,NONEstring
calculationAccuracy计算精度string
changeQueue是否转换队列boolean
childJobTasksarrayJobTask
cloud是否是云端作业, 1:是, 0: 否boolean
cluster作业集群string
codeinteger(int32)
comment作业描述string
cpuTimecpu核时integer(int64)
createdDate创建时间string(date-time)
delete是否删除boolean
departmentTag部门标签string
done作业是否完成boolean
doneUnZip是否对结果文件进行解压boolean
downloadEndDate下载结束时间string(date-time)
downloadStartDate下载开始时间string(date-time)
downloadTime文件下载时间integer(int64)
elasticityQueue是否是弹性队列boolean
endTime结束时间integer(int64)
executionTime作业定时开始时间integer(int64)
exitCode作业退出状态string
fileDelete文件删除状态integer(int32)
gid用户组integer(int64)
gpuTimegpu卡时integer(int64)
groupFirst否为第一条作业boolean
higher作业优先级integer(int64)
isBatch是否批量提交boolean
jobDesc作业备注string
jobId作业编号string
jobName作业名称string
jobOriginalStatus作业原始状态string
jobSecurityLevel作业密级,可用值:CONFIDENTIAL,INTERNAL,PUBLIC,RESTRICTEDstring
jobStatus作业状态string
jobTaskPriority节点优先级,可用值:HIGH,LOW,MEDIUMstring
jobType作业类型,可用值:CMD,GUIstring
jobUser作业提交账号string
lastAccessDatestring(date-time)
lazyDeleteFileTime作业文件延迟删除时间integer(int64)
localLogPath本地日志路径string
localOutputCluster作业本地输出集群string
localOutputZone作业本地输出区域string
localPath作业本地同步路径string
localPathBase作业本地同步基础路径string
localStartTime作业本地开始运行时间integer(int64)
logPath作业日志路径string
mpimpi类型string
msgstring
nextAccessDatestring(date-time)
ngpus作业gpu核数integer(int64)
nodes作业节点string
outPutPath作业输出目录string
outPutPathTmp作业输出临时目录string
outputFileDoneMatch输出文件匹配规则string
outputFileExcludeDoneMatch输出文件排除匹配规则string
outputFileExcludeRunMatch输出文件运行排除匹配规则string
outputFileRunMatch输出文件运行匹配规则string
parentJobId父作业IDstring
payGid支付用户组idinteger(int64)
payProjectId支付项目组idinteger(int64)
payUid支付用户idstring
pbsPlatformPBS平台string
pendReason排队原因string
pendReasonDesc排队原因原文string
pendReasonKey排队原因类型string
pendingChangeQueueTime切换队列等待时长integer(int64)
pendingOrder队列排队次序integer(int64)
pendingSlots队列排队核数integer(int64)
pendingTime排队时间integer(int64)
platform作业平台别名string
preStatus作业任务上一个状态,可用值:CANCEL,DOWNLOADING,DOWNLOAD_ERROR,DOWNLOAD_INIT,DOWNLOAD_PEND,DOWNLOAD_SUSPEND,END,ERROR,INIT,JOB_END,PREP,RUN,SUBMIT_PEND,UPLOADING,UPLOAD_ERROR,UPLOAD_PEND,UPLOAD_SUSPENDstring
priority节点优先级integer(int64)
projectId项目IDinteger(int64)
projectName项目名string
queue队列string
queueType队列类型,可用值:CPU,GPUstring
rawJobId真实作业编号string
reason作业原因string
rootRawJobId真实作业根编号string
showSyncStatus作业同步状态,可用值:DOWNLOADING,DOWNLOAD_CANCEL,DOWNLOAD_END,DOWNLOAD_ERROR,DOWNLOAD_PEND,DOWNLOAD_SUSPEND,DOWNLOAD_UN,UPLOADING,UPLOAD_CANCEL,UPLOAD_END,UPLOAD_ERROR,UPLOAD_PEND,UPLOAD_SUSPEND,UPLOAD_UNstring
slots作业核数integer(int64)
slotsRequested作业申请核数integer(int64)
software作业软件string
softwareModule软件模块string
startTime作业开始时间integer(int64)
status作业任务状态,可用值:CANCEL,DOWNLOADING,DOWNLOAD_ERROR,DOWNLOAD_INIT,DOWNLOAD_PEND,DOWNLOAD_SUSPEND,END,ERROR,INIT,JOB_END,PREP,RUN,SUBMIT_PEND,UPLOADING,UPLOAD_ERROR,UPLOAD_PEND,UPLOAD_SUSPENDstring
submitTime提交时间integer(int64)
totalInputFileCount作业输入文件数量integer(int64)
totalInputFileSize作业输入文件大小integer(int64)
totalOutputFileCount作业输出文件数量integer(int64)
totalOutputFileSize作业输出文件大小integer(int64)
totalSyncFileCount作业同步文件大小数量integer(int64)
totalSyncFileSize作业同步文件大小integer(int64)
uidstring
updatedDate更新时间string(date-time)
uploadBasePath作业上传基本路径string
uploadEndDate上传结束时间string(date-time)
uploadStartDate上传开始时间string(date-time)
uploadTime文件上传时间integer(int64)
version应用版本string
walltime作业运行时长(单位:秒)integer(int64)
workDir作业工作目录string
zone作业区域string
zoneAccessType集群接入类型,可用值:INTERNET,LOCAL_AREA_NETWORK,PARA_GATEWAYstring
downloadTransferPriority可用值:NORMAL,URGENTstring
downlondPendingTimeinteger(int64)integer(int64)
downlondTimeinteger(int64)integer(int64)
eventAppliesarrayEventApply
applyAction可用值:CITRIX_SESSION,DCV_SESSION,JOB_APPLY_CHANGE_QUEUE,JOB_APPLY_HIGHER,JOB_MEMORY_UTILIZATION,JOB_NODE_UTILIZATION,JOB_PERFORMANCE,JOB_STATUS,STORAGE_RATEstring
applyHigherinteger(int32)
applyQueuestring
eventIdstring
eventStatus可用值:APPROVAL,PASS,REJECTstring
idinteger(int64)
notifyActionType可用值:CITRIX_SESSION,DCV_SESSION,JOB_APPLY_CHANGE_QUEUE,JOB_APPLY_HIGHER,JOB_MEMORY_UTILIZATION,JOB_NODE_UTILIZATION,JOB_PERFORMANCE,JOB_STATUS,STORAGE_RATEstring
notifyEventType可用值:JOB_3DVNC_NODE,JOB_CANCEL,JOB_CPU_NODE_UTILIZATION,JOB_DONE,JOB_FAIL,JOB_MEMORY_NODE_UTILIZATION,JOB_PENDING,JOB_PENDING_INTERVAL,JOB_RUNTIME_KILL,JOB_RUN_INTERVAL,JOB_RUN_TIMEOUT,JOB_RUN_UNIT_HOUR,JOB_WAITING,STORAGE_RATE_EXCESSIVEstring
uuidstring
jobAppealStatusType可用值:APPEALED,IN_COMPLAINT,NOT_APPROVED,NO_APPEAL,REQUESTED,VOUCHER_RETURNEDstring
jobParamsstring
jobTaskTagsarrayJobTaskTag
jobTagOptionNamestring
jobTagOptionValuestring
jobTagTypeIdinteger(int64)
jobTagTypeKeystring
jobTagTypeNamestring
statisticExpandType可用值:EXPAND1,EXPAND2,EXPAND3,EXPAND4,EXPAND5string
logPathTmpstring
percentagenumber(float)number(float)
runTotalCurrentinteger(int64)integer(int64)
runTotalLengthinteger(int64)integer(int64)
speedType可用值:DOWNLOAD,UPLOADstring
totalSpeednumber(float)number(float)
updateTimeinteger(int64)integer(int64)
uploadPendingTimeinteger(int64)integer(int64)
uploadTransferPriority可用值:NORMAL,URGENTstring
viewChildAppVersionstring
viewRemindboolean
响应示例
json
{
	"activeManualTransfer": true,
	"allChildJobEnd": true,
	"appCode": "",
	"appSubmitType": "",
	"averageDownlondSpeed": 0,
	"averageUploadSpeed": 0,
	"batchId": "",
	"batchName": "",
	"batchNo": 0,
	"billingType": "",
	"calculationAccuracy": "",
	"changeQueue": false,
	"childJobTasks": [
		{
			"appCode": "",
			"appSubmitType": "",
			"batchId": "",
			"batchName": "",
			"batchNo": 0,
			"billingType": "",
			"calculationAccuracy": "",
			"changeQueue": false,
			"cloud": false,
			"cluster": "",
			"code": 0,
			"comment": "",
			"cpuTime": 0,
			"createdDate": "",
			"delete": false,
			"departmentTag": "",
			"done": false,
			"doneUnZip": false,
			"downloadEndDate": "",
			"downloadStartDate": "",
			"downloadTime": 0,
			"elasticityQueue": false,
			"endTime": 0,
			"executionTime": 0,
			"exitCode": "",
			"fileDelete": 0,
			"gid": 0,
			"gpuTime": 0,
			"groupFirst": false,
			"higher": 0,
			"isBatch": false,
			"jobDesc": "",
			"jobId": "",
			"jobName": "",
			"jobOriginalStatus": "",
			"jobSecurityLevel": "",
			"jobStatus": "",
			"jobTaskPriority": "",
			"jobType": "",
			"jobUser": "",
			"lastAccessDate": "",
			"lazyDeleteFileTime": 0,
			"localLogPath": "",
			"localOutputCluster": "",
			"localOutputZone": "",
			"localPath": "",
			"localPathBase": "",
			"localStartTime": 0,
			"logPath": "",
			"mpi": "",
			"msg": "",
			"nextAccessDate": "",
			"ngpus": 0,
			"nodes": "",
			"outPutPath": "",
			"outPutPathTmp": "",
			"outputFileDoneMatch": "",
			"outputFileExcludeDoneMatch": "",
			"outputFileExcludeRunMatch": "",
			"outputFileRunMatch": "",
			"parentJobId": "",
			"payGid": 0,
			"payProjectId": 0,
			"payUid": "",
			"pbsPlatform": "",
			"pendReason": "",
			"pendReasonDesc": "",
			"pendReasonKey": "",
			"pendingChangeQueueTime": 0,
			"pendingOrder": 0,
			"pendingSlots": 0,
			"pendingTime": 0,
			"platform": "",
			"preStatus": "",
			"priority": 0,
			"projectId": 0,
			"projectName": "",
			"queue": "",
			"queueType": "",
			"rawJobId": "",
			"reason": "",
			"rootRawJobId": "",
			"showSyncStatus": "",
			"slots": 0,
			"slotsRequested": 0,
			"software": "",
			"softwareModule": "",
			"startTime": 0,
			"status": "",
			"submitTime": 0,
			"totalInputFileCount": 0,
			"totalInputFileSize": 0,
			"totalOutputFileCount": 0,
			"totalOutputFileSize": 0,
			"totalSyncFileCount": 0,
			"totalSyncFileSize": 0,
			"uid": "",
			"updatedDate": "",
			"uploadBasePath": "",
			"uploadEndDate": "",
			"uploadStartDate": "",
			"uploadTime": 0,
			"version": "",
			"walltime": 0,
			"workDir": "",
			"zone": "",
			"zoneAccessType": ""
		}
	],
	"cloud": false,
	"cluster": "",
	"code": 0,
	"comment": "",
	"cpuTime": 0,
	"createdDate": "",
	"delete": false,
	"departmentTag": "",
	"done": false,
	"doneUnZip": false,
	"downloadEndDate": "",
	"downloadStartDate": "",
	"downloadTime": 0,
	"downloadTransferPriority": "",
	"downlondPendingTime": 0,
	"downlondTime": 0,
	"elasticityQueue": false,
	"endTime": 0,
	"eventApplies": [
		{
			"applyAction": "",
			"applyHigher": 0,
			"applyQueue": "",
			"createdDate": "",
			"eventId": "",
			"eventStatus": "",
			"id": 0,
			"jobId": "",
			"notifyActionType": "",
			"notifyEventType": "",
			"rawJobId": "",
			"uid": "",
			"updatedDate": "",
			"uuid": ""
		}
	],
	"executionTime": 0,
	"exitCode": "",
	"fileDelete": 0,
	"gid": 0,
	"gpuTime": 0,
	"groupFirst": false,
	"higher": 0,
	"isBatch": false,
	"jobAppealStatusType": "",
	"jobDesc": "",
	"jobId": "",
	"jobName": "",
	"jobOriginalStatus": "",
	"jobParams": "",
	"jobSecurityLevel": "",
	"jobStatus": "",
	"jobTaskPriority": "",
	"jobTaskTags": [
		{
			"createdDate": "",
			"id": 0,
			"jobId": "",
			"jobTagOptionName": "",
			"jobTagOptionValue": "",
			"jobTagTypeId": 0,
			"jobTagTypeKey": "",
			"jobTagTypeName": "",
			"statisticExpandType": "",
			"updatedDate": ""
		}
	],
	"jobType": "",
	"jobUser": "",
	"lastAccessDate": "",
	"lazyDeleteFileTime": 0,
	"localLogPath": "",
	"localOutputCluster": "",
	"localOutputZone": "",
	"localPath": "",
	"localPathBase": "",
	"localStartTime": 0,
	"logPath": "",
	"logPathTmp": "",
	"mpi": "",
	"msg": "",
	"nextAccessDate": "",
	"ngpus": 0,
	"nodes": "",
	"outPutPath": "",
	"outPutPathTmp": "",
	"outputFileDoneMatch": "",
	"outputFileExcludeDoneMatch": "",
	"outputFileExcludeRunMatch": "",
	"outputFileRunMatch": "",
	"parentJobId": "",
	"payGid": 0,
	"payProjectId": 0,
	"payUid": "",
	"pbsPlatform": "",
	"pendReason": "",
	"pendReasonDesc": "",
	"pendReasonKey": "",
	"pendingChangeQueueTime": 0,
	"pendingOrder": 0,
	"pendingSlots": 0,
	"pendingTime": 0,
	"percentage": 0,
	"platform": "",
	"preStatus": "",
	"priority": 0,
	"projectId": 0,
	"projectName": "",
	"queue": "",
	"queueType": "",
	"rawJobId": "",
	"reason": "",
	"rootRawJobId": "",
	"runTotalCurrent": 0,
	"runTotalLength": 0,
	"showSyncStatus": "",
	"slots": 0,
	"slotsRequested": 0,
	"software": "",
	"softwareModule": "",
	"speedType": "",
	"startTime": 0,
	"status": "",
	"submitTime": 0,
	"totalInputFileCount": 0,
	"totalInputFileSize": 0,
	"totalOutputFileCount": 0,
	"totalOutputFileSize": 0,
	"totalSpeed": 0,
	"totalSyncFileCount": 0,
	"totalSyncFileSize": 0,
	"uid": "",
	"updateTime": 0,
	"updatedDate": "",
	"uploadBasePath": "",
	"uploadEndDate": "",
	"uploadPendingTime": 0,
	"uploadStartDate": "",
	"uploadTime": 0,
	"uploadTransferPriority": "",
	"version": "",
	"viewChildAppVersion": "",
	"viewRemind": true,
	"walltime": 0,
	"workDir": "",
	"zone": "",
	"zoneAccessType": ""
}
Java / OkHttp 示例
java
import okhttp3.*;

import java.io.IOException;

public class Main {
    public static void main(String[] args) throws IOException {
        OkHttpClient client = new OkHttpClient().newBuilder()
                .build();
        Request request = new Request.Builder()
                .url("https://pc.paratera.com:10443/api/job/43962")
                .addHeader("Cookie", "PAA_TOKEN=CC98603D656B4369B56CE9AB76FA50CEPCADMIN_1717659651692; SESSION=YWE5MzY5YjAtODM0Ni00MzY5LWE2ZmEtMTQ0YWQxZGQ2YmZk")
                .build();
        Response response = client.newCall(request).execute();
        System.out.println("response = " + response.toString());
    }
}
Python / requests 示例
python
import requests

url = "https://pc.paratera.com:10443/api/job/43962"

payload = {}
headers = {
  'Cookie': 'PAA_TOKEN=CC98603D656B4369B56CE9AB76FA50CEPCADMIN_1717659651692; SESSION=YWE5MzY5YjAtODM0Ni00MzY5LWE2ZmEtMTQ0YWQxZGQ2YmZk'
}

response = requests.request("GET", url, headers=headers, data=payload)

print(response.text)
DELETE/api/job/{jobId}
ParaCloud API文档.pdf

删除作业 #12

请求类型 application/x-www-form-urlencoded响应类型 */*

请求参数 1

参数名称参数说明位置必须类型
jobId作业 idpathtruestring

响应状态

状态码说明schema
200successfully
204NoContent
401You are not authorized to view the resource
403Accessing the resource you were trying to reach is forbidden
404The resource you were trying to reach is not found
500error
响应示例
json
作业取消接口
PUT/api/job/{jobId}/cancel
ParaCloud API文档.pdf

作业取消接口 #13

冲突源文档对同一路径记录了多个请求方式:PUT、GET。本文采用 PUT(状态变更类操作),其余记录视为文档导出冗余。
请求类型 application/x-www-form-urlencoded响应类型 */*

请求参数 1

参数名称参数说明位置必须类型
jobId作业 idpathtruestring

响应状态

状态码说明schema
200successfully
201Created
401You are not authorized to view the resource
403Accessing the resource you were trying to reach is forbidden
404The resource you were trying to reach is not found
500error
响应示例
json
删除作业文件
DELETE/api/job/{jobId}/file
ParaCloud API文档.pdf

删除作业文件 #14

存疑PDF 源存在跨页表格错位嫌疑:limit、lines、start 属日志类参数,与本接口语义不符,建议以线上接口文档核实。

删除作业在超算端的输入输出文件

请求类型 application/x-www-form-urlencoded响应类型 */*

请求参数 5

参数名称参数说明位置必须类型
jobId作业 idpathtruestring
pathpathquerytruestring
lines行数queryfalseinteger(int64)
limit行数queryfalseinteger(int64)
start是否从尾部开始读queryfalseboolean

响应状态

状态码说明schema
200successfully
204NoContent
401You are not authorized to view the resource
403Accessing the resource you were trying to reach is forbidden
404The resource you were trying to reach is not found
500error
响应示例
json
查看作业日志
PUT/api/job/{jobId}/files/cancel
ParaCloud API文档.pdf

手动取消同步文件下载 #15

请求类型 application/x-www-form-urlencoded响应类型 */*

请求参数 0

源文档未记录请求参数。

响应示例
json
查询手动同步作业文件下载信息
GET/api/job/{jobId}/files/dowload
ParaCloud API文档.pdf

查询手动同步作业文件下载信息 #16

请求类型 application/x-www-form-urlencoded响应类型 */*

请求参数 0

源文档未记录请求参数。

响应参数(24)
参数名称参数说明类型schema
createdDate创建时间
destAccountstring
destClusterstring
destClusterConnectionIpstring
destClusterConnectionPortinteger(int64)integer(int64)
destClusterPathstring
destZonestring
值:CANCEL,DONE,FAIL,INIT,RUN
idinteger(int64)integer(int64)
jobIdstring
messagestring
percentagenumber(float)number(float)
requestAccountstring
requestClusterstring
requestZonestring
speedinteger(int64)integer(int64)
totalFileCount作业输入文件数量 integer(int64)integer(int64)
totalFileSize作业输入文件大小 integer(int64)integer(int64)
transferEndDate传输结束时间
transferPriority可用值 :NORMAL,URGENTstring
transferStartDate传输开始时间
transferTime文件下载时间 integer(int64)integer(int64)
updatedDate更新时间
userIdstring
响应示例
json
[
    {
        "createdDate": "",
POST/api/job/{jobId}/files/dowload
ParaCloud API文档.pdf

手动同步作业文件下载 #17

请求类型 application/x-www-form-urlencoded,application/json响应类型 */*

请求参数 1

参数名称参数说明位置必须类型
jobId作业 idpathtruestring

响应状态

状态码说明schema
200successfully
201Created
401You are not authorized to view the resource
403Accessing the resource you were trying to reach is forbidden
404The resource you were trying to reach is not found
500error
响应示例
json
{
  "forceRedownload": true,
  "paths": []
}
GET/api/job/{jobId}/files/zip/dowload
ParaCloud API文档.pdf

查询作业输出文件同步压缩信息 #18

请求类型 application/x-www-form-urlencoded响应类型 */*

请求参数 0

源文档未记录请求参数。

响应状态

状态码说明schema
200successfullyJobZipFileTask
401You are not authorized to view the resource
403Accessing the resource you were trying to reach is forbidden
404The resource you were trying to reach is not found
500error
响应参数(10)
参数名称参数说明类型schema
currentinteger(int64)integer(int64)
filePathstring
idstring
jobIdstring
progressnumber(float)number(float)
statusinteger(int32)integer(int32)
totalinteger(int64)integer(int64)
uidstring
valuestring
zipType可用值 :UNZIP,ZIPstring
响应示例
json
[
    {
        "createdDate": "",
        "current": 0,
        "filePath": "",
        "id": "",
        "jobId": "",
        "progress": 0,
        "status": 0,
        "total": 0,
        "uid": "",
        "updatedDate": "",
        "value": "",
        "zipType": ""
    }
]
GET/api/job/{jobId}/log
ParaCloud API文档.pdf

查看作业日志 #19

path 参数:是从作业列表中取 logPathTmp || localLogPath 。如果是运行中的作业是取 logPathTmp ,如果 是运行结束的作业取 localLogPath

请求类型 application/x-www-form-urlencoded响应类型 */*

请求参数 1

参数名称参数说明位置必须类型
jobId作业 idpathtruestring

响应状态

状态码说明schema
200successfully
401You are not authorized to view the resource
403Accessing the resource you were trying to reach is forbidden
404The resource you were trying to reach is not found
500error
响应示例
json
查看作业提交参数
GET/api/job/{jobId}/params
ParaCloud API文档.pdf

查看作业提交参数 #20

请求类型 application/x-www-form-urlencoded响应类型 */*

请求参数 1

参数名称参数说明位置必须类型
jobIdjobIdpathtruestring

响应状态

状态码说明schema
200successfullyJobSubmitParam
401You are not authorized to view the resource
403Accessing the resource you were trying to reach is forbidden
404The resource you were trying to reach is not found
500error
201Created
响应参数(19)
参数名称参数说明类型schema
appCode应用编码string
basePathbasePathstring
batchKey批量作业 Keystring
batchName批量作业名称string
batchNo批量作业 No integer(int64)integer(int64)
cmdcmdarray
jobDesc作业描述string
jobName作业名称string
值:CONFIDENTIAL,INTERNAL,PUBLIC,RESTRICTED
lazyDeleteFileHour延迟多少小时删除作业文件 integer(int64)integer(int64)
mainFilePath主文件路径string
modelmodelstring
outputPath作业输出文件路径string
paramsparams 参数array
parentJobId父作业 jobIdstring
pendingChangeQueueMinutes暂停多少分钟后切换队列 integer(int64)integer(int64)
projectId项目 id integer(int64)integer(int64)
queue队列string
version应用版本string
响应示例
json
"jobDesc": "",
    "jobName": "",
    "jobSecurityLevel": "",
    "lazyDeleteFileHour": 0,
    "mainFilePath": "",
    "model": "",
    "outputPath": "",
    "params": [],
    "parentJobId": "",
    "pendingChangeQueueMinutes": 0,
    "projectId": 0,
    "queue": "",
    "version": ""
}
GET/api/admin/queue/resource/list
ParaCloud API文档.pdf

例出所有队列资源 #21

请求类型 application/x-www-form-urlencoded响应类型 */*

请求参数 1

参数名称参数说明位置必须类型
pathpathquerytruestring

响应状态

状态码说明schema
200successfullyFileInfo
401You are not authorized to view the resource
403Accessing the resource you were trying to reach is forbidden
404The resource you were trying to reach is not found
500error
响应参数(16)
参数名称参数说明类型schema
dataarrayQueueResource
clusterstring
cpusinteger(int64)
elasticityQueueResourcesarrayElasticityQueueResourceParam
queueNamestring
zonestring
elasticityQueuesstring
gpusinteger(int64)
idinteger(int64)
queuestring
queueOrderinteger(int32)
zoneUserstring
pageinteger(int32)integer(int32)
sizeinteger(int32)integer(int32)
totalinteger(int64)integer(int64)
totalPageinteger(int32)integer(int32)
响应示例
json
"gpus": 0,
            "id": 0,
            "queue": "",
            "queueName": "",
            "queueOrder": 0,
            "updatedDate": "",
            "zone": "",
            "zoneUser": ""
        }
    ],
    "page": 0,
    "size": 0,
    "total": 0,
    "totalPage": 0
}
GET/api/resources/queue/dashBoard
ParaCloud API文档.pdf

查询首页核心数据 #22

请求类型 application/x-www-form-urlencoded响应类型 */*

请求参数 0

源文档未记录请求参数。

响应状态

状态码说明schema
200successfullyQueueResourceVo
401You are not authorized to view the resource
403Accessing the resource you were trying to reach is forbidden
404The resource you were trying to reach is not found
500error
响应参数(20)
参数名称参数说明类型schema
clusterstring
coresPendinginteger(int64)integer(int64)
coresPrepinteger(int64)integer(int64)
coresRemaininginteger(int64)integer(int64)
coresRunninginteger(int64)integer(int64)
coresTotalinteger(int64)integer(int64)
cpusinteger(int64)integer(int64)
elasticityQueueboolean
gpusPendinginteger(int64)integer(int64)
gpusRemaininginteger(int64)integer(int64)
gpusRunninginteger(int64)integer(int64)
gpusTotalinteger(int64)integer(int64)
jobUserstring
namestring
ngpusinteger(int64)integer(int64)
platformstring
publicJobUserboolean
queuestring
queueType可用值 :CPU,GPUstring
zonestring
响应示例
json
"jobUser": "",
        "name": "",
        "ngpus": 0,
        "platform": "",
        "publicJobUser": true,
        "queue": "",
        "queueType": "",
        "zone": ""
    }
]
GET/api/resources/queue/info
ParaCloud API文档.pdf

查询队列资源信息接口(目前只提供公共账号或自己绑定的第一个账号) #23

请求类型 application/x-www-form-urlencoded响应类型 */*

请求参数 0

源文档未记录请求参数。

响应参数(23)
参数名称参数说明类型schema
aclUserEnableboolean
aclUsersarray
aliasNamestring
clusterstring
coresPendinginteger(int64)integer(int64)
coresPrepinteger(int64)integer(int64)
coresRemaininginteger(int64)integer(int64)
coresRunninginteger(int64)integer(int64)
coresTotalinteger(int64)integer(int64)
cpusinteger(int64)integer(int64)
gpusinteger(int64)integer(int64)
gpusPendinginteger(int64)integer(int64)
gpusRemaininginteger(int64)integer(int64)
gpusRunninginteger(int64)integer(int64)
gpusTotalinteger(int64)integer(int64)
nodeInfostring
nodeRmaininginteger(int64)integer(int64)
nodeRunninginteger(int64)integer(int64)
nodeTotalinteger(int64)integer(int64)
platformstring
queuestring
reserveboolean
zonestring
响应示例
json
"coresPrep": 0,
        "coresRemaining": 0,
        "coresRunning": 0,
        "coresTotal": 0,
        "cpus": 0,
        "endDate": "",
        "gpus": 0,
        "gpusPending": 0,
        "gpusRemaining": 0,
        "gpusRunning": 0,
        "gpusTotal": 0,
        "nodeInfo": "",
        "nodeRmaining": 0,
        "nodeRunning": 0,
        "nodeTotal": 0,
        "platform": "",
        "queue": "",
        "reserve": true,
        "startDate": "",
        "zone": ""
    }
]
GET/api/zone/list
ParaCloud API文档.pdf

查询集群 #24

请求类型 application/x-www-form-urlencoded响应类型 */*

请求参数 4

参数名称参数说明位置必须类型
pagepagequeryfalseinteger(int32)
sizesizequeryfalseinteger(int32)
orderorder, 可用值 :ASC,DESCqueryfalsestring
orderByorderByqueryfalsestring

响应状态

状态码说明schema
200successfullyVoZone
401You are not authorized to view the resource
403Accessing the resource you were trying to reach is forbidden
404The resource you were trying to reach is not found
500error
响应参数(12)
参数名称参数说明类型schema
cloudboolean
createdDate创建时间
enablePrivateboolean
enableQueuePublicUserboolean
hideboolean
idinteger(int64)integer(int64)
updatedDate更新时间
值:INTERNET,LOCAL_AREA_NETWORK,PARA_GATEWAY
zoneAliasstring
zoneCodestring
zoneLoginTypeinteger(int32)integer(int32)
zoneNamestring
响应示例
json
[
    {
        "cloud": true,
        "createdDate": "",
        "enablePrivate": true,
        "enableQueuePublicUser": true,
        "hide": true,
        "id": 0,
        "updatedDate": "",
        "zoneAccessType": "",
        "zoneAlias": "",
        "zoneCode": "",
        "zoneLoginType": 0,
        "zoneName": ""
    }
]
DELETE/api/files/delete
ParaCloud API文档.pdf

文件删除 #25

请求类型 application/x-www-form-urlencoded响应类型 */*

请求参数 1

参数名称参数说明位置必须类型
pathpathquerytruestring

响应状态

状态码说明schema
200successfully
204NoContent
401You are not authorized to view the resource
403Accessing the resource you were trying to reach is forbidden
404The resource you were trying to reach is not found
500error
响应示例
json
文件上传
GET/api/files/download
ParaCloud API文档.pdf

文件下载 #26

请求类型 application/x-www-form-urlencoded响应类型 */*

请求参数 2

参数名称参数说明位置必须类型
pathpathquerytruestring
RangeRangeheaderfalsestring

响应状态

状态码说明schema
200successfully
401You are not authorized to view the resource
403Accessing the resource you were trying to reach is forbidden
404The resource you were trying to reach is not found
500error
响应示例
json
文件是否存在
GET/api/files/download/zip
ParaCloud API文档.pdf

文件打包下载 #27

请求类型 application/x-www-form-urlencoded响应类型 */*

请求参数 3

参数名称参数说明位置必须类型
workDirworkDirquerytruestring
subPathssubPathsquerytruestring
containHiddencontainHiddenqueryfalseboolean

响应状态

状态码说明schema
200successfully
401You are not authorized to view the resource
403Accessing the resource you were trying to reach is forbidden
404The resource you were trying to reach is not found
500error
响应示例
json
获取当前用户家目录接口
GET/api/files/exist
ParaCloud API文档.pdf

文件是否存在 #28

请求类型 application/x-www-form-urlencoded响应类型 */*

请求参数 1

参数名称参数说明位置必须类型
pathpathquerytruestring

响应状态

状态码说明schema
200successfullyVoExist
401You are not authorized to view the resource
403Accessing the resource you were trying to reach is forbidden
404The resource you were trying to reach is not found
500error
响应参数(1)
参数名称参数说明类型schema
existboolean
响应示例
json
{
    "exist": true
}
GET/api/files/home
ParaCloud API文档.pdf

获取当前用户家目录接口 #29

请求类型 application/x-www-form-urlencoded响应类型 */*

请求参数 0

源文档未记录请求参数。

响应状态

状态码说明schema
200successfullyHomePathEntity
401You are not authorized to view the resource
403Accessing the resource you were trying to reach is forbidden
404The resource you were trying to reach is not found
500error
响应参数(1)
参数名称参数说明类型schema
pathstring
GET/api/files/info
ParaCloud API文档.pdf

文件信息 #30

请求类型 application/x-www-form-urlencoded响应类型 */*

请求参数 0

源文档未记录请求参数。

响应状态

状态码说明schema
200successfullyFileInfo
401You are not authorized to view the resource
403Accessing the resource you were trying to reach is forbidden
404The resource you were trying to reach is not found
500error
响应参数(8)
参数名称参数说明类型schema
chmodstring
extstring
isDirboolean
lastModifiedinteger(int64)integer(int64)
namestring
pathstring
sizeinteger(int64)integer(int64)
typestring
响应示例
json
{
    "chmod": "",
    "ext": "",
    "isDir": true,
    "lastModified": 0,
    "name": "",
    "path": "",
    "size": 0,
    "type": ""
}
GET/api/files/ls
作业提交API文档.mdParaCloud API文档.pdf

查询文件列表 #31

请求参数: | 参数名称 | 参数说明 | 请求类型 | 是否必须 | 数据类型 | schema | | --------- | --------------------------------------------------------- | -------- | -------- | -------------- | ------ | | path | 工作目录路径 | query | true | string | | | recursive | 是否递归文件夹 | query | false | boolean | | | maxfiles | 能查询的最大文件数量,如果ls返回的文件数超出该值就抛出异常 | query | false | integer(int32) | | | hide | 是否显示隐藏文件 | query | false | boolean | |

请求类型 application/x-www-form-urlencoded响应类型 */*

请求参数 4

参数名称参数说明位置必须类型
path工作目录路径querytruestring
recursive是否递归文件夹queryfalseboolean
maxfiles能查询的最大文件数量,如果ls返回的文件数超出该值就抛出异常queryfalseinteger(int32)
hide是否显示隐藏文件queryfalseboolean

响应状态

状态码说明schema
200successfullyFileInfo
401You are not authorized to view the resource
403Accessing the resource you were trying to reach is forbidden
404The resource you were trying to reach is not found
500error
响应参数(8)
参数名称参数说明类型schema
chmodstring
extstring
isDirboolean
lastModifiedinteger(int64)integer(int64)
namestring
pathstring
sizeinteger(int64)integer(int64)
typestring
响应示例
json
[
	{
		"chmod": "",
		"ext": "",
		"isDir": true,
		"lastModified": 0,
		"name": "",
		"path": "",
		"size": 0,
		"type": ""
	}
]
Java / OkHttp 示例
java
import okhttp3.*;

import java.io.IOException;

public class Main {
    public static void main(String[] args) throws IOException {
        OkHttpClient client = new OkHttpClient().newBuilder()
                .build();
        Request request = new Request.Builder()
                .url("https://pc.paratera.com:10443/api/files/ls?path=prn:pcadmin:lpcs:sftp:LOCAL:LOCAL:pcadmin:file:/tmp")
                .addHeader("Cookie", "PAA_TOKEN=CC98603D656B4369B56CE9AB76FA50CEPCADMIN_1717659651692; SESSION=YWE5MzY5YjAtODM0Ni00MzY5LWE2ZmEtMTQ0YWQxZGQ2YmZk")
                .build();
        Response response = client.newCall(request).execute();
        System.out.println("response = " + response.toString());
    }
}
Python / requests 示例
python
import requests

url = "https://pc.paratera.com:10443/api/files/ls?path=prn:pcadmin:lpcs:sftp:LOCAL:LOCAL:pcadmin:file:/tmp"

payload = {}
headers = {
  'Cookie': 'PAA_TOKEN=CC98603D656B4369B56CE9AB76FA50CEPCADMIN_1717659651692; SESSION=YWE5MzY5YjAtODM0Ni00MzY5LWE2ZmEtMTQ0YWQxZGQ2YmZk'
}

response = requests.request("GET", url, headers=headers, data=payload)

print(response.text)
POST/api/files/mkdir
ParaCloud API文档.pdf

创建目录 #32

请求类型 application/x-www-form-urlencoded响应类型 */*

请求参数 0

源文档未记录请求参数。

响应示例
json
重命名文件
PUT/api/files/rename
ParaCloud API文档.pdf

重命名文件 #33

请求类型 application/x-www-form-urlencoded响应类型 */*

请求参数 2

参数名称参数说明位置必须类型
pathpathquerytruestring
newnamenewnamequerytruestring

响应状态

状态码说明schema
200successfully
201Created
401You are not authorized to view the resource
403Accessing the resource you were trying to reach is forbidden
404The resource you were trying to reach is not found
500error
响应示例
json
===== [api_full] PAGE 66 =====
文件内容
GET/api/files/tail
ParaCloud API文档.pdf

文件内容 #34

请求类型 application/x-www-form-urlencoded响应类型 */*

请求参数 4

参数名称参数说明位置必须类型
pathpathquerytruestring
lineslinesqueryfalseinteger(int64)
limitlimitqueryfalseinteger(int64)
startstartqueryfalseboolean

响应状态

状态码说明schema
200successfully
401You are not authorized to view the resource
403Accessing the resource you were trying to reach is forbidden
404The resource you were trying to reach is not found
500error
响应示例
json
文件下载
POST/api/files/upload
ParaCloud API文档.pdf

文件上传 #35

请求类型 application/x-www-form-urlencoded,application/json响应类型 */*

请求参数 2

参数名称参数说明位置必须类型
pathpathquerytruestring
Content-RangeContent-Rangeheaderfalsestring

响应状态

状态码说明schema
200successfullyMd5Entity
201Created
401You are not authorized to view the resource
403Accessing the resource you were trying to reach is forbidden
404The resource you were trying to reach is not found
500error
响应参数(1)
参数名称参数说明类型schema
md5string
响应示例
json
{
    "md5": ""
}