Skip to content

Commit 9ef7c9e

Browse files
yeldarbyclaude
andcommitted
fix(cli): use params= for api_key in rfapi batch/job endpoints, update docs
Standardize 4 annotation batch/job endpoints to use params= instead of f-string query params for consistency with the rest of the codebase. Update CLI-COMMANDS.md with Phase 2 command examples. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 4638d08 commit 9ef7c9e

2 files changed

Lines changed: 67 additions & 9 deletions

File tree

CLI-COMMANDS.md

Lines changed: 63 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,64 @@ roboflow version list -p my-project
6464
roboflow model list -p my-project
6565
```
6666

67+
### Manage folders
68+
69+
```bash
70+
roboflow folder list
71+
roboflow folder create "Training Data" --projects proj1,proj2
72+
roboflow folder get <folder-id>
73+
roboflow folder update <folder-id> --name "New Name"
74+
roboflow folder delete <folder-id>
75+
```
76+
77+
### Annotation batches and jobs
78+
79+
```bash
80+
roboflow annotation batch list -p my-project
81+
roboflow annotation batch get <batch-id> -p my-project
82+
roboflow annotation job list -p my-project
83+
roboflow annotation job create -p my-project --name "Label round 1" \
84+
--batch <batch-id> --num-images 100 --labeler a@co.com --reviewer b@co.com
85+
```
86+
87+
### Workflows
88+
89+
```bash
90+
roboflow workflow list
91+
roboflow workflow get my-workflow
92+
roboflow workflow create --name "My Workflow" --definition workflow.json
93+
roboflow workflow update my-workflow --definition updated.json
94+
roboflow workflow version list my-workflow
95+
roboflow workflow fork other-ws/their-workflow
96+
```
97+
98+
### Create a dataset version
99+
100+
```bash
101+
roboflow version create -p my-project --settings settings.json
102+
```
103+
104+
### Workspace stats and billing
105+
106+
```bash
107+
roboflow workspace usage
108+
roboflow workspace plan
109+
roboflow workspace stats --start-date 2026-01-01 --end-date 2026-03-31
110+
```
111+
112+
### Search Roboflow Universe
113+
114+
```bash
115+
roboflow universe search "hard hats" --type dataset --limit 5
116+
```
117+
118+
### Video inference
119+
120+
```bash
121+
roboflow video infer -p my-project -v 3 -f video.mp4 --fps 10
122+
roboflow video status <job-id>
123+
```
124+
67125
## JSON output for agents
68126

69127
Every command supports `--json` for structured output that's safe to pipe:
@@ -103,12 +161,12 @@ Version numbers are always numeric — that's how `x/y` is disambiguated between
103161
| `infer` | Run inference on images |
104162
| `search` | Search workspace images (RoboQL), export results |
105163
| `deployment` | Manage dedicated deployments |
106-
| `workflow` | Manage workflows *(coming soon)* |
107-
| `folder` | Manage project folders *(coming soon)* |
164+
| `workflow` | Manage workflows |
165+
| `folder` | Manage workspace folders |
166+
| `annotation` | Annotation batches and jobs |
167+
| `universe` | Search Roboflow Universe |
168+
| `video` | Video inference |
108169
| `batch` | Batch processing jobs *(coming soon)* |
109-
| `universe` | Browse Roboflow Universe *(coming soon)* |
110-
| `video` | Video inference *(coming soon)* |
111-
| `annotation` | Annotation batches and jobs *(coming soon)* |
112170
| `completion` | Shell completion scripts *(coming soon)* |
113171

114172
Run `roboflow <command> --help` for details on any command.

roboflow/adapters/rfapi.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -486,31 +486,31 @@ def _save_annotation_error(response):
486486

487487
def list_batches(api_key, workspace_url, project_url):
488488
"""GET /{ws}/{proj}/batches — list annotation batches."""
489-
response = requests.get(f"{API_URL}/{workspace_url}/{project_url}/batches?api_key={api_key}")
489+
response = requests.get(f"{API_URL}/{workspace_url}/{project_url}/batches", params={"api_key": api_key})
490490
if response.status_code != 200:
491491
raise RoboflowError(response.text)
492492
return response.json()
493493

494494

495495
def get_batch(api_key, workspace_url, project_url, batch_id):
496496
"""GET /{ws}/{proj}/batches/{batch_id} — get batch details."""
497-
response = requests.get(f"{API_URL}/{workspace_url}/{project_url}/batches/{batch_id}?api_key={api_key}")
497+
response = requests.get(f"{API_URL}/{workspace_url}/{project_url}/batches/{batch_id}", params={"api_key": api_key})
498498
if response.status_code != 200:
499499
raise RoboflowError(response.text)
500500
return response.json()
501501

502502

503503
def list_annotation_jobs(api_key, workspace_url, project_url):
504504
"""GET /{ws}/{proj}/jobs — list annotation jobs."""
505-
response = requests.get(f"{API_URL}/{workspace_url}/{project_url}/jobs?api_key={api_key}")
505+
response = requests.get(f"{API_URL}/{workspace_url}/{project_url}/jobs", params={"api_key": api_key})
506506
if response.status_code != 200:
507507
raise RoboflowError(response.text)
508508
return response.json()
509509

510510

511511
def get_annotation_job(api_key, workspace_url, project_url, job_id):
512512
"""GET /{ws}/{proj}/jobs/{job_id} — get annotation job details."""
513-
response = requests.get(f"{API_URL}/{workspace_url}/{project_url}/jobs/{job_id}?api_key={api_key}")
513+
response = requests.get(f"{API_URL}/{workspace_url}/{project_url}/jobs/{job_id}", params={"api_key": api_key})
514514
if response.status_code != 200:
515515
raise RoboflowError(response.text)
516516
return response.json()

0 commit comments

Comments
 (0)