Skip to content

Commit 15a927b

Browse files
Merge pull request #939 from mrbullwinkle/mrb_10_21_2024_fix_batch_REST
[Azure OpenAI] REST API cURL fix
2 parents cc07490 + 6208936 commit 15a927b

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

articles/ai-services/openai/includes/batch/batch-rest.md

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -258,9 +258,8 @@ curl https://YOUR_RESOURCE_NAME.openai.azure.com/openai/batches?api-version=2024
258258
Use the REST API to list all batch jobs with additional sorting/filtering options.
259259

260260
```http
261-
curl https://YOUR_RESOURCE_NAME.openai.azure.com/openai/batches?api-version=2024-10-01-preview \
262-
-H "api-key: $AZURE_OPENAI_API_KEY" \
263-
-H "filter: 'created_at gt 1728773533 and created_at lt 1729032733 and status eq 'Completed''" \
264-
-H "orderby: created_at asc"
265-
261+
curl "YOUR_RESOURCE_NAME.openai.azure.com/batches?api-version=2024-10-01-preview&$filter=created_at%20gt%201728773533%20and%20created_at%20lt%201729032733%20and%20status%20eq%20'Completed'&$orderby=created_at%20asc" \
262+
-H "api-key: $AZURE_OPENAI_API_KEY""
266263
```
264+
265+
To avoid the error `URL rejected: Malformed input to a URL function` spaces are replaced with `%20`.

0 commit comments

Comments
 (0)