curl --request POST \
--url https://api.ionworks.com/pipelines/datafits \
--header 'Content-Type: application/json' \
--data '
{
"objectives": {},
"parameters": {},
"optimizer": {},
"cost": {},
"options": {},
"multistarts": 123,
"baseline_parameters": {},
"existing_parameters": {},
"timeout": 3600,
"job_type": "datafit",
"selected_cell": "<string>",
"selected_model": "<string>"
}
'import requests
url = "https://api.ionworks.com/pipelines/datafits"
payload = {
"objectives": {},
"parameters": {},
"optimizer": {},
"cost": {},
"options": {},
"multistarts": 123,
"baseline_parameters": {},
"existing_parameters": {},
"timeout": 3600,
"job_type": "datafit",
"selected_cell": "<string>",
"selected_model": "<string>"
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
objectives: {},
parameters: {},
optimizer: {},
cost: {},
options: {},
multistarts: 123,
baseline_parameters: {},
existing_parameters: {},
timeout: 3600,
job_type: 'datafit',
selected_cell: '<string>',
selected_model: '<string>'
})
};
fetch('https://api.ionworks.com/pipelines/datafits', 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/pipelines/datafits",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'objectives' => [
],
'parameters' => [
],
'optimizer' => [
],
'cost' => [
],
'options' => [
],
'multistarts' => 123,
'baseline_parameters' => [
],
'existing_parameters' => [
],
'timeout' => 3600,
'job_type' => 'datafit',
'selected_cell' => '<string>',
'selected_model' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"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://api.ionworks.com/pipelines/datafits"
payload := strings.NewReader("{\n \"objectives\": {},\n \"parameters\": {},\n \"optimizer\": {},\n \"cost\": {},\n \"options\": {},\n \"multistarts\": 123,\n \"baseline_parameters\": {},\n \"existing_parameters\": {},\n \"timeout\": 3600,\n \"job_type\": \"datafit\",\n \"selected_cell\": \"<string>\",\n \"selected_model\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
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.post("https://api.ionworks.com/pipelines/datafits")
.header("Content-Type", "application/json")
.body("{\n \"objectives\": {},\n \"parameters\": {},\n \"optimizer\": {},\n \"cost\": {},\n \"options\": {},\n \"multistarts\": 123,\n \"baseline_parameters\": {},\n \"existing_parameters\": {},\n \"timeout\": 3600,\n \"job_type\": \"datafit\",\n \"selected_cell\": \"<string>\",\n \"selected_model\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.ionworks.com/pipelines/datafits")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"objectives\": {},\n \"parameters\": {},\n \"optimizer\": {},\n \"cost\": {},\n \"options\": {},\n \"multistarts\": 123,\n \"baseline_parameters\": {},\n \"existing_parameters\": {},\n \"timeout\": 3600,\n \"job_type\": \"datafit\",\n \"selected_cell\": \"<string>\",\n \"selected_model\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"job_id": "<string>",
"job_type": "dummy",
"status": "pending",
"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_code": "CONFIGURATION_ERROR",
"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": {}
}
]
}Run Datafit
curl --request POST \
--url https://api.ionworks.com/pipelines/datafits \
--header 'Content-Type: application/json' \
--data '
{
"objectives": {},
"parameters": {},
"optimizer": {},
"cost": {},
"options": {},
"multistarts": 123,
"baseline_parameters": {},
"existing_parameters": {},
"timeout": 3600,
"job_type": "datafit",
"selected_cell": "<string>",
"selected_model": "<string>"
}
'import requests
url = "https://api.ionworks.com/pipelines/datafits"
payload = {
"objectives": {},
"parameters": {},
"optimizer": {},
"cost": {},
"options": {},
"multistarts": 123,
"baseline_parameters": {},
"existing_parameters": {},
"timeout": 3600,
"job_type": "datafit",
"selected_cell": "<string>",
"selected_model": "<string>"
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
objectives: {},
parameters: {},
optimizer: {},
cost: {},
options: {},
multistarts: 123,
baseline_parameters: {},
existing_parameters: {},
timeout: 3600,
job_type: 'datafit',
selected_cell: '<string>',
selected_model: '<string>'
})
};
fetch('https://api.ionworks.com/pipelines/datafits', 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/pipelines/datafits",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'objectives' => [
],
'parameters' => [
],
'optimizer' => [
],
'cost' => [
],
'options' => [
],
'multistarts' => 123,
'baseline_parameters' => [
],
'existing_parameters' => [
],
'timeout' => 3600,
'job_type' => 'datafit',
'selected_cell' => '<string>',
'selected_model' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"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://api.ionworks.com/pipelines/datafits"
payload := strings.NewReader("{\n \"objectives\": {},\n \"parameters\": {},\n \"optimizer\": {},\n \"cost\": {},\n \"options\": {},\n \"multistarts\": 123,\n \"baseline_parameters\": {},\n \"existing_parameters\": {},\n \"timeout\": 3600,\n \"job_type\": \"datafit\",\n \"selected_cell\": \"<string>\",\n \"selected_model\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
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.post("https://api.ionworks.com/pipelines/datafits")
.header("Content-Type", "application/json")
.body("{\n \"objectives\": {},\n \"parameters\": {},\n \"optimizer\": {},\n \"cost\": {},\n \"options\": {},\n \"multistarts\": 123,\n \"baseline_parameters\": {},\n \"existing_parameters\": {},\n \"timeout\": 3600,\n \"job_type\": \"datafit\",\n \"selected_cell\": \"<string>\",\n \"selected_model\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.ionworks.com/pipelines/datafits")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"objectives\": {},\n \"parameters\": {},\n \"optimizer\": {},\n \"cost\": {},\n \"options\": {},\n \"multistarts\": 123,\n \"baseline_parameters\": {},\n \"existing_parameters\": {},\n \"timeout\": 3600,\n \"job_type\": \"datafit\",\n \"selected_cell\": \"<string>\",\n \"selected_model\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"job_id": "<string>",
"job_type": "dummy",
"status": "pending",
"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_code": "CONFIGURATION_ERROR",
"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": {}
}
]
}Query Parameters
Body
1 <= x <= 86400Job type: 'datafit' or 'optimize' (must match JobType enum values)
Response
Successful Response
Schema for job information response
Possible types for a job
dummy, datafit, array_datafit, validation, simulate, evaluate_variables, optimize, ecm_fit, simple_pipeline Possible statuses for a job
pending, processing, waiting, completed, failed, canceled Whether the job has reached a terminal state and will not transition further.
Derived from :attr:JobStatus.TERMINAL_STATUSES, so adding a new
terminal status to the enum automatically updates the wire field —
clients that read is_terminal never need to know the status
taxonomy or be re-released when it changes.
Whether the job terminated unsuccessfully (failed or canceled, not completed).
Derived from :attr:is_terminal minus the success case, so any new
non-success terminal status added to :class:JobStatus is
automatically classified as a failure without touching this method.
Deep-link to this job's Anyscale console dashboard, or None.
Built server-side (mirroring the Sentry log_url pattern) from the
captured anyscale_job_id and the environment's console cloud/project
ids. Returns None when the job never ran on Anyscale (local/serve) or
the environment has no console ids configured, so the UI simply omits
the link in those cases.
Machine-readable error codes for jobs.
CONFIGURATION_ERROR, MODEL_ERROR, SOLVER_ERROR, EXECUTION_TIMEOUT, SUBMISSION_FAILED, INTERNAL_ERROR 1 - 2083Possible access levels for a job
project, organization Was this page helpful?