- 主要流程
- codeZone
- codeZoneResource
- codeZoneMiddleware
- codeZoneSnapshot
- unitTest
- git-codeZone
- docker
- git-docker
- unitTestFramework
- environment
- middleware
- playground
- 创建playgroundPOST
- 下载代码文件GET
- 批量创建Playground并异步激活(返回结果不代表已全部激活完成)POST
- 获取代码文件内容GET
- 批量释放PlaygroundPUT
- 获取 playground 状态GET
- 导入文件 jsonPOST
- 激活playgroundPOST
- 获取playground状态GET
- playground绑定CodeZoneSnapshotPOST
- playground绑定dockerContainerPOST
- 切换指定playground的环境版本POST
- 删除 playgroundDELETE
- 暂停playgroundPOST
- playground资源释放PUT
- playground 运行脚本POST
- 获取运行结果GET
- 修改资源配置POST
- 获取当前资源GET
- playground 停止运行脚本POST
- git-playground
- playgroundUnitTest
- DiskResource
- URLResource
- ticket
- playgroundMiddleware
- nix
- file
- mq
- IDE Server
导入文件 json
POST
/api/v1/sdk/playgrounds/{id}/importJson
playground
请求参数
Path 参数
id
integer <int64>
id
Header 参数
tenantCode
string
租户code
默认值:
demo
userId
string
租户系统用户Id
默认值:
2
nonce
string
必需
默认值:
{{nonce}}
timestamp
string
必需
默认值:
{{timestamp}}
token
string
必需
默认值:
{{token}}
Body 参数application/json
codeZoneImportFileListDTOList
array[object (CodeZoneImportFileListDTO) {2}]
文件列表
fileContent
string
文件内容
fileName
string
文件名
示例
{
"codeZoneImportFileListDTOList": [
{
"fileContent": "string",
"fileName": "string"
}
]
}
示例代码
Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
请求示例请求示例
Shell
JavaScript
Java
Swift
curl --location --request POST '/api/v1/sdk/playgrounds//importJson' \
--header 'tenantCode;' \
--header 'userId;' \
--header 'nonce;' \
--header 'timestamp;' \
--header 'token;' \
--header 'Content-Type: application/json' \
--data-raw '{
"codeZoneImportFileListDTOList": [
{
"fileContent": "string",
"fileName": "string"
}
]
}'
返回响应
🟢200OK
application/json
Body
errors
array[object (ResultError) {3}]
异常信息
errcode
string
异常编码
errmsg
string
异常消息
field
string
可选
status
enum<string>
可选
枚举值:
failuresuccess
timestamp
string <date-time>
可选
示例
{
"errors": [
{
"errcode": "string",
"errmsg": "string",
"field": "string"
}
],
"status": "failure",
"timestamp": "2019-08-24T14:15:22Z"
}
🟢201Created
🟠401Unauthorized
🟠403Forbidden
🟠404Not Found
修改于 2025-05-23 13:47:39