Create Stack
curl --request POST \
--url https://api.stax.ai/stack/create \
--header 'Content-Type: application/json' \
--cookie authToken= \
--data '
{
"stackPath": "<string>",
"baseStack": "<string>",
"inheritSharingFrom": "<string>"
}
'import requests
url = "https://api.stax.ai/stack/create"
payload = {
"stackPath": "<string>",
"baseStack": "<string>",
"inheritSharingFrom": "<string>"
}
headers = {
"cookie": "authToken=",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {cookie: 'authToken=', 'Content-Type': 'application/json'},
body: JSON.stringify({stackPath: '<string>', baseStack: '<string>', inheritSharingFrom: '<string>'})
};
fetch('https://api.stax.ai/stack/create', 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.stax.ai/stack/create",
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([
'stackPath' => '<string>',
'baseStack' => '<string>',
'inheritSharingFrom' => '<string>'
]),
CURLOPT_COOKIE => "authToken=",
CURLOPT_HTTPHEADER => [
"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.stax.ai/stack/create"
payload := strings.NewReader("{\n \"stackPath\": \"<string>\",\n \"baseStack\": \"<string>\",\n \"inheritSharingFrom\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("cookie", "authToken=")
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.stax.ai/stack/create")
.header("cookie", "authToken=")
.header("Content-Type", "application/json")
.body("{\n \"stackPath\": \"<string>\",\n \"baseStack\": \"<string>\",\n \"inheritSharingFrom\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.stax.ai/stack/create")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["cookie"] = 'authToken='
request["Content-Type"] = 'application/json'
request.body = "{\n \"stackPath\": \"<string>\",\n \"baseStack\": \"<string>\",\n \"inheritSharingFrom\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"stack": {
"_id": "<string>",
"path": "<string>",
"template": "<string>",
"team": "<string>",
"baseName": "<string>",
"base": "<string>",
"restrict": true,
"access": [
"<string>"
],
"pinned": true,
"hideHint": true,
"enabled": true,
"lastModified": "2023-11-07T05:31:56Z",
"numDocuments": 123,
"numUnread": 123,
"keys": [
"<string>"
],
"dataTypes": [
{
"key": "<string>"
}
],
"rules": {
"enabled": true,
"match": {
"source": [
"<string>"
],
"name": [
"<string>"
],
"phrases": [
"<string>"
]
}
},
"trainer": {
"manualTrigger": true,
"isTraining": true,
"lastTrained": "2023-11-07T05:31:56Z"
},
"numMovedFiles": 123,
"pipeline": [
{
"module": "<string>",
"config": [
{
"label": "<string>",
"value": {}
}
],
"locked": true,
"trainer": {
"usage": 123,
"lastTrained": "2023-11-07T05:31:56Z",
"training": true,
"config": [
{
"label": "<string>",
"value": {}
}
],
"data": {}
},
"usage": 123,
"limit": 123,
"history": [
{
"timestamp": "2023-11-07T05:31:56Z",
"modifiedBy": "<string>",
"labels": [
"<string>"
]
}
]
}
],
"locked": true,
"forms": [
"<string>"
],
"tags": [
"<string>"
]
}
}{
"success": false,
"error": "<string>",
"authError": true
}Stack
Create Stack
Create a new document stack
POST
/
stack
/
create
Create Stack
curl --request POST \
--url https://api.stax.ai/stack/create \
--header 'Content-Type: application/json' \
--cookie authToken= \
--data '
{
"stackPath": "<string>",
"baseStack": "<string>",
"inheritSharingFrom": "<string>"
}
'import requests
url = "https://api.stax.ai/stack/create"
payload = {
"stackPath": "<string>",
"baseStack": "<string>",
"inheritSharingFrom": "<string>"
}
headers = {
"cookie": "authToken=",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {cookie: 'authToken=', 'Content-Type': 'application/json'},
body: JSON.stringify({stackPath: '<string>', baseStack: '<string>', inheritSharingFrom: '<string>'})
};
fetch('https://api.stax.ai/stack/create', 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.stax.ai/stack/create",
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([
'stackPath' => '<string>',
'baseStack' => '<string>',
'inheritSharingFrom' => '<string>'
]),
CURLOPT_COOKIE => "authToken=",
CURLOPT_HTTPHEADER => [
"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.stax.ai/stack/create"
payload := strings.NewReader("{\n \"stackPath\": \"<string>\",\n \"baseStack\": \"<string>\",\n \"inheritSharingFrom\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("cookie", "authToken=")
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.stax.ai/stack/create")
.header("cookie", "authToken=")
.header("Content-Type", "application/json")
.body("{\n \"stackPath\": \"<string>\",\n \"baseStack\": \"<string>\",\n \"inheritSharingFrom\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.stax.ai/stack/create")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["cookie"] = 'authToken='
request["Content-Type"] = 'application/json'
request.body = "{\n \"stackPath\": \"<string>\",\n \"baseStack\": \"<string>\",\n \"inheritSharingFrom\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"stack": {
"_id": "<string>",
"path": "<string>",
"template": "<string>",
"team": "<string>",
"baseName": "<string>",
"base": "<string>",
"restrict": true,
"access": [
"<string>"
],
"pinned": true,
"hideHint": true,
"enabled": true,
"lastModified": "2023-11-07T05:31:56Z",
"numDocuments": 123,
"numUnread": 123,
"keys": [
"<string>"
],
"dataTypes": [
{
"key": "<string>"
}
],
"rules": {
"enabled": true,
"match": {
"source": [
"<string>"
],
"name": [
"<string>"
],
"phrases": [
"<string>"
]
}
},
"trainer": {
"manualTrigger": true,
"isTraining": true,
"lastTrained": "2023-11-07T05:31:56Z"
},
"numMovedFiles": 123,
"pipeline": [
{
"module": "<string>",
"config": [
{
"label": "<string>",
"value": {}
}
],
"locked": true,
"trainer": {
"usage": 123,
"lastTrained": "2023-11-07T05:31:56Z",
"training": true,
"config": [
{
"label": "<string>",
"value": {}
}
],
"data": {}
},
"usage": 123,
"limit": 123,
"history": [
{
"timestamp": "2023-11-07T05:31:56Z",
"modifiedBy": "<string>",
"labels": [
"<string>"
]
}
]
}
],
"locked": true,
"forms": [
"<string>"
],
"tags": [
"<string>"
]
}
}{
"success": false,
"error": "<string>",
"authError": true
}Authorizations
cookieAuthbearerAuth
Cookie-based authentication using userId and authToken cookies
Body
application/json
⌘I