@@ -13,44 +13,46 @@ This page will demonstrate how to access watsonx Assistant via an API call.
1313
14141 . 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
18182 . Get API Key for watsonx Assistant from Launch webpage
19- ![ test] ( ../assets/api-access/api.png )
19+ ![ test] ( ../assets/api-access/api.png )
2020
21213 . Get Serice Instance URL from Launch webpage
22- ![ test] ( ../assets/api-access/url.png )
22+ ![ test] ( ../assets/api-access/url.png )
2323
24244 . Get Assistant ID from webpage within the Assistant settings
2525
2626 - Head to the Homepage of your assistant:
27- ![ test] ( ../assets/api-access/assistant-page.png )
27+ ![ test] ( ../assets/api-access/assistant-page.png )
2828
2929 - 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 )
3131
3232 - 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 )
3434
3535 - Get the required information from this pop-up window:
36- ![ test] ( ../assets/api-access/details.png )
36+ ![ test] ( ../assets/api-access/details.png )
3737
38385 . Copy the Skill ID from the watsonx Assistant settings
3939
40406 . Obtain the Session ID from CLI CURL
4141
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+ ```
45457 . Get all parameters from CLI CURL
4646
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+ ```
5050
51518 . Run Query from CLI CURL as API call to watsonx Agent
5252
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