curl --request PATCH \
--url https://platformapi.comfy.org/deploy/v1/deployments/{id}/releases/{releaseId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"status": "stopped"
}
'import requests
url = "https://platformapi.comfy.org/deploy/v1/deployments/{id}/releases/{releaseId}"
payload = { "status": "stopped" }
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({status: 'stopped'})
};
fetch('https://platformapi.comfy.org/deploy/v1/deployments/{id}/releases/{releaseId}', 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://platformapi.comfy.org/deploy/v1/deployments/{id}/releases/{releaseId}",
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([
'status' => 'stopped'
]),
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://platformapi.comfy.org/deploy/v1/deployments/{id}/releases/{releaseId}"
payload := strings.NewReader("{\n \"status\": \"stopped\"\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://platformapi.comfy.org/deploy/v1/deployments/{id}/releases/{releaseId}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"status\": \"stopped\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://platformapi.comfy.org/deploy/v1/deployments/{id}/releases/{releaseId}")
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 \"status\": \"stopped\"\n}"
response = http.request(request)
puts response.read_body{
"releaseId": "<string>",
"status": "queued"
}{
"error": "<string>",
"message": "<string>"
}{
"error": "<string>",
"message": "<string>"
}{
"error": "<string>",
"message": "<string>"
}{
"error": "<string>",
"message": "<string>"
}{
"error": "<string>",
"message": "<string>"
}{
"error": "<string>",
"message": "<string>"
}Stop a release a deployment keeps
Pauses the running copy of one release the deployment keeps from an earlier update, while the release the deployment serves keeps serving. Its storage stays, so an update or rollback to it starts it again. Stopping the release an update waits on ends that update and cancels its compute request, if any. The pending target takes precedence even when it shares the serving release id. If cancellation dispatch fails, retries keep that exact copy until its stop finishes. New copy moves wait for that cancellation. Once the target applies, the call answers 409 CURRENT_RELEASE for the release the deployment serves, which stops only with the deployment, and 404 for a release the deployment keeps no copy of. Async. Each call picks its target from the release id when it arrives: a repeat after the stop finished changes nothing, unless an update has since begun to wait on a new copy of that release, which the repeat then ends.
curl --request PATCH \
--url https://platformapi.comfy.org/deploy/v1/deployments/{id}/releases/{releaseId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"status": "stopped"
}
'import requests
url = "https://platformapi.comfy.org/deploy/v1/deployments/{id}/releases/{releaseId}"
payload = { "status": "stopped" }
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({status: 'stopped'})
};
fetch('https://platformapi.comfy.org/deploy/v1/deployments/{id}/releases/{releaseId}', 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://platformapi.comfy.org/deploy/v1/deployments/{id}/releases/{releaseId}",
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([
'status' => 'stopped'
]),
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://platformapi.comfy.org/deploy/v1/deployments/{id}/releases/{releaseId}"
payload := strings.NewReader("{\n \"status\": \"stopped\"\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://platformapi.comfy.org/deploy/v1/deployments/{id}/releases/{releaseId}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"status\": \"stopped\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://platformapi.comfy.org/deploy/v1/deployments/{id}/releases/{releaseId}")
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 \"status\": \"stopped\"\n}"
response = http.request(request)
puts response.read_body{
"releaseId": "<string>",
"status": "queued"
}{
"error": "<string>",
"message": "<string>"
}{
"error": "<string>",
"message": "<string>"
}{
"error": "<string>",
"message": "<string>"
}{
"error": "<string>",
"message": "<string>"
}{
"error": "<string>",
"message": "<string>"
}{
"error": "<string>",
"message": "<string>"
}Parámetros de ruta
Cuerpo
Respuesta
Accepted; the release's copy is stopping.
Lifecycle state. unhealthy is a recoverable post-ready state: the deployment was serving but its endpoint degraded or vanished, and the control plane will move it back to ready if it recovers. stop_failed means a stop ran but could not release the compute, so the deployment may still be holding (and billing for) its endpoint; it is not terminal, and stopping it again retries the release. stopped and failed are terminal.
queued, provisioning, starting, ready, unhealthy, stopping, stop_failed, stopped, failed ¿Esta página le ayudó?