Patch Endpoint Settings
curl --request PATCH \
--url https://external.aieev.cloud:5007/external/api/v1/endpoints/{endpoint_id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"container_start_command": "python app.py",
"container_env_vars": [
{
"key": "ENV",
"value": "prod"
}
],
"container_port": 8080,
"container_health_check_path": "/healthz",
"container_health_check_timeout": 30,
"health_check_timeout": 300,
"container_metric_path": "/metrics"
}
'import requests
url = "https://external.aieev.cloud:5007/external/api/v1/endpoints/{endpoint_id}"
payload = {
"container_start_command": "python app.py",
"container_env_vars": [
{
"key": "ENV",
"value": "prod"
}
],
"container_port": 8080,
"container_health_check_path": "/healthz",
"container_health_check_timeout": 30,
"health_check_timeout": 300,
"container_metric_path": "/metrics"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
container_start_command: 'python app.py',
container_env_vars: [{key: 'ENV', value: 'prod'}],
container_port: 8080,
container_health_check_path: '/healthz',
container_health_check_timeout: 30,
health_check_timeout: 300,
container_metric_path: '/metrics'
})
};
fetch('https://external.aieev.cloud:5007/external/api/v1/endpoints/{endpoint_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_PORT => "5007",
CURLOPT_URL => "https://external.aieev.cloud:5007/external/api/v1/endpoints/{endpoint_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'container_start_command' => 'python app.py',
'container_env_vars' => [
[
'key' => 'ENV',
'value' => 'prod'
]
],
'container_port' => 8080,
'container_health_check_path' => '/healthz',
'container_health_check_timeout' => 30,
'health_check_timeout' => 300,
'container_metric_path' => '/metrics'
]),
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://external.aieev.cloud:5007/external/api/v1/endpoints/{endpoint_id}"
payload := strings.NewReader("{\n \"container_start_command\": \"python app.py\",\n \"container_env_vars\": [\n {\n \"key\": \"ENV\",\n \"value\": \"prod\"\n }\n ],\n \"container_port\": 8080,\n \"container_health_check_path\": \"/healthz\",\n \"container_health_check_timeout\": 30,\n \"health_check_timeout\": 300,\n \"container_metric_path\": \"/metrics\"\n}")
req, _ := http.NewRequest("PATCH", 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.patch("https://external.aieev.cloud:5007/external/api/v1/endpoints/{endpoint_id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"container_start_command\": \"python app.py\",\n \"container_env_vars\": [\n {\n \"key\": \"ENV\",\n \"value\": \"prod\"\n }\n ],\n \"container_port\": 8080,\n \"container_health_check_path\": \"/healthz\",\n \"container_health_check_timeout\": 30,\n \"health_check_timeout\": 300,\n \"container_metric_path\": \"/metrics\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://external.aieev.cloud:5007/external/api/v1/endpoints/{endpoint_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"container_start_command\": \"python app.py\",\n \"container_env_vars\": [\n {\n \"key\": \"ENV\",\n \"value\": \"prod\"\n }\n ],\n \"container_port\": 8080,\n \"container_health_check_path\": \"/healthz\",\n \"container_health_check_timeout\": 30,\n \"health_check_timeout\": 300,\n \"container_metric_path\": \"/metrics\"\n}"
response = http.request(request)
puts response.read_body{
"endpoint_id": "<string>",
"name": "<string>",
"is_active": true,
"container_start_command": "<string>",
"container_env_vars": [
{}
],
"container_port": 123,
"container_health_check_path": "<string>",
"container_health_check_timeout": 123,
"health_check_timeout": 123,
"container_metric_path": "<string>",
"updated_at": "2023-11-07T05:31:56Z"
}Authorizations
Pass your API key as a Bearer token. Create API keys in the project overview.
Path Parameters
Unique endpoint ID.
Body
Fields to update. All fields are optional, but at least one must be provided.
Container start command.
"python app.py"
Container environment variables.
Show child attributes
Show child attributes
Container service port (1-65535).
1 <= x <= 655358080
Health check endpoint path.
"/healthz"
Container health check timeout in seconds.
x >= 130
Overall health check timeout in seconds. Deployment fails if health check does not pass within this time.
x >= 1300
Prometheus metrics endpoint path.
"/metrics"
Response
Updated endpoint settings.
Unique endpoint ID.
Endpoint name.
Active status (always false after successful patch).
Current start command.
Current environment variables.
Current port.
Current health check path.
Current health check timeout.
Current overall health check timeout.
Current metric path.
Update time.
curl --request PATCH \
--url https://external.aieev.cloud:5007/external/api/v1/endpoints/{endpoint_id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"container_start_command": "python app.py",
"container_env_vars": [
{
"key": "ENV",
"value": "prod"
}
],
"container_port": 8080,
"container_health_check_path": "/healthz",
"container_health_check_timeout": 30,
"health_check_timeout": 300,
"container_metric_path": "/metrics"
}
'import requests
url = "https://external.aieev.cloud:5007/external/api/v1/endpoints/{endpoint_id}"
payload = {
"container_start_command": "python app.py",
"container_env_vars": [
{
"key": "ENV",
"value": "prod"
}
],
"container_port": 8080,
"container_health_check_path": "/healthz",
"container_health_check_timeout": 30,
"health_check_timeout": 300,
"container_metric_path": "/metrics"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
container_start_command: 'python app.py',
container_env_vars: [{key: 'ENV', value: 'prod'}],
container_port: 8080,
container_health_check_path: '/healthz',
container_health_check_timeout: 30,
health_check_timeout: 300,
container_metric_path: '/metrics'
})
};
fetch('https://external.aieev.cloud:5007/external/api/v1/endpoints/{endpoint_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_PORT => "5007",
CURLOPT_URL => "https://external.aieev.cloud:5007/external/api/v1/endpoints/{endpoint_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'container_start_command' => 'python app.py',
'container_env_vars' => [
[
'key' => 'ENV',
'value' => 'prod'
]
],
'container_port' => 8080,
'container_health_check_path' => '/healthz',
'container_health_check_timeout' => 30,
'health_check_timeout' => 300,
'container_metric_path' => '/metrics'
]),
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://external.aieev.cloud:5007/external/api/v1/endpoints/{endpoint_id}"
payload := strings.NewReader("{\n \"container_start_command\": \"python app.py\",\n \"container_env_vars\": [\n {\n \"key\": \"ENV\",\n \"value\": \"prod\"\n }\n ],\n \"container_port\": 8080,\n \"container_health_check_path\": \"/healthz\",\n \"container_health_check_timeout\": 30,\n \"health_check_timeout\": 300,\n \"container_metric_path\": \"/metrics\"\n}")
req, _ := http.NewRequest("PATCH", 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.patch("https://external.aieev.cloud:5007/external/api/v1/endpoints/{endpoint_id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"container_start_command\": \"python app.py\",\n \"container_env_vars\": [\n {\n \"key\": \"ENV\",\n \"value\": \"prod\"\n }\n ],\n \"container_port\": 8080,\n \"container_health_check_path\": \"/healthz\",\n \"container_health_check_timeout\": 30,\n \"health_check_timeout\": 300,\n \"container_metric_path\": \"/metrics\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://external.aieev.cloud:5007/external/api/v1/endpoints/{endpoint_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"container_start_command\": \"python app.py\",\n \"container_env_vars\": [\n {\n \"key\": \"ENV\",\n \"value\": \"prod\"\n }\n ],\n \"container_port\": 8080,\n \"container_health_check_path\": \"/healthz\",\n \"container_health_check_timeout\": 30,\n \"health_check_timeout\": 300,\n \"container_metric_path\": \"/metrics\"\n}"
response = http.request(request)
puts response.read_body{
"endpoint_id": "<string>",
"name": "<string>",
"is_active": true,
"container_start_command": "<string>",
"container_env_vars": [
{}
],
"container_port": 123,
"container_health_check_path": "<string>",
"container_health_check_timeout": 123,
"health_check_timeout": 123,
"container_metric_path": "<string>",
"updated_at": "2023-11-07T05:31:56Z"
}
