跳转到正文
BoxOpenAPI

Submit a durable command

POST/api/box/v1/{boxId}/executions

Send at most 1 MiB of JSON. The executionId identifies the exact original command, normalized environment, network and authority; changing input under the same identity conflicts. Retries inspect existing work and never replay an uncertain dispatch. Lite reserves credits against the maximum command duration and bills measured wall time (maximum 120 seconds). Sandbox requires a funded running lease with enough remaining time, caps commands at 300 seconds, and requires the lease network policy; it charges only allocated VM time at lease level. Successful HTTP status can contain nonzero exitCode, reconciliation or unavailable output. Preserve executionId and inspect status before any retry.

组织 API Key 鉴权

Authorization: Bearer $SINECLOUD_API_KEY

所需权限: boxRun

参数

boxId · path · 必填
Existing Box resource ID selected in Console, not its parent product activation ID.

请求体

必填

application/json

响应

200
Current command result or durable in-progress/uncertain state.
400
Invalid fields, identity, path, cursor or query. Unknown/duplicate fields are rejected where validated.
401
Missing, invalid, expired or revoked organization credential.
402
Insufficient available organization credits for the reservation.
403
Current issuer membership, product scope, project, resource lifecycle or entitlement denies access.
404
Resource, execution, snapshot, restore or file not found within the authorized organization.
409
State/identity conflict or unresolved execution. Observe the original durable identity; do not create replacement work to bypass uncertainty.
413
JSON body exceeds its byte limit.
415
Use Content-Type: application/json.
429
Admission concurrency, rate or budget limit reached.
500
The request could not be completed. Preserve any durable identity before retrying.
503
Runtime, deployment or recovery evidence is unavailable. Read existing status before retrying an uncertain mutation.

正在加载 API 参考文档…

Box · 接入与鉴权

基础 URLhttps://sinecloud.dev/api/box/v1/{boxId}

首次调用前

在控制台选择组织、准备资源,并创建具有所需产品权限范围的组织 API Key。每次调用都会检查当前权限、资源访问权限、预算和可用资金。

在控制台创建并选择 Box,将 boxId 替换为实际 Box 资源 ID,不能使用父级激活记录 ID。接口目录涵盖工作区文件、目录、命令执行、持久化状态、Sandbox 运行窗口和保留备份。Lite 命令无需启动虚拟机;Sandbox 命令需要已明确确认并预留资金的运行窗口,虚拟机空闲分配时间也会计费。文件访问不会启动虚拟机。

按各接口要求授予 boxRun、fileRead 或 fileWrite 等权限。创建备份同时需要 boxRun 与 fileRead。资源创建、发起恢复和删除备份使用控制台会话。恢复结果不明确的任务时,请保留原始执行标识。

组织密钥鉴权与基础 URL

产品 API 的生产源地址是 https://sinecloud.dev,不是文档站点。路径前缀为 /api/box/v1/{boxId}。请使用接口注明的完整路径,并将资源 ID、模型与端点版本替换为实际值。

Authorization: Bearer $SINECLOUD_API_KEY

将 SINECLOUD_API_KEY 设置为你自己的环境变量值,切勿使用平台服务凭据。各接口的 x-sinecloud-scopes 会注明所需的权限范围。

此文档为只读参考,请在控制台或自己的客户端中发起请求。浏览文档不会创建密钥、启动执行或产生执行费用。请保留请求 ID 和执行回执;连接中断不会取消任务,再次提交前请按接口说明恢复并确认状态。

控制台

输入关键词开始搜索…

↑↓ 移动↵ 选择Esc 关闭