Get Optimization With Job
curl --request GET \
--url https://api.ionworks.com/optimize/{id}import requests
url = "https://api.ionworks.com/optimize/{id}"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.ionworks.com/optimize/{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_URL => "https://api.ionworks.com/optimize/{id}",
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 := "https://api.ionworks.com/optimize/{id}"
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("https://api.ionworks.com/optimize/{id}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.ionworks.com/optimize/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"optimization": {
"id": "<string>",
"job_id": "<string>",
"project_id": "<string>",
"organization_id": "<string>",
"name": "<string>",
"description": "<string>",
"user_id": "<string>",
"cell_spec_id": "<string>",
"parameterized_model_id": "<string>",
"optimization_template_id": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"created_by_email": "<string>",
"parameterized_model_name": "<string>",
"cell_name": "<string>"
},
"job": {
"job_id": "<string>",
"priority": 123,
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"user_id": "<string>",
"organization_id": "<string>",
"is_terminal": true,
"is_failed": true,
"anyscale_url": "<string>",
"started_at": "2023-11-07T05:31:56Z",
"completed_at": "2023-11-07T05:31:56Z",
"compute_time": 123,
"error": "<string>",
"error_detail": {},
"result": {},
"callback_url": "<string>",
"parent_job_id": "<string>",
"project_id": "<string>",
"access_level": "organization",
"params_path": "<string>",
"metadata_path": "<string>",
"anyscale_job_id": "<string>",
"submission_info": {}
}
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}optimization
Get Optimization With Job
deprecated
Get an optimization and its linked job by optimization id or job_id.
Get Optimization With Job
curl --request GET \
--url https://api.ionworks.com/optimize/{id}import requests
url = "https://api.ionworks.com/optimize/{id}"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.ionworks.com/optimize/{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_URL => "https://api.ionworks.com/optimize/{id}",
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 := "https://api.ionworks.com/optimize/{id}"
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("https://api.ionworks.com/optimize/{id}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.ionworks.com/optimize/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"optimization": {
"id": "<string>",
"job_id": "<string>",
"project_id": "<string>",
"organization_id": "<string>",
"name": "<string>",
"description": "<string>",
"user_id": "<string>",
"cell_spec_id": "<string>",
"parameterized_model_id": "<string>",
"optimization_template_id": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"created_by_email": "<string>",
"parameterized_model_name": "<string>",
"cell_name": "<string>"
},
"job": {
"job_id": "<string>",
"priority": 123,
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"user_id": "<string>",
"organization_id": "<string>",
"is_terminal": true,
"is_failed": true,
"anyscale_url": "<string>",
"started_at": "2023-11-07T05:31:56Z",
"completed_at": "2023-11-07T05:31:56Z",
"compute_time": 123,
"error": "<string>",
"error_detail": {},
"result": {},
"callback_url": "<string>",
"parent_job_id": "<string>",
"project_id": "<string>",
"access_level": "organization",
"params_path": "<string>",
"metadata_path": "<string>",
"anyscale_job_id": "<string>",
"submission_info": {}
}
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Path Parameters
Was this page helpful?
⌘I