Notebook Endpoints
Compile Notebook
Compile a notebook
POST
/
workspaces
/
{workspace_id}
/
notebooks
/
{notebook_id}
/
compile
Compile notebook
curl --request POST \
--url https://s-server-demo.siftd.ai/api/workspaces/{workspace_id}/notebooks/{notebook_id}/compile \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"content": {
"metadata": {},
"spin_cells": [
{
"cell_id": "<string>",
"cxn_name": "<string>",
"desc": "<string>",
"loop_id": "<string>",
"metadata": {
"collapsed": true,
"display_settings": {},
"output_variable_name": "<string>",
"scrolled": "<unknown>",
"tags": [
"<string>"
]
},
"param_map": {},
"payload": [
123
],
"tool": "<string>"
}
]
},
"emit_to_stdout": true,
"end_index": 123,
"loop_id": "<string>",
"request_id": "<string>",
"start_index": 123
}
'import requests
url = "https://s-server-demo.siftd.ai/api/workspaces/{workspace_id}/notebooks/{notebook_id}/compile"
payload = {
"content": {
"metadata": {},
"spin_cells": [
{
"cell_id": "<string>",
"cxn_name": "<string>",
"desc": "<string>",
"loop_id": "<string>",
"metadata": {
"collapsed": True,
"display_settings": {},
"output_variable_name": "<string>",
"scrolled": "<unknown>",
"tags": ["<string>"]
},
"param_map": {},
"payload": [123],
"tool": "<string>"
}
]
},
"emit_to_stdout": True,
"end_index": 123,
"loop_id": "<string>",
"request_id": "<string>",
"start_index": 123
}
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({
content: {
metadata: {},
spin_cells: [
{
cell_id: '<string>',
cxn_name: '<string>',
desc: '<string>',
loop_id: '<string>',
metadata: {
collapsed: true,
display_settings: {},
output_variable_name: '<string>',
scrolled: '<unknown>',
tags: ['<string>']
},
param_map: {},
payload: [123],
tool: '<string>'
}
]
},
emit_to_stdout: true,
end_index: 123,
loop_id: '<string>',
request_id: '<string>',
start_index: 123
})
};
fetch('https://s-server-demo.siftd.ai/api/workspaces/{workspace_id}/notebooks/{notebook_id}/compile', 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://s-server-demo.siftd.ai/api/workspaces/{workspace_id}/notebooks/{notebook_id}/compile",
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([
'content' => [
'metadata' => [
],
'spin_cells' => [
[
'cell_id' => '<string>',
'cxn_name' => '<string>',
'desc' => '<string>',
'loop_id' => '<string>',
'metadata' => [
'collapsed' => true,
'display_settings' => [
],
'output_variable_name' => '<string>',
'scrolled' => '<unknown>',
'tags' => [
'<string>'
]
],
'param_map' => [
],
'payload' => [
123
],
'tool' => '<string>'
]
]
],
'emit_to_stdout' => true,
'end_index' => 123,
'loop_id' => '<string>',
'request_id' => '<string>',
'start_index' => 123
]),
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://s-server-demo.siftd.ai/api/workspaces/{workspace_id}/notebooks/{notebook_id}/compile"
payload := strings.NewReader("{\n \"content\": {\n \"metadata\": {},\n \"spin_cells\": [\n {\n \"cell_id\": \"<string>\",\n \"cxn_name\": \"<string>\",\n \"desc\": \"<string>\",\n \"loop_id\": \"<string>\",\n \"metadata\": {\n \"collapsed\": true,\n \"display_settings\": {},\n \"output_variable_name\": \"<string>\",\n \"scrolled\": \"<unknown>\",\n \"tags\": [\n \"<string>\"\n ]\n },\n \"param_map\": {},\n \"payload\": [\n 123\n ],\n \"tool\": \"<string>\"\n }\n ]\n },\n \"emit_to_stdout\": true,\n \"end_index\": 123,\n \"loop_id\": \"<string>\",\n \"request_id\": \"<string>\",\n \"start_index\": 123\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://s-server-demo.siftd.ai/api/workspaces/{workspace_id}/notebooks/{notebook_id}/compile")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"content\": {\n \"metadata\": {},\n \"spin_cells\": [\n {\n \"cell_id\": \"<string>\",\n \"cxn_name\": \"<string>\",\n \"desc\": \"<string>\",\n \"loop_id\": \"<string>\",\n \"metadata\": {\n \"collapsed\": true,\n \"display_settings\": {},\n \"output_variable_name\": \"<string>\",\n \"scrolled\": \"<unknown>\",\n \"tags\": [\n \"<string>\"\n ]\n },\n \"param_map\": {},\n \"payload\": [\n 123\n ],\n \"tool\": \"<string>\"\n }\n ]\n },\n \"emit_to_stdout\": true,\n \"end_index\": 123,\n \"loop_id\": \"<string>\",\n \"request_id\": \"<string>\",\n \"start_index\": 123\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://s-server-demo.siftd.ai/api/workspaces/{workspace_id}/notebooks/{notebook_id}/compile")
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 \"content\": {\n \"metadata\": {},\n \"spin_cells\": [\n {\n \"cell_id\": \"<string>\",\n \"cxn_name\": \"<string>\",\n \"desc\": \"<string>\",\n \"loop_id\": \"<string>\",\n \"metadata\": {\n \"collapsed\": true,\n \"display_settings\": {},\n \"output_variable_name\": \"<string>\",\n \"scrolled\": \"<unknown>\",\n \"tags\": [\n \"<string>\"\n ]\n },\n \"param_map\": {},\n \"payload\": [\n 123\n ],\n \"tool\": \"<string>\"\n }\n ]\n },\n \"emit_to_stdout\": true,\n \"end_index\": 123,\n \"loop_id\": \"<string>\",\n \"request_id\": \"<string>\",\n \"start_index\": 123\n}"
response = http.request(request)
puts response.read_bodyAuthorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Query Parameters
Organization ID
Runtime ID
Mode (edit or run)
Phase (preprocess or compile)
Body
application/json
Compile request
Response
OK
Was this page helpful?
⌘I