Environment
CRUD - Create, Update, Delete
Get Environments
GET
https://api.perun.cloud/api/v1/environments
This endpoint allows you to get free cakes.
Headers
Name
Type
Description
Authentication
string
Authentication token
{
"environments": []
}
Get Environment
GET
https://api.perun.cloud/api/v1/environment/[env_id]
Headers
Name
Type
Description
Authentication
string
Authentication token
{
"environment": []
}
Header parameters
AuthorizationstringOptional
Content-TypestringRequired
Body
loggingstringRequired
Responses
200Success
post
POST /api/v1/environments HTTP/1.1
Host: api.perun.cloud
Content-Type: application/json
Accept: */*
Content-Length: 876
{
"environment": {
"name": "mixed",
"region": "us-east-2",
"entryService": "",
"provider": "AWS",
"services": [
{
"name": "demo",
"type": "instance",
"ami_id": "ami-05bd91861c26b1d36",
"ports": "",
"cpu": 100,
"memory": 300,
"expose": false
},
{
"name": "logger",
"type": "docker",
"imageId": "chentex/random-logger:latest",
"ports": "",
"cpu": 100,
"memory": 300,
"expose": false
}
],
"stack": [
{
"type": "RDS",
"config~": {
"rds_engine": "postgres",
"rds_engine_version": "12.3",
"rds_instance_class": "db.t3.micro",
"name": "rds1341",
"rds_storage_type": "gp2",
"rds_username": "user1",
"rds_password": "blablapwd"
},
"config": {
"rds_engine": "postgres",
"rds_engine_version": "12.3",
"name": "rds1341"
},
"output": {}
},
{
"type": "SQS",
"run_sequentially": true,
"config": {
"name": "q01-20"
},
"output": {}
},
{
"type": "S3",
"config": {
"name": "bbb20"
},
"output": {}
}
],
"workers": [],
"cost": "556",
"isExpanded": false,
"ttl": "2020-09-30T21:00:00.000Z"
},
"logging": "stdout"
}
200Success
No content
Header parameters
AuthorizationstringOptional
Content-TypestringRequired
Body
loggingstringRequired
Responses
200Success
put
PUT /api/v1/environments/609148d2fe28b7b51f5d5539 HTTP/1.1
Host: api.perun.cloud
Content-Type: application/json
Accept: */*
Content-Length: 358
{
"logging": "stdout",
"environment": {
"name": "ttt1",
"entryService": "ttt1-1",
"provider": "AWS",
"services": [
{
"name": "wiki02",
"ports": "5001",
"cpu": 250,
"memory": 1250,
"type": "docker",
"imageId": "558070116784.dkr.ecr.eu-central-1.amazonaws.com/scraper:latest",
"isPublic": false
}
],
"stack": [],
"workers": [],
"cost": "556",
"isExpanded": false,
"ttl": "2020-09-30T21:00:00.000Z"
}
}
200Success
No content
Last updated
Was this helpful?