@@ -13,13 +13,13 @@ This page will demonstrate how to access watsonx Assistant via an API call.
13
13
14
14
1 . Access watsonx Assistant from Resource List in the IBM Cloud Account
15
15
16
- ![ test] ( ../assets/api-access/resource.png )
16
+ ![ test] ( ../assets/api-access/resource.png )
17
17
18
18
2 . Get API Key for watsonx Assistant from Launch webpage
19
- ![ test] ( ../assets/api-access/api.png )
19
+ ![ test] ( ../assets/api-access/api.png )
20
20
21
21
3 . Get Serice Instance URL from Launch webpage
22
- ![ test] ( ../assets/api-access/url.png )
22
+ ![ test] ( ../assets/api-access/url.png )
23
23
24
24
4 . Copy the Assistant ID and the Skill ID from the Assistant settings
25
25
@@ -37,20 +37,21 @@ This page will demonstrate how to access watsonx Assistant via an API call.
37
37
38
38
5 . Obtain the Session ID from CLI CURL
39
39
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
+
43
44
6 . Get all parameters from CLI CURL
44
45
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
+ ```
48
49
49
50
7 . Run Query from CLI CURL as API call to watsonx Agent
50
51
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
+ ```
55
56
56
57
Cheers! Now you can chat with your watsonx Assistant via API.
0 commit comments