@@ -13,44 +13,46 @@ 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 . Get Assistant ID from webpage within the Assistant settings
25
25
26
26
- Head to the Homepage of your assistant:
27
- ![ test] ( ../assets/api-access/assistant-page.png )
27
+ ![ test] ( ../assets/api-access/assistant-page.png )
28
28
29
29
- Access the Assistant Settings on the bottom left corner of the page:
30
- ![ test] ( ../assets/api-access/assistant-settings.png )
30
+ ![ test] ( ../assets/api-access/assistant-settings.png )
31
31
32
32
- Select * View details* on the Assistant IDs and API details section of the page:
33
- ![ test] ( ../assets/api-access/view-details.png )
33
+ ![ test] ( ../assets/api-access/view-details.png )
34
34
35
35
- Get the required information from this pop-up window:
36
- ![ test] ( ../assets/api-access/details.png )
36
+ ![ test] ( ../assets/api-access/details.png )
37
37
38
38
5 . Copy the Skill ID from the watsonx Assistant settings
39
39
40
40
6 . Obtain the Session ID from CLI CURL
41
41
42
- ``` {}
43
- curl -X POST -u "apikey:{apikey}" "{url}/v2/assistants/{environment_id}/sessions?version=2021-11-27"
44
- ```
42
+ ``` {}
43
+ curl -X POST -u "apikey:{apikey}" "{url}/v2/assistants/{environment_id}/sessions?version=2021-11-27"
44
+ ```
45
45
7 . Get all parameters from CLI CURL
46
46
47
- ``` {}
48
- curl -X GET -u "apikey:{apikey}" "{url}/v2/assistants/{assistant_id}/skills/{skill_id}?version=2021-11-27"
49
- ```
47
+ ``` {}
48
+ curl -X GET -u "apikey:{apikey}" "{url}/v2/assistants/{assistant_id}/skills/{skill_id}?version=2021-11-27"
49
+ ```
50
50
51
51
8 . Run Query from CLI CURL as API call to watsonx Agent
52
52
53
- ``` {}
54
- curl -X POST -u "apikey:{apikey}" --header "Content-Type:application/json" --data "{\"input\": {\"text\":
55
- \"Hello\"}}" "{url}/v2/assistants/{environment_id}/sessions/{session_id}/message?version=2024-08-25"
56
- ```
53
+ ``` {}
54
+ curl -X POST -u "apikey:{apikey}" --header "Content-Type:application/json" --data "{\"input\": {\"text\":
55
+ \"Hello\"}}" "{url}/v2/assistants/{environment_id}/sessions/{session_id}/message?version=2024-08-25"
56
+ ```
57
+
58
+ Cheers! Now you can chat with your watsonx Assistant via API.
0 commit comments