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; praxis_token enables platform API calls without a key in application code, reaching only what the Worker’s grants name, while praxis_vault_ref is not available. In the Praxis Application Model an application is the system of engagement: pages, APIs and orchestration. Business data, the facts of the business that survive a change of implementation (orders, customers, collected records), belongs in the system of record: Database, Knowledge, Media and File, reached through public APIs. Application state, data that exists only because of how the application is built (sessions, jobs, cursors, checkpoints, locks, retries, caches), belongs in the Worker’s own d1, kv or r2 components. Business processes run in the execution layer (Automation workflows and scripts, agents), not inside Worker code. Start with praxis.application.publish, which uploads, versions and deploys in one call.
基础地址
https://api.deepraxis.com/application/v1
鉴权
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}/assets/manifest - 获取版本 —
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