curl --request GET \
--url https://api.inworld.ai/knowledge/v1alpha/{name} \
--header 'Authorization: <api-key>'import requests
url = "https://api.inworld.ai/knowledge/v1alpha/{name}"
headers = {"Authorization": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: '<api-key>'}};
fetch('https://api.inworld.ai/knowledge/v1alpha/{name}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"name": "<string>",
"records": [
{
"text": "<string>"
}
],
"language": "LANGUAGE_CODE_UNSPECIFIED"
}{
"code": 123,
"message": "<string>",
"details": [
{
"@type": "<string>"
}
]
}Get knowledge
Can only be called for the workspace associated with the provided API key.
curl --request GET \
--url https://api.inworld.ai/knowledge/v1alpha/{name} \
--header 'Authorization: <api-key>'import requests
url = "https://api.inworld.ai/knowledge/v1alpha/{name}"
headers = {"Authorization": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: '<api-key>'}};
fetch('https://api.inworld.ai/knowledge/v1alpha/{name}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"name": "<string>",
"records": [
{
"text": "<string>"
}
],
"language": "LANGUAGE_CODE_UNSPECIFIED"
}{
"code": 123,
"message": "<string>",
"details": [
{
"@type": "<string>"
}
]
}Authorizations
Should follow the format Basic {credentials}. The {credentials} consists of the Base64-encoded string of the API key and the secret in the format key:secret. You can create a key in one command with the Inworld CLI: inworld workspace add-key.
Path Parameters
The name of the knowledge collection to retrieve. Format: workspaces/{workspace}/knowledge/{knowledge}.
workspaces/[^/]+/knowledge/[^/]+Response
A successful response.
Represents a knowledge collection, which contains multiple knowledge records.
Resource name that is provided by user and can contain only lowercase letters, digits, underscores, or hyphens and has length up to 61 symbols
List of knowledge records in the collection.
Show child attributes
Show child attributes
Language codes following the format of Language_Locale. Language is defined per ISO 639-1. Locale is defined per ISO 3166-1. Current protobuf value: 3. Please update with each revision.
- LANGUAGE_CODE_UNSPECIFIED: Unspecified.
- EN_US: English - US.
- ZH_CN: Chinese - China.
- KO_KR: Korean - Korea.
- JA_JP: Japanese - Japan.
- RU_RU: Russian - Russia.
- AUTO: Auto-detect language.
LANGUAGE_CODE_UNSPECIFIED, EN_US, ZH_CN, KO_KR, JA_JP, RU_RU, AUTO Was this page helpful?