curl --request POST \
--url https://api.example.com/v2/deployments \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"source_config": {
"integration_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"repo_url": "<string>",
"build_on_push": true,
"custom_url": "<string>",
"resource_spec": {
"min_scale": 123,
"max_scale": 123,
"cpu": 0.1,
"cpu_limit": 0.2,
"memory_mb": 123,
"memory_limit_mb": 123,
"queue_min_scale": 123,
"queue_max_scale": 123,
"queue_cpu": 0.1,
"queue_cpu_limit": 0.2,
"queue_memory_mb": 123,
"queue_memory_limit_mb": 123,
"redis_cpu": 0.1,
"redis_cpu_limit": 0.2,
"redis_memory_mb": 123,
"redis_memory_limit_mb": 123,
"core_cpu": 1.1,
"core_cpu_limit": 1.1,
"core_memory_mb": 123,
"core_memory_limit_mb": 123,
"labels": {},
"annotations": {},
"service_account_name": "<string>",
"image_pull_secrets": [
{
"name": "<string>"
}
],
"volumes": [
{
"name": "<string>",
"configMap": {},
"secret": {},
"emptyDir": {},
"persistentVolumeClaim": {},
"nfs": {},
"projected": {},
"downwardAPI": {},
"csi": {}
}
],
"volume_mounts": [
{
"name": "<string>",
"mountPath": "<string>",
"subPath": "<string>",
"mountPropagation": "<string>",
"readOnly": true,
"subPathExpr": "<string>"
}
],
"init_containers": [
{
"name": "<string>",
"image": "<string>",
"imagePullPolicy": "<string>",
"command": [
"<string>"
],
"args": [
"<string>"
],
"workingDir": "<string>",
"env": [
{
"name": "<string>",
"value": "<string>",
"valueFrom": {}
}
],
"envFrom": [
{}
],
"resources": {
"limits": {},
"requests": {}
},
"volumeMounts": [
{
"name": "<string>",
"mountPath": "<string>",
"subPath": "<string>",
"mountPropagation": "<string>",
"readOnly": true,
"subPathExpr": "<string>"
}
],
"securityContext": {},
"restartPolicy": "<string>"
}
],
"sidecars": [
{
"name": "<string>",
"image": "<string>",
"imagePullPolicy": "<string>",
"command": [
"<string>"
],
"args": [
"<string>"
],
"workingDir": "<string>",
"env": [
{
"name": "<string>",
"value": "<string>",
"valueFrom": {}
}
],
"envFrom": [
{}
],
"resources": {
"limits": {},
"requests": {}
},
"volumeMounts": [
{
"name": "<string>",
"mountPath": "<string>",
"subPath": "<string>",
"mountPropagation": "<string>",
"readOnly": true,
"subPathExpr": "<string>"
}
],
"securityContext": {},
"restartPolicy": "<string>"
}
],
"db_cpu": 123,
"db_cpu_limit": 123,
"db_memory_mb": 123,
"db_memory_limit_mb": 123,
"db_storage_gi": 123,
"db_max_connections": 123
},
"listener_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"listener_config": {
"k8s_namespace": "<string>"
},
"install_command": "<string>",
"build_command": "<string>"
},
"source_revision_config": {
"repo_ref": "<string>",
"langgraph_config_path": "<string>",
"image_uri": "<string>",
"source_tarball_path": "<string>"
},
"secrets": [
{
"name": "<string>",
"value": "<string>"
}
],
"secret_references": [
{
"name": "<string>",
"secret_name": "<string>",
"secret_key": "<string>"
}
]
}
'import requests
url = "https://api.example.com/v2/deployments"
payload = {
"name": "<string>",
"source_config": {
"integration_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"repo_url": "<string>",
"build_on_push": True,
"custom_url": "<string>",
"resource_spec": {
"min_scale": 123,
"max_scale": 123,
"cpu": 0.1,
"cpu_limit": 0.2,
"memory_mb": 123,
"memory_limit_mb": 123,
"queue_min_scale": 123,
"queue_max_scale": 123,
"queue_cpu": 0.1,
"queue_cpu_limit": 0.2,
"queue_memory_mb": 123,
"queue_memory_limit_mb": 123,
"redis_cpu": 0.1,
"redis_cpu_limit": 0.2,
"redis_memory_mb": 123,
"redis_memory_limit_mb": 123,
"core_cpu": 1.1,
"core_cpu_limit": 1.1,
"core_memory_mb": 123,
"core_memory_limit_mb": 123,
"labels": {},
"annotations": {},
"service_account_name": "<string>",
"image_pull_secrets": [{ "name": "<string>" }],
"volumes": [
{
"name": "<string>",
"configMap": {},
"secret": {},
"emptyDir": {},
"persistentVolumeClaim": {},
"nfs": {},
"projected": {},
"downwardAPI": {},
"csi": {}
}
],
"volume_mounts": [
{
"name": "<string>",
"mountPath": "<string>",
"subPath": "<string>",
"mountPropagation": "<string>",
"readOnly": True,
"subPathExpr": "<string>"
}
],
"init_containers": [
{
"name": "<string>",
"image": "<string>",
"imagePullPolicy": "<string>",
"command": ["<string>"],
"args": ["<string>"],
"workingDir": "<string>",
"env": [
{
"name": "<string>",
"value": "<string>",
"valueFrom": {}
}
],
"envFrom": [{}],
"resources": {
"limits": {},
"requests": {}
},
"volumeMounts": [
{
"name": "<string>",
"mountPath": "<string>",
"subPath": "<string>",
"mountPropagation": "<string>",
"readOnly": True,
"subPathExpr": "<string>"
}
],
"securityContext": {},
"restartPolicy": "<string>"
}
],
"sidecars": [
{
"name": "<string>",
"image": "<string>",
"imagePullPolicy": "<string>",
"command": ["<string>"],
"args": ["<string>"],
"workingDir": "<string>",
"env": [
{
"name": "<string>",
"value": "<string>",
"valueFrom": {}
}
],
"envFrom": [{}],
"resources": {
"limits": {},
"requests": {}
},
"volumeMounts": [
{
"name": "<string>",
"mountPath": "<string>",
"subPath": "<string>",
"mountPropagation": "<string>",
"readOnly": True,
"subPathExpr": "<string>"
}
],
"securityContext": {},
"restartPolicy": "<string>"
}
],
"db_cpu": 123,
"db_cpu_limit": 123,
"db_memory_mb": 123,
"db_memory_limit_mb": 123,
"db_storage_gi": 123,
"db_max_connections": 123
},
"listener_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"listener_config": { "k8s_namespace": "<string>" },
"install_command": "<string>",
"build_command": "<string>"
},
"source_revision_config": {
"repo_ref": "<string>",
"langgraph_config_path": "<string>",
"image_uri": "<string>",
"source_tarball_path": "<string>"
},
"secrets": [
{
"name": "<string>",
"value": "<string>"
}
],
"secret_references": [
{
"name": "<string>",
"secret_name": "<string>",
"secret_key": "<string>"
}
]
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
source_config: {
integration_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
repo_url: '<string>',
build_on_push: true,
custom_url: '<string>',
resource_spec: {
min_scale: 123,
max_scale: 123,
cpu: 0.1,
cpu_limit: 0.2,
memory_mb: 123,
memory_limit_mb: 123,
queue_min_scale: 123,
queue_max_scale: 123,
queue_cpu: 0.1,
queue_cpu_limit: 0.2,
queue_memory_mb: 123,
queue_memory_limit_mb: 123,
redis_cpu: 0.1,
redis_cpu_limit: 0.2,
redis_memory_mb: 123,
redis_memory_limit_mb: 123,
core_cpu: 1.1,
core_cpu_limit: 1.1,
core_memory_mb: 123,
core_memory_limit_mb: 123,
labels: {},
annotations: {},
service_account_name: '<string>',
image_pull_secrets: [{name: '<string>'}],
volumes: [
{
name: '<string>',
configMap: {},
secret: {},
emptyDir: {},
persistentVolumeClaim: {},
nfs: {},
projected: {},
downwardAPI: {},
csi: {}
}
],
volume_mounts: [
{
name: '<string>',
mountPath: '<string>',
subPath: '<string>',
mountPropagation: '<string>',
readOnly: true,
subPathExpr: '<string>'
}
],
init_containers: [
{
name: '<string>',
image: '<string>',
imagePullPolicy: '<string>',
command: ['<string>'],
args: ['<string>'],
workingDir: '<string>',
env: [{name: '<string>', value: '<string>', valueFrom: {}}],
envFrom: [{}],
resources: {limits: {}, requests: {}},
volumeMounts: [
{
name: '<string>',
mountPath: '<string>',
subPath: '<string>',
mountPropagation: '<string>',
readOnly: true,
subPathExpr: '<string>'
}
],
securityContext: {},
restartPolicy: '<string>'
}
],
sidecars: [
{
name: '<string>',
image: '<string>',
imagePullPolicy: '<string>',
command: ['<string>'],
args: ['<string>'],
workingDir: '<string>',
env: [{name: '<string>', value: '<string>', valueFrom: {}}],
envFrom: [{}],
resources: {limits: {}, requests: {}},
volumeMounts: [
{
name: '<string>',
mountPath: '<string>',
subPath: '<string>',
mountPropagation: '<string>',
readOnly: true,
subPathExpr: '<string>'
}
],
securityContext: {},
restartPolicy: '<string>'
}
],
db_cpu: 123,
db_cpu_limit: 123,
db_memory_mb: 123,
db_memory_limit_mb: 123,
db_storage_gi: 123,
db_max_connections: 123
},
listener_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
listener_config: {k8s_namespace: '<string>'},
install_command: '<string>',
build_command: '<string>'
},
source_revision_config: {
repo_ref: '<string>',
langgraph_config_path: '<string>',
image_uri: '<string>',
source_tarball_path: '<string>'
},
secrets: [{name: '<string>', value: '<string>'}],
secret_references: [{name: '<string>', secret_name: '<string>', secret_key: '<string>'}]
})
};
fetch('https://api.example.com/v2/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 => "https://api.example.com/v2/deployments",
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([
'name' => '<string>',
'source_config' => [
'integration_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'repo_url' => '<string>',
'build_on_push' => true,
'custom_url' => '<string>',
'resource_spec' => [
'min_scale' => 123,
'max_scale' => 123,
'cpu' => 0.1,
'cpu_limit' => 0.2,
'memory_mb' => 123,
'memory_limit_mb' => 123,
'queue_min_scale' => 123,
'queue_max_scale' => 123,
'queue_cpu' => 0.1,
'queue_cpu_limit' => 0.2,
'queue_memory_mb' => 123,
'queue_memory_limit_mb' => 123,
'redis_cpu' => 0.1,
'redis_cpu_limit' => 0.2,
'redis_memory_mb' => 123,
'redis_memory_limit_mb' => 123,
'core_cpu' => 1.1,
'core_cpu_limit' => 1.1,
'core_memory_mb' => 123,
'core_memory_limit_mb' => 123,
'labels' => [
],
'annotations' => [
],
'service_account_name' => '<string>',
'image_pull_secrets' => [
[
'name' => '<string>'
]
],
'volumes' => [
[
'name' => '<string>',
'configMap' => [
],
'secret' => [
],
'emptyDir' => [
],
'persistentVolumeClaim' => [
],
'nfs' => [
],
'projected' => [
],
'downwardAPI' => [
],
'csi' => [
]
]
],
'volume_mounts' => [
[
'name' => '<string>',
'mountPath' => '<string>',
'subPath' => '<string>',
'mountPropagation' => '<string>',
'readOnly' => true,
'subPathExpr' => '<string>'
]
],
'init_containers' => [
[
'name' => '<string>',
'image' => '<string>',
'imagePullPolicy' => '<string>',
'command' => [
'<string>'
],
'args' => [
'<string>'
],
'workingDir' => '<string>',
'env' => [
[
'name' => '<string>',
'value' => '<string>',
'valueFrom' => [
]
]
],
'envFrom' => [
[
]
],
'resources' => [
'limits' => [
],
'requests' => [
]
],
'volumeMounts' => [
[
'name' => '<string>',
'mountPath' => '<string>',
'subPath' => '<string>',
'mountPropagation' => '<string>',
'readOnly' => true,
'subPathExpr' => '<string>'
]
],
'securityContext' => [
],
'restartPolicy' => '<string>'
]
],
'sidecars' => [
[
'name' => '<string>',
'image' => '<string>',
'imagePullPolicy' => '<string>',
'command' => [
'<string>'
],
'args' => [
'<string>'
],
'workingDir' => '<string>',
'env' => [
[
'name' => '<string>',
'value' => '<string>',
'valueFrom' => [
]
]
],
'envFrom' => [
[
]
],
'resources' => [
'limits' => [
],
'requests' => [
]
],
'volumeMounts' => [
[
'name' => '<string>',
'mountPath' => '<string>',
'subPath' => '<string>',
'mountPropagation' => '<string>',
'readOnly' => true,
'subPathExpr' => '<string>'
]
],
'securityContext' => [
],
'restartPolicy' => '<string>'
]
],
'db_cpu' => 123,
'db_cpu_limit' => 123,
'db_memory_mb' => 123,
'db_memory_limit_mb' => 123,
'db_storage_gi' => 123,
'db_max_connections' => 123
],
'listener_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'listener_config' => [
'k8s_namespace' => '<string>'
],
'install_command' => '<string>',
'build_command' => '<string>'
],
'source_revision_config' => [
'repo_ref' => '<string>',
'langgraph_config_path' => '<string>',
'image_uri' => '<string>',
'source_tarball_path' => '<string>'
],
'secrets' => [
[
'name' => '<string>',
'value' => '<string>'
]
],
'secret_references' => [
[
'name' => '<string>',
'secret_name' => '<string>',
'secret_key' => '<string>'
]
]
]),
CURLOPT_HTTPHEADER => [
"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.example.com/v2/deployments"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"source_config\": {\n \"integration_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"repo_url\": \"<string>\",\n \"build_on_push\": true,\n \"custom_url\": \"<string>\",\n \"resource_spec\": {\n \"min_scale\": 123,\n \"max_scale\": 123,\n \"cpu\": 0.1,\n \"cpu_limit\": 0.2,\n \"memory_mb\": 123,\n \"memory_limit_mb\": 123,\n \"queue_min_scale\": 123,\n \"queue_max_scale\": 123,\n \"queue_cpu\": 0.1,\n \"queue_cpu_limit\": 0.2,\n \"queue_memory_mb\": 123,\n \"queue_memory_limit_mb\": 123,\n \"redis_cpu\": 0.1,\n \"redis_cpu_limit\": 0.2,\n \"redis_memory_mb\": 123,\n \"redis_memory_limit_mb\": 123,\n \"core_cpu\": 1.1,\n \"core_cpu_limit\": 1.1,\n \"core_memory_mb\": 123,\n \"core_memory_limit_mb\": 123,\n \"labels\": {},\n \"annotations\": {},\n \"service_account_name\": \"<string>\",\n \"image_pull_secrets\": [\n {\n \"name\": \"<string>\"\n }\n ],\n \"volumes\": [\n {\n \"name\": \"<string>\",\n \"configMap\": {},\n \"secret\": {},\n \"emptyDir\": {},\n \"persistentVolumeClaim\": {},\n \"nfs\": {},\n \"projected\": {},\n \"downwardAPI\": {},\n \"csi\": {}\n }\n ],\n \"volume_mounts\": [\n {\n \"name\": \"<string>\",\n \"mountPath\": \"<string>\",\n \"subPath\": \"<string>\",\n \"mountPropagation\": \"<string>\",\n \"readOnly\": true,\n \"subPathExpr\": \"<string>\"\n }\n ],\n \"init_containers\": [\n {\n \"name\": \"<string>\",\n \"image\": \"<string>\",\n \"imagePullPolicy\": \"<string>\",\n \"command\": [\n \"<string>\"\n ],\n \"args\": [\n \"<string>\"\n ],\n \"workingDir\": \"<string>\",\n \"env\": [\n {\n \"name\": \"<string>\",\n \"value\": \"<string>\",\n \"valueFrom\": {}\n }\n ],\n \"envFrom\": [\n {}\n ],\n \"resources\": {\n \"limits\": {},\n \"requests\": {}\n },\n \"volumeMounts\": [\n {\n \"name\": \"<string>\",\n \"mountPath\": \"<string>\",\n \"subPath\": \"<string>\",\n \"mountPropagation\": \"<string>\",\n \"readOnly\": true,\n \"subPathExpr\": \"<string>\"\n }\n ],\n \"securityContext\": {},\n \"restartPolicy\": \"<string>\"\n }\n ],\n \"sidecars\": [\n {\n \"name\": \"<string>\",\n \"image\": \"<string>\",\n \"imagePullPolicy\": \"<string>\",\n \"command\": [\n \"<string>\"\n ],\n \"args\": [\n \"<string>\"\n ],\n \"workingDir\": \"<string>\",\n \"env\": [\n {\n \"name\": \"<string>\",\n \"value\": \"<string>\",\n \"valueFrom\": {}\n }\n ],\n \"envFrom\": [\n {}\n ],\n \"resources\": {\n \"limits\": {},\n \"requests\": {}\n },\n \"volumeMounts\": [\n {\n \"name\": \"<string>\",\n \"mountPath\": \"<string>\",\n \"subPath\": \"<string>\",\n \"mountPropagation\": \"<string>\",\n \"readOnly\": true,\n \"subPathExpr\": \"<string>\"\n }\n ],\n \"securityContext\": {},\n \"restartPolicy\": \"<string>\"\n }\n ],\n \"db_cpu\": 123,\n \"db_cpu_limit\": 123,\n \"db_memory_mb\": 123,\n \"db_memory_limit_mb\": 123,\n \"db_storage_gi\": 123,\n \"db_max_connections\": 123\n },\n \"listener_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"listener_config\": {\n \"k8s_namespace\": \"<string>\"\n },\n \"install_command\": \"<string>\",\n \"build_command\": \"<string>\"\n },\n \"source_revision_config\": {\n \"repo_ref\": \"<string>\",\n \"langgraph_config_path\": \"<string>\",\n \"image_uri\": \"<string>\",\n \"source_tarball_path\": \"<string>\"\n },\n \"secrets\": [\n {\n \"name\": \"<string>\",\n \"value\": \"<string>\"\n }\n ],\n \"secret_references\": [\n {\n \"name\": \"<string>\",\n \"secret_name\": \"<string>\",\n \"secret_key\": \"<string>\"\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
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.example.com/v2/deployments")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"source_config\": {\n \"integration_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"repo_url\": \"<string>\",\n \"build_on_push\": true,\n \"custom_url\": \"<string>\",\n \"resource_spec\": {\n \"min_scale\": 123,\n \"max_scale\": 123,\n \"cpu\": 0.1,\n \"cpu_limit\": 0.2,\n \"memory_mb\": 123,\n \"memory_limit_mb\": 123,\n \"queue_min_scale\": 123,\n \"queue_max_scale\": 123,\n \"queue_cpu\": 0.1,\n \"queue_cpu_limit\": 0.2,\n \"queue_memory_mb\": 123,\n \"queue_memory_limit_mb\": 123,\n \"redis_cpu\": 0.1,\n \"redis_cpu_limit\": 0.2,\n \"redis_memory_mb\": 123,\n \"redis_memory_limit_mb\": 123,\n \"core_cpu\": 1.1,\n \"core_cpu_limit\": 1.1,\n \"core_memory_mb\": 123,\n \"core_memory_limit_mb\": 123,\n \"labels\": {},\n \"annotations\": {},\n \"service_account_name\": \"<string>\",\n \"image_pull_secrets\": [\n {\n \"name\": \"<string>\"\n }\n ],\n \"volumes\": [\n {\n \"name\": \"<string>\",\n \"configMap\": {},\n \"secret\": {},\n \"emptyDir\": {},\n \"persistentVolumeClaim\": {},\n \"nfs\": {},\n \"projected\": {},\n \"downwardAPI\": {},\n \"csi\": {}\n }\n ],\n \"volume_mounts\": [\n {\n \"name\": \"<string>\",\n \"mountPath\": \"<string>\",\n \"subPath\": \"<string>\",\n \"mountPropagation\": \"<string>\",\n \"readOnly\": true,\n \"subPathExpr\": \"<string>\"\n }\n ],\n \"init_containers\": [\n {\n \"name\": \"<string>\",\n \"image\": \"<string>\",\n \"imagePullPolicy\": \"<string>\",\n \"command\": [\n \"<string>\"\n ],\n \"args\": [\n \"<string>\"\n ],\n \"workingDir\": \"<string>\",\n \"env\": [\n {\n \"name\": \"<string>\",\n \"value\": \"<string>\",\n \"valueFrom\": {}\n }\n ],\n \"envFrom\": [\n {}\n ],\n \"resources\": {\n \"limits\": {},\n \"requests\": {}\n },\n \"volumeMounts\": [\n {\n \"name\": \"<string>\",\n \"mountPath\": \"<string>\",\n \"subPath\": \"<string>\",\n \"mountPropagation\": \"<string>\",\n \"readOnly\": true,\n \"subPathExpr\": \"<string>\"\n }\n ],\n \"securityContext\": {},\n \"restartPolicy\": \"<string>\"\n }\n ],\n \"sidecars\": [\n {\n \"name\": \"<string>\",\n \"image\": \"<string>\",\n \"imagePullPolicy\": \"<string>\",\n \"command\": [\n \"<string>\"\n ],\n \"args\": [\n \"<string>\"\n ],\n \"workingDir\": \"<string>\",\n \"env\": [\n {\n \"name\": \"<string>\",\n \"value\": \"<string>\",\n \"valueFrom\": {}\n }\n ],\n \"envFrom\": [\n {}\n ],\n \"resources\": {\n \"limits\": {},\n \"requests\": {}\n },\n \"volumeMounts\": [\n {\n \"name\": \"<string>\",\n \"mountPath\": \"<string>\",\n \"subPath\": \"<string>\",\n \"mountPropagation\": \"<string>\",\n \"readOnly\": true,\n \"subPathExpr\": \"<string>\"\n }\n ],\n \"securityContext\": {},\n \"restartPolicy\": \"<string>\"\n }\n ],\n \"db_cpu\": 123,\n \"db_cpu_limit\": 123,\n \"db_memory_mb\": 123,\n \"db_memory_limit_mb\": 123,\n \"db_storage_gi\": 123,\n \"db_max_connections\": 123\n },\n \"listener_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"listener_config\": {\n \"k8s_namespace\": \"<string>\"\n },\n \"install_command\": \"<string>\",\n \"build_command\": \"<string>\"\n },\n \"source_revision_config\": {\n \"repo_ref\": \"<string>\",\n \"langgraph_config_path\": \"<string>\",\n \"image_uri\": \"<string>\",\n \"source_tarball_path\": \"<string>\"\n },\n \"secrets\": [\n {\n \"name\": \"<string>\",\n \"value\": \"<string>\"\n }\n ],\n \"secret_references\": [\n {\n \"name\": \"<string>\",\n \"secret_name\": \"<string>\",\n \"secret_key\": \"<string>\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/v2/deployments")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"source_config\": {\n \"integration_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"repo_url\": \"<string>\",\n \"build_on_push\": true,\n \"custom_url\": \"<string>\",\n \"resource_spec\": {\n \"min_scale\": 123,\n \"max_scale\": 123,\n \"cpu\": 0.1,\n \"cpu_limit\": 0.2,\n \"memory_mb\": 123,\n \"memory_limit_mb\": 123,\n \"queue_min_scale\": 123,\n \"queue_max_scale\": 123,\n \"queue_cpu\": 0.1,\n \"queue_cpu_limit\": 0.2,\n \"queue_memory_mb\": 123,\n \"queue_memory_limit_mb\": 123,\n \"redis_cpu\": 0.1,\n \"redis_cpu_limit\": 0.2,\n \"redis_memory_mb\": 123,\n \"redis_memory_limit_mb\": 123,\n \"core_cpu\": 1.1,\n \"core_cpu_limit\": 1.1,\n \"core_memory_mb\": 123,\n \"core_memory_limit_mb\": 123,\n \"labels\": {},\n \"annotations\": {},\n \"service_account_name\": \"<string>\",\n \"image_pull_secrets\": [\n {\n \"name\": \"<string>\"\n }\n ],\n \"volumes\": [\n {\n \"name\": \"<string>\",\n \"configMap\": {},\n \"secret\": {},\n \"emptyDir\": {},\n \"persistentVolumeClaim\": {},\n \"nfs\": {},\n \"projected\": {},\n \"downwardAPI\": {},\n \"csi\": {}\n }\n ],\n \"volume_mounts\": [\n {\n \"name\": \"<string>\",\n \"mountPath\": \"<string>\",\n \"subPath\": \"<string>\",\n \"mountPropagation\": \"<string>\",\n \"readOnly\": true,\n \"subPathExpr\": \"<string>\"\n }\n ],\n \"init_containers\": [\n {\n \"name\": \"<string>\",\n \"image\": \"<string>\",\n \"imagePullPolicy\": \"<string>\",\n \"command\": [\n \"<string>\"\n ],\n \"args\": [\n \"<string>\"\n ],\n \"workingDir\": \"<string>\",\n \"env\": [\n {\n \"name\": \"<string>\",\n \"value\": \"<string>\",\n \"valueFrom\": {}\n }\n ],\n \"envFrom\": [\n {}\n ],\n \"resources\": {\n \"limits\": {},\n \"requests\": {}\n },\n \"volumeMounts\": [\n {\n \"name\": \"<string>\",\n \"mountPath\": \"<string>\",\n \"subPath\": \"<string>\",\n \"mountPropagation\": \"<string>\",\n \"readOnly\": true,\n \"subPathExpr\": \"<string>\"\n }\n ],\n \"securityContext\": {},\n \"restartPolicy\": \"<string>\"\n }\n ],\n \"sidecars\": [\n {\n \"name\": \"<string>\",\n \"image\": \"<string>\",\n \"imagePullPolicy\": \"<string>\",\n \"command\": [\n \"<string>\"\n ],\n \"args\": [\n \"<string>\"\n ],\n \"workingDir\": \"<string>\",\n \"env\": [\n {\n \"name\": \"<string>\",\n \"value\": \"<string>\",\n \"valueFrom\": {}\n }\n ],\n \"envFrom\": [\n {}\n ],\n \"resources\": {\n \"limits\": {},\n \"requests\": {}\n },\n \"volumeMounts\": [\n {\n \"name\": \"<string>\",\n \"mountPath\": \"<string>\",\n \"subPath\": \"<string>\",\n \"mountPropagation\": \"<string>\",\n \"readOnly\": true,\n \"subPathExpr\": \"<string>\"\n }\n ],\n \"securityContext\": {},\n \"restartPolicy\": \"<string>\"\n }\n ],\n \"db_cpu\": 123,\n \"db_cpu_limit\": 123,\n \"db_memory_mb\": 123,\n \"db_memory_limit_mb\": 123,\n \"db_storage_gi\": 123,\n \"db_max_connections\": 123\n },\n \"listener_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"listener_config\": {\n \"k8s_namespace\": \"<string>\"\n },\n \"install_command\": \"<string>\",\n \"build_command\": \"<string>\"\n },\n \"source_revision_config\": {\n \"repo_ref\": \"<string>\",\n \"langgraph_config_path\": \"<string>\",\n \"image_uri\": \"<string>\",\n \"source_tarball_path\": \"<string>\"\n },\n \"secrets\": [\n {\n \"name\": \"<string>\",\n \"value\": \"<string>\"\n }\n ],\n \"secret_references\": [\n {\n \"name\": \"<string>\",\n \"secret_name\": \"<string>\",\n \"secret_key\": \"<string>\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"name": "<string>",
"source_config": {
"integration_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"repo_url": "<string>",
"build_on_push": true,
"custom_url": "<string>",
"resource_spec": {
"min_scale": 123,
"max_scale": 123,
"cpu": 0.1,
"cpu_limit": 0.2,
"memory_mb": 123,
"memory_limit_mb": 123,
"queue_min_scale": 123,
"queue_max_scale": 123,
"queue_cpu": 0.1,
"queue_cpu_limit": 0.2,
"queue_memory_mb": 123,
"queue_memory_limit_mb": 123,
"redis_cpu": 0.1,
"redis_cpu_limit": 0.2,
"redis_memory_mb": 123,
"redis_memory_limit_mb": 123,
"core_cpu": 1.1,
"core_cpu_limit": 1.1,
"core_memory_mb": 123,
"core_memory_limit_mb": 123,
"labels": {},
"annotations": {},
"service_account_name": "<string>",
"image_pull_secrets": [
{
"name": "<string>"
}
],
"volumes": [
{
"name": "<string>",
"configMap": {},
"secret": {},
"emptyDir": {},
"persistentVolumeClaim": {},
"nfs": {},
"projected": {},
"downwardAPI": {},
"csi": {}
}
],
"volume_mounts": [
{
"name": "<string>",
"mountPath": "<string>",
"subPath": "<string>",
"mountPropagation": "<string>",
"readOnly": true,
"subPathExpr": "<string>"
}
],
"init_containers": [
{
"name": "<string>",
"image": "<string>",
"imagePullPolicy": "<string>",
"command": [
"<string>"
],
"args": [
"<string>"
],
"workingDir": "<string>",
"env": [
{
"name": "<string>",
"value": "<string>",
"valueFrom": {}
}
],
"envFrom": [
{}
],
"resources": {
"limits": {},
"requests": {}
},
"volumeMounts": [
{
"name": "<string>",
"mountPath": "<string>",
"subPath": "<string>",
"mountPropagation": "<string>",
"readOnly": true,
"subPathExpr": "<string>"
}
],
"securityContext": {},
"restartPolicy": "<string>"
}
],
"sidecars": [
{
"name": "<string>",
"image": "<string>",
"imagePullPolicy": "<string>",
"command": [
"<string>"
],
"args": [
"<string>"
],
"workingDir": "<string>",
"env": [
{
"name": "<string>",
"value": "<string>",
"valueFrom": {}
}
],
"envFrom": [
{}
],
"resources": {
"limits": {},
"requests": {}
},
"volumeMounts": [
{
"name": "<string>",
"mountPath": "<string>",
"subPath": "<string>",
"mountPropagation": "<string>",
"readOnly": true,
"subPathExpr": "<string>"
}
],
"securityContext": {},
"restartPolicy": "<string>"
}
],
"db_cpu": 123,
"db_cpu_limit": 123,
"db_memory_mb": 123,
"db_memory_limit_mb": 123,
"db_storage_gi": 123,
"db_max_connections": 123
},
"listener_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"listener_config": {
"k8s_namespace": "<string>"
},
"install_command": "<string>",
"build_command": "<string>"
},
"source_revision_config": {
"repo_ref": "<string>",
"langgraph_config_path": "<string>",
"image_uri": "<string>",
"source_tarball_path": "<string>",
"repo_commit_sha": "<string>"
},
"secrets": [
{
"name": "<string>",
"value": "<string>"
}
],
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"tenant_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"latest_revision_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"active_revision_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"secret_references": [
{
"name": "<string>",
"secret_name": "<string>",
"secret_key": "<string>"
}
],
"image_version": "<string>",
"is_managed_deep_agent": false
}{
"detail": "Error description."
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Create Deployment
Create a new deployment.
curl --request POST \
--url https://api.example.com/v2/deployments \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"source_config": {
"integration_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"repo_url": "<string>",
"build_on_push": true,
"custom_url": "<string>",
"resource_spec": {
"min_scale": 123,
"max_scale": 123,
"cpu": 0.1,
"cpu_limit": 0.2,
"memory_mb": 123,
"memory_limit_mb": 123,
"queue_min_scale": 123,
"queue_max_scale": 123,
"queue_cpu": 0.1,
"queue_cpu_limit": 0.2,
"queue_memory_mb": 123,
"queue_memory_limit_mb": 123,
"redis_cpu": 0.1,
"redis_cpu_limit": 0.2,
"redis_memory_mb": 123,
"redis_memory_limit_mb": 123,
"core_cpu": 1.1,
"core_cpu_limit": 1.1,
"core_memory_mb": 123,
"core_memory_limit_mb": 123,
"labels": {},
"annotations": {},
"service_account_name": "<string>",
"image_pull_secrets": [
{
"name": "<string>"
}
],
"volumes": [
{
"name": "<string>",
"configMap": {},
"secret": {},
"emptyDir": {},
"persistentVolumeClaim": {},
"nfs": {},
"projected": {},
"downwardAPI": {},
"csi": {}
}
],
"volume_mounts": [
{
"name": "<string>",
"mountPath": "<string>",
"subPath": "<string>",
"mountPropagation": "<string>",
"readOnly": true,
"subPathExpr": "<string>"
}
],
"init_containers": [
{
"name": "<string>",
"image": "<string>",
"imagePullPolicy": "<string>",
"command": [
"<string>"
],
"args": [
"<string>"
],
"workingDir": "<string>",
"env": [
{
"name": "<string>",
"value": "<string>",
"valueFrom": {}
}
],
"envFrom": [
{}
],
"resources": {
"limits": {},
"requests": {}
},
"volumeMounts": [
{
"name": "<string>",
"mountPath": "<string>",
"subPath": "<string>",
"mountPropagation": "<string>",
"readOnly": true,
"subPathExpr": "<string>"
}
],
"securityContext": {},
"restartPolicy": "<string>"
}
],
"sidecars": [
{
"name": "<string>",
"image": "<string>",
"imagePullPolicy": "<string>",
"command": [
"<string>"
],
"args": [
"<string>"
],
"workingDir": "<string>",
"env": [
{
"name": "<string>",
"value": "<string>",
"valueFrom": {}
}
],
"envFrom": [
{}
],
"resources": {
"limits": {},
"requests": {}
},
"volumeMounts": [
{
"name": "<string>",
"mountPath": "<string>",
"subPath": "<string>",
"mountPropagation": "<string>",
"readOnly": true,
"subPathExpr": "<string>"
}
],
"securityContext": {},
"restartPolicy": "<string>"
}
],
"db_cpu": 123,
"db_cpu_limit": 123,
"db_memory_mb": 123,
"db_memory_limit_mb": 123,
"db_storage_gi": 123,
"db_max_connections": 123
},
"listener_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"listener_config": {
"k8s_namespace": "<string>"
},
"install_command": "<string>",
"build_command": "<string>"
},
"source_revision_config": {
"repo_ref": "<string>",
"langgraph_config_path": "<string>",
"image_uri": "<string>",
"source_tarball_path": "<string>"
},
"secrets": [
{
"name": "<string>",
"value": "<string>"
}
],
"secret_references": [
{
"name": "<string>",
"secret_name": "<string>",
"secret_key": "<string>"
}
]
}
'import requests
url = "https://api.example.com/v2/deployments"
payload = {
"name": "<string>",
"source_config": {
"integration_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"repo_url": "<string>",
"build_on_push": True,
"custom_url": "<string>",
"resource_spec": {
"min_scale": 123,
"max_scale": 123,
"cpu": 0.1,
"cpu_limit": 0.2,
"memory_mb": 123,
"memory_limit_mb": 123,
"queue_min_scale": 123,
"queue_max_scale": 123,
"queue_cpu": 0.1,
"queue_cpu_limit": 0.2,
"queue_memory_mb": 123,
"queue_memory_limit_mb": 123,
"redis_cpu": 0.1,
"redis_cpu_limit": 0.2,
"redis_memory_mb": 123,
"redis_memory_limit_mb": 123,
"core_cpu": 1.1,
"core_cpu_limit": 1.1,
"core_memory_mb": 123,
"core_memory_limit_mb": 123,
"labels": {},
"annotations": {},
"service_account_name": "<string>",
"image_pull_secrets": [{ "name": "<string>" }],
"volumes": [
{
"name": "<string>",
"configMap": {},
"secret": {},
"emptyDir": {},
"persistentVolumeClaim": {},
"nfs": {},
"projected": {},
"downwardAPI": {},
"csi": {}
}
],
"volume_mounts": [
{
"name": "<string>",
"mountPath": "<string>",
"subPath": "<string>",
"mountPropagation": "<string>",
"readOnly": True,
"subPathExpr": "<string>"
}
],
"init_containers": [
{
"name": "<string>",
"image": "<string>",
"imagePullPolicy": "<string>",
"command": ["<string>"],
"args": ["<string>"],
"workingDir": "<string>",
"env": [
{
"name": "<string>",
"value": "<string>",
"valueFrom": {}
}
],
"envFrom": [{}],
"resources": {
"limits": {},
"requests": {}
},
"volumeMounts": [
{
"name": "<string>",
"mountPath": "<string>",
"subPath": "<string>",
"mountPropagation": "<string>",
"readOnly": True,
"subPathExpr": "<string>"
}
],
"securityContext": {},
"restartPolicy": "<string>"
}
],
"sidecars": [
{
"name": "<string>",
"image": "<string>",
"imagePullPolicy": "<string>",
"command": ["<string>"],
"args": ["<string>"],
"workingDir": "<string>",
"env": [
{
"name": "<string>",
"value": "<string>",
"valueFrom": {}
}
],
"envFrom": [{}],
"resources": {
"limits": {},
"requests": {}
},
"volumeMounts": [
{
"name": "<string>",
"mountPath": "<string>",
"subPath": "<string>",
"mountPropagation": "<string>",
"readOnly": True,
"subPathExpr": "<string>"
}
],
"securityContext": {},
"restartPolicy": "<string>"
}
],
"db_cpu": 123,
"db_cpu_limit": 123,
"db_memory_mb": 123,
"db_memory_limit_mb": 123,
"db_storage_gi": 123,
"db_max_connections": 123
},
"listener_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"listener_config": { "k8s_namespace": "<string>" },
"install_command": "<string>",
"build_command": "<string>"
},
"source_revision_config": {
"repo_ref": "<string>",
"langgraph_config_path": "<string>",
"image_uri": "<string>",
"source_tarball_path": "<string>"
},
"secrets": [
{
"name": "<string>",
"value": "<string>"
}
],
"secret_references": [
{
"name": "<string>",
"secret_name": "<string>",
"secret_key": "<string>"
}
]
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
source_config: {
integration_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
repo_url: '<string>',
build_on_push: true,
custom_url: '<string>',
resource_spec: {
min_scale: 123,
max_scale: 123,
cpu: 0.1,
cpu_limit: 0.2,
memory_mb: 123,
memory_limit_mb: 123,
queue_min_scale: 123,
queue_max_scale: 123,
queue_cpu: 0.1,
queue_cpu_limit: 0.2,
queue_memory_mb: 123,
queue_memory_limit_mb: 123,
redis_cpu: 0.1,
redis_cpu_limit: 0.2,
redis_memory_mb: 123,
redis_memory_limit_mb: 123,
core_cpu: 1.1,
core_cpu_limit: 1.1,
core_memory_mb: 123,
core_memory_limit_mb: 123,
labels: {},
annotations: {},
service_account_name: '<string>',
image_pull_secrets: [{name: '<string>'}],
volumes: [
{
name: '<string>',
configMap: {},
secret: {},
emptyDir: {},
persistentVolumeClaim: {},
nfs: {},
projected: {},
downwardAPI: {},
csi: {}
}
],
volume_mounts: [
{
name: '<string>',
mountPath: '<string>',
subPath: '<string>',
mountPropagation: '<string>',
readOnly: true,
subPathExpr: '<string>'
}
],
init_containers: [
{
name: '<string>',
image: '<string>',
imagePullPolicy: '<string>',
command: ['<string>'],
args: ['<string>'],
workingDir: '<string>',
env: [{name: '<string>', value: '<string>', valueFrom: {}}],
envFrom: [{}],
resources: {limits: {}, requests: {}},
volumeMounts: [
{
name: '<string>',
mountPath: '<string>',
subPath: '<string>',
mountPropagation: '<string>',
readOnly: true,
subPathExpr: '<string>'
}
],
securityContext: {},
restartPolicy: '<string>'
}
],
sidecars: [
{
name: '<string>',
image: '<string>',
imagePullPolicy: '<string>',
command: ['<string>'],
args: ['<string>'],
workingDir: '<string>',
env: [{name: '<string>', value: '<string>', valueFrom: {}}],
envFrom: [{}],
resources: {limits: {}, requests: {}},
volumeMounts: [
{
name: '<string>',
mountPath: '<string>',
subPath: '<string>',
mountPropagation: '<string>',
readOnly: true,
subPathExpr: '<string>'
}
],
securityContext: {},
restartPolicy: '<string>'
}
],
db_cpu: 123,
db_cpu_limit: 123,
db_memory_mb: 123,
db_memory_limit_mb: 123,
db_storage_gi: 123,
db_max_connections: 123
},
listener_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
listener_config: {k8s_namespace: '<string>'},
install_command: '<string>',
build_command: '<string>'
},
source_revision_config: {
repo_ref: '<string>',
langgraph_config_path: '<string>',
image_uri: '<string>',
source_tarball_path: '<string>'
},
secrets: [{name: '<string>', value: '<string>'}],
secret_references: [{name: '<string>', secret_name: '<string>', secret_key: '<string>'}]
})
};
fetch('https://api.example.com/v2/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 => "https://api.example.com/v2/deployments",
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([
'name' => '<string>',
'source_config' => [
'integration_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'repo_url' => '<string>',
'build_on_push' => true,
'custom_url' => '<string>',
'resource_spec' => [
'min_scale' => 123,
'max_scale' => 123,
'cpu' => 0.1,
'cpu_limit' => 0.2,
'memory_mb' => 123,
'memory_limit_mb' => 123,
'queue_min_scale' => 123,
'queue_max_scale' => 123,
'queue_cpu' => 0.1,
'queue_cpu_limit' => 0.2,
'queue_memory_mb' => 123,
'queue_memory_limit_mb' => 123,
'redis_cpu' => 0.1,
'redis_cpu_limit' => 0.2,
'redis_memory_mb' => 123,
'redis_memory_limit_mb' => 123,
'core_cpu' => 1.1,
'core_cpu_limit' => 1.1,
'core_memory_mb' => 123,
'core_memory_limit_mb' => 123,
'labels' => [
],
'annotations' => [
],
'service_account_name' => '<string>',
'image_pull_secrets' => [
[
'name' => '<string>'
]
],
'volumes' => [
[
'name' => '<string>',
'configMap' => [
],
'secret' => [
],
'emptyDir' => [
],
'persistentVolumeClaim' => [
],
'nfs' => [
],
'projected' => [
],
'downwardAPI' => [
],
'csi' => [
]
]
],
'volume_mounts' => [
[
'name' => '<string>',
'mountPath' => '<string>',
'subPath' => '<string>',
'mountPropagation' => '<string>',
'readOnly' => true,
'subPathExpr' => '<string>'
]
],
'init_containers' => [
[
'name' => '<string>',
'image' => '<string>',
'imagePullPolicy' => '<string>',
'command' => [
'<string>'
],
'args' => [
'<string>'
],
'workingDir' => '<string>',
'env' => [
[
'name' => '<string>',
'value' => '<string>',
'valueFrom' => [
]
]
],
'envFrom' => [
[
]
],
'resources' => [
'limits' => [
],
'requests' => [
]
],
'volumeMounts' => [
[
'name' => '<string>',
'mountPath' => '<string>',
'subPath' => '<string>',
'mountPropagation' => '<string>',
'readOnly' => true,
'subPathExpr' => '<string>'
]
],
'securityContext' => [
],
'restartPolicy' => '<string>'
]
],
'sidecars' => [
[
'name' => '<string>',
'image' => '<string>',
'imagePullPolicy' => '<string>',
'command' => [
'<string>'
],
'args' => [
'<string>'
],
'workingDir' => '<string>',
'env' => [
[
'name' => '<string>',
'value' => '<string>',
'valueFrom' => [
]
]
],
'envFrom' => [
[
]
],
'resources' => [
'limits' => [
],
'requests' => [
]
],
'volumeMounts' => [
[
'name' => '<string>',
'mountPath' => '<string>',
'subPath' => '<string>',
'mountPropagation' => '<string>',
'readOnly' => true,
'subPathExpr' => '<string>'
]
],
'securityContext' => [
],
'restartPolicy' => '<string>'
]
],
'db_cpu' => 123,
'db_cpu_limit' => 123,
'db_memory_mb' => 123,
'db_memory_limit_mb' => 123,
'db_storage_gi' => 123,
'db_max_connections' => 123
],
'listener_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'listener_config' => [
'k8s_namespace' => '<string>'
],
'install_command' => '<string>',
'build_command' => '<string>'
],
'source_revision_config' => [
'repo_ref' => '<string>',
'langgraph_config_path' => '<string>',
'image_uri' => '<string>',
'source_tarball_path' => '<string>'
],
'secrets' => [
[
'name' => '<string>',
'value' => '<string>'
]
],
'secret_references' => [
[
'name' => '<string>',
'secret_name' => '<string>',
'secret_key' => '<string>'
]
]
]),
CURLOPT_HTTPHEADER => [
"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.example.com/v2/deployments"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"source_config\": {\n \"integration_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"repo_url\": \"<string>\",\n \"build_on_push\": true,\n \"custom_url\": \"<string>\",\n \"resource_spec\": {\n \"min_scale\": 123,\n \"max_scale\": 123,\n \"cpu\": 0.1,\n \"cpu_limit\": 0.2,\n \"memory_mb\": 123,\n \"memory_limit_mb\": 123,\n \"queue_min_scale\": 123,\n \"queue_max_scale\": 123,\n \"queue_cpu\": 0.1,\n \"queue_cpu_limit\": 0.2,\n \"queue_memory_mb\": 123,\n \"queue_memory_limit_mb\": 123,\n \"redis_cpu\": 0.1,\n \"redis_cpu_limit\": 0.2,\n \"redis_memory_mb\": 123,\n \"redis_memory_limit_mb\": 123,\n \"core_cpu\": 1.1,\n \"core_cpu_limit\": 1.1,\n \"core_memory_mb\": 123,\n \"core_memory_limit_mb\": 123,\n \"labels\": {},\n \"annotations\": {},\n \"service_account_name\": \"<string>\",\n \"image_pull_secrets\": [\n {\n \"name\": \"<string>\"\n }\n ],\n \"volumes\": [\n {\n \"name\": \"<string>\",\n \"configMap\": {},\n \"secret\": {},\n \"emptyDir\": {},\n \"persistentVolumeClaim\": {},\n \"nfs\": {},\n \"projected\": {},\n \"downwardAPI\": {},\n \"csi\": {}\n }\n ],\n \"volume_mounts\": [\n {\n \"name\": \"<string>\",\n \"mountPath\": \"<string>\",\n \"subPath\": \"<string>\",\n \"mountPropagation\": \"<string>\",\n \"readOnly\": true,\n \"subPathExpr\": \"<string>\"\n }\n ],\n \"init_containers\": [\n {\n \"name\": \"<string>\",\n \"image\": \"<string>\",\n \"imagePullPolicy\": \"<string>\",\n \"command\": [\n \"<string>\"\n ],\n \"args\": [\n \"<string>\"\n ],\n \"workingDir\": \"<string>\",\n \"env\": [\n {\n \"name\": \"<string>\",\n \"value\": \"<string>\",\n \"valueFrom\": {}\n }\n ],\n \"envFrom\": [\n {}\n ],\n \"resources\": {\n \"limits\": {},\n \"requests\": {}\n },\n \"volumeMounts\": [\n {\n \"name\": \"<string>\",\n \"mountPath\": \"<string>\",\n \"subPath\": \"<string>\",\n \"mountPropagation\": \"<string>\",\n \"readOnly\": true,\n \"subPathExpr\": \"<string>\"\n }\n ],\n \"securityContext\": {},\n \"restartPolicy\": \"<string>\"\n }\n ],\n \"sidecars\": [\n {\n \"name\": \"<string>\",\n \"image\": \"<string>\",\n \"imagePullPolicy\": \"<string>\",\n \"command\": [\n \"<string>\"\n ],\n \"args\": [\n \"<string>\"\n ],\n \"workingDir\": \"<string>\",\n \"env\": [\n {\n \"name\": \"<string>\",\n \"value\": \"<string>\",\n \"valueFrom\": {}\n }\n ],\n \"envFrom\": [\n {}\n ],\n \"resources\": {\n \"limits\": {},\n \"requests\": {}\n },\n \"volumeMounts\": [\n {\n \"name\": \"<string>\",\n \"mountPath\": \"<string>\",\n \"subPath\": \"<string>\",\n \"mountPropagation\": \"<string>\",\n \"readOnly\": true,\n \"subPathExpr\": \"<string>\"\n }\n ],\n \"securityContext\": {},\n \"restartPolicy\": \"<string>\"\n }\n ],\n \"db_cpu\": 123,\n \"db_cpu_limit\": 123,\n \"db_memory_mb\": 123,\n \"db_memory_limit_mb\": 123,\n \"db_storage_gi\": 123,\n \"db_max_connections\": 123\n },\n \"listener_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"listener_config\": {\n \"k8s_namespace\": \"<string>\"\n },\n \"install_command\": \"<string>\",\n \"build_command\": \"<string>\"\n },\n \"source_revision_config\": {\n \"repo_ref\": \"<string>\",\n \"langgraph_config_path\": \"<string>\",\n \"image_uri\": \"<string>\",\n \"source_tarball_path\": \"<string>\"\n },\n \"secrets\": [\n {\n \"name\": \"<string>\",\n \"value\": \"<string>\"\n }\n ],\n \"secret_references\": [\n {\n \"name\": \"<string>\",\n \"secret_name\": \"<string>\",\n \"secret_key\": \"<string>\"\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
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.example.com/v2/deployments")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"source_config\": {\n \"integration_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"repo_url\": \"<string>\",\n \"build_on_push\": true,\n \"custom_url\": \"<string>\",\n \"resource_spec\": {\n \"min_scale\": 123,\n \"max_scale\": 123,\n \"cpu\": 0.1,\n \"cpu_limit\": 0.2,\n \"memory_mb\": 123,\n \"memory_limit_mb\": 123,\n \"queue_min_scale\": 123,\n \"queue_max_scale\": 123,\n \"queue_cpu\": 0.1,\n \"queue_cpu_limit\": 0.2,\n \"queue_memory_mb\": 123,\n \"queue_memory_limit_mb\": 123,\n \"redis_cpu\": 0.1,\n \"redis_cpu_limit\": 0.2,\n \"redis_memory_mb\": 123,\n \"redis_memory_limit_mb\": 123,\n \"core_cpu\": 1.1,\n \"core_cpu_limit\": 1.1,\n \"core_memory_mb\": 123,\n \"core_memory_limit_mb\": 123,\n \"labels\": {},\n \"annotations\": {},\n \"service_account_name\": \"<string>\",\n \"image_pull_secrets\": [\n {\n \"name\": \"<string>\"\n }\n ],\n \"volumes\": [\n {\n \"name\": \"<string>\",\n \"configMap\": {},\n \"secret\": {},\n \"emptyDir\": {},\n \"persistentVolumeClaim\": {},\n \"nfs\": {},\n \"projected\": {},\n \"downwardAPI\": {},\n \"csi\": {}\n }\n ],\n \"volume_mounts\": [\n {\n \"name\": \"<string>\",\n \"mountPath\": \"<string>\",\n \"subPath\": \"<string>\",\n \"mountPropagation\": \"<string>\",\n \"readOnly\": true,\n \"subPathExpr\": \"<string>\"\n }\n ],\n \"init_containers\": [\n {\n \"name\": \"<string>\",\n \"image\": \"<string>\",\n \"imagePullPolicy\": \"<string>\",\n \"command\": [\n \"<string>\"\n ],\n \"args\": [\n \"<string>\"\n ],\n \"workingDir\": \"<string>\",\n \"env\": [\n {\n \"name\": \"<string>\",\n \"value\": \"<string>\",\n \"valueFrom\": {}\n }\n ],\n \"envFrom\": [\n {}\n ],\n \"resources\": {\n \"limits\": {},\n \"requests\": {}\n },\n \"volumeMounts\": [\n {\n \"name\": \"<string>\",\n \"mountPath\": \"<string>\",\n \"subPath\": \"<string>\",\n \"mountPropagation\": \"<string>\",\n \"readOnly\": true,\n \"subPathExpr\": \"<string>\"\n }\n ],\n \"securityContext\": {},\n \"restartPolicy\": \"<string>\"\n }\n ],\n \"sidecars\": [\n {\n \"name\": \"<string>\",\n \"image\": \"<string>\",\n \"imagePullPolicy\": \"<string>\",\n \"command\": [\n \"<string>\"\n ],\n \"args\": [\n \"<string>\"\n ],\n \"workingDir\": \"<string>\",\n \"env\": [\n {\n \"name\": \"<string>\",\n \"value\": \"<string>\",\n \"valueFrom\": {}\n }\n ],\n \"envFrom\": [\n {}\n ],\n \"resources\": {\n \"limits\": {},\n \"requests\": {}\n },\n \"volumeMounts\": [\n {\n \"name\": \"<string>\",\n \"mountPath\": \"<string>\",\n \"subPath\": \"<string>\",\n \"mountPropagation\": \"<string>\",\n \"readOnly\": true,\n \"subPathExpr\": \"<string>\"\n }\n ],\n \"securityContext\": {},\n \"restartPolicy\": \"<string>\"\n }\n ],\n \"db_cpu\": 123,\n \"db_cpu_limit\": 123,\n \"db_memory_mb\": 123,\n \"db_memory_limit_mb\": 123,\n \"db_storage_gi\": 123,\n \"db_max_connections\": 123\n },\n \"listener_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"listener_config\": {\n \"k8s_namespace\": \"<string>\"\n },\n \"install_command\": \"<string>\",\n \"build_command\": \"<string>\"\n },\n \"source_revision_config\": {\n \"repo_ref\": \"<string>\",\n \"langgraph_config_path\": \"<string>\",\n \"image_uri\": \"<string>\",\n \"source_tarball_path\": \"<string>\"\n },\n \"secrets\": [\n {\n \"name\": \"<string>\",\n \"value\": \"<string>\"\n }\n ],\n \"secret_references\": [\n {\n \"name\": \"<string>\",\n \"secret_name\": \"<string>\",\n \"secret_key\": \"<string>\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/v2/deployments")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"source_config\": {\n \"integration_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"repo_url\": \"<string>\",\n \"build_on_push\": true,\n \"custom_url\": \"<string>\",\n \"resource_spec\": {\n \"min_scale\": 123,\n \"max_scale\": 123,\n \"cpu\": 0.1,\n \"cpu_limit\": 0.2,\n \"memory_mb\": 123,\n \"memory_limit_mb\": 123,\n \"queue_min_scale\": 123,\n \"queue_max_scale\": 123,\n \"queue_cpu\": 0.1,\n \"queue_cpu_limit\": 0.2,\n \"queue_memory_mb\": 123,\n \"queue_memory_limit_mb\": 123,\n \"redis_cpu\": 0.1,\n \"redis_cpu_limit\": 0.2,\n \"redis_memory_mb\": 123,\n \"redis_memory_limit_mb\": 123,\n \"core_cpu\": 1.1,\n \"core_cpu_limit\": 1.1,\n \"core_memory_mb\": 123,\n \"core_memory_limit_mb\": 123,\n \"labels\": {},\n \"annotations\": {},\n \"service_account_name\": \"<string>\",\n \"image_pull_secrets\": [\n {\n \"name\": \"<string>\"\n }\n ],\n \"volumes\": [\n {\n \"name\": \"<string>\",\n \"configMap\": {},\n \"secret\": {},\n \"emptyDir\": {},\n \"persistentVolumeClaim\": {},\n \"nfs\": {},\n \"projected\": {},\n \"downwardAPI\": {},\n \"csi\": {}\n }\n ],\n \"volume_mounts\": [\n {\n \"name\": \"<string>\",\n \"mountPath\": \"<string>\",\n \"subPath\": \"<string>\",\n \"mountPropagation\": \"<string>\",\n \"readOnly\": true,\n \"subPathExpr\": \"<string>\"\n }\n ],\n \"init_containers\": [\n {\n \"name\": \"<string>\",\n \"image\": \"<string>\",\n \"imagePullPolicy\": \"<string>\",\n \"command\": [\n \"<string>\"\n ],\n \"args\": [\n \"<string>\"\n ],\n \"workingDir\": \"<string>\",\n \"env\": [\n {\n \"name\": \"<string>\",\n \"value\": \"<string>\",\n \"valueFrom\": {}\n }\n ],\n \"envFrom\": [\n {}\n ],\n \"resources\": {\n \"limits\": {},\n \"requests\": {}\n },\n \"volumeMounts\": [\n {\n \"name\": \"<string>\",\n \"mountPath\": \"<string>\",\n \"subPath\": \"<string>\",\n \"mountPropagation\": \"<string>\",\n \"readOnly\": true,\n \"subPathExpr\": \"<string>\"\n }\n ],\n \"securityContext\": {},\n \"restartPolicy\": \"<string>\"\n }\n ],\n \"sidecars\": [\n {\n \"name\": \"<string>\",\n \"image\": \"<string>\",\n \"imagePullPolicy\": \"<string>\",\n \"command\": [\n \"<string>\"\n ],\n \"args\": [\n \"<string>\"\n ],\n \"workingDir\": \"<string>\",\n \"env\": [\n {\n \"name\": \"<string>\",\n \"value\": \"<string>\",\n \"valueFrom\": {}\n }\n ],\n \"envFrom\": [\n {}\n ],\n \"resources\": {\n \"limits\": {},\n \"requests\": {}\n },\n \"volumeMounts\": [\n {\n \"name\": \"<string>\",\n \"mountPath\": \"<string>\",\n \"subPath\": \"<string>\",\n \"mountPropagation\": \"<string>\",\n \"readOnly\": true,\n \"subPathExpr\": \"<string>\"\n }\n ],\n \"securityContext\": {},\n \"restartPolicy\": \"<string>\"\n }\n ],\n \"db_cpu\": 123,\n \"db_cpu_limit\": 123,\n \"db_memory_mb\": 123,\n \"db_memory_limit_mb\": 123,\n \"db_storage_gi\": 123,\n \"db_max_connections\": 123\n },\n \"listener_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"listener_config\": {\n \"k8s_namespace\": \"<string>\"\n },\n \"install_command\": \"<string>\",\n \"build_command\": \"<string>\"\n },\n \"source_revision_config\": {\n \"repo_ref\": \"<string>\",\n \"langgraph_config_path\": \"<string>\",\n \"image_uri\": \"<string>\",\n \"source_tarball_path\": \"<string>\"\n },\n \"secrets\": [\n {\n \"name\": \"<string>\",\n \"value\": \"<string>\"\n }\n ],\n \"secret_references\": [\n {\n \"name\": \"<string>\",\n \"secret_name\": \"<string>\",\n \"secret_key\": \"<string>\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"name": "<string>",
"source_config": {
"integration_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"repo_url": "<string>",
"build_on_push": true,
"custom_url": "<string>",
"resource_spec": {
"min_scale": 123,
"max_scale": 123,
"cpu": 0.1,
"cpu_limit": 0.2,
"memory_mb": 123,
"memory_limit_mb": 123,
"queue_min_scale": 123,
"queue_max_scale": 123,
"queue_cpu": 0.1,
"queue_cpu_limit": 0.2,
"queue_memory_mb": 123,
"queue_memory_limit_mb": 123,
"redis_cpu": 0.1,
"redis_cpu_limit": 0.2,
"redis_memory_mb": 123,
"redis_memory_limit_mb": 123,
"core_cpu": 1.1,
"core_cpu_limit": 1.1,
"core_memory_mb": 123,
"core_memory_limit_mb": 123,
"labels": {},
"annotations": {},
"service_account_name": "<string>",
"image_pull_secrets": [
{
"name": "<string>"
}
],
"volumes": [
{
"name": "<string>",
"configMap": {},
"secret": {},
"emptyDir": {},
"persistentVolumeClaim": {},
"nfs": {},
"projected": {},
"downwardAPI": {},
"csi": {}
}
],
"volume_mounts": [
{
"name": "<string>",
"mountPath": "<string>",
"subPath": "<string>",
"mountPropagation": "<string>",
"readOnly": true,
"subPathExpr": "<string>"
}
],
"init_containers": [
{
"name": "<string>",
"image": "<string>",
"imagePullPolicy": "<string>",
"command": [
"<string>"
],
"args": [
"<string>"
],
"workingDir": "<string>",
"env": [
{
"name": "<string>",
"value": "<string>",
"valueFrom": {}
}
],
"envFrom": [
{}
],
"resources": {
"limits": {},
"requests": {}
},
"volumeMounts": [
{
"name": "<string>",
"mountPath": "<string>",
"subPath": "<string>",
"mountPropagation": "<string>",
"readOnly": true,
"subPathExpr": "<string>"
}
],
"securityContext": {},
"restartPolicy": "<string>"
}
],
"sidecars": [
{
"name": "<string>",
"image": "<string>",
"imagePullPolicy": "<string>",
"command": [
"<string>"
],
"args": [
"<string>"
],
"workingDir": "<string>",
"env": [
{
"name": "<string>",
"value": "<string>",
"valueFrom": {}
}
],
"envFrom": [
{}
],
"resources": {
"limits": {},
"requests": {}
},
"volumeMounts": [
{
"name": "<string>",
"mountPath": "<string>",
"subPath": "<string>",
"mountPropagation": "<string>",
"readOnly": true,
"subPathExpr": "<string>"
}
],
"securityContext": {},
"restartPolicy": "<string>"
}
],
"db_cpu": 123,
"db_cpu_limit": 123,
"db_memory_mb": 123,
"db_memory_limit_mb": 123,
"db_storage_gi": 123,
"db_max_connections": 123
},
"listener_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"listener_config": {
"k8s_namespace": "<string>"
},
"install_command": "<string>",
"build_command": "<string>"
},
"source_revision_config": {
"repo_ref": "<string>",
"langgraph_config_path": "<string>",
"image_uri": "<string>",
"source_tarball_path": "<string>",
"repo_commit_sha": "<string>"
},
"secrets": [
{
"name": "<string>",
"value": "<string>"
}
],
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"tenant_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"latest_revision_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"active_revision_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"secret_references": [
{
"name": "<string>",
"secret_name": "<string>",
"secret_key": "<string>"
}
],
"image_version": "<string>",
"is_managed_deep_agent": false
}{
"detail": "Error description."
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Body
Request body for creating a deployment.
Name of the deployment.
A LangSmith tracing project with the same name will also automatically be created. This cannot be changed once the deployment is created.
Deploy from a GitHub repository (github), an external Docker image (external_docker), a CLI-pushed image (internal_docker), uploaded source (internal_source), or a prebuilt LangChain template (internal_template).
Deploying from GitHub, internal Docker, internal source, or a template is only available for Cloud SaaS deployments. Deploying from an external Docker image is only available for self-hosted deployments. This cannot be changed once the deployment is created.
github, external_docker, internal_docker, internal_source, internal_template Fields for a deployment that are specific to the source, but do not require a new revision when modified or cannot be modified.
All fields are nullable, but are validated based on the source.
Show child attributes
Show child attributes
Fields for a deployment that are specific to the source and require a new revision when modified.
All fields are nullable, but are validated based on the source.
Show child attributes
Show child attributes
Show child attributes
Show child attributes
List of Kubernetes Secret references.
Only applicable for external_docker source.
Show child attributes
Show child attributes
Response
Successful Response
Deployment resource.
Name of the deployment.
A LangSmith tracing project with the same name will also automatically be created. This cannot be changed once the deployment is created.
Deploy from a GitHub repository (github), an external Docker image (external_docker), a CLI-pushed image (internal_docker), uploaded source (internal_source), or a prebuilt LangChain template (internal_template).
Deploying from GitHub, internal Docker, internal source, or a template is only available for Cloud SaaS deployments. Deploying from an external Docker image is only available for self-hosted deployments. This cannot be changed once the deployment is created.
github, external_docker, internal_docker, internal_source, internal_template Source configuration.
Show child attributes
Show child attributes
Source revision configuration.
For a Deployment resource, the field values refer to the latest revision of the Deployment. For a Revision resource, the field values refer to the Revision itself.
Show child attributes
Show child attributes
Show child attributes
Show child attributes
The ID of the deployment.
This is a read-only field.
The ID of the tenant that owns the deployment.
This is a read-only field.
The creation time of the deployment.
This is a read-only field.
The last update time of the deployment.
This is a read-only field.
The status of the deployment.
This is a read-only field.
AWAITING_DATABASE, READY, UNUSED, AWAITING_DELETE, UNKNOWN The ID of the latest revision of the deployment.
This is a read-only field.
The ID of the current (actively deployed) revision of the deployment.
This is a read-only field.
List of Kubernetes Secret references.
Only applicable for external_docker source.
Show child attributes
Show child attributes
Image version of the deployment.
Whether this deployment is a Managed Deep Agent deployment.
This is a read-only field.
Was this page helpful?

