Skip to content

Commit

Permalink
Update api-access.md
Browse files Browse the repository at this point in the history
  • Loading branch information
ashlynbain authored Oct 2, 2024
1 parent a79e22c commit 6ca1e05
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions docs/watsonx-assistant/api-access.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,42 +11,42 @@ This page will demonstrate how to access watsonx Assistant via an API call.

## Steps:

- Access watsonx Assistant from Resource List in the IBM Cloud Account
1. Access watsonx Assistant from Resource List in the IBM Cloud Account

![test](../assets/api-access/resource.png)

- Get API Key for watsonx Assistant from Launch webpage
2. Get API Key for watsonx Assistant from Launch webpage
![test](../assets/api-access/api.png)

- Get Serice Instance URL from Launch webpage
3. Get Serice Instance URL from Launch webpage
![test](../assets/api-access/url.png)

- Copy the Assistant ID and the Skill ID from the Assistant settings
4. Copy the Assistant ID and the Skill ID from the Assistant settings

- Head to the Homepage of your assistant:
+ Head to the Homepage of your assistant:
![test](../assets/api-access/assistant-page.png)

- Access the Assistant Settings on the bottom left corner of the page:
+ Access the Assistant Settings on the bottom left corner of the page:
![test](../assets/api-access/assistant-settings.png)

- Select *View details* on the Assistant IDs and API details section of the page:
+ Select *View details* on the Assistant IDs and API details section of the page:
![test](../assets/api-access/view-details.png)

- Get the required information from this pop-up window:
+ Get the required information from this pop-up window:
![test](../assets/api-access/details.png)

- Obtain the Session ID from CLI CURL
5. Obtain the Session ID from CLI CURL

```{}
curl -X POST -u "apikey:{apikey}" "{url}/v2/assistants/{environment_id}/sessions?version=2021-11-27"
```
- Get all parameters from CLI CURL
6. Get all parameters from CLI CURL

```{}
curl -X GET -u "apikey:{apikey}" "{url}/v2/assistants/{assistant_id}/skills/{skill_id}?version=2021-11-27"
```

- Run Query from CLI CURL as API call to watsonx Agent
7. Run Query from CLI CURL as API call to watsonx Agent

```{}
curl -X POST -u "apikey:{apikey}" --header "Content-Type:application/json" --data "{\"input\": {\"text\":
Expand Down

0 comments on commit 6ca1e05

Please sign in to comment.