curl --request PATCH \
--url https://api.aryn.cloud/v1/storage/docsets/{docset_id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"properties": {},
"query_schema": {
"properties": [
{
"name": "<string>",
"field_type": "<string>",
"default": "<unknown>",
"description": "<string>",
"examples": [
"<unknown>"
]
}
]
},
"prompts": {}
}
'import requests
url = "https://api.aryn.cloud/v1/storage/docsets/{docset_id}"
payload = {
"name": "<string>",
"properties": {},
"query_schema": { "properties": [
{
"name": "<string>",
"field_type": "<string>",
"default": "<unknown>",
"description": "<string>",
"examples": ["<unknown>"]
}
] },
"prompts": {}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
properties: {},
query_schema: {
properties: [
{
name: '<string>',
field_type: '<string>',
default: '<unknown>',
description: '<string>',
examples: ['<unknown>']
}
]
},
prompts: {}
})
};
fetch('https://api.aryn.cloud/v1/storage/docsets/{docset_id}', 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/{docset_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'name' => '<string>',
'properties' => [
],
'query_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/{docset_id}"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"properties\": {},\n \"query_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("PATCH", 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.patch("https://api.aryn.cloud/v1/storage/docsets/{docset_id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"properties\": {},\n \"query_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/{docset_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"properties\": {},\n \"query_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>"
}
]
}Update Docset
Updates the metadata associated with a docset.
Currently, this will replace any field that is set (non-None) in the update. In v2 we will add support for proper update masks a la AIP-134.
At present, the prompts and query_schema fields will be completely replaced — there is not currently a mechanism to update a subfield.
curl --request PATCH \
--url https://api.aryn.cloud/v1/storage/docsets/{docset_id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"properties": {},
"query_schema": {
"properties": [
{
"name": "<string>",
"field_type": "<string>",
"default": "<unknown>",
"description": "<string>",
"examples": [
"<unknown>"
]
}
]
},
"prompts": {}
}
'import requests
url = "https://api.aryn.cloud/v1/storage/docsets/{docset_id}"
payload = {
"name": "<string>",
"properties": {},
"query_schema": { "properties": [
{
"name": "<string>",
"field_type": "<string>",
"default": "<unknown>",
"description": "<string>",
"examples": ["<unknown>"]
}
] },
"prompts": {}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
properties: {},
query_schema: {
properties: [
{
name: '<string>',
field_type: '<string>',
default: '<unknown>',
description: '<string>',
examples: ['<unknown>']
}
]
},
prompts: {}
})
};
fetch('https://api.aryn.cloud/v1/storage/docsets/{docset_id}', 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/{docset_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'name' => '<string>',
'properties' => [
],
'query_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/{docset_id}"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"properties\": {},\n \"query_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("PATCH", 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.patch("https://api.aryn.cloud/v1/storage/docsets/{docset_id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"properties\": {},\n \"query_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/{docset_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"properties\": {},\n \"query_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.
Path Parameters
The unique identifier of the DocSet.
Body
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?
