Get datasets
curl --request GET \
--url https://api.gbase.ai/v1/datasets \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.gbase.ai/v1/datasets"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.gbase.ai/v1/datasets', 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://api.gbase.ai/v1/datasets",
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://api.gbase.ai/v1/datasets"
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://api.gbase.ai/v1/datasets")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.gbase.ai/v1/datasets")
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{
"items": [
{
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"name": "<string>",
"robots": [
{
"created_at": "2023-11-07T05:31:56Z",
"name": "<string>",
"apis": [
{
"created_at": "2023-11-07T05:31:56Z",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"function_call_name": "<string>",
"openapi_url": "<string>",
"server_url": "<string>",
"path": "<string>",
"method": "<string>",
"header_authorization": "<unknown>",
"function_type": "<string>",
"function_status": "<string>",
"share_status": "<string>",
"user_id": "<string>",
"function_call_description": "<string>",
"matching_keywords": "<unknown>",
"llm_sta": true,
"body": "<unknown>",
"auth_token_curl": "<unknown>",
"body_required": "<unknown>",
"request_explanation": "<string>"
}
],
"user_id": "<string>",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"discrible": "<string>",
"subject_name": "<string>",
"prompt": "<string>",
"robot_type": "rag",
"ai_type": "private",
"ai_model": "file",
"ai_status": "ready",
"organization_id": "<string>"
}
],
"user_id": "<string>",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"data_status": "init",
"description": "<string>",
"metadata": "<unknown>",
"url_rules": "<unknown>",
"company_id": "<string>",
"clone_progress": {
"total": 123,
"done": 123,
"remaining": 123
}
}
],
"total": 1,
"page": 2,
"size": 2,
"pages": 1
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Datasets
Get datasets
You can obtain all datasets you create through this interface.
GET
/
v1
/
datasets
Get datasets
curl --request GET \
--url https://api.gbase.ai/v1/datasets \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.gbase.ai/v1/datasets"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.gbase.ai/v1/datasets', 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://api.gbase.ai/v1/datasets",
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://api.gbase.ai/v1/datasets"
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://api.gbase.ai/v1/datasets")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.gbase.ai/v1/datasets")
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{
"items": [
{
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"name": "<string>",
"robots": [
{
"created_at": "2023-11-07T05:31:56Z",
"name": "<string>",
"apis": [
{
"created_at": "2023-11-07T05:31:56Z",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"function_call_name": "<string>",
"openapi_url": "<string>",
"server_url": "<string>",
"path": "<string>",
"method": "<string>",
"header_authorization": "<unknown>",
"function_type": "<string>",
"function_status": "<string>",
"share_status": "<string>",
"user_id": "<string>",
"function_call_description": "<string>",
"matching_keywords": "<unknown>",
"llm_sta": true,
"body": "<unknown>",
"auth_token_curl": "<unknown>",
"body_required": "<unknown>",
"request_explanation": "<string>"
}
],
"user_id": "<string>",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"discrible": "<string>",
"subject_name": "<string>",
"prompt": "<string>",
"robot_type": "rag",
"ai_type": "private",
"ai_model": "file",
"ai_status": "ready",
"organization_id": "<string>"
}
],
"user_id": "<string>",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"data_status": "init",
"description": "<string>",
"metadata": "<unknown>",
"url_rules": "<unknown>",
"company_id": "<string>",
"clone_progress": {
"total": 123,
"done": 123,
"remaining": 123
}
}
],
"total": 1,
"page": 2,
"size": 2,
"pages": 1
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Query Parameters
Company ID. If provided, returns company datasets; if not, returns personal datasets
Search by dataset name or description
Required range:
x >= 1Required range:
1 <= x <= 1000⌘I