Wait For Service
curl --request GET \
--url http://127.0.0.1:9321/api/services/{ident}/waitimport requests
url = "http://127.0.0.1:9321/api/services/{ident}/wait"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('http://127.0.0.1:9321/api/services/{ident}/wait', 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}/wait",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$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}/wait"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("http://127.0.0.1:9321/api/services/{ident}/wait")
.asString();require 'uri'
require 'net/http'
url = URI("http://127.0.0.1:9321/api/services/{ident}/wait")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"outcome": "<string>",
"service_name": "<string>",
"status": "pending",
"waited_s": 123,
"version": 123,
"phase": "<string>",
"public_url": "<string>",
"public_urls": [
{
"url": "<string>",
"kind": "default",
"state": "ready",
"access": "private",
"domain": "<string>",
"cert_state": "internal"
}
],
"reason": "<string>",
"error_class": "OOM",
"error_message": "<string>",
"diagnosis": {
"service_name": "<string>",
"kind": "batch",
"status": "pending",
"error": {
"class": "<string>",
"message": "<string>"
},
"forensics": {
"last_exit_code": 123,
"oom_killed": false,
"gpu_oom": false,
"priv_denied": false,
"last_crash_at": "<string>"
},
"restarts": {
"max_restarts": 123,
"window_seconds": 123,
"policy": "<string>",
"count": 0,
"window_start": "2023-11-07T05:31:56Z",
"last_exit_at": "2023-11-07T05:31:56Z",
"backoff_s": 123,
"next_retry_in_s": 123
},
"health": {
"spec": {},
"probe": {},
"observations": [
"<string>"
]
},
"bindings": {
"waiting": false,
"messages": [
"<string>"
]
},
"build": {
"last_result": "<string>",
"version": 123,
"reason": "<string>"
},
"injected_env_keys_source": "<string>",
"remediation": {
"code": "<string>",
"detail": "<string>"
},
"desired_state": "<string>",
"last_deploy": {},
"last_run": {},
"last_dump": {},
"injected_env_keys": [
"<string>"
],
"pending_env_keys": [
"<string>"
],
"logs": [
{}
]
}
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Services
Wait For 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.
Wait For Service
curl --request GET \
--url http://127.0.0.1:9321/api/services/{ident}/waitimport requests
url = "http://127.0.0.1:9321/api/services/{ident}/wait"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('http://127.0.0.1:9321/api/services/{ident}/wait', 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}/wait",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$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}/wait"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("http://127.0.0.1:9321/api/services/{ident}/wait")
.asString();require 'uri'
require 'net/http'
url = URI("http://127.0.0.1:9321/api/services/{ident}/wait")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"outcome": "<string>",
"service_name": "<string>",
"status": "pending",
"waited_s": 123,
"version": 123,
"phase": "<string>",
"public_url": "<string>",
"public_urls": [
{
"url": "<string>",
"kind": "default",
"state": "ready",
"access": "private",
"domain": "<string>",
"cert_state": "internal"
}
],
"reason": "<string>",
"error_class": "OOM",
"error_message": "<string>",
"diagnosis": {
"service_name": "<string>",
"kind": "batch",
"status": "pending",
"error": {
"class": "<string>",
"message": "<string>"
},
"forensics": {
"last_exit_code": 123,
"oom_killed": false,
"gpu_oom": false,
"priv_denied": false,
"last_crash_at": "<string>"
},
"restarts": {
"max_restarts": 123,
"window_seconds": 123,
"policy": "<string>",
"count": 0,
"window_start": "2023-11-07T05:31:56Z",
"last_exit_at": "2023-11-07T05:31:56Z",
"backoff_s": 123,
"next_retry_in_s": 123
},
"health": {
"spec": {},
"probe": {},
"observations": [
"<string>"
]
},
"bindings": {
"waiting": false,
"messages": [
"<string>"
]
},
"build": {
"last_result": "<string>",
"version": 123,
"reason": "<string>"
},
"injected_env_keys_source": "<string>",
"remediation": {
"code": "<string>",
"detail": "<string>"
},
"desired_state": "<string>",
"last_deploy": {},
"last_run": {},
"last_dump": {},
"injected_env_keys": [
"<string>"
],
"pending_env_keys": [
"<string>"
],
"logs": [
{}
]
}
}{
"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 Show child attributes
Show child attributes
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