Set Readonly Docset
curl --request POST \
--url https://api.aryn.cloud/v1/storage/docsets/{docset_id}/readonly/{value} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.aryn.cloud/v1/storage/docsets/{docset_id}/readonly/{value}"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.aryn.cloud/v1/storage/docsets/{docset_id}/readonly/{value}', 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}/readonly/{value}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
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.aryn.cloud/v1/storage/docsets/{docset_id}/readonly/{value}"
req, _ := http.NewRequest("POST", 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.post("https://api.aryn.cloud/v1/storage/docsets/{docset_id}/readonly/{value}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.aryn.cloud/v1/storage/docsets/{docset_id}/readonly/{value}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
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
Set Readonly Docset
Sets the read-only status of the DocSet.
POST
/
v1
/
storage
/
docsets
/
{docset_id}
/
readonly
/
{value}
Set Readonly Docset
curl --request POST \
--url https://api.aryn.cloud/v1/storage/docsets/{docset_id}/readonly/{value} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.aryn.cloud/v1/storage/docsets/{docset_id}/readonly/{value}"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.aryn.cloud/v1/storage/docsets/{docset_id}/readonly/{value}', 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}/readonly/{value}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
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.aryn.cloud/v1/storage/docsets/{docset_id}/readonly/{value}"
req, _ := http.NewRequest("POST", 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.post("https://api.aryn.cloud/v1/storage/docsets/{docset_id}/readonly/{value}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.aryn.cloud/v1/storage/docsets/{docset_id}/readonly/{value}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
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.
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?
