Apps
Post apps
POST
/
apps
cURL
curl --request POST \
--url https://kennhosting.com/api/v1/apps \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"repo_full_name": "<string>",
"repo_branch": "<string>",
"root_directory": "<string>",
"install_command": "<string>",
"build_command": "<string>",
"start_command": "<string>",
"port": 32768,
"output_directory": "<string>",
"auto_deploy": true,
"env_vars": [
{
"key": "<string>",
"value": "<string>",
"is_secret": true
}
]
}
'import requests
url = "https://kennhosting.com/api/v1/apps"
payload = {
"name": "<string>",
"repo_full_name": "<string>",
"repo_branch": "<string>",
"root_directory": "<string>",
"install_command": "<string>",
"build_command": "<string>",
"start_command": "<string>",
"port": 32768,
"output_directory": "<string>",
"auto_deploy": True,
"env_vars": [
{
"key": "<string>",
"value": "<string>",
"is_secret": True
}
]
}
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({
name: '<string>',
repo_full_name: '<string>',
repo_branch: '<string>',
root_directory: '<string>',
install_command: '<string>',
build_command: '<string>',
start_command: '<string>',
port: 32768,
output_directory: '<string>',
auto_deploy: true,
env_vars: [{key: '<string>', value: '<string>', is_secret: true}]
})
};
fetch('https://kennhosting.com/api/v1/apps', 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://kennhosting.com/api/v1/apps",
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>',
'repo_full_name' => '<string>',
'repo_branch' => '<string>',
'root_directory' => '<string>',
'install_command' => '<string>',
'build_command' => '<string>',
'start_command' => '<string>',
'port' => 32768,
'output_directory' => '<string>',
'auto_deploy' => true,
'env_vars' => [
[
'key' => '<string>',
'value' => '<string>',
'is_secret' => true
]
]
]),
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://kennhosting.com/api/v1/apps"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"repo_full_name\": \"<string>\",\n \"repo_branch\": \"<string>\",\n \"root_directory\": \"<string>\",\n \"install_command\": \"<string>\",\n \"build_command\": \"<string>\",\n \"start_command\": \"<string>\",\n \"port\": 32768,\n \"output_directory\": \"<string>\",\n \"auto_deploy\": true,\n \"env_vars\": [\n {\n \"key\": \"<string>\",\n \"value\": \"<string>\",\n \"is_secret\": true\n }\n ]\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://kennhosting.com/api/v1/apps")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"repo_full_name\": \"<string>\",\n \"repo_branch\": \"<string>\",\n \"root_directory\": \"<string>\",\n \"install_command\": \"<string>\",\n \"build_command\": \"<string>\",\n \"start_command\": \"<string>\",\n \"port\": 32768,\n \"output_directory\": \"<string>\",\n \"auto_deploy\": true,\n \"env_vars\": [\n {\n \"key\": \"<string>\",\n \"value\": \"<string>\",\n \"is_secret\": true\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://kennhosting.com/api/v1/apps")
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 \"name\": \"<string>\",\n \"repo_full_name\": \"<string>\",\n \"repo_branch\": \"<string>\",\n \"root_directory\": \"<string>\",\n \"install_command\": \"<string>\",\n \"build_command\": \"<string>\",\n \"start_command\": \"<string>\",\n \"port\": 32768,\n \"output_directory\": \"<string>\",\n \"auto_deploy\": true,\n \"env_vars\": [\n {\n \"key\": \"<string>\",\n \"value\": \"<string>\",\n \"is_secret\": true\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"data": [
"<unknown>"
],
"meta": {
"state": "deploying",
"deployment_id": "<string>",
"message": "Application créée. Elle se déploiera avec une offre payante : vos applications gratuites incluses sont déjà utilisées."
}
}{
"message": "<string>"
}{
"message": "<string>",
"errors": {}
}{
"message": "<string>"
}Authorizations
Body
application/json
Palette de couleurs unies proposées pour identifier un projet (favicon généré, aperçu). Teintes assez sombres pour porter un texte blanc lisible en thème clair comme en thème sombre. Source unique : le front reçoit color_hex et la liste colors, il n'a pas de palette à lui.
Available options:
blue, cyan, teal, green, amber, orange, red, pink, violet, slate ⌘I
cURL
curl --request POST \
--url https://kennhosting.com/api/v1/apps \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"repo_full_name": "<string>",
"repo_branch": "<string>",
"root_directory": "<string>",
"install_command": "<string>",
"build_command": "<string>",
"start_command": "<string>",
"port": 32768,
"output_directory": "<string>",
"auto_deploy": true,
"env_vars": [
{
"key": "<string>",
"value": "<string>",
"is_secret": true
}
]
}
'import requests
url = "https://kennhosting.com/api/v1/apps"
payload = {
"name": "<string>",
"repo_full_name": "<string>",
"repo_branch": "<string>",
"root_directory": "<string>",
"install_command": "<string>",
"build_command": "<string>",
"start_command": "<string>",
"port": 32768,
"output_directory": "<string>",
"auto_deploy": True,
"env_vars": [
{
"key": "<string>",
"value": "<string>",
"is_secret": True
}
]
}
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({
name: '<string>',
repo_full_name: '<string>',
repo_branch: '<string>',
root_directory: '<string>',
install_command: '<string>',
build_command: '<string>',
start_command: '<string>',
port: 32768,
output_directory: '<string>',
auto_deploy: true,
env_vars: [{key: '<string>', value: '<string>', is_secret: true}]
})
};
fetch('https://kennhosting.com/api/v1/apps', 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://kennhosting.com/api/v1/apps",
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>',
'repo_full_name' => '<string>',
'repo_branch' => '<string>',
'root_directory' => '<string>',
'install_command' => '<string>',
'build_command' => '<string>',
'start_command' => '<string>',
'port' => 32768,
'output_directory' => '<string>',
'auto_deploy' => true,
'env_vars' => [
[
'key' => '<string>',
'value' => '<string>',
'is_secret' => true
]
]
]),
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://kennhosting.com/api/v1/apps"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"repo_full_name\": \"<string>\",\n \"repo_branch\": \"<string>\",\n \"root_directory\": \"<string>\",\n \"install_command\": \"<string>\",\n \"build_command\": \"<string>\",\n \"start_command\": \"<string>\",\n \"port\": 32768,\n \"output_directory\": \"<string>\",\n \"auto_deploy\": true,\n \"env_vars\": [\n {\n \"key\": \"<string>\",\n \"value\": \"<string>\",\n \"is_secret\": true\n }\n ]\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://kennhosting.com/api/v1/apps")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"repo_full_name\": \"<string>\",\n \"repo_branch\": \"<string>\",\n \"root_directory\": \"<string>\",\n \"install_command\": \"<string>\",\n \"build_command\": \"<string>\",\n \"start_command\": \"<string>\",\n \"port\": 32768,\n \"output_directory\": \"<string>\",\n \"auto_deploy\": true,\n \"env_vars\": [\n {\n \"key\": \"<string>\",\n \"value\": \"<string>\",\n \"is_secret\": true\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://kennhosting.com/api/v1/apps")
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 \"name\": \"<string>\",\n \"repo_full_name\": \"<string>\",\n \"repo_branch\": \"<string>\",\n \"root_directory\": \"<string>\",\n \"install_command\": \"<string>\",\n \"build_command\": \"<string>\",\n \"start_command\": \"<string>\",\n \"port\": 32768,\n \"output_directory\": \"<string>\",\n \"auto_deploy\": true,\n \"env_vars\": [\n {\n \"key\": \"<string>\",\n \"value\": \"<string>\",\n \"is_secret\": true\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"data": [
"<unknown>"
],
"meta": {
"state": "deploying",
"deployment_id": "<string>",
"message": "Application créée. Elle se déploiera avec une offre payante : vos applications gratuites incluses sont déjà utilisées."
}
}{
"message": "<string>"
}{
"message": "<string>",
"errors": {}
}{
"message": "<string>"
}