curl --request GET \
--url https://app.agentcloud.dev/{resourceSlug}/datasource/{datasourceId}.json \
--header 'Authorization: Bearer <token>'import requests
url = "https://app.agentcloud.dev/{resourceSlug}/datasource/{datasourceId}.json"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://app.agentcloud.dev/{resourceSlug}/datasource/{datasourceId}.json', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://app.agentcloud.dev/{resourceSlug}/datasource/{datasourceId}.json",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://app.agentcloud.dev/{resourceSlug}/datasource/{datasourceId}.json"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://app.agentcloud.dev/{resourceSlug}/datasource/{datasourceId}.json")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.agentcloud.dev/{resourceSlug}/datasource/{datasourceId}.json")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"datasource": {
"name": "<string>",
"originalName": "<string>",
"sourceType": "<string>",
"sourceId": "<string>",
"destinationId": "<string>",
"workspaceId": "<string>",
"connectionId": "<string>",
"createdDate": "2023-11-07T05:31:56Z",
"_id": "<string>",
"orgId": "<string>",
"teamId": "<string>",
"description": "<string>",
"filename": "<string>",
"recordCount": {
"total": 123,
"success": 123,
"failure": 123
},
"connectionSettings": {
"prefix": "<string>",
"name": "<string>",
"sourceId": "<string>",
"destinationId": "<string>",
"status": "<string>",
"configurations": {},
"nonBreakingSchemaUpdatesBehavior": "<string>",
"schedule": {
"cronExpression": "<string>"
},
"dataResidency": "<string>",
"namespaceDefinition": "<string>",
"namespaceFormat": "<string>"
},
"lastSyncedDate": "2023-11-07T05:31:56Z",
"discoveredSchema": {},
"chunkingConfig": {
"max_characters": 123,
"new_after_n_chars": 123,
"overlap": 123,
"similarity_threshold": 0.5,
"overlap_all": true
},
"embeddingField": "<string>",
"timeWeightField": "<string>",
"modelId": "<string>",
"hidden": true,
"streamConfig": {},
"timeUnit": "<string>"
},
"models": [
{
"_id": "<string>",
"orgId": "<string>",
"teamId": "<string>",
"name": "<string>",
"model": "<string>",
"embeddingLength": 123,
"modelType": "<string>",
"type": "<string>",
"config": {
"model": "<string>",
"api_key": "<string>",
"base_url": "<string>",
"cohere_api_key": "<string>",
"groq_api_key": "<string>"
}
}
]
}{
"message": "<string>",
"code": 123
}{
"message": "<string>",
"code": 123
}Retrieve A Datasource
Retrieve a JSON object of a single model within the specified team by modelId.
curl --request GET \
--url https://app.agentcloud.dev/{resourceSlug}/datasource/{datasourceId}.json \
--header 'Authorization: Bearer <token>'import requests
url = "https://app.agentcloud.dev/{resourceSlug}/datasource/{datasourceId}.json"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://app.agentcloud.dev/{resourceSlug}/datasource/{datasourceId}.json', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://app.agentcloud.dev/{resourceSlug}/datasource/{datasourceId}.json",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://app.agentcloud.dev/{resourceSlug}/datasource/{datasourceId}.json"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://app.agentcloud.dev/{resourceSlug}/datasource/{datasourceId}.json")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.agentcloud.dev/{resourceSlug}/datasource/{datasourceId}.json")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"datasource": {
"name": "<string>",
"originalName": "<string>",
"sourceType": "<string>",
"sourceId": "<string>",
"destinationId": "<string>",
"workspaceId": "<string>",
"connectionId": "<string>",
"createdDate": "2023-11-07T05:31:56Z",
"_id": "<string>",
"orgId": "<string>",
"teamId": "<string>",
"description": "<string>",
"filename": "<string>",
"recordCount": {
"total": 123,
"success": 123,
"failure": 123
},
"connectionSettings": {
"prefix": "<string>",
"name": "<string>",
"sourceId": "<string>",
"destinationId": "<string>",
"status": "<string>",
"configurations": {},
"nonBreakingSchemaUpdatesBehavior": "<string>",
"schedule": {
"cronExpression": "<string>"
},
"dataResidency": "<string>",
"namespaceDefinition": "<string>",
"namespaceFormat": "<string>"
},
"lastSyncedDate": "2023-11-07T05:31:56Z",
"discoveredSchema": {},
"chunkingConfig": {
"max_characters": 123,
"new_after_n_chars": 123,
"overlap": 123,
"similarity_threshold": 0.5,
"overlap_all": true
},
"embeddingField": "<string>",
"timeWeightField": "<string>",
"modelId": "<string>",
"hidden": true,
"streamConfig": {},
"timeUnit": "<string>"
},
"models": [
{
"_id": "<string>",
"orgId": "<string>",
"teamId": "<string>",
"name": "<string>",
"model": "<string>",
"embeddingLength": 123,
"modelType": "<string>",
"type": "<string>",
"config": {
"model": "<string>",
"api_key": "<string>",
"base_url": "<string>",
"cohere_api_key": "<string>",
"groq_api_key": "<string>"
}
}
]
}{
"message": "<string>",
"code": 123
}{
"message": "<string>",
"code": 123
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
The resourceSlug is a URL parameter of the teamId associated with the user. Mongodb Object id, unique identifier, length of 24 characters fitting the following regex; [a-f0-9]{24}
The ID of the datasource to retrieve.
Response
JSON object containing the retrieved datasource and all models associated with the resourceSlug teamId.
JSON object of the datasource retrieved by the operation
Show child attributes
Show child attributes
An array object of all models the user has access to, this is used to identify the embedding model of the datasource and to have a list of all available embedding models to allow for easy modification of the selected embedding model.
Show child attributes
Show child attributes