Create Docset
curl --request POST \
--url https://api.aryn.cloud/v1/storage/docsets \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"properties": {},
"schema": {
"properties": [
{
"name": "<string>",
"field_type": "<string>",
"default": "<unknown>",
"description": "<string>",
"examples": [
"<unknown>"
]
}
]
},
"prompts": {}
}
'import requests
url = "https://api.aryn.cloud/v1/storage/docsets"
payload = {
"name": "<string>",
"properties": {},
"schema": { "properties": [
{
"name": "<string>",
"field_type": "<string>",
"default": "<unknown>",
"description": "<string>",
"examples": ["<unknown>"]
}
] },
"prompts": {}
}
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({
name: '<string>',
properties: {},
schema: {
properties: [
{
name: '<string>',
field_type: '<string>',
default: '<unknown>',
description: '<string>',
examples: ['<unknown>']
}
]
},
prompts: {}
})
};
fetch('https://api.aryn.cloud/v1/storage/docsets', 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.aryn.cloud/v1/storage/docsets",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'name' => '<string>',
'properties' => [
],
'schema' => [
'properties' => [
[
'name' => '<string>',
'field_type' => '<string>',
'default' => '<unknown>',
'description' => '<string>',
'examples' => [
'<unknown>'
]
]
]
],
'prompts' => [
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.aryn.cloud/v1/storage/docsets"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"properties\": {},\n \"schema\": {\n \"properties\": [\n {\n \"name\": \"<string>\",\n \"field_type\": \"<string>\",\n \"default\": \"<unknown>\",\n \"description\": \"<string>\",\n \"examples\": [\n \"<unknown>\"\n ]\n }\n ]\n },\n \"prompts\": {}\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.aryn.cloud/v1/storage/docsets")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"properties\": {},\n \"schema\": {\n \"properties\": [\n {\n \"name\": \"<string>\",\n \"field_type\": \"<string>\",\n \"default\": \"<unknown>\",\n \"description\": \"<string>\",\n \"examples\": [\n \"<unknown>\"\n ]\n }\n ]\n },\n \"prompts\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.aryn.cloud/v1/storage/docsets")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"properties\": {},\n \"schema\": {\n \"properties\": [\n {\n \"name\": \"<string>\",\n \"field_type\": \"<string>\",\n \"default\": \"<unknown>\",\n \"description\": \"<string>\",\n \"examples\": [\n \"<unknown>\"\n ]\n }\n ]\n },\n \"prompts\": {}\n}"
response = http.request(request)
puts response.read_body{
"account_id": "<string>",
"docset_id": "<string>",
"name": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"readonly": true,
"properties": {},
"size": 123,
"schema": {
"properties": [
{
"name": "<string>",
"property_type": "<string>",
"default": "<unknown>",
"description": "<string>",
"examples": [
"<unknown>"
]
}
]
},
"prompts": {}
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}DocSet
Create Docset
Create a new DocSet.
Args: name (str): The name for the new DocSet
Returns: DocSetMetadata: Metadata of the newly created DocSet
POST
/
v1
/
storage
/
docsets
Create Docset
curl --request POST \
--url https://api.aryn.cloud/v1/storage/docsets \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"properties": {},
"schema": {
"properties": [
{
"name": "<string>",
"field_type": "<string>",
"default": "<unknown>",
"description": "<string>",
"examples": [
"<unknown>"
]
}
]
},
"prompts": {}
}
'import requests
url = "https://api.aryn.cloud/v1/storage/docsets"
payload = {
"name": "<string>",
"properties": {},
"schema": { "properties": [
{
"name": "<string>",
"field_type": "<string>",
"default": "<unknown>",
"description": "<string>",
"examples": ["<unknown>"]
}
] },
"prompts": {}
}
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({
name: '<string>',
properties: {},
schema: {
properties: [
{
name: '<string>',
field_type: '<string>',
default: '<unknown>',
description: '<string>',
examples: ['<unknown>']
}
]
},
prompts: {}
})
};
fetch('https://api.aryn.cloud/v1/storage/docsets', 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.aryn.cloud/v1/storage/docsets",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'name' => '<string>',
'properties' => [
],
'schema' => [
'properties' => [
[
'name' => '<string>',
'field_type' => '<string>',
'default' => '<unknown>',
'description' => '<string>',
'examples' => [
'<unknown>'
]
]
]
],
'prompts' => [
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.aryn.cloud/v1/storage/docsets"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"properties\": {},\n \"schema\": {\n \"properties\": [\n {\n \"name\": \"<string>\",\n \"field_type\": \"<string>\",\n \"default\": \"<unknown>\",\n \"description\": \"<string>\",\n \"examples\": [\n \"<unknown>\"\n ]\n }\n ]\n },\n \"prompts\": {}\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.aryn.cloud/v1/storage/docsets")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"properties\": {},\n \"schema\": {\n \"properties\": [\n {\n \"name\": \"<string>\",\n \"field_type\": \"<string>\",\n \"default\": \"<unknown>\",\n \"description\": \"<string>\",\n \"examples\": [\n \"<unknown>\"\n ]\n }\n ]\n },\n \"prompts\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.aryn.cloud/v1/storage/docsets")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"properties\": {},\n \"schema\": {\n \"properties\": [\n {\n \"name\": \"<string>\",\n \"field_type\": \"<string>\",\n \"default\": \"<unknown>\",\n \"description\": \"<string>\",\n \"examples\": [\n \"<unknown>\"\n ]\n }\n ]\n },\n \"prompts\": {}\n}"
response = http.request(request)
puts response.read_body{
"account_id": "<string>",
"docset_id": "<string>",
"name": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"readonly": true,
"properties": {},
"size": 123,
"schema": {
"properties": [
{
"name": "<string>",
"property_type": "<string>",
"default": "<unknown>",
"description": "<string>",
"examples": [
"<unknown>"
]
}
]
},
"prompts": {}
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
application/json
Response
Successful Response
The account id containing the DocSet.
The unique id for the DocSet.
The name of the DocSet.
The creation time of this DocSet.
Whether the DocSet is read-only.
Additional properties for the DocSet.
Show child attributes
Show child attributes
The number of documents in the DocSet.
Represents the schema of a DocSet.
Show child attributes
Show child attributes
The prompts associated with this DocSet.
Show child attributes
Show child attributes
Was this page helpful?
⌘I
