Run a V1 job
curl --request POST \
--url https://api.hotglue.com/{env_id}/{flow_id}/{tenant}/jobs \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"state": {},
"tap": "<string>",
"job_name": "<string>",
"external_job_id": "<string>",
"override_start_date": "2023-11-07T05:31:56Z",
"reset_source_state": true,
"streaming_job": true,
"override_selected_tables": {},
"override_field_map": {},
"override_end_date": "2023-11-07T05:31:56Z",
"override_source_config": {},
"override_target_config": {},
"ignore_parallel_jobs": true,
"queue_if_active_job": true,
"environment_variables": {}
}
'import requests
url = "https://api.hotglue.com/{env_id}/{flow_id}/{tenant}/jobs"
payload = {
"state": {},
"tap": "<string>",
"job_name": "<string>",
"external_job_id": "<string>",
"override_start_date": "2023-11-07T05:31:56Z",
"reset_source_state": True,
"streaming_job": True,
"override_selected_tables": {},
"override_field_map": {},
"override_end_date": "2023-11-07T05:31:56Z",
"override_source_config": {},
"override_target_config": {},
"ignore_parallel_jobs": True,
"queue_if_active_job": True,
"environment_variables": {}
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
state: {},
tap: '<string>',
job_name: '<string>',
external_job_id: '<string>',
override_start_date: '2023-11-07T05:31:56Z',
reset_source_state: true,
streaming_job: true,
override_selected_tables: {},
override_field_map: {},
override_end_date: '2023-11-07T05:31:56Z',
override_source_config: {},
override_target_config: {},
ignore_parallel_jobs: true,
queue_if_active_job: true,
environment_variables: {}
})
};
fetch('https://api.hotglue.com/{env_id}/{flow_id}/{tenant}/jobs', 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.hotglue.com/{env_id}/{flow_id}/{tenant}/jobs",
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([
'state' => [
],
'tap' => '<string>',
'job_name' => '<string>',
'external_job_id' => '<string>',
'override_start_date' => '2023-11-07T05:31:56Z',
'reset_source_state' => true,
'streaming_job' => true,
'override_selected_tables' => [
],
'override_field_map' => [
],
'override_end_date' => '2023-11-07T05:31:56Z',
'override_source_config' => [
],
'override_target_config' => [
],
'ignore_parallel_jobs' => true,
'queue_if_active_job' => true,
'environment_variables' => [
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <api-key>"
],
]);
$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.hotglue.com/{env_id}/{flow_id}/{tenant}/jobs"
payload := strings.NewReader("{\n \"state\": {},\n \"tap\": \"<string>\",\n \"job_name\": \"<string>\",\n \"external_job_id\": \"<string>\",\n \"override_start_date\": \"2023-11-07T05:31:56Z\",\n \"reset_source_state\": true,\n \"streaming_job\": true,\n \"override_selected_tables\": {},\n \"override_field_map\": {},\n \"override_end_date\": \"2023-11-07T05:31:56Z\",\n \"override_source_config\": {},\n \"override_target_config\": {},\n \"ignore_parallel_jobs\": true,\n \"queue_if_active_job\": true,\n \"environment_variables\": {}\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-api-key", "<api-key>")
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.hotglue.com/{env_id}/{flow_id}/{tenant}/jobs")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"state\": {},\n \"tap\": \"<string>\",\n \"job_name\": \"<string>\",\n \"external_job_id\": \"<string>\",\n \"override_start_date\": \"2023-11-07T05:31:56Z\",\n \"reset_source_state\": true,\n \"streaming_job\": true,\n \"override_selected_tables\": {},\n \"override_field_map\": {},\n \"override_end_date\": \"2023-11-07T05:31:56Z\",\n \"override_source_config\": {},\n \"override_target_config\": {},\n \"ignore_parallel_jobs\": true,\n \"queue_if_active_job\": true,\n \"environment_variables\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.hotglue.com/{env_id}/{flow_id}/{tenant}/jobs")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"state\": {},\n \"tap\": \"<string>\",\n \"job_name\": \"<string>\",\n \"external_job_id\": \"<string>\",\n \"override_start_date\": \"2023-11-07T05:31:56Z\",\n \"reset_source_state\": true,\n \"streaming_job\": true,\n \"override_selected_tables\": {},\n \"override_field_map\": {},\n \"override_end_date\": \"2023-11-07T05:31:56Z\",\n \"override_source_config\": {},\n \"override_target_config\": {},\n \"ignore_parallel_jobs\": true,\n \"queue_if_active_job\": true,\n \"environment_variables\": {}\n}"
response = http.request(request)
puts response.read_body{
"job_id": "37g_DK",
"env_id": "mydomain.hotglue.xyz",
"flow_id": "l8odS2mce",
"job_name": "l8odS2mce-chargebee-20220119-153011",
"external_job_id": "asdijsdijasd",
"tenant": "12598713",
"started_by": "12598713",
"s3_root": "12598713/flows/l8odS2mce/jobs/2022/01/4/19/15/37g_DK",
"start_time": "2022-01-19T15:30:11.731333+00:00",
"state": {},
"tap": "chargebee",
"status": "JOB_CREATED",
"scheduled_job": true,
"message": "...",
"last_updated": "2022-01-19T15:35:13.982380+00:00",
"processed_rows": 0
}{
"message": "Job has been queued. It will run when available",
"reason": "There is a job currently running"
}{}V1 flows (legacy)
Run a V1 job
Kicks off a job for a given tenant. When using the API tap, you can pass a payload in the state object to be written to the target. When queue_if_active_job is set to true in the request body, hotglue queues the job if another job is already running for the same tenant or flow.
POST
/
{env_id}
/
{flow_id}
/
{tenant}
/
jobs
Run a V1 job
curl --request POST \
--url https://api.hotglue.com/{env_id}/{flow_id}/{tenant}/jobs \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"state": {},
"tap": "<string>",
"job_name": "<string>",
"external_job_id": "<string>",
"override_start_date": "2023-11-07T05:31:56Z",
"reset_source_state": true,
"streaming_job": true,
"override_selected_tables": {},
"override_field_map": {},
"override_end_date": "2023-11-07T05:31:56Z",
"override_source_config": {},
"override_target_config": {},
"ignore_parallel_jobs": true,
"queue_if_active_job": true,
"environment_variables": {}
}
'import requests
url = "https://api.hotglue.com/{env_id}/{flow_id}/{tenant}/jobs"
payload = {
"state": {},
"tap": "<string>",
"job_name": "<string>",
"external_job_id": "<string>",
"override_start_date": "2023-11-07T05:31:56Z",
"reset_source_state": True,
"streaming_job": True,
"override_selected_tables": {},
"override_field_map": {},
"override_end_date": "2023-11-07T05:31:56Z",
"override_source_config": {},
"override_target_config": {},
"ignore_parallel_jobs": True,
"queue_if_active_job": True,
"environment_variables": {}
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
state: {},
tap: '<string>',
job_name: '<string>',
external_job_id: '<string>',
override_start_date: '2023-11-07T05:31:56Z',
reset_source_state: true,
streaming_job: true,
override_selected_tables: {},
override_field_map: {},
override_end_date: '2023-11-07T05:31:56Z',
override_source_config: {},
override_target_config: {},
ignore_parallel_jobs: true,
queue_if_active_job: true,
environment_variables: {}
})
};
fetch('https://api.hotglue.com/{env_id}/{flow_id}/{tenant}/jobs', 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.hotglue.com/{env_id}/{flow_id}/{tenant}/jobs",
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([
'state' => [
],
'tap' => '<string>',
'job_name' => '<string>',
'external_job_id' => '<string>',
'override_start_date' => '2023-11-07T05:31:56Z',
'reset_source_state' => true,
'streaming_job' => true,
'override_selected_tables' => [
],
'override_field_map' => [
],
'override_end_date' => '2023-11-07T05:31:56Z',
'override_source_config' => [
],
'override_target_config' => [
],
'ignore_parallel_jobs' => true,
'queue_if_active_job' => true,
'environment_variables' => [
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <api-key>"
],
]);
$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.hotglue.com/{env_id}/{flow_id}/{tenant}/jobs"
payload := strings.NewReader("{\n \"state\": {},\n \"tap\": \"<string>\",\n \"job_name\": \"<string>\",\n \"external_job_id\": \"<string>\",\n \"override_start_date\": \"2023-11-07T05:31:56Z\",\n \"reset_source_state\": true,\n \"streaming_job\": true,\n \"override_selected_tables\": {},\n \"override_field_map\": {},\n \"override_end_date\": \"2023-11-07T05:31:56Z\",\n \"override_source_config\": {},\n \"override_target_config\": {},\n \"ignore_parallel_jobs\": true,\n \"queue_if_active_job\": true,\n \"environment_variables\": {}\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-api-key", "<api-key>")
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.hotglue.com/{env_id}/{flow_id}/{tenant}/jobs")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"state\": {},\n \"tap\": \"<string>\",\n \"job_name\": \"<string>\",\n \"external_job_id\": \"<string>\",\n \"override_start_date\": \"2023-11-07T05:31:56Z\",\n \"reset_source_state\": true,\n \"streaming_job\": true,\n \"override_selected_tables\": {},\n \"override_field_map\": {},\n \"override_end_date\": \"2023-11-07T05:31:56Z\",\n \"override_source_config\": {},\n \"override_target_config\": {},\n \"ignore_parallel_jobs\": true,\n \"queue_if_active_job\": true,\n \"environment_variables\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.hotglue.com/{env_id}/{flow_id}/{tenant}/jobs")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"state\": {},\n \"tap\": \"<string>\",\n \"job_name\": \"<string>\",\n \"external_job_id\": \"<string>\",\n \"override_start_date\": \"2023-11-07T05:31:56Z\",\n \"reset_source_state\": true,\n \"streaming_job\": true,\n \"override_selected_tables\": {},\n \"override_field_map\": {},\n \"override_end_date\": \"2023-11-07T05:31:56Z\",\n \"override_source_config\": {},\n \"override_target_config\": {},\n \"ignore_parallel_jobs\": true,\n \"queue_if_active_job\": true,\n \"environment_variables\": {}\n}"
response = http.request(request)
puts response.read_body{
"job_id": "37g_DK",
"env_id": "mydomain.hotglue.xyz",
"flow_id": "l8odS2mce",
"job_name": "l8odS2mce-chargebee-20220119-153011",
"external_job_id": "asdijsdijasd",
"tenant": "12598713",
"started_by": "12598713",
"s3_root": "12598713/flows/l8odS2mce/jobs/2022/01/4/19/15/37g_DK",
"start_time": "2022-01-19T15:30:11.731333+00:00",
"state": {},
"tap": "chargebee",
"status": "JOB_CREATED",
"scheduled_job": true,
"message": "...",
"last_updated": "2022-01-19T15:35:13.982380+00:00",
"processed_rows": 0
}{
"message": "Job has been queued. It will run when available",
"reason": "There is a job currently running"
}{}Path Parameters
Body
application/json
Response
200