Agent versions
Wait for one validation or publish job and return its durable status
GET
/
versions
/
{version_id}
/
jobs
/
{job_id}
/
wait
Wait for one validation or publish job and return its durable status
curl --request GET \
--url https://api.guild.ai/v1/versions/{version_id}/jobs/{job_id}/wait \
--header 'Authorization: Basic <encoded-value>'import requests
url = "https://api.guild.ai/v1/versions/{version_id}/jobs/{job_id}/wait"
headers = {"Authorization": "Basic <encoded-value>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Basic <encoded-value>'}};
fetch('https://api.guild.ai/v1/versions/{version_id}/jobs/{job_id}/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_URL => "https://api.guild.ai/v1/versions/{version_id}/jobs/{job_id}/wait",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Basic <encoded-value>"
],
]);
$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 := "https://api.guild.ai/v1/versions/{version_id}/jobs/{job_id}/wait"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Basic <encoded-value>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.guild.ai/v1/versions/{version_id}/jobs/{job_id}/wait")
.header("Authorization", "Basic <encoded-value>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.guild.ai/v1/versions/{version_id}/jobs/{job_id}/wait")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Basic <encoded-value>'
response = http.request(request)
puts response.read_body{
"wait_complete": true,
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"job_type": "VALIDATION",
"target_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": "PENDING",
"completed_at": "2023-11-07T05:31:56Z",
"error_message": "<string>",
"started_at": "2023-11-07T05:31:56Z",
"target": "<unknown>"
}{
"error": "<string>",
"message": "<string>"
}{
"error": "<string>",
"message": "<string>"
}Authorizations
apiKeybearerApiKeyoauth2
API key: key id as the username, secret as the password. An account API key carries the same scopes as an OAuth token and is checked against the scopes listed under oauth2 on each operation. A trigger API key is limited to its trigger's workspace and reaches only the session operations that list this scheme alongside the oauth2 scopes.
Query Parameters
Optional wait in seconds, capped by the server's configured window; expiry returns wait_complete=false without stopping the job
Required range:
x > 0Response
Successful response
Whether the operation completed before the optional wait timeout.
Available options:
VALIDATION, PUBLISH, PUBLISH_PRE_CHECK Available options:
PENDING, RUNNING, SUCCEEDED, FAILED, ERRORED, CANCELLED Maximum string length:
65536⌘I
Wait for one validation or publish job and return its durable status
curl --request GET \
--url https://api.guild.ai/v1/versions/{version_id}/jobs/{job_id}/wait \
--header 'Authorization: Basic <encoded-value>'import requests
url = "https://api.guild.ai/v1/versions/{version_id}/jobs/{job_id}/wait"
headers = {"Authorization": "Basic <encoded-value>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Basic <encoded-value>'}};
fetch('https://api.guild.ai/v1/versions/{version_id}/jobs/{job_id}/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_URL => "https://api.guild.ai/v1/versions/{version_id}/jobs/{job_id}/wait",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Basic <encoded-value>"
],
]);
$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 := "https://api.guild.ai/v1/versions/{version_id}/jobs/{job_id}/wait"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Basic <encoded-value>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.guild.ai/v1/versions/{version_id}/jobs/{job_id}/wait")
.header("Authorization", "Basic <encoded-value>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.guild.ai/v1/versions/{version_id}/jobs/{job_id}/wait")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Basic <encoded-value>'
response = http.request(request)
puts response.read_body{
"wait_complete": true,
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"job_type": "VALIDATION",
"target_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": "PENDING",
"completed_at": "2023-11-07T05:31:56Z",
"error_message": "<string>",
"started_at": "2023-11-07T05:31:56Z",
"target": "<unknown>"
}{
"error": "<string>",
"message": "<string>"
}{
"error": "<string>",
"message": "<string>"
}