Get a single environment deployment
curl --request GET \
--url {schemes}://api.upsun.com/projects/{projectId}/environments/{environmentId}/deployments/{deploymentId} \
--header 'Authorization: Bearer <token>'import requests
url = "{schemes}://api.upsun.com/projects/{projectId}/environments/{environmentId}/deployments/{deploymentId}"
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/{deploymentId}', 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/{deploymentId}",
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/{deploymentId}"
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/{deploymentId}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("{schemes}://api.upsun.com/projects/{projectId}/environments/{environmentId}/deployments/{deploymentId}")
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>",
"head_commit": "<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,
"application_scope": [
"<string>"
],
"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": {},
"tasks": {},
"container_profiles": {},
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"fingerprint": "<string>"
}Deployment
Get a single environment deployment
Retrieve a single deployment configuration with an id of current. This may be subject to change in the future.
Only current can be queried.
GET
/
projects
/
{projectId}
/
environments
/
{environmentId}
/
deployments
/
{deploymentId}
Get a single environment deployment
curl --request GET \
--url {schemes}://api.upsun.com/projects/{projectId}/environments/{environmentId}/deployments/{deploymentId} \
--header 'Authorization: Bearer <token>'import requests
url = "{schemes}://api.upsun.com/projects/{projectId}/environments/{environmentId}/deployments/{deploymentId}"
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/{deploymentId}', 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/{deploymentId}",
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/{deploymentId}"
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/{deploymentId}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("{schemes}://api.upsun.com/projects/{projectId}/environments/{environmentId}/deployments/{deploymentId}")
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>",
"head_commit": "<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,
"application_scope": [
"<string>"
],
"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": {},
"tasks": {},
"container_profiles": {},
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"fingerprint": "<string>"
}Authorizations
Response
default - application/json
Was this page helpful?