Создать шаблон
curl --request POST \
--url https://api.qudata.ai/v0/templates/create \
--header 'Content-Type: application/json' \
--header 'X-Api-Key: <api-key>' \
--data '
{
"name": "<string>",
"description": "<string>",
"image": "<string>",
"image_tag": "<string>",
"docker_username": "<string>",
"docker_password": "<string>",
"docker_registry": "<string>",
"env": "<string>",
"use_ssh": true,
"use_jupyter": true,
"direct_ssh": true,
"jupyter_directory": "<string>",
"use_jupyter_lab": true,
"on_start_command": "<string>",
"recommended_disk_space": 123,
"is_private": false,
"ssh_username": "root"
}
'import requests
url = "https://api.qudata.ai/v0/templates/create"
payload = {
"name": "<string>",
"description": "<string>",
"image": "<string>",
"image_tag": "<string>",
"docker_username": "<string>",
"docker_password": "<string>",
"docker_registry": "<string>",
"env": "<string>",
"use_ssh": True,
"use_jupyter": True,
"direct_ssh": True,
"jupyter_directory": "<string>",
"use_jupyter_lab": True,
"on_start_command": "<string>",
"recommended_disk_space": 123,
"is_private": False,
"ssh_username": "root"
}
headers = {
"X-Api-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-Api-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
description: '<string>',
image: '<string>',
image_tag: '<string>',
docker_username: '<string>',
docker_password: '<string>',
docker_registry: '<string>',
env: '<string>',
use_ssh: true,
use_jupyter: true,
direct_ssh: true,
jupyter_directory: '<string>',
use_jupyter_lab: true,
on_start_command: '<string>',
recommended_disk_space: 123,
is_private: false,
ssh_username: 'root'
})
};
fetch('https://api.qudata.ai/v0/templates/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.qudata.ai/v0/templates/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([
'name' => '<string>',
'description' => '<string>',
'image' => '<string>',
'image_tag' => '<string>',
'docker_username' => '<string>',
'docker_password' => '<string>',
'docker_registry' => '<string>',
'env' => '<string>',
'use_ssh' => true,
'use_jupyter' => true,
'direct_ssh' => true,
'jupyter_directory' => '<string>',
'use_jupyter_lab' => true,
'on_start_command' => '<string>',
'recommended_disk_space' => 123,
'is_private' => false,
'ssh_username' => 'root'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-Api-Key: <api-key>"
],
]);
$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.qudata.ai/v0/templates/create"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"image\": \"<string>\",\n \"image_tag\": \"<string>\",\n \"docker_username\": \"<string>\",\n \"docker_password\": \"<string>\",\n \"docker_registry\": \"<string>\",\n \"env\": \"<string>\",\n \"use_ssh\": true,\n \"use_jupyter\": true,\n \"direct_ssh\": true,\n \"jupyter_directory\": \"<string>\",\n \"use_jupyter_lab\": true,\n \"on_start_command\": \"<string>\",\n \"recommended_disk_space\": 123,\n \"is_private\": false,\n \"ssh_username\": \"root\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-Api-Key", "<api-key>")
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.qudata.ai/v0/templates/create")
.header("X-Api-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"image\": \"<string>\",\n \"image_tag\": \"<string>\",\n \"docker_username\": \"<string>\",\n \"docker_password\": \"<string>\",\n \"docker_registry\": \"<string>\",\n \"env\": \"<string>\",\n \"use_ssh\": true,\n \"use_jupyter\": true,\n \"direct_ssh\": true,\n \"jupyter_directory\": \"<string>\",\n \"use_jupyter_lab\": true,\n \"on_start_command\": \"<string>\",\n \"recommended_disk_space\": 123,\n \"is_private\": false,\n \"ssh_username\": \"root\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.qudata.ai/v0/templates/create")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-Api-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"image\": \"<string>\",\n \"image_tag\": \"<string>\",\n \"docker_username\": \"<string>\",\n \"docker_password\": \"<string>\",\n \"docker_registry\": \"<string>\",\n \"env\": \"<string>\",\n \"use_ssh\": true,\n \"use_jupyter\": true,\n \"direct_ssh\": true,\n \"jupyter_directory\": \"<string>\",\n \"use_jupyter_lab\": true,\n \"on_start_command\": \"<string>\",\n \"recommended_disk_space\": 123,\n \"is_private\": false,\n \"ssh_username\": \"root\"\n}"
response = http.request(request)
puts response.read_body{
"ok": true,
"data": {
"id": "<string>",
"image": "<string>",
"owner_id": "<string>",
"name": "<string>",
"description": "<string>",
"image_tag": "latest",
"docker_login": "<string>",
"env": "<string>",
"use_ssh": false,
"use_jupyter": false,
"direct_ssh": false,
"jupyter_directory": "<string>",
"use_jupyter_lab": false,
"on_start_command": "<string>",
"search_params": "<string>",
"recommended_disk_space": 123,
"href": "<string>",
"picture": "<string>",
"is_private": false,
"ssh_username": "root"
}
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Шаблоны
Создать шаблон
Создаёт новый шаблон
POST
/
v0
/
templates
/
create
Создать шаблон
curl --request POST \
--url https://api.qudata.ai/v0/templates/create \
--header 'Content-Type: application/json' \
--header 'X-Api-Key: <api-key>' \
--data '
{
"name": "<string>",
"description": "<string>",
"image": "<string>",
"image_tag": "<string>",
"docker_username": "<string>",
"docker_password": "<string>",
"docker_registry": "<string>",
"env": "<string>",
"use_ssh": true,
"use_jupyter": true,
"direct_ssh": true,
"jupyter_directory": "<string>",
"use_jupyter_lab": true,
"on_start_command": "<string>",
"recommended_disk_space": 123,
"is_private": false,
"ssh_username": "root"
}
'import requests
url = "https://api.qudata.ai/v0/templates/create"
payload = {
"name": "<string>",
"description": "<string>",
"image": "<string>",
"image_tag": "<string>",
"docker_username": "<string>",
"docker_password": "<string>",
"docker_registry": "<string>",
"env": "<string>",
"use_ssh": True,
"use_jupyter": True,
"direct_ssh": True,
"jupyter_directory": "<string>",
"use_jupyter_lab": True,
"on_start_command": "<string>",
"recommended_disk_space": 123,
"is_private": False,
"ssh_username": "root"
}
headers = {
"X-Api-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-Api-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
description: '<string>',
image: '<string>',
image_tag: '<string>',
docker_username: '<string>',
docker_password: '<string>',
docker_registry: '<string>',
env: '<string>',
use_ssh: true,
use_jupyter: true,
direct_ssh: true,
jupyter_directory: '<string>',
use_jupyter_lab: true,
on_start_command: '<string>',
recommended_disk_space: 123,
is_private: false,
ssh_username: 'root'
})
};
fetch('https://api.qudata.ai/v0/templates/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.qudata.ai/v0/templates/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([
'name' => '<string>',
'description' => '<string>',
'image' => '<string>',
'image_tag' => '<string>',
'docker_username' => '<string>',
'docker_password' => '<string>',
'docker_registry' => '<string>',
'env' => '<string>',
'use_ssh' => true,
'use_jupyter' => true,
'direct_ssh' => true,
'jupyter_directory' => '<string>',
'use_jupyter_lab' => true,
'on_start_command' => '<string>',
'recommended_disk_space' => 123,
'is_private' => false,
'ssh_username' => 'root'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-Api-Key: <api-key>"
],
]);
$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.qudata.ai/v0/templates/create"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"image\": \"<string>\",\n \"image_tag\": \"<string>\",\n \"docker_username\": \"<string>\",\n \"docker_password\": \"<string>\",\n \"docker_registry\": \"<string>\",\n \"env\": \"<string>\",\n \"use_ssh\": true,\n \"use_jupyter\": true,\n \"direct_ssh\": true,\n \"jupyter_directory\": \"<string>\",\n \"use_jupyter_lab\": true,\n \"on_start_command\": \"<string>\",\n \"recommended_disk_space\": 123,\n \"is_private\": false,\n \"ssh_username\": \"root\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-Api-Key", "<api-key>")
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.qudata.ai/v0/templates/create")
.header("X-Api-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"image\": \"<string>\",\n \"image_tag\": \"<string>\",\n \"docker_username\": \"<string>\",\n \"docker_password\": \"<string>\",\n \"docker_registry\": \"<string>\",\n \"env\": \"<string>\",\n \"use_ssh\": true,\n \"use_jupyter\": true,\n \"direct_ssh\": true,\n \"jupyter_directory\": \"<string>\",\n \"use_jupyter_lab\": true,\n \"on_start_command\": \"<string>\",\n \"recommended_disk_space\": 123,\n \"is_private\": false,\n \"ssh_username\": \"root\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.qudata.ai/v0/templates/create")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-Api-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"image\": \"<string>\",\n \"image_tag\": \"<string>\",\n \"docker_username\": \"<string>\",\n \"docker_password\": \"<string>\",\n \"docker_registry\": \"<string>\",\n \"env\": \"<string>\",\n \"use_ssh\": true,\n \"use_jupyter\": true,\n \"direct_ssh\": true,\n \"jupyter_directory\": \"<string>\",\n \"use_jupyter_lab\": true,\n \"on_start_command\": \"<string>\",\n \"recommended_disk_space\": 123,\n \"is_private\": false,\n \"ssh_username\": \"root\"\n}"
response = http.request(request)
puts response.read_body{
"ok": true,
"data": {
"id": "<string>",
"image": "<string>",
"owner_id": "<string>",
"name": "<string>",
"description": "<string>",
"image_tag": "latest",
"docker_login": "<string>",
"env": "<string>",
"use_ssh": false,
"use_jupyter": false,
"direct_ssh": false,
"jupyter_directory": "<string>",
"use_jupyter_lab": false,
"on_start_command": "<string>",
"search_params": "<string>",
"recommended_disk_space": 123,
"href": "<string>",
"picture": "<string>",
"is_private": false,
"ssh_username": "root"
}
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Авторизации
Тело
application/json
⌘I