获取 Worker 输入 Schema
方法: GET
端点: /api/v2/workers/{workerId}/input-schema
认证: 不需要 API token
GET
/api/v2/workers/{workerId}/input-schemaGet worker input schemaAuthorizationNot required
This is a public endpoint and does not require an API token.
Parameters
Required
Worker slug or path. You may paste `owner/name`; the playground sends it as `owner~name` for path values.
Request BodyNot applicable
No JSON request body. Fill the path or query parameters above.
什么时候使用这个接口
Section titled “什么时候使用这个接口”用于读取某个 Worker 的输入 schema,并据此构造 input。
workerId/worker_id支持 Worker slug,也支持把路径owner/name写成owner~name。
| 参数 | 必填 | 类型 | 说明 |
|---|---|---|---|
workerId | 是 | string | Worker slug 或 path;如果使用 owner/name 路径,请写成 owner~name。 |
curl -X GET "https://openapi.coreclaw.com/api/v2/workers/YOUR_WORKER_ID/input-schema"{ "code": 0, "data": { "input_schema": { "properties": { "keyword": { "type": "string" } }, "type": "object" } }, "message": "success", "request_id": "req-123"}- 此接口不需要 API token。
HTTP 响应
Section titled “HTTP 响应”| HTTP 状态 | 应用代码 | 含义 |
|---|---|---|
200 | 0 | 请求成功。 |
400 | 11000 | 请求参数不合法。 |
401 | 12001 | 认证缺失或无效。 |
404 | 11004 | 目标资源不存在。 |
422 | 11000 | 请求语义或字段校验未通过。 |
429 | 13000 | 请求过于频繁。 |
500 | 10000 | 服务端内部错误。 |