curl --request GET \
--url {schemes}://api.upsun.com/projects/{projectId}/environments/{environmentId}/deployments \
--header 'Authorization: Bearer <token>'import requests
url = "{schemes}://api.upsun.com/projects/{projectId}/environments/{environmentId}/deployments"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('{schemes}://api.upsun.com/projects/{projectId}/environments/{environmentId}/deployments', 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 => "{schemes}://api.upsun.com/projects/{projectId}/environments/{environmentId}/deployments",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{schemes}://api.upsun.com/projects/{projectId}/environments/{environmentId}/deployments"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("{schemes}://api.upsun.com/projects/{projectId}/environments/{environmentId}/deployments")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("{schemes}://api.upsun.com/projects/{projectId}/environments/{environmentId}/deployments")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body[
{
"id": "<string>",
"cluster_name": "<string>",
"project_info": {
"title": "<string>",
"name": "<string>",
"namespace": "<string>",
"organization": "<string>",
"capabilities": {},
"settings": {}
},
"environment_info": {
"name": "<string>",
"status": "<string>",
"is_main": true,
"is_production": true,
"constraints": {},
"reference": "<string>",
"machine_name": "<string>",
"environment_type": "<string>",
"links": {}
},
"deployment_target": "<string>",
"vpn": {
"version": 1,
"aggressive": "no",
"modeconfig": "pull",
"authentication": "<string>",
"gateway_ip": "<string>",
"identity": "<string>",
"second_identity": "<string>",
"remote_identity": "<string>",
"remote_subnets": [
"<string>"
],
"ike": "<string>",
"esp": "<string>",
"ikelifetime": "<string>",
"lifetime": "<string>",
"margintime": "<string>"
},
"http_access": {
"is_enabled": true,
"addresses": [
{
"permission": "allow",
"address": "<string>"
}
],
"basic_auth": {}
},
"enable_smtp": true,
"restrict_robots": true,
"variables": [
{
"name": "<string>",
"is_sensitive": true,
"is_json": true,
"visible_build": true,
"visible_runtime": true,
"value": "<string>"
}
],
"access": [
{
"entity_id": "<string>",
"role": "admin"
}
],
"subscription": {
"license_uri": "<string>",
"storage": 123,
"included_users": 123,
"subscription_management_uri": "<string>",
"restricted": true,
"suspended": true,
"user_licenses": 123,
"plan": "2xlarge",
"environments": 123,
"resources": {
"container_profiles": true,
"production": {
"legacy_development": true,
"max_cpu": 123,
"max_memory": 123,
"max_environments": 123
},
"development": {
"legacy_development": true,
"max_cpu": 123,
"max_memory": 123,
"max_environments": 123
}
},
"resource_validation_url": "<string>",
"image_types": {
"only": [
"<string>"
],
"exclude": [
"<string>"
]
}
},
"services": {},
"routes": {},
"webapps": {},
"workers": {},
"container_profiles": {},
"tasks": {},
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"fingerprint": "<string>"
}
]Get an environment's deployment information
Retrieve the read-only configuration of an environment’s deployment. The returned information is everything required to recreate a project’s current deployment.
More specifically, the objects
returned by this endpoint contain the configuration derived from the
repository’s YAML configuration file: .upsun/config.yaml.
Additionally, any values deriving from environment variables, the domains attached to a project, project access settings, etc. are included here.
This endpoint currently returns a list containing a single deployment
configuration with an id of current. This may be subject to change
in the future.
curl --request GET \
--url {schemes}://api.upsun.com/projects/{projectId}/environments/{environmentId}/deployments \
--header 'Authorization: Bearer <token>'import requests
url = "{schemes}://api.upsun.com/projects/{projectId}/environments/{environmentId}/deployments"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('{schemes}://api.upsun.com/projects/{projectId}/environments/{environmentId}/deployments', 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 => "{schemes}://api.upsun.com/projects/{projectId}/environments/{environmentId}/deployments",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{schemes}://api.upsun.com/projects/{projectId}/environments/{environmentId}/deployments"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("{schemes}://api.upsun.com/projects/{projectId}/environments/{environmentId}/deployments")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("{schemes}://api.upsun.com/projects/{projectId}/environments/{environmentId}/deployments")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body[
{
"id": "<string>",
"cluster_name": "<string>",
"project_info": {
"title": "<string>",
"name": "<string>",
"namespace": "<string>",
"organization": "<string>",
"capabilities": {},
"settings": {}
},
"environment_info": {
"name": "<string>",
"status": "<string>",
"is_main": true,
"is_production": true,
"constraints": {},
"reference": "<string>",
"machine_name": "<string>",
"environment_type": "<string>",
"links": {}
},
"deployment_target": "<string>",
"vpn": {
"version": 1,
"aggressive": "no",
"modeconfig": "pull",
"authentication": "<string>",
"gateway_ip": "<string>",
"identity": "<string>",
"second_identity": "<string>",
"remote_identity": "<string>",
"remote_subnets": [
"<string>"
],
"ike": "<string>",
"esp": "<string>",
"ikelifetime": "<string>",
"lifetime": "<string>",
"margintime": "<string>"
},
"http_access": {
"is_enabled": true,
"addresses": [
{
"permission": "allow",
"address": "<string>"
}
],
"basic_auth": {}
},
"enable_smtp": true,
"restrict_robots": true,
"variables": [
{
"name": "<string>",
"is_sensitive": true,
"is_json": true,
"visible_build": true,
"visible_runtime": true,
"value": "<string>"
}
],
"access": [
{
"entity_id": "<string>",
"role": "admin"
}
],
"subscription": {
"license_uri": "<string>",
"storage": 123,
"included_users": 123,
"subscription_management_uri": "<string>",
"restricted": true,
"suspended": true,
"user_licenses": 123,
"plan": "2xlarge",
"environments": 123,
"resources": {
"container_profiles": true,
"production": {
"legacy_development": true,
"max_cpu": 123,
"max_memory": 123,
"max_environments": 123
},
"development": {
"legacy_development": true,
"max_cpu": 123,
"max_memory": 123,
"max_environments": 123
}
},
"resource_validation_url": "<string>",
"image_types": {
"only": [
"<string>"
],
"exclude": [
"<string>"
]
}
},
"services": {},
"routes": {},
"webapps": {},
"workers": {},
"container_profiles": {},
"tasks": {},
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"fingerprint": "<string>"
}
]Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Response
The identifier of Deployment
The name of the cluster
The project information
Show child attributes
Show child attributes
The environment information
Show child attributes
Show child attributes
The deployment target
The configuration of the VPN
Show child attributes
Show child attributes
The permissions of the HTTP access
Show child attributes
Show child attributes
Whether to configure SMTP for this environment
Whether to restrict robots for this environment
The variables applying to this environment
Show child attributes
Show child attributes
Access control definition for this enviroment
Show child attributes
Show child attributes
Subscription
Show child attributes
Show child attributes
The services
Show child attributes
Show child attributes
The routes
Show child attributes
Show child attributes
The Web applications
Show child attributes
Show child attributes
The workers
Show child attributes
Show child attributes
The profiles of the containers
Show child attributes
Show child attributes
The tasks sizing (applied at task run time)
Show child attributes
Show child attributes
The creation date of the deployment
The update date of the deployment
The fingerprint of the deployment
Was this page helpful?