docs: add API quick reference to openclaw skill guide
All checks were successful
CI / test (push) Successful in 1m33s
All checks were successful
CI / test (push) Successful in 1m33s
This commit is contained in:
58
SKILL.md
58
SKILL.md
@@ -31,3 +31,61 @@ Agents can use ScreenJob to launch and control GUI workflows, including orchestr
|
||||
1. Submit job via CLI or API.
|
||||
2. Agent performs tool loop.
|
||||
3. Read final `response.return` and `response.data` from job status.
|
||||
|
||||
## API Quick Reference
|
||||
|
||||
Base URL:
|
||||
|
||||
- `http://127.0.0.1:8787` (default)
|
||||
|
||||
Auth (required on all `/api/*` routes):
|
||||
|
||||
- `Authorization: Bearer <SCREENJOB_TOKEN>`
|
||||
- or `X-ScreenJob-Token: <SCREENJOB_TOKEN>`
|
||||
|
||||
Create a job:
|
||||
|
||||
- `POST /api/jobs`
|
||||
- Body:
|
||||
|
||||
```json
|
||||
{
|
||||
"job": "Open amazon.de and go to my orders",
|
||||
"model": "gpt-5.4-mini",
|
||||
"disabled_tools": [],
|
||||
"safety_override": false
|
||||
}
|
||||
```
|
||||
|
||||
- Response:
|
||||
|
||||
```json
|
||||
{ "job_id": "job_..." }
|
||||
```
|
||||
|
||||
Check progress/result:
|
||||
|
||||
- `GET /api/jobs/{job_id}`
|
||||
- `GET /api/jobs/{job_id}/status`
|
||||
- `GET /api/jobs/{job_id}/events`
|
||||
- `GET /api/jobs`
|
||||
- `POST /api/jobs/{job_id}/cancel`
|
||||
- `GET /api/stats`
|
||||
|
||||
Result contract in job payload:
|
||||
|
||||
```json
|
||||
{
|
||||
"status": "completed",
|
||||
"response": {
|
||||
"return": "Task completed successfully",
|
||||
"data": "file1.txt\nfile2.txt"
|
||||
},
|
||||
"return": "Task completed successfully",
|
||||
"data": "file1.txt\nfile2.txt"
|
||||
}
|
||||
```
|
||||
|
||||
Artifacts (screenshots/enhanced images):
|
||||
|
||||
- `GET /api/jobs/{job_id}/artifact?path=<absolute_artifact_path>&token=<SCREENJOB_TOKEN>`
|
||||
|
||||
Reference in New Issue
Block a user