Create knowledge from connection
import requests
url = "https://api.datagrid.com/v1/knowledge/connect"
payload = { "connection_id": "<string>" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({connection_id: '<string>'})
};
fetch('https://api.datagrid.com/v1/knowledge/connect', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request POST \
--url https://api.datagrid.com/v1/knowledge/connect \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"connection_id": "<string>"
}
'{
"object": "redirect_url",
"redirect_url": "<string>"
}{
"status_code": 123,
"error": "rate_limit_exceeded",
"message": "<string>",
"retryable": true,
"statusCode": 123,
"mitigation": "<string>",
"details": {
"reason": "<string>"
}
}Knowledge
Create knowledge from connection
Initiates knowledge creation from a connection by returning a redirect URL. The organization must have enough credits to start this flow. The downstream ingestion and indexing that follow still run asynchronously, and the actual credit consumption remains variable based on the volume of data processed.
POST
/
knowledge
/
connect
Create knowledge from connection
import requests
url = "https://api.datagrid.com/v1/knowledge/connect"
payload = { "connection_id": "<string>" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({connection_id: '<string>'})
};
fetch('https://api.datagrid.com/v1/knowledge/connect', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request POST \
--url https://api.datagrid.com/v1/knowledge/connect \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"connection_id": "<string>"
}
'{
"object": "redirect_url",
"redirect_url": "<string>"
}{
"status_code": 123,
"error": "rate_limit_exceeded",
"message": "<string>",
"retryable": true,
"statusCode": 123,
"mitigation": "<string>",
"details": {
"reason": "<string>"
}
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
application/json
The id of the connection to be used to create the knowledge.