@@ -12,7 +12,6 @@ This page will demonstrate how to access watsonx Assistant via an API call.
12
12
## Steps:
13
13
14
14
1 . Access watsonx Assistant from Resource List in the IBM Cloud Account
15
-
16
15
![ test] ( ../assets/api-access/resource.png )
17
16
18
17
2 . Get API Key for watsonx Assistant from Launch webpage
@@ -22,33 +21,26 @@ This page will demonstrate how to access watsonx Assistant via an API call.
22
21
![ test] ( ../assets/api-access/url.png )
23
22
24
23
4 . Copy the Assistant ID and the Skill ID from the Assistant settings
25
-
26
- + Head to the Homepage of your assistant:
24
+ - Head to the Homepage of your assistant:
27
25
![ test] ( ../assets/api-access/assistant-page.png )
28
-
29
- + Access the Assistant Settings on the bottom left corner of the page:
26
+ - Access the Assistant Settings on the bottom left corner of the page:
30
27
![ test] ( ../assets/api-access/assistant-settings.png )
31
-
32
- + Select * View details* on the Assistant IDs and API details section of the page:
28
+ - Select * View details* on the Assistant IDs and API details section of the page:
33
29
![ test] ( ../assets/api-access/view-details.png )
34
-
35
- + Get the required information from this pop-up window:
30
+ - Get the required information from this pop-up window:
36
31
![ test] ( ../assets/api-access/details.png )
37
32
38
33
5 . Obtain the Session ID from CLI CURL
39
-
40
34
``` {}
41
35
curl -X POST -u "apikey:{apikey}" "{url}/v2/assistants/{environment_id}/sessions?version=2021-11-27"
42
36
```
43
37
44
38
6 . Get all parameters from CLI CURL
45
-
46
39
``` {}
47
40
curl -X GET -u "apikey:{apikey}" "{url}/v2/assistants/{assistant_id}/skills/{skill_id}?version=2021-11-27"
48
41
```
49
42
50
43
7 . Run Query from CLI CURL as API call to watsonx Agent
51
-
52
44
``` {}
53
45
curl -X POST -u "apikey:{apikey}" --header "Content-Type:application/json" --data "{\"input\": {\"text\":
54
46
\"Hello\"}}" "{url}/v2/assistants/{environment_id}/sessions/{session_id}/message?version=2024-08-25"
0 commit comments