Create ExecutionEnvironment
curl --request POST \
--url https://api.ravion.com/execution-environments \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"data": {
"awsAccountId": "<string>",
"givenId": "<string>",
"name": "<string>",
"region": "<string>",
"securityGroupId": "<string>",
"type": "AWS",
"vpcId": "<string>",
"budget": {
"limitUsd": 2,
"enforce": true,
"killRunningJobs": true
},
"sandboxes": {
"allowPublicRepositories": true,
"capacityTypes": [],
"instanceTypes": [
{
"diskGiB": 8207,
"diskIops": 41500,
"diskThroughputMBps": 1062,
"type": "<string>"
}
],
"maxHostAgeHours": 4380,
"maxHosts": 2
}
}
}
'import requests
url = "https://api.ravion.com/execution-environments"
payload = { "data": {
"awsAccountId": "<string>",
"givenId": "<string>",
"name": "<string>",
"region": "<string>",
"securityGroupId": "<string>",
"type": "AWS",
"vpcId": "<string>",
"budget": {
"limitUsd": 2,
"enforce": True,
"killRunningJobs": True
},
"sandboxes": {
"allowPublicRepositories": True,
"capacityTypes": [],
"instanceTypes": [
{
"diskGiB": 8207,
"diskIops": 41500,
"diskThroughputMBps": 1062,
"type": "<string>"
}
],
"maxHostAgeHours": 4380,
"maxHosts": 2
}
} }
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: {
awsAccountId: '<string>',
givenId: '<string>',
name: '<string>',
region: '<string>',
securityGroupId: '<string>',
type: 'AWS',
vpcId: '<string>',
budget: {limitUsd: 2, enforce: true, killRunningJobs: true},
sandboxes: {
allowPublicRepositories: true,
capacityTypes: [],
instanceTypes: [{diskGiB: 8207, diskIops: 41500, diskThroughputMBps: 1062, type: '<string>'}],
maxHostAgeHours: 4380,
maxHosts: 2
}
}
})
};
fetch('https://api.ravion.com/execution-environments', 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/execution-environments",
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' => [
'awsAccountId' => '<string>',
'givenId' => '<string>',
'name' => '<string>',
'region' => '<string>',
'securityGroupId' => '<string>',
'type' => 'AWS',
'vpcId' => '<string>',
'budget' => [
'limitUsd' => 2,
'enforce' => true,
'killRunningJobs' => true
],
'sandboxes' => [
'allowPublicRepositories' => true,
'capacityTypes' => [
],
'instanceTypes' => [
[
'diskGiB' => 8207,
'diskIops' => 41500,
'diskThroughputMBps' => 1062,
'type' => '<string>'
]
],
'maxHostAgeHours' => 4380,
'maxHosts' => 2
]
]
]),
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/execution-environments"
payload := strings.NewReader("{\n \"data\": {\n \"awsAccountId\": \"<string>\",\n \"givenId\": \"<string>\",\n \"name\": \"<string>\",\n \"region\": \"<string>\",\n \"securityGroupId\": \"<string>\",\n \"type\": \"AWS\",\n \"vpcId\": \"<string>\",\n \"budget\": {\n \"limitUsd\": 2,\n \"enforce\": true,\n \"killRunningJobs\": true\n },\n \"sandboxes\": {\n \"allowPublicRepositories\": true,\n \"capacityTypes\": [],\n \"instanceTypes\": [\n {\n \"diskGiB\": 8207,\n \"diskIops\": 41500,\n \"diskThroughputMBps\": 1062,\n \"type\": \"<string>\"\n }\n ],\n \"maxHostAgeHours\": 4380,\n \"maxHosts\": 2\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/execution-environments")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"data\": {\n \"awsAccountId\": \"<string>\",\n \"givenId\": \"<string>\",\n \"name\": \"<string>\",\n \"region\": \"<string>\",\n \"securityGroupId\": \"<string>\",\n \"type\": \"AWS\",\n \"vpcId\": \"<string>\",\n \"budget\": {\n \"limitUsd\": 2,\n \"enforce\": true,\n \"killRunningJobs\": true\n },\n \"sandboxes\": {\n \"allowPublicRepositories\": true,\n \"capacityTypes\": [],\n \"instanceTypes\": [\n {\n \"diskGiB\": 8207,\n \"diskIops\": 41500,\n \"diskThroughputMBps\": 1062,\n \"type\": \"<string>\"\n }\n ],\n \"maxHostAgeHours\": 4380,\n \"maxHosts\": 2\n }\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.ravion.com/execution-environments")
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 \"awsAccountId\": \"<string>\",\n \"givenId\": \"<string>\",\n \"name\": \"<string>\",\n \"region\": \"<string>\",\n \"securityGroupId\": \"<string>\",\n \"type\": \"AWS\",\n \"vpcId\": \"<string>\",\n \"budget\": {\n \"limitUsd\": 2,\n \"enforce\": true,\n \"killRunningJobs\": true\n },\n \"sandboxes\": {\n \"allowPublicRepositories\": true,\n \"capacityTypes\": [],\n \"instanceTypes\": [\n {\n \"diskGiB\": 8207,\n \"diskIops\": 41500,\n \"diskThroughputMBps\": 1062,\n \"type\": \"<string>\"\n }\n ],\n \"maxHostAgeHours\": 4380,\n \"maxHosts\": 2\n }\n }\n}"
response = http.request(request)
puts response.read_body{
"data": {
"awsAccountId": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"givenId": "<string>",
"id": "<string>",
"name": "<string>",
"organizationId": "<string>",
"region": "<string>",
"sandboxDefaults": {
"capacityTypes": [
"ON_DEMAND"
],
"instanceTypes": [
{
"diskGiB": 8207,
"diskIops": 41500,
"diskThroughputMBps": 1062,
"type": "<string>"
}
],
"maxHostAgeHours": 123,
"maxHosts": 123,
"reservePolicy": {
"type": "PEAK",
"value": 1,
"windowDays": 45,
"workingHours": true
}
},
"securityGroupId": "<string>",
"type": "AWS",
"updatedAt": "2023-11-07T05:31:56Z",
"vpcId": "<string>",
"budget": {
"limitUsd": 2,
"enforce": true,
"killRunningJobs": true
},
"budgetStatus": {
"enforced": true,
"level": "OK",
"limitUsd": 123,
"spentUsd": 123,
"exceededAt": "2023-11-07T05:31:56Z",
"periodEnd": "2023-11-07T05:31:56Z",
"periodStart": "2023-11-07T05:31:56Z",
"spentThrough": "2023-11-07T05:31:56Z"
},
"cacheDeletion": {
"id": "<string>",
"mode": "DELETE_CACHE",
"requestedAt": "2023-11-07T05:31:56Z",
"status": "WAITING_FOR_JOBS",
"error": "<string>"
},
"deletion": {
"id": "<string>",
"requestedAt": "2023-11-07T05:31:56Z",
"status": "DELETING",
"error": {
"code": "<string>",
"message": "<string>",
"action": {
"label": "<string>",
"url": "<string>"
},
"description": "<string>",
"details": [
{
"render": "<string>",
"title": "<string>",
"items": [
"<string>"
],
"object": {}
}
],
"isInternal": true,
"metadata": {},
"requestId": "<string>"
}
},
"sandboxes": {
"allowPublicRepositories": true,
"capacityTypes": [
"ON_DEMAND"
],
"githubActionsArtifactStorage": "GITHUB",
"instanceTypes": [
{
"diskGiB": 8207,
"diskIops": 41500,
"diskThroughputMBps": 1062,
"type": "<string>"
}
],
"maxHostAgeHours": 4380,
"maxHosts": 2,
"performanceProfile": "LUDICROUS",
"reservePolicy": {
"type": "PEAK",
"value": 1,
"windowDays": 45,
"workingHours": true
}
},
"subnetSelection": {
"mode": "PUBLIC",
"subnetIds": [
"<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>"
}ExecutionEnvironments
Create ExecutionEnvironment
Create a new AWS execution environment. Returns the created AWS execution environment, including its assigned ID and initial state.
POST
/
execution-environments
Create ExecutionEnvironment
curl --request POST \
--url https://api.ravion.com/execution-environments \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"data": {
"awsAccountId": "<string>",
"givenId": "<string>",
"name": "<string>",
"region": "<string>",
"securityGroupId": "<string>",
"type": "AWS",
"vpcId": "<string>",
"budget": {
"limitUsd": 2,
"enforce": true,
"killRunningJobs": true
},
"sandboxes": {
"allowPublicRepositories": true,
"capacityTypes": [],
"instanceTypes": [
{
"diskGiB": 8207,
"diskIops": 41500,
"diskThroughputMBps": 1062,
"type": "<string>"
}
],
"maxHostAgeHours": 4380,
"maxHosts": 2
}
}
}
'import requests
url = "https://api.ravion.com/execution-environments"
payload = { "data": {
"awsAccountId": "<string>",
"givenId": "<string>",
"name": "<string>",
"region": "<string>",
"securityGroupId": "<string>",
"type": "AWS",
"vpcId": "<string>",
"budget": {
"limitUsd": 2,
"enforce": True,
"killRunningJobs": True
},
"sandboxes": {
"allowPublicRepositories": True,
"capacityTypes": [],
"instanceTypes": [
{
"diskGiB": 8207,
"diskIops": 41500,
"diskThroughputMBps": 1062,
"type": "<string>"
}
],
"maxHostAgeHours": 4380,
"maxHosts": 2
}
} }
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: {
awsAccountId: '<string>',
givenId: '<string>',
name: '<string>',
region: '<string>',
securityGroupId: '<string>',
type: 'AWS',
vpcId: '<string>',
budget: {limitUsd: 2, enforce: true, killRunningJobs: true},
sandboxes: {
allowPublicRepositories: true,
capacityTypes: [],
instanceTypes: [{diskGiB: 8207, diskIops: 41500, diskThroughputMBps: 1062, type: '<string>'}],
maxHostAgeHours: 4380,
maxHosts: 2
}
}
})
};
fetch('https://api.ravion.com/execution-environments', 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/execution-environments",
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' => [
'awsAccountId' => '<string>',
'givenId' => '<string>',
'name' => '<string>',
'region' => '<string>',
'securityGroupId' => '<string>',
'type' => 'AWS',
'vpcId' => '<string>',
'budget' => [
'limitUsd' => 2,
'enforce' => true,
'killRunningJobs' => true
],
'sandboxes' => [
'allowPublicRepositories' => true,
'capacityTypes' => [
],
'instanceTypes' => [
[
'diskGiB' => 8207,
'diskIops' => 41500,
'diskThroughputMBps' => 1062,
'type' => '<string>'
]
],
'maxHostAgeHours' => 4380,
'maxHosts' => 2
]
]
]),
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/execution-environments"
payload := strings.NewReader("{\n \"data\": {\n \"awsAccountId\": \"<string>\",\n \"givenId\": \"<string>\",\n \"name\": \"<string>\",\n \"region\": \"<string>\",\n \"securityGroupId\": \"<string>\",\n \"type\": \"AWS\",\n \"vpcId\": \"<string>\",\n \"budget\": {\n \"limitUsd\": 2,\n \"enforce\": true,\n \"killRunningJobs\": true\n },\n \"sandboxes\": {\n \"allowPublicRepositories\": true,\n \"capacityTypes\": [],\n \"instanceTypes\": [\n {\n \"diskGiB\": 8207,\n \"diskIops\": 41500,\n \"diskThroughputMBps\": 1062,\n \"type\": \"<string>\"\n }\n ],\n \"maxHostAgeHours\": 4380,\n \"maxHosts\": 2\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/execution-environments")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"data\": {\n \"awsAccountId\": \"<string>\",\n \"givenId\": \"<string>\",\n \"name\": \"<string>\",\n \"region\": \"<string>\",\n \"securityGroupId\": \"<string>\",\n \"type\": \"AWS\",\n \"vpcId\": \"<string>\",\n \"budget\": {\n \"limitUsd\": 2,\n \"enforce\": true,\n \"killRunningJobs\": true\n },\n \"sandboxes\": {\n \"allowPublicRepositories\": true,\n \"capacityTypes\": [],\n \"instanceTypes\": [\n {\n \"diskGiB\": 8207,\n \"diskIops\": 41500,\n \"diskThroughputMBps\": 1062,\n \"type\": \"<string>\"\n }\n ],\n \"maxHostAgeHours\": 4380,\n \"maxHosts\": 2\n }\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.ravion.com/execution-environments")
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 \"awsAccountId\": \"<string>\",\n \"givenId\": \"<string>\",\n \"name\": \"<string>\",\n \"region\": \"<string>\",\n \"securityGroupId\": \"<string>\",\n \"type\": \"AWS\",\n \"vpcId\": \"<string>\",\n \"budget\": {\n \"limitUsd\": 2,\n \"enforce\": true,\n \"killRunningJobs\": true\n },\n \"sandboxes\": {\n \"allowPublicRepositories\": true,\n \"capacityTypes\": [],\n \"instanceTypes\": [\n {\n \"diskGiB\": 8207,\n \"diskIops\": 41500,\n \"diskThroughputMBps\": 1062,\n \"type\": \"<string>\"\n }\n ],\n \"maxHostAgeHours\": 4380,\n \"maxHosts\": 2\n }\n }\n}"
response = http.request(request)
puts response.read_body{
"data": {
"awsAccountId": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"givenId": "<string>",
"id": "<string>",
"name": "<string>",
"organizationId": "<string>",
"region": "<string>",
"sandboxDefaults": {
"capacityTypes": [
"ON_DEMAND"
],
"instanceTypes": [
{
"diskGiB": 8207,
"diskIops": 41500,
"diskThroughputMBps": 1062,
"type": "<string>"
}
],
"maxHostAgeHours": 123,
"maxHosts": 123,
"reservePolicy": {
"type": "PEAK",
"value": 1,
"windowDays": 45,
"workingHours": true
}
},
"securityGroupId": "<string>",
"type": "AWS",
"updatedAt": "2023-11-07T05:31:56Z",
"vpcId": "<string>",
"budget": {
"limitUsd": 2,
"enforce": true,
"killRunningJobs": true
},
"budgetStatus": {
"enforced": true,
"level": "OK",
"limitUsd": 123,
"spentUsd": 123,
"exceededAt": "2023-11-07T05:31:56Z",
"periodEnd": "2023-11-07T05:31:56Z",
"periodStart": "2023-11-07T05:31:56Z",
"spentThrough": "2023-11-07T05:31:56Z"
},
"cacheDeletion": {
"id": "<string>",
"mode": "DELETE_CACHE",
"requestedAt": "2023-11-07T05:31:56Z",
"status": "WAITING_FOR_JOBS",
"error": "<string>"
},
"deletion": {
"id": "<string>",
"requestedAt": "2023-11-07T05:31:56Z",
"status": "DELETING",
"error": {
"code": "<string>",
"message": "<string>",
"action": {
"label": "<string>",
"url": "<string>"
},
"description": "<string>",
"details": [
{
"render": "<string>",
"title": "<string>",
"items": [
"<string>"
],
"object": {}
}
],
"isInternal": true,
"metadata": {},
"requestId": "<string>"
}
},
"sandboxes": {
"allowPublicRepositories": true,
"capacityTypes": [
"ON_DEMAND"
],
"githubActionsArtifactStorage": "GITHUB",
"instanceTypes": [
{
"diskGiB": 8207,
"diskIops": 41500,
"diskThroughputMBps": 1062,
"type": "<string>"
}
],
"maxHostAgeHours": 4380,
"maxHosts": 2,
"performanceProfile": "LUDICROUS",
"reservePolicy": {
"type": "PEAK",
"value": 1,
"windowDays": 45,
"workingHours": true
}
},
"subnetSelection": {
"mode": "PUBLIC",
"subnetIds": [
"<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>"
}Body
application/json
Was this page helpful?