Application API
Application API
(待译)
Application hosts your Workers: upload code and static assets as a version, deploy it, and serve it on its own *.praxisusercontent.com URL (use the url that publish returns). Concepts and behavior follow Cloudflare Workers (Workers, versions, deployments, static assets with _headers/_redirects, secrets, bindings), so Cloudflare experience applies. Differences: there are no Service Bindings, so applications call each other with fetch on their public URL; a deployment runs exactly one version at 100 percent (no gradual rollout); changing a secret creates a new version and deploys it. Application runtime data belongs in its own d1, kv or r2 components; Database, File and Knowledge are shared content stores that applications can read through public APIs, not private runtime storage. Start with praxis.application.publish, which uploads, versions and deploys in one call.
基础地址
鉴权
Authorization: Bearer <PRAXIS_API_KEY>
端点
- 获取账号子域 —
GET /application/v1/subdomain - 修改账号子域 —
PUT /application/v1/subdomain - 列出 Worker —
GET /application/v1/workers - 创建 Worker —
POST /application/v1/workers - 获取 Worker —
GET /application/v1/workers/{worker_id} - 更新 Worker —
PATCH /application/v1/workers/{worker_id} - 删除 Worker —
DELETE /application/v1/workers/{worker_id} - 恢复 Worker —
POST /application/v1/workers/{worker_id}/restore - 列出版本 —
GET /application/v1/workers/{worker_id}/versions - 创建版本 —
POST /application/v1/workers/{worker_id}/versions - 获取版本 —
GET /application/v1/workers/{worker_id}/versions/{version_id} - 列出部署 —
GET /application/v1/workers/{worker_id}/deployments - 创建部署 —
POST /application/v1/workers/{worker_id}/deployments - 获取部署 —
GET /application/v1/workers/{worker_id}/deployments/{deployment_id} - 列出组件 —
GET /application/v1/workers/{worker_id}/components - 列出密钥 —
GET /application/v1/workers/{worker_id}/secrets - 写入密钥 —
PUT /application/v1/workers/{worker_id}/secrets/{name} - 删除密钥 —
DELETE /application/v1/workers/{worker_id}/secrets/{name} - 列出授权 —
GET /application/v1/workers/{worker_id}/grants - 创建授权 —
POST /application/v1/workers/{worker_id}/grants - 删除授权 —
DELETE /application/v1/workers/{worker_id}/grants/{grant_id} - 列出事件 —
GET /application/v1/workers/{worker_id}/events - 创建静态资源上传会话 —
POST /application/v1/workers/{worker_id}/assets-upload-session - 上传静态资源 —
POST /application/v1/assets/upload