Start a job run
import requests
url = "https://{FUSION HOST}/api/spark/jobs/{id}"
headers = {"Authorization": "Basic <encoded-value>"}
response = requests.post(url, headers=headers)
print(response.text)HttpResponse<String> response = Unirest.post("https://{FUSION HOST}/api/spark/jobs/{id}")
.header("Authorization", "Basic <encoded-value>")
.asString();const options = {method: 'POST', headers: {Authorization: 'Basic <encoded-value>'}};
fetch('https://{FUSION HOST}/api/spark/jobs/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));require 'uri'
require 'net/http'
url = URI("https://{FUSION HOST}/api/spark/jobs/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Basic <encoded-value>'
response = http.request(request)
puts response.read_bodypackage main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://{FUSION HOST}/api/spark/jobs/{id}"
req, _ := http.NewRequest("POST", 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))
}<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://{FUSION HOST}/api/spark/jobs/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
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;
}curl --request POST \
--url https://{FUSION HOST}/api/spark/jobs/{id} \
--header 'Authorization: Basic <encoded-value>'{
"state": "starting",
"jobId": "c7f701edfd",
"jobConfig": {
"type": "custom_python_job",
"id": "my-python-job",
"script": "/compare_fusion_apis.py",
"verboseReporting": false,
"updates": [
{
"userId": "demo-user",
"timestamp": "2025-12-03T22:17:23.651897283Z"
},
{
"userId": "demo-user",
"timestamp": "2025-12-03T22:17:23.653890793Z"
}
]
},
"hostname": "10.64.19.46",
"result": {
"jobConfigId": "my-python-job",
"jobRunId": "c7f701edfd"
}
}Start a job run
Start a new run of a job configuration.
POST
/
spark
/
jobs
/
{id}
Start a job run
import requests
url = "https://{FUSION HOST}/api/spark/jobs/{id}"
headers = {"Authorization": "Basic <encoded-value>"}
response = requests.post(url, headers=headers)
print(response.text)HttpResponse<String> response = Unirest.post("https://{FUSION HOST}/api/spark/jobs/{id}")
.header("Authorization", "Basic <encoded-value>")
.asString();const options = {method: 'POST', headers: {Authorization: 'Basic <encoded-value>'}};
fetch('https://{FUSION HOST}/api/spark/jobs/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));require 'uri'
require 'net/http'
url = URI("https://{FUSION HOST}/api/spark/jobs/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Basic <encoded-value>'
response = http.request(request)
puts response.read_bodypackage main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://{FUSION HOST}/api/spark/jobs/{id}"
req, _ := http.NewRequest("POST", 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))
}<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://{FUSION HOST}/api/spark/jobs/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
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;
}curl --request POST \
--url https://{FUSION HOST}/api/spark/jobs/{id} \
--header 'Authorization: Basic <encoded-value>'{
"state": "starting",
"jobId": "c7f701edfd",
"jobConfig": {
"type": "custom_python_job",
"id": "my-python-job",
"script": "/compare_fusion_apis.py",
"verboseReporting": false,
"updates": [
{
"userId": "demo-user",
"timestamp": "2025-12-03T22:17:23.651897283Z"
},
{
"userId": "demo-user",
"timestamp": "2025-12-03T22:17:23.653890793Z"
}
]
},
"hostname": "10.64.19.46",
"result": {
"jobConfigId": "my-python-job",
"jobRunId": "c7f701edfd"
}
}Authorizations
Basic authAPI key
Basic authentication header of the form Basic <encoded-value>, where <encoded-value> is the base64-encoded string username:password.
Path Parameters
The name of the job configuration for which to start a new run.
Response
200 - */*
OK
The job run's current status.
Available options:
unknown, idle, starting, running, finishing, cancelling, finished, cancelled, error, skipped The unique job run ID.
The job's configuration details.
Show child attributes
Show child attributes
The host that ran the job.
Show child attributes
Show child attributes
The job's start time, shown if the job has finished.
The job's end time, shown if the job has finished.
The job's total run time, shown if the job has finished.
Was this page helpful?