Deploy an app
curl --request POST \
--url https://api.ravion.com/apps/{id}/deploys \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"data": {
"archiveSha256": "<string>",
"definition": {
"env": [
{
"name": "<string>",
"value": "<string>"
}
],
"expose": [
{
"healthCheckPath": "<string>",
"name": "<string>",
"port": 32768,
"domains": [
"<string>"
]
}
],
"workdir": "<string>",
"cpu": 2,
"description": "<string>",
"diskGib": 2,
"idleTimeoutSeconds": 1,
"memoryMib": 2
},
"uploadId": "<string>",
"branch": "<string>",
"commit": "<string>",
"dirty": true,
"env": [
{
"name": "<string>",
"value": "<string>"
}
]
}
}
'import requests
url = "https://api.ravion.com/apps/{id}/deploys"
payload = { "data": {
"archiveSha256": "<string>",
"definition": {
"env": [
{
"name": "<string>",
"value": "<string>"
}
],
"expose": [
{
"healthCheckPath": "<string>",
"name": "<string>",
"port": 32768,
"domains": ["<string>"]
}
],
"workdir": "<string>",
"cpu": 2,
"description": "<string>",
"diskGib": 2,
"idleTimeoutSeconds": 1,
"memoryMib": 2
},
"uploadId": "<string>",
"branch": "<string>",
"commit": "<string>",
"dirty": True,
"env": [
{
"name": "<string>",
"value": "<string>"
}
]
} }
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({
data: {
archiveSha256: '<string>',
definition: {
env: [{name: '<string>', value: '<string>'}],
expose: [
{
healthCheckPath: '<string>',
name: '<string>',
port: 32768,
domains: ['<string>']
}
],
workdir: '<string>',
cpu: 2,
description: '<string>',
diskGib: 2,
idleTimeoutSeconds: 1,
memoryMib: 2
},
uploadId: '<string>',
branch: '<string>',
commit: '<string>',
dirty: true,
env: [{name: '<string>', value: '<string>'}]
}
})
};
fetch('https://api.ravion.com/apps/{id}/deploys', 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.ravion.com/apps/{id}/deploys",
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([
'data' => [
'archiveSha256' => '<string>',
'definition' => [
'env' => [
[
'name' => '<string>',
'value' => '<string>'
]
],
'expose' => [
[
'healthCheckPath' => '<string>',
'name' => '<string>',
'port' => 32768,
'domains' => [
'<string>'
]
]
],
'workdir' => '<string>',
'cpu' => 2,
'description' => '<string>',
'diskGib' => 2,
'idleTimeoutSeconds' => 1,
'memoryMib' => 2
],
'uploadId' => '<string>',
'branch' => '<string>',
'commit' => '<string>',
'dirty' => true,
'env' => [
[
'name' => '<string>',
'value' => '<string>'
]
]
]
]),
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://api.ravion.com/apps/{id}/deploys"
payload := strings.NewReader("{\n \"data\": {\n \"archiveSha256\": \"<string>\",\n \"definition\": {\n \"env\": [\n {\n \"name\": \"<string>\",\n \"value\": \"<string>\"\n }\n ],\n \"expose\": [\n {\n \"healthCheckPath\": \"<string>\",\n \"name\": \"<string>\",\n \"port\": 32768,\n \"domains\": [\n \"<string>\"\n ]\n }\n ],\n \"workdir\": \"<string>\",\n \"cpu\": 2,\n \"description\": \"<string>\",\n \"diskGib\": 2,\n \"idleTimeoutSeconds\": 1,\n \"memoryMib\": 2\n },\n \"uploadId\": \"<string>\",\n \"branch\": \"<string>\",\n \"commit\": \"<string>\",\n \"dirty\": true,\n \"env\": [\n {\n \"name\": \"<string>\",\n \"value\": \"<string>\"\n }\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://api.ravion.com/apps/{id}/deploys")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"data\": {\n \"archiveSha256\": \"<string>\",\n \"definition\": {\n \"env\": [\n {\n \"name\": \"<string>\",\n \"value\": \"<string>\"\n }\n ],\n \"expose\": [\n {\n \"healthCheckPath\": \"<string>\",\n \"name\": \"<string>\",\n \"port\": 32768,\n \"domains\": [\n \"<string>\"\n ]\n }\n ],\n \"workdir\": \"<string>\",\n \"cpu\": 2,\n \"description\": \"<string>\",\n \"diskGib\": 2,\n \"idleTimeoutSeconds\": 1,\n \"memoryMib\": 2\n },\n \"uploadId\": \"<string>\",\n \"branch\": \"<string>\",\n \"commit\": \"<string>\",\n \"dirty\": true,\n \"env\": [\n {\n \"name\": \"<string>\",\n \"value\": \"<string>\"\n }\n ]\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.ravion.com/apps/{id}/deploys")
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 \"data\": {\n \"archiveSha256\": \"<string>\",\n \"definition\": {\n \"env\": [\n {\n \"name\": \"<string>\",\n \"value\": \"<string>\"\n }\n ],\n \"expose\": [\n {\n \"healthCheckPath\": \"<string>\",\n \"name\": \"<string>\",\n \"port\": 32768,\n \"domains\": [\n \"<string>\"\n ]\n }\n ],\n \"workdir\": \"<string>\",\n \"cpu\": 2,\n \"description\": \"<string>\",\n \"diskGib\": 2,\n \"idleTimeoutSeconds\": 1,\n \"memoryMib\": 2\n },\n \"uploadId\": \"<string>\",\n \"branch\": \"<string>\",\n \"commit\": \"<string>\",\n \"dirty\": true,\n \"env\": [\n {\n \"name\": \"<string>\",\n \"value\": \"<string>\"\n }\n ]\n }\n}"
response = http.request(request)
puts response.read_body{
"data": {
"pipelineRunId": "<string>"
}
}{
"code": "<string>",
"message": "<string>",
"action": {
"label": "<string>",
"url": "<string>"
},
"description": "<string>",
"details": [
{
"render": "<string>",
"title": "<string>",
"items": [
"<string>"
],
"object": {}
}
],
"isInternal": true,
"metadata": {},
"requestId": "<string>"
}{
"code": "<string>",
"message": "<string>",
"action": {
"label": "<string>",
"url": "<string>"
},
"description": "<string>",
"details": [
{
"render": "<string>",
"title": "<string>",
"items": [
"<string>"
],
"object": {}
}
],
"isInternal": true,
"metadata": {},
"requestId": "<string>"
}{
"code": "<string>",
"message": "<string>",
"action": {
"label": "<string>",
"url": "<string>"
},
"description": "<string>",
"details": [
{
"render": "<string>",
"title": "<string>",
"items": [
"<string>"
],
"object": {}
}
],
"isInternal": true,
"metadata": {},
"requestId": "<string>"
}{
"code": "<string>",
"message": "<string>",
"action": {
"label": "<string>",
"url": "<string>"
},
"description": "<string>",
"details": [
{
"render": "<string>",
"title": "<string>",
"items": [
"<string>"
],
"object": {}
}
],
"isInternal": true,
"metadata": {},
"requestId": "<string>"
}{
"code": "<string>",
"message": "<string>",
"action": {
"label": "<string>",
"url": "<string>"
},
"description": "<string>",
"details": [
{
"render": "<string>",
"title": "<string>",
"items": [
"<string>"
],
"object": {}
}
],
"isInternal": true,
"metadata": {},
"requestId": "<string>"
}{
"code": "<string>",
"message": "<string>",
"action": {
"label": "<string>",
"url": "<string>"
},
"description": "<string>",
"details": [
{
"render": "<string>",
"title": "<string>",
"items": [
"<string>"
],
"object": {}
}
],
"isInternal": true,
"metadata": {},
"requestId": "<string>"
}{
"code": "<string>",
"message": "<string>",
"action": {
"label": "<string>",
"url": "<string>"
},
"description": "<string>",
"details": [
{
"render": "<string>",
"title": "<string>",
"items": [
"<string>"
],
"object": {}
}
],
"isInternal": true,
"metadata": {},
"requestId": "<string>"
}Apps
Deploy an app
Deploy uploaded files as the app. Open an upload and send the files to it first, and deploy once it has SUCCEEDED.
POST
/
apps
/
{id}
/
deploys
Deploy an app
curl --request POST \
--url https://api.ravion.com/apps/{id}/deploys \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"data": {
"archiveSha256": "<string>",
"definition": {
"env": [
{
"name": "<string>",
"value": "<string>"
}
],
"expose": [
{
"healthCheckPath": "<string>",
"name": "<string>",
"port": 32768,
"domains": [
"<string>"
]
}
],
"workdir": "<string>",
"cpu": 2,
"description": "<string>",
"diskGib": 2,
"idleTimeoutSeconds": 1,
"memoryMib": 2
},
"uploadId": "<string>",
"branch": "<string>",
"commit": "<string>",
"dirty": true,
"env": [
{
"name": "<string>",
"value": "<string>"
}
]
}
}
'import requests
url = "https://api.ravion.com/apps/{id}/deploys"
payload = { "data": {
"archiveSha256": "<string>",
"definition": {
"env": [
{
"name": "<string>",
"value": "<string>"
}
],
"expose": [
{
"healthCheckPath": "<string>",
"name": "<string>",
"port": 32768,
"domains": ["<string>"]
}
],
"workdir": "<string>",
"cpu": 2,
"description": "<string>",
"diskGib": 2,
"idleTimeoutSeconds": 1,
"memoryMib": 2
},
"uploadId": "<string>",
"branch": "<string>",
"commit": "<string>",
"dirty": True,
"env": [
{
"name": "<string>",
"value": "<string>"
}
]
} }
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({
data: {
archiveSha256: '<string>',
definition: {
env: [{name: '<string>', value: '<string>'}],
expose: [
{
healthCheckPath: '<string>',
name: '<string>',
port: 32768,
domains: ['<string>']
}
],
workdir: '<string>',
cpu: 2,
description: '<string>',
diskGib: 2,
idleTimeoutSeconds: 1,
memoryMib: 2
},
uploadId: '<string>',
branch: '<string>',
commit: '<string>',
dirty: true,
env: [{name: '<string>', value: '<string>'}]
}
})
};
fetch('https://api.ravion.com/apps/{id}/deploys', 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.ravion.com/apps/{id}/deploys",
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([
'data' => [
'archiveSha256' => '<string>',
'definition' => [
'env' => [
[
'name' => '<string>',
'value' => '<string>'
]
],
'expose' => [
[
'healthCheckPath' => '<string>',
'name' => '<string>',
'port' => 32768,
'domains' => [
'<string>'
]
]
],
'workdir' => '<string>',
'cpu' => 2,
'description' => '<string>',
'diskGib' => 2,
'idleTimeoutSeconds' => 1,
'memoryMib' => 2
],
'uploadId' => '<string>',
'branch' => '<string>',
'commit' => '<string>',
'dirty' => true,
'env' => [
[
'name' => '<string>',
'value' => '<string>'
]
]
]
]),
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://api.ravion.com/apps/{id}/deploys"
payload := strings.NewReader("{\n \"data\": {\n \"archiveSha256\": \"<string>\",\n \"definition\": {\n \"env\": [\n {\n \"name\": \"<string>\",\n \"value\": \"<string>\"\n }\n ],\n \"expose\": [\n {\n \"healthCheckPath\": \"<string>\",\n \"name\": \"<string>\",\n \"port\": 32768,\n \"domains\": [\n \"<string>\"\n ]\n }\n ],\n \"workdir\": \"<string>\",\n \"cpu\": 2,\n \"description\": \"<string>\",\n \"diskGib\": 2,\n \"idleTimeoutSeconds\": 1,\n \"memoryMib\": 2\n },\n \"uploadId\": \"<string>\",\n \"branch\": \"<string>\",\n \"commit\": \"<string>\",\n \"dirty\": true,\n \"env\": [\n {\n \"name\": \"<string>\",\n \"value\": \"<string>\"\n }\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://api.ravion.com/apps/{id}/deploys")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"data\": {\n \"archiveSha256\": \"<string>\",\n \"definition\": {\n \"env\": [\n {\n \"name\": \"<string>\",\n \"value\": \"<string>\"\n }\n ],\n \"expose\": [\n {\n \"healthCheckPath\": \"<string>\",\n \"name\": \"<string>\",\n \"port\": 32768,\n \"domains\": [\n \"<string>\"\n ]\n }\n ],\n \"workdir\": \"<string>\",\n \"cpu\": 2,\n \"description\": \"<string>\",\n \"diskGib\": 2,\n \"idleTimeoutSeconds\": 1,\n \"memoryMib\": 2\n },\n \"uploadId\": \"<string>\",\n \"branch\": \"<string>\",\n \"commit\": \"<string>\",\n \"dirty\": true,\n \"env\": [\n {\n \"name\": \"<string>\",\n \"value\": \"<string>\"\n }\n ]\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.ravion.com/apps/{id}/deploys")
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 \"data\": {\n \"archiveSha256\": \"<string>\",\n \"definition\": {\n \"env\": [\n {\n \"name\": \"<string>\",\n \"value\": \"<string>\"\n }\n ],\n \"expose\": [\n {\n \"healthCheckPath\": \"<string>\",\n \"name\": \"<string>\",\n \"port\": 32768,\n \"domains\": [\n \"<string>\"\n ]\n }\n ],\n \"workdir\": \"<string>\",\n \"cpu\": 2,\n \"description\": \"<string>\",\n \"diskGib\": 2,\n \"idleTimeoutSeconds\": 1,\n \"memoryMib\": 2\n },\n \"uploadId\": \"<string>\",\n \"branch\": \"<string>\",\n \"commit\": \"<string>\",\n \"dirty\": true,\n \"env\": [\n {\n \"name\": \"<string>\",\n \"value\": \"<string>\"\n }\n ]\n }\n}"
response = http.request(request)
puts response.read_body{
"data": {
"pipelineRunId": "<string>"
}
}{
"code": "<string>",
"message": "<string>",
"action": {
"label": "<string>",
"url": "<string>"
},
"description": "<string>",
"details": [
{
"render": "<string>",
"title": "<string>",
"items": [
"<string>"
],
"object": {}
}
],
"isInternal": true,
"metadata": {},
"requestId": "<string>"
}{
"code": "<string>",
"message": "<string>",
"action": {
"label": "<string>",
"url": "<string>"
},
"description": "<string>",
"details": [
{
"render": "<string>",
"title": "<string>",
"items": [
"<string>"
],
"object": {}
}
],
"isInternal": true,
"metadata": {},
"requestId": "<string>"
}{
"code": "<string>",
"message": "<string>",
"action": {
"label": "<string>",
"url": "<string>"
},
"description": "<string>",
"details": [
{
"render": "<string>",
"title": "<string>",
"items": [
"<string>"
],
"object": {}
}
],
"isInternal": true,
"metadata": {},
"requestId": "<string>"
}{
"code": "<string>",
"message": "<string>",
"action": {
"label": "<string>",
"url": "<string>"
},
"description": "<string>",
"details": [
{
"render": "<string>",
"title": "<string>",
"items": [
"<string>"
],
"object": {}
}
],
"isInternal": true,
"metadata": {},
"requestId": "<string>"
}{
"code": "<string>",
"message": "<string>",
"action": {
"label": "<string>",
"url": "<string>"
},
"description": "<string>",
"details": [
{
"render": "<string>",
"title": "<string>",
"items": [
"<string>"
],
"object": {}
}
],
"isInternal": true,
"metadata": {},
"requestId": "<string>"
}{
"code": "<string>",
"message": "<string>",
"action": {
"label": "<string>",
"url": "<string>"
},
"description": "<string>",
"details": [
{
"render": "<string>",
"title": "<string>",
"items": [
"<string>"
],
"object": {}
}
],
"isInternal": true,
"metadata": {},
"requestId": "<string>"
}{
"code": "<string>",
"message": "<string>",
"action": {
"label": "<string>",
"url": "<string>"
},
"description": "<string>",
"details": [
{
"render": "<string>",
"title": "<string>",
"items": [
"<string>"
],
"object": {}
}
],
"isInternal": true,
"metadata": {},
"requestId": "<string>"
}Was this page helpful?