Stop Service
curl --request POST \
--url http://127.0.0.1:9321/api/services/{ident}/stopimport requests
url = "http://127.0.0.1:9321/api/services/{ident}/stop"
response = requests.post(url)
print(response.text)const options = {method: 'POST'};
fetch('http://127.0.0.1:9321/api/services/{ident}/stop', 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 => "9321",
CURLOPT_URL => "http://127.0.0.1:9321/api/services/{ident}/stop",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
]);
$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 := "http://127.0.0.1:9321/api/services/{ident}/stop"
req, _ := http.NewRequest("POST", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("http://127.0.0.1:9321/api/services/{ident}/stop")
.asString();require 'uri'
require 'net/http'
url = URI("http://127.0.0.1:9321/api/services/{ident}/stop")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Post.new(url)
response = http.request(request)
puts response.read_body{
"id": "<string>",
"name": "<string>",
"status": "pending",
"gpu_count": 123,
"created_at": "2023-11-07T05:31:56Z",
"manageable": true,
"desired_state": "<string>",
"kind": "service",
"image": "<string>",
"gpu_ids": [
"<string>"
],
"restart_policy": "<string>",
"restart_count": 0,
"health_check": {},
"container_id": "<string>",
"started_at": "2023-11-07T05:31:56Z",
"finished_at": "2023-11-07T05:31:56Z",
"exit_code": 123,
"error_class": "OOM",
"error_message": "<string>",
"submitted_via": "cli",
"endpoint": {
"container_port": 123,
"host_port": 123,
"effective_host_port": 123,
"protocol": "tcp",
"route": "<string>",
"url": "<string>",
"public_url": "<string>",
"public_urls": [
{
"url": "<string>",
"kind": "default",
"state": "ready",
"access": "private",
"domain": "<string>",
"cert_state": "internal"
}
]
},
"rollback_available": false,
"build_version": 123,
"last_deploy": {},
"data_dir_bytes": 123,
"source": {}
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Services
Stop Service
Reference for merged 0.6.0 source. The latest verified binary release is 0.5.5; use your Engine’s /api/openapi.json for its installed contract.
Stop Service
curl --request POST \
--url http://127.0.0.1:9321/api/services/{ident}/stopimport requests
url = "http://127.0.0.1:9321/api/services/{ident}/stop"
response = requests.post(url)
print(response.text)const options = {method: 'POST'};
fetch('http://127.0.0.1:9321/api/services/{ident}/stop', 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 => "9321",
CURLOPT_URL => "http://127.0.0.1:9321/api/services/{ident}/stop",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
]);
$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 := "http://127.0.0.1:9321/api/services/{ident}/stop"
req, _ := http.NewRequest("POST", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("http://127.0.0.1:9321/api/services/{ident}/stop")
.asString();require 'uri'
require 'net/http'
url = URI("http://127.0.0.1:9321/api/services/{ident}/stop")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Post.new(url)
response = http.request(request)
puts response.read_body{
"id": "<string>",
"name": "<string>",
"status": "pending",
"gpu_count": 123,
"created_at": "2023-11-07T05:31:56Z",
"manageable": true,
"desired_state": "<string>",
"kind": "service",
"image": "<string>",
"gpu_ids": [
"<string>"
],
"restart_policy": "<string>",
"restart_count": 0,
"health_check": {},
"container_id": "<string>",
"started_at": "2023-11-07T05:31:56Z",
"finished_at": "2023-11-07T05:31:56Z",
"exit_code": 123,
"error_class": "OOM",
"error_message": "<string>",
"submitted_via": "cli",
"endpoint": {
"container_port": 123,
"host_port": 123,
"effective_host_port": 123,
"protocol": "tcp",
"route": "<string>",
"url": "<string>",
"public_url": "<string>",
"public_urls": [
{
"url": "<string>",
"kind": "default",
"state": "ready",
"access": "private",
"domain": "<string>",
"cert_state": "internal"
}
]
},
"rollback_available": false,
"build_version": 123,
"last_deploy": {},
"data_dir_bytes": 123,
"source": {}
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Path Parameters
Response
HTTP 200 response
Available options:
pending, scheduled, running, paused, completed, failed, cancelled, retrying, building, degraded, restarting, stopped Available options:
batch, service, model, database Available options:
OOM, GPU_FAIL, IMAGE_PULL_FAIL, USER_ERROR, TIMEOUT, CONTAINER_FAIL, MOUNT_MISSING, GPU_OOM, PLATFORM_ERROR, UNKNOWN Show child attributes
Show child attributes