Skip to content

Commit 8ea5e7e

Browse files
committed
updating rest samples
1 parent 9de9be1 commit 8ea5e7e

10 files changed

+64
-64
lines changed

articles/ai-services/agents/how-to/tools/azure-ai-search-samples.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -431,7 +431,7 @@ In the URL, you see the wsid=/subscription/your-subscription-id..., this is the
431431
Using the connection ID you got in the previous step, you can now configure the Azure AI Search tool to use your Azure AI Search index.
432432
433433
```console
434-
curl $AZURE_AI_AGENTS_ENDPOINT/assistants?api-version=2024-12-01-preview \
434+
curl $AZURE_AI_FOUNDRY_PROJECT_ENDPOINT/assistants?api-version=2025-05-01 \
435435
-H "Authorization: Bearer $AZURE_AI_AGENTS_TOKEN" \
436436
-H "Content-Type: application/json" \
437437
-d '{
@@ -461,7 +461,7 @@ Now that the agent is created, ask it questions about the data in your Azure AI
461461
#### Create a thread
462462
463463
```console
464-
curl $AZURE_AI_AGENTS_ENDPOINT/threads?api-version=2024-12-01-preview \
464+
curl $AZURE_AI_FOUNDRY_PROJECT_ENDPOINT/threads?api-version=2025-05-01 \
465465
-H "Authorization: Bearer $AZURE_AI_AGENTS_TOKEN" \
466466
-H "Content-Type: application/json" \
467467
-d ''
@@ -470,7 +470,7 @@ curl $AZURE_AI_AGENTS_ENDPOINT/threads?api-version=2024-12-01-preview \
470470
#### Add a user question to the thread
471471
472472
```console
473-
curl $AZURE_AI_AGENTS_ENDPOINT/threads/thread_abc123/messages?api-version=2024-12-01-preview \
473+
curl $AZURE_AI_FOUNDRY_PROJECT_ENDPOINT/threads/thread_abc123/messages?api-version=2025-05-01 \
474474
-H "Authorization: Bearer $AZURE_AI_AGENTS_TOKEN" \
475475
-H "Content-Type: application/json" \
476476
-d '{
@@ -481,7 +481,7 @@ curl $AZURE_AI_AGENTS_ENDPOINT/threads/thread_abc123/messages?api-version=2024-1
481481
#### Run the thread
482482
483483
```console
484-
curl $AZURE_AI_AGENTS_ENDPOINT/threads/thread_abc123/runs?api-version=2024-12-01-preview \
484+
curl $AZURE_AI_FOUNDRY_PROJECT_ENDPOINT/threads/thread_abc123/runs?api-version=2025-05-01 \
485485
-H "Authorization: Bearer $AZURE_AI_AGENTS_TOKEN" \
486486
-H "Content-Type: application/json" \
487487
-d '{
@@ -492,14 +492,14 @@ curl $AZURE_AI_AGENTS_ENDPOINT/threads/thread_abc123/runs?api-version=2024-12-01
492492
#### Retrieve the status of the run
493493
494494
```console
495-
curl $AZURE_AI_AGENTS_ENDPOINT/threads/thread_abc123/runs/run_abc123?api-version=2024-12-01-preview \
495+
curl $AZURE_AI_FOUNDRY_PROJECT_ENDPOINT/threads/thread_abc123/runs/run_abc123?api-version=2025-05-01 \
496496
-H "Authorization: Bearer $AZURE_AI_AGENTS_TOKEN"
497497
```
498498
499499
#### Retrieve the agent response
500500
501501
```console
502-
curl $AZURE_AI_AGENTS_ENDPOINT/threads/thread_abc123/messages?api-version=2024-12-01-preview \
502+
curl $AZURE_AI_FOUNDRY_PROJECT_ENDPOINT/threads/thread_abc123/messages?api-version=2025-05-01 \
503503
-H "Authorization: Bearer $AZURE_AI_AGENTS_TOKEN"
504504
```
505505

articles/ai-services/agents/how-to/tools/azure-functions-samples.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@ In the sample below we create a client and an agent that has the tools definitio
182182

183183
Follow the [REST API Quickstart](../../quickstart.md?pivots=rest-api) to set the right values for the environment variables `AZURE_AI_AGENTS_TOKEN` and `AZURE_AI_AGENTS_ENDPOINT`. Then create the agent using:
184184
```console
185-
curl $AZURE_AI_AGENTS_ENDPOINT/assistants?api-version=2024-12-01-preview \
185+
curl $AZURE_AI_FOUNDRY_PROJECT_ENDPOINT/assistants?api-version=2025-05-01 \
186186
-H "Authorization: Bearer $AZURE_AI_AGENTS_TOKEN" \
187187
-H "Content-Type: application/json" \
188188
-d '{
@@ -227,7 +227,7 @@ curl $AZURE_AI_AGENTS_ENDPOINT/assistants?api-version=2024-12-01-preview \
227227
## Create a thread for the agent
228228

229229
```console
230-
curl $AZURE_AI_AGENTS_ENDPOINT/threads?api-version=2024-12-01-preview \
230+
curl $AZURE_AI_FOUNDRY_PROJECT_ENDPOINT/threads?api-version=2025-05-01 \
231231
-H "Authorization: Bearer $AZURE_AI_AGENTS_TOKEN" \
232232
-H "Content-Type: application/json" \
233233
-d ''
@@ -236,7 +236,7 @@ curl $AZURE_AI_AGENTS_ENDPOINT/threads?api-version=2024-12-01-preview \
236236
## Create a run and check the output
237237

238238
```console
239-
curl $AZURE_AI_AGENTS_ENDPOINT/threads/thread_abc123/messages?api-version=2024-12-01-preview \
239+
curl $AZURE_AI_FOUNDRY_PROJECT_ENDPOINT/threads/thread_abc123/messages?api-version=2025-05-01 \
240240
-H "Authorization: Bearer $AZURE_AI_AGENTS_TOKEN" \
241241
-H "Content-Type: application/json" \
242242
-d '{
@@ -246,7 +246,7 @@ curl $AZURE_AI_AGENTS_ENDPOINT/threads/thread_abc123/messages?api-version=2024-1
246246
```
247247

248248
```console
249-
curl $AZURE_AI_AGENTS_ENDPOINT/threads/thread_abc123/runs?api-version=2024-12-01-preview \
249+
curl $AZURE_AI_FOUNDRY_PROJECT_ENDPOINT/threads/thread_abc123/runs?api-version=2025-05-01 \
250250
-H "Authorization: Bearer $AZURE_AI_AGENTS_TOKEN" \
251251
-H "Content-Type: application/json" \
252252
-d '{
@@ -255,14 +255,14 @@ curl $AZURE_AI_AGENTS_ENDPOINT/threads/thread_abc123/runs?api-version=2024-12-01
255255
```
256256

257257
```console
258-
curl $AZURE_AI_AGENTS_ENDPOINT/threads/thread_abc123/runs/run_abc123?api-version=2024-12-01-preview \
258+
curl $AZURE_AI_FOUNDRY_PROJECT_ENDPOINT/threads/thread_abc123/runs/run_abc123?api-version=2025-05-01 \
259259
-H "Authorization: Bearer $AZURE_AI_AGENTS_TOKEN"
260260
```
261261

262262
## Get the result of the run
263263

264264
```console
265-
curl $AZURE_AI_AGENTS_ENDPOINT/threads/thread_abc123/messages?api-version=2024-12-01-preview \
265+
curl $AZURE_AI_FOUNDRY_PROJECT_ENDPOINT/threads/thread_abc123/messages?api-version=2025-05-01 \
266266
-H "Authorization: Bearer $AZURE_AI_AGENTS_TOKEN"
267267
```
268268

articles/ai-services/agents/how-to/tools/bing-code-samples.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -409,7 +409,7 @@ Follow the [REST API Quickstart](../../quickstart.md?pivots=rest-api) to set the
409409
To make the Grounding with Bing search tool available to your agent, use a connection to initialize the tool and attach it to the agent. You can find your connection in the **connected resources** section of your project in the [Azure AI Foundry portal](https://ai.azure.com/).
410410
411411
```console
412-
curl $AZURE_AI_AGENTS_ENDPOINT/assistants?api-version=2025-05-01 \
412+
curl $AZURE_AI_FOUNDRY_PROJECT_ENDPOINT/assistants?api-version=2025-05-01 \
413413
-H "Authorization: Bearer $AZURE_AI_AGENTS_TOKEN" \
414414
-H "Content-Type: application/json" \
415415
-d '{
@@ -438,7 +438,7 @@ curl $AZURE_AI_AGENTS_ENDPOINT/assistants?api-version=2025-05-01 \
438438
## Create a thread
439439
440440
```console
441-
curl $AZURE_AI_AGENTS_ENDPOINT/threads?api-version=2025-05-01 \
441+
curl $AZURE_AI_FOUNDRY_PROJECT_ENDPOINT/threads?api-version=2025-05-01 \
442442
-H "Authorization: Bearer $AZURE_AI_AGENTS_TOKEN" \
443443
-H "Content-Type: application/json" \
444444
-d ''
@@ -447,7 +447,7 @@ curl $AZURE_AI_AGENTS_ENDPOINT/threads?api-version=2025-05-01 \
447447
## Add a user question to the thread
448448
449449
```console
450-
curl $AZURE_AI_AGENTS_ENDPOINT/threads/thread_abc123/messages?api-version=2025-05-01 \
450+
curl $AZURE_AI_FOUNDRY_PROJECT_ENDPOINT/threads/thread_abc123/messages?api-version=2025-05-01 \
451451
-H "Authorization: Bearer $AZURE_AI_AGENTS_TOKEN" \
452452
-H "Content-Type: application/json" \
453453
-d '{
@@ -461,7 +461,7 @@ curl $AZURE_AI_AGENTS_ENDPOINT/threads/thread_abc123/messages?api-version=2025-0
461461
Create a run and observe that the model uses the Grounding with Bing Search tool to provide a response to the user's question.
462462
463463
```console
464-
curl $AZURE_AI_AGENTS_ENDPOINT/threads/thread_abc123/runs?api-version=2025-05-01 \
464+
curl $AZURE_AI_FOUNDRY_PROJECT_ENDPOINT/threads/thread_abc123/runs?api-version=2025-05-01 \
465465
-H "Authorization: Bearer $AZURE_AI_AGENTS_TOKEN" \
466466
-H "Content-Type: application/json" \
467467
-d '{
@@ -472,14 +472,14 @@ curl $AZURE_AI_AGENTS_ENDPOINT/threads/thread_abc123/runs?api-version=2025-05-01
472472
### Retrieve the status of the run
473473
474474
```console
475-
curl $AZURE_AI_AGENTS_ENDPOINT/threads/thread_abc123/runs/run_abc123?api-version=2025-05-01 \
475+
curl $AZURE_AI_FOUNDRY_PROJECT_ENDPOINT/threads/thread_abc123/runs/run_abc123?api-version=2025-05-01 \
476476
-H "Authorization: Bearer $AZURE_AI_AGENTS_TOKEN"
477477
```
478478
479479
### Retrieve the agent response
480480
481481
```console
482-
curl $AZURE_AI_AGENTS_ENDPOINT/threads/thread_abc123/messages?api-version=2025-05-01 \
482+
curl $AZURE_AI_FOUNDRY_PROJECT_ENDPOINT/threads/thread_abc123/messages?api-version=2025-05-01 \
483483
-H "Authorization: Bearer $AZURE_AI_AGENTS_TOKEN"
484484
```
485485

articles/ai-services/agents/how-to/tools/bing-custom-search-samples.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -391,7 +391,7 @@ Follow the [REST API Quickstart](../../quickstart.md?pivots=rest-api) to set the
391391
To make the Grounding with Bing Custom Search tool available to your agent, use a connection to initialize the tool and attach it to the agent. You can find your connection in the **connected resources** section of your project in the [Azure AI Foundry portal](https://ai.azure.com/).
392392
393393
```console
394-
curl $AZURE_AI_AGENTS_ENDPOINT/assistants?api-version=2025-05-15-preview \
394+
curl $AZURE_AI_FOUNDRY_PROJECT_ENDPOINT/assistants?api-version=2025-05-15-preview \
395395
-H "Authorization: Bearer $AZURE_AI_AGENTS_TOKEN" \
396396
-H "Content-Type: application/json" \
397397
-d '{
@@ -421,7 +421,7 @@ curl $AZURE_AI_AGENTS_ENDPOINT/assistants?api-version=2025-05-15-preview \
421421
## Create a thread
422422
423423
```console
424-
curl $AZURE_AI_AGENTS_ENDPOINT/threads?api-version=2025-05-15-preview \
424+
curl $AZURE_AI_FOUNDRY_PROJECT_ENDPOINT/threads?api-version=2025-05-15-preview \
425425
-H "Authorization: Bearer $AZURE_AI_AGENTS_TOKEN" \
426426
-H "Content-Type: application/json" \
427427
-d ''
@@ -430,7 +430,7 @@ curl $AZURE_AI_AGENTS_ENDPOINT/threads?api-version=2025-05-15-preview \
430430
## Add a user question to the thread
431431
432432
```console
433-
curl $AZURE_AI_AGENTS_ENDPOINT/threads/thread_abc123/messages?api-version=2025-05-15-preview \
433+
curl $AZURE_AI_FOUNDRY_PROJECT_ENDPOINT/threads/thread_abc123/messages?api-version=2025-05-15-preview \
434434
-H "Authorization: Bearer $AZURE_AI_AGENTS_TOKEN" \
435435
-H "Content-Type: application/json" \
436436
-d '{
@@ -444,7 +444,7 @@ curl $AZURE_AI_AGENTS_ENDPOINT/threads/thread_abc123/messages?api-version=2025-0
444444
Create a run and observe that the model uses the Grounding with Bing Custom Search tool to provide a response to the user's question.
445445
446446
```console
447-
curl $AZURE_AI_AGENTS_ENDPOINT/threads/thread_abc123/runs?api-version=2025-05-15-preview \
447+
curl $AZURE_AI_FOUNDRY_PROJECT_ENDPOINT/threads/thread_abc123/runs?api-version=2025-05-15-preview \
448448
-H "Authorization: Bearer $AZURE_AI_AGENTS_TOKEN" \
449449
-H "Content-Type: application/json" \
450450
-d '{
@@ -455,14 +455,14 @@ curl $AZURE_AI_AGENTS_ENDPOINT/threads/thread_abc123/runs?api-version=2025-05-15
455455
### Retrieve the status of the run
456456
457457
```console
458-
curl $AZURE_AI_AGENTS_ENDPOINT/threads/thread_abc123/runs/run_abc123?api-version=2025-05-15-preview \
458+
curl $AZURE_AI_FOUNDRY_PROJECT_ENDPOINT/threads/thread_abc123/runs/run_abc123?api-version=2025-05-15-preview \
459459
-H "Authorization: Bearer $AZURE_AI_AGENTS_TOKEN"
460460
```
461461
462462
### Retrieve the agent response
463463
464464
```console
465-
curl $AZURE_AI_AGENTS_ENDPOINT/threads/thread_abc123/messages?api-version=2025-05-15-preview \
465+
curl $AZURE_AI_FOUNDRY_PROJECT_ENDPOINT/threads/thread_abc123/messages?api-version=2025-05-15-preview \
466466
-H "Authorization: Bearer $AZURE_AI_AGENTS_TOKEN"
467467
```
468468

articles/ai-services/agents/how-to/tools/code-interpreter-samples.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -383,7 +383,7 @@ console.log(`Saved image file to: ${imageFileName}`);
383383
## Upload a file
384384
385385
```bash
386-
curl $AZURE_AI_AGENTS_ENDPOINT/files?api-version=2024-12-01-preview \
386+
curl $AZURE_AI_FOUNDRY_PROJECT_ENDPOINT/files?api-version=2025-05-01 \
387387
-H "Authorization: Bearer $AZURE_AI_AGENTS_TOKEN" \
388388
-F purpose="assistants" \
389389
-F file="@c:\\path_to_file\\file.csv"
@@ -392,7 +392,7 @@ curl $AZURE_AI_AGENTS_ENDPOINT/files?api-version=2024-12-01-preview \
392392
## Create an agent with the code interpreter tool
393393
394394
```bash
395-
curl $AZURE_AI_AGENTS_ENDPOINT/assistants?api-version=2024-12-01-preview \
395+
curl $AZURE_AI_FOUNDRY_PROJECT_ENDPOINT/assistants?api-version=2025-05-01 \
396396
-H "Authorization: Bearer $AZURE_AI_AGENTS_TOKEN" \
397397
-H "Content-Type: application/json" \
398398
-d '{
@@ -412,7 +412,7 @@ curl $AZURE_AI_AGENTS_ENDPOINT/assistants?api-version=2024-12-01-preview \
412412
## Create a thread
413413
414414
```bash
415-
curl $AZURE_AI_AGENTS_ENDPOINT/threads?api-version=2024-12-01-preview \
415+
curl $AZURE_AI_FOUNDRY_PROJECT_ENDPOINT/threads?api-version=2025-05-01 \
416416
-H "Authorization: Bearer $AZURE_AI_AGENTS_TOKEN" \
417417
-H "Content-Type: application/json" \
418418
-d ''
@@ -421,7 +421,7 @@ curl $AZURE_AI_AGENTS_ENDPOINT/threads?api-version=2024-12-01-preview \
421421
## Add a user question to the thread
422422
423423
```bash
424-
curl $AZURE_AI_AGENTS_ENDPOINT/threads/thread_abc123/messages?api-version=2024-12-01-preview \
424+
curl $AZURE_AI_FOUNDRY_PROJECT_ENDPOINT/threads/thread_abc123/messages?api-version=2025-05-01 \
425425
-H "Authorization: Bearer $AZURE_AI_AGENTS_TOKEN" \
426426
-H "Content-Type: application/json" \
427427
-d '{
@@ -433,7 +433,7 @@ curl $AZURE_AI_AGENTS_ENDPOINT/threads/thread_abc123/messages?api-version=2024-1
433433
## Run the thread
434434
435435
```bash
436-
curl $AZURE_AI_AGENTS_ENDPOINT/threads/thread_abc123/runs?api-version=2024-12-01-preview \
436+
curl $AZURE_AI_FOUNDRY_PROJECT_ENDPOINT/threads/thread_abc123/runs?api-version=2025-05-01 \
437437
-H "Authorization: Bearer $AZURE_AI_AGENTS_TOKEN" \
438438
-H "Content-Type: application/json" \
439439
-d '{
@@ -444,14 +444,14 @@ curl $AZURE_AI_AGENTS_ENDPOINT/threads/thread_abc123/runs?api-version=2024-12-01
444444
## Retrieve the status of the run
445445
446446
```bash
447-
curl $AZURE_AI_AGENTS_ENDPOINT/threads/thread_abc123/runs/run_abc123?api-version=2024-12-01-preview \
447+
curl $AZURE_AI_FOUNDRY_PROJECT_ENDPOINT/threads/thread_abc123/runs/run_abc123?api-version=2025-05-01 \
448448
-H "Authorization: Bearer $AZURE_AI_AGENTS_TOKEN"
449449
```
450450
451451
## Retrieve the agent response
452452
453453
```bash
454-
curl $AZURE_AI_AGENTS_ENDPOINT/threads/thread_abc123/messages?api-version=2024-12-01-preview \
454+
curl $AZURE_AI_FOUNDRY_PROJECT_ENDPOINT/threads/thread_abc123/messages?api-version=2025-05-01 \
455455
-H "Authorization: Bearer $AZURE_AI_AGENTS_TOKEN"
456456
```
457457

articles/ai-services/agents/how-to/tools/fabric.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -390,7 +390,7 @@ Follow the [REST API Quickstart](../../quickstart.md?pivots=rest-api) to set the
390390
### Create an agent with the Microsoft Fabric tool enabled
391391
392392
```bash
393-
curl $AZURE_AI_AGENTS_ENDPOINT/assistants?api-version=2024-12-01-preview \
393+
curl $AZURE_AI_FOUNDRY_PROJECT_ENDPOINT/assistants?api-version=2025-05-15-preview \
394394
-H "Authorization: Bearer $AZURE_AI_AGENTS_TOKEN" \
395395
-H "Content-Type: application/json" \
396396
-d '{
@@ -417,7 +417,7 @@ curl $AZURE_AI_AGENTS_ENDPOINT/assistants?api-version=2024-12-01-preview \
417417
#### Create a thread
418418
419419
```bash
420-
curl $AZURE_AI_AGENTS_ENDPOINT/threads?api-version=2024-12-01-preview \
420+
curl $AZURE_AI_FOUNDRY_PROJECT_ENDPOINT/threads?api-version=2025-05-15-preview \
421421
-H "Authorization: Bearer $AZURE_AI_AGENTS_TOKEN" \
422422
-H "Content-Type: application/json" \
423423
-d ''
@@ -426,7 +426,7 @@ curl $AZURE_AI_AGENTS_ENDPOINT/threads?api-version=2024-12-01-preview \
426426
#### Add a user question to the thread
427427
428428
```bash
429-
curl $AZURE_AI_AGENTS_ENDPOINT/threads/thread_abc123/messages?api-version=2024-12-01-preview \
429+
curl $AZURE_AI_FOUNDRY_PROJECT_ENDPOINT/threads/thread_abc123/messages?api-version=2025-05-15-preview \
430430
-H "Authorization: Bearer $AZURE_AI_AGENTS_TOKEN" \
431431
-H "Content-Type: application/json" \
432432
-d '{
@@ -440,7 +440,7 @@ curl $AZURE_AI_AGENTS_ENDPOINT/threads/thread_abc123/messages?api-version=2024-1
440440
#### Run the thread
441441
442442
```bash
443-
curl $AZURE_AI_AGENTS_ENDPOINT/threads/thread_abc123/runs?api-version=2024-12-01-preview \
443+
curl $AZURE_AI_FOUNDRY_PROJECT_ENDPOINT/threads/thread_abc123/runs?api-version=2025-05-15-preview \
444444
-H "Authorization: Bearer $AZURE_AI_AGENTS_TOKEN" \
445445
-H "Content-Type: application/json" \
446446
-d '{
@@ -451,14 +451,14 @@ curl $AZURE_AI_AGENTS_ENDPOINT/threads/thread_abc123/runs?api-version=2024-12-01
451451
#### Retrieve the status of the run
452452
453453
```bash
454-
curl $AZURE_AI_AGENTS_ENDPOINT/threads/thread_abc123/runs/run_abc123?api-version=2024-12-01-preview \
454+
curl $AZURE_AI_FOUNDRY_PROJECT_ENDPOINT/threads/thread_abc123/runs/run_abc123?api-version=2025-05-15-preview \
455455
-H "Authorization: Bearer $AZURE_AI_AGENTS_TOKEN"
456456
```
457457
458458
#### Retrieve the agent response
459459
460460
```bash
461-
curl $AZURE_AI_AGENTS_ENDPOINT/threads/thread_abc123/messages?api-version=2024-12-01-preview \
461+
curl $AZURE_AI_FOUNDRY_PROJECT_ENDPOINT/threads/thread_abc123/messages?api-version=2025-05-15-preview \
462462
-H "Authorization: Bearer $AZURE_AI_AGENTS_TOKEN"
463463
```
464464
:::zone-end

0 commit comments

Comments
 (0)