Skip to content

Commit 917d806

Browse files
authored
Update api-access.md
1 parent 6ca1e05 commit 917d806

File tree

1 file changed

+14
-13
lines changed

1 file changed

+14
-13
lines changed

docs/watsonx-assistant/api-access.md

+14-13
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,13 @@ This page will demonstrate how to access watsonx Assistant via an API call.
1313

1414
1. Access watsonx Assistant from Resource List in the IBM Cloud Account
1515

16-
![test](../assets/api-access/resource.png)
16+
![test](../assets/api-access/resource.png)
1717

1818
2. Get API Key for watsonx Assistant from Launch webpage
19-
![test](../assets/api-access/api.png)
19+
![test](../assets/api-access/api.png)
2020

2121
3. Get Serice Instance URL from Launch webpage
22-
![test](../assets/api-access/url.png)
22+
![test](../assets/api-access/url.png)
2323

2424
4. Copy the Assistant ID and the Skill ID from the Assistant settings
2525

@@ -37,20 +37,21 @@ This page will demonstrate how to access watsonx Assistant via an API call.
3737

3838
5. Obtain the Session ID from CLI CURL
3939

40-
```{}
41-
curl -X POST -u "apikey:{apikey}" "{url}/v2/assistants/{environment_id}/sessions?version=2021-11-27"
42-
```
40+
```{}
41+
curl -X POST -u "apikey:{apikey}" "{url}/v2/assistants/{environment_id}/sessions?version=2021-11-27"
42+
```
43+
4344
6. Get all parameters from CLI CURL
4445

45-
```{}
46-
curl -X GET -u "apikey:{apikey}" "{url}/v2/assistants/{assistant_id}/skills/{skill_id}?version=2021-11-27"
47-
```
46+
```{}
47+
curl -X GET -u "apikey:{apikey}" "{url}/v2/assistants/{assistant_id}/skills/{skill_id}?version=2021-11-27"
48+
```
4849

4950
7. Run Query from CLI CURL as API call to watsonx Agent
5051

51-
```{}
52-
curl -X POST -u "apikey:{apikey}" --header "Content-Type:application/json" --data "{\"input\": {\"text\":
53-
\"Hello\"}}" "{url}/v2/assistants/{environment_id}/sessions/{session_id}/message?version=2024-08-25"
54-
```
52+
```{}
53+
curl -X POST -u "apikey:{apikey}" --header "Content-Type:application/json" --data "{\"input\": {\"text\":
54+
\"Hello\"}}" "{url}/v2/assistants/{environment_id}/sessions/{session_id}/message?version=2024-08-25"
55+
```
5556

5657
Cheers! Now you can chat with your watsonx Assistant via API.

0 commit comments

Comments
 (0)