Skip to content

Commit 71e46ca

Browse files
authored
Update api-access.md
1 parent 9304df7 commit 71e46ca

File tree

1 file changed

+20
-9
lines changed

1 file changed

+20
-9
lines changed

docs/watsonx-assistant/api-access.md

Lines changed: 20 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -9,21 +9,32 @@ This page will demonstrate how to access watsonx Assistant via an API call.
99
- [watsonx Assistant v2](https://cloud.ibm.com/apidocs/assistant-v2)
1010

1111

12-
## High level steps:
12+
## Steps:
1313

1414
1. Access watsonx Assistant from Resource List in the IBM Cloud Account
15-
2. Get API Key for watsonx Assistant from Launch webpage
15+
16+
2. Get API Key for watsonx Assistant from Launch webpage\
17+
1618
3. Get Serice Instance URL from Launch webpage
19+
1720
4. Get Assistant ID from webpage within the Assistant settings
21+
1822
5. Copy the Skill ID from the watsonx Assistant settings
23+
1924
6. Obtain the Session ID from CLI CURL
2025

2126
```{}
22-
{ curl -X POST -u "apikey:{apikey}" "{url}/v2/assistants/{environment_id}/sessions?version=2021-11-27" }
23-
curl -X POST -u "apikey:APIKEY" "URL"
24-
{
25-
"session_id":"SESSION_ID"
26-
}
27+
curl -X POST -u "apikey:{apikey}" "{url}/v2/assistants/{environment_id}/sessions?version=2021-11-27"
28+
```
29+
7. Get all parameters from CLI CURL
30+
31+
```{}
32+
curl -X GET -u "apikey:{apikey}" "{url}/v2/assistants/{assistant_id}/skills/{skill_id}?version=2021-11-27"
33+
```
34+
35+
8. Run Query from CLI CURL as API call to watsonx Agent
36+
37+
```{}
38+
curl -X POST -u "apikey:{apikey}" --header "Content-Type:application/json" --data "{\"input\": {\"text\":
39+
\"Hello\"}}" "{url}/v2/assistants/{environment_id}/sessions/{session_id}/message?version=2024-08-25"
2740
```
28-
7. dsgsd
29-
9.

0 commit comments

Comments
 (0)