curl --request POST \
--url https://api.select.dev/v2/databricks-jcss-jobs/actions/batch-update-automated-savings \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'x-tenant-id: <x-tenant-id>' \
--data '
{
"items": [
{
"job_id": "<string>",
"databricks_workspace_id": "<string>",
"insight_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
],
"enabled": true,
"config": {
"poll_interval": 30,
"max_cap_enabled": true,
"downscale_to_busy_enabled": true,
"busy_tail_trim_enabled": false,
"reclaim_release_cached_data": false,
"grow_polls_required": 2,
"shrink_polls_required": 3,
"consecutive_failure_threshold": 3
}
}
'import requests
url = "https://api.select.dev/v2/databricks-jcss-jobs/actions/batch-update-automated-savings"
payload = {
"items": [
{
"job_id": "<string>",
"databricks_workspace_id": "<string>",
"insight_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
],
"enabled": True,
"config": {
"poll_interval": 30,
"max_cap_enabled": True,
"downscale_to_busy_enabled": True,
"busy_tail_trim_enabled": False,
"reclaim_release_cached_data": False,
"grow_polls_required": 2,
"shrink_polls_required": 3,
"consecutive_failure_threshold": 3
}
}
headers = {
"x-tenant-id": "<x-tenant-id>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'x-tenant-id': '<x-tenant-id>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
items: [
{
job_id: '<string>',
databricks_workspace_id: '<string>',
insight_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a'
}
],
enabled: true,
config: {
poll_interval: 30,
max_cap_enabled: true,
downscale_to_busy_enabled: true,
busy_tail_trim_enabled: false,
reclaim_release_cached_data: false,
grow_polls_required: 2,
shrink_polls_required: 3,
consecutive_failure_threshold: 3
}
})
};
fetch('https://api.select.dev/v2/databricks-jcss-jobs/actions/batch-update-automated-savings', 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.select.dev/v2/databricks-jcss-jobs/actions/batch-update-automated-savings",
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([
'items' => [
[
'job_id' => '<string>',
'databricks_workspace_id' => '<string>',
'insight_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a'
]
],
'enabled' => true,
'config' => [
'poll_interval' => 30,
'max_cap_enabled' => true,
'downscale_to_busy_enabled' => true,
'busy_tail_trim_enabled' => false,
'reclaim_release_cached_data' => false,
'grow_polls_required' => 2,
'shrink_polls_required' => 3,
'consecutive_failure_threshold' => 3
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json",
"x-tenant-id: <x-tenant-id>"
],
]);
$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.select.dev/v2/databricks-jcss-jobs/actions/batch-update-automated-savings"
payload := strings.NewReader("{\n \"items\": [\n {\n \"job_id\": \"<string>\",\n \"databricks_workspace_id\": \"<string>\",\n \"insight_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n }\n ],\n \"enabled\": true,\n \"config\": {\n \"poll_interval\": 30,\n \"max_cap_enabled\": true,\n \"downscale_to_busy_enabled\": true,\n \"busy_tail_trim_enabled\": false,\n \"reclaim_release_cached_data\": false,\n \"grow_polls_required\": 2,\n \"shrink_polls_required\": 3,\n \"consecutive_failure_threshold\": 3\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-tenant-id", "<x-tenant-id>")
req.Header.Add("Authorization", "Bearer <token>")
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.select.dev/v2/databricks-jcss-jobs/actions/batch-update-automated-savings")
.header("x-tenant-id", "<x-tenant-id>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"items\": [\n {\n \"job_id\": \"<string>\",\n \"databricks_workspace_id\": \"<string>\",\n \"insight_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n }\n ],\n \"enabled\": true,\n \"config\": {\n \"poll_interval\": 30,\n \"max_cap_enabled\": true,\n \"downscale_to_busy_enabled\": true,\n \"busy_tail_trim_enabled\": false,\n \"reclaim_release_cached_data\": false,\n \"grow_polls_required\": 2,\n \"shrink_polls_required\": 3,\n \"consecutive_failure_threshold\": 3\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.select.dev/v2/databricks-jcss-jobs/actions/batch-update-automated-savings")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-tenant-id"] = '<x-tenant-id>'
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"items\": [\n {\n \"job_id\": \"<string>\",\n \"databricks_workspace_id\": \"<string>\",\n \"insight_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n }\n ],\n \"enabled\": true,\n \"config\": {\n \"poll_interval\": 30,\n \"max_cap_enabled\": true,\n \"downscale_to_busy_enabled\": true,\n \"busy_tail_trim_enabled\": false,\n \"reclaim_release_cached_data\": false,\n \"grow_polls_required\": 2,\n \"shrink_polls_required\": 3,\n \"consecutive_failure_threshold\": 3\n }\n}"
response = http.request(request)
puts response.read_body{
"items": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"job_id": "<string>",
"databricks_connection_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"databricks_workspace_id": "<string>",
"connection_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"enabled": true,
"enabled_time": "<string>",
"disabled_time": "<string>",
"update_time": "<string>",
"config": {
"poll_interval": 30,
"max_cap_enabled": true,
"downscale_to_busy_enabled": true,
"busy_tail_trim_enabled": false,
"reclaim_release_cached_data": false,
"grow_polls_required": 2,
"shrink_polls_required": 3,
"consecutive_failure_threshold": 3
},
"permission_level": "is_owner",
"ineligibility_reason": "insufficient_permission",
"discovery_error": "<string>",
"last_heartbeat_time": "<string>"
}
],
"row_count": 123,
"failures": [
{
"title": "<string>",
"status": 123,
"detail": "<string>",
"code": "validation_failed",
"retryable": true,
"index": 123,
"type": "about:blank",
"details": [
{}
]
}
],
"page_token": "<string>"
}{
"title": "<string>",
"status": 123,
"detail": "<string>",
"code": "validation_failed",
"retryable": true,
"type": "about:blank",
"details": [
{}
]
}{
"title": "<string>",
"status": 123,
"detail": "<string>",
"code": "validation_failed",
"retryable": true,
"type": "about:blank",
"details": [
{}
]
}{
"title": "<string>",
"status": 123,
"detail": "<string>",
"code": "validation_failed",
"retryable": true,
"type": "about:blank",
"details": [
{}
]
}{
"title": "<string>",
"status": 123,
"detail": "<string>",
"code": "validation_failed",
"retryable": true,
"type": "about:blank",
"details": [
{}
]
}{
"title": "<string>",
"status": 123,
"detail": "<string>",
"code": "validation_failed",
"retryable": true,
"type": "about:blank",
"details": [
{}
]
}{
"title": "<string>",
"status": 123,
"detail": "<string>",
"code": "validation_failed",
"retryable": true,
"type": "about:blank",
"details": [
{}
]
}{
"title": "<string>",
"status": 123,
"detail": "<string>",
"code": "validation_failed",
"retryable": true,
"type": "about:blank",
"details": [
{}
]
}{
"title": "<string>",
"status": 123,
"detail": "<string>",
"code": "validation_failed",
"retryable": true,
"type": "about:blank",
"details": [
{}
]
}{
"title": "<string>",
"status": 123,
"detail": "<string>",
"code": "validation_failed",
"retryable": true,
"type": "about:blank",
"details": [
{}
]
}{
"title": "<string>",
"status": 123,
"detail": "<string>",
"code": "validation_failed",
"retryable": true,
"type": "about:blank",
"details": [
{}
]
}{
"title": "<string>",
"status": 123,
"detail": "<string>",
"code": "validation_failed",
"retryable": true,
"type": "about:blank",
"details": [
{}
]
}Turn automated savings on or off for a batch of Databricks jobs
Turn automated savings on or off for many Databricks jobs at once.
The same enabled value, and config when you send it, apply to every job
in items. Each job must exist in the workspace that you name (404). To
turn automated savings on, SELECT must have CAN_MANAGE or IS_OWNER on
the job in Databricks (403). An entry that names the same job as an
earlier entry is rejected (422). Each entry is checked on its own. The
accepted entries are applied, and items returns them in request order.
Each rejected entry is in failures, with its position in the request as
index. The status is 200 also when every entry is rejected.
curl --request POST \
--url https://api.select.dev/v2/databricks-jcss-jobs/actions/batch-update-automated-savings \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'x-tenant-id: <x-tenant-id>' \
--data '
{
"items": [
{
"job_id": "<string>",
"databricks_workspace_id": "<string>",
"insight_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
],
"enabled": true,
"config": {
"poll_interval": 30,
"max_cap_enabled": true,
"downscale_to_busy_enabled": true,
"busy_tail_trim_enabled": false,
"reclaim_release_cached_data": false,
"grow_polls_required": 2,
"shrink_polls_required": 3,
"consecutive_failure_threshold": 3
}
}
'import requests
url = "https://api.select.dev/v2/databricks-jcss-jobs/actions/batch-update-automated-savings"
payload = {
"items": [
{
"job_id": "<string>",
"databricks_workspace_id": "<string>",
"insight_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
],
"enabled": True,
"config": {
"poll_interval": 30,
"max_cap_enabled": True,
"downscale_to_busy_enabled": True,
"busy_tail_trim_enabled": False,
"reclaim_release_cached_data": False,
"grow_polls_required": 2,
"shrink_polls_required": 3,
"consecutive_failure_threshold": 3
}
}
headers = {
"x-tenant-id": "<x-tenant-id>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'x-tenant-id': '<x-tenant-id>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
items: [
{
job_id: '<string>',
databricks_workspace_id: '<string>',
insight_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a'
}
],
enabled: true,
config: {
poll_interval: 30,
max_cap_enabled: true,
downscale_to_busy_enabled: true,
busy_tail_trim_enabled: false,
reclaim_release_cached_data: false,
grow_polls_required: 2,
shrink_polls_required: 3,
consecutive_failure_threshold: 3
}
})
};
fetch('https://api.select.dev/v2/databricks-jcss-jobs/actions/batch-update-automated-savings', 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.select.dev/v2/databricks-jcss-jobs/actions/batch-update-automated-savings",
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([
'items' => [
[
'job_id' => '<string>',
'databricks_workspace_id' => '<string>',
'insight_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a'
]
],
'enabled' => true,
'config' => [
'poll_interval' => 30,
'max_cap_enabled' => true,
'downscale_to_busy_enabled' => true,
'busy_tail_trim_enabled' => false,
'reclaim_release_cached_data' => false,
'grow_polls_required' => 2,
'shrink_polls_required' => 3,
'consecutive_failure_threshold' => 3
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json",
"x-tenant-id: <x-tenant-id>"
],
]);
$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.select.dev/v2/databricks-jcss-jobs/actions/batch-update-automated-savings"
payload := strings.NewReader("{\n \"items\": [\n {\n \"job_id\": \"<string>\",\n \"databricks_workspace_id\": \"<string>\",\n \"insight_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n }\n ],\n \"enabled\": true,\n \"config\": {\n \"poll_interval\": 30,\n \"max_cap_enabled\": true,\n \"downscale_to_busy_enabled\": true,\n \"busy_tail_trim_enabled\": false,\n \"reclaim_release_cached_data\": false,\n \"grow_polls_required\": 2,\n \"shrink_polls_required\": 3,\n \"consecutive_failure_threshold\": 3\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-tenant-id", "<x-tenant-id>")
req.Header.Add("Authorization", "Bearer <token>")
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.select.dev/v2/databricks-jcss-jobs/actions/batch-update-automated-savings")
.header("x-tenant-id", "<x-tenant-id>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"items\": [\n {\n \"job_id\": \"<string>\",\n \"databricks_workspace_id\": \"<string>\",\n \"insight_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n }\n ],\n \"enabled\": true,\n \"config\": {\n \"poll_interval\": 30,\n \"max_cap_enabled\": true,\n \"downscale_to_busy_enabled\": true,\n \"busy_tail_trim_enabled\": false,\n \"reclaim_release_cached_data\": false,\n \"grow_polls_required\": 2,\n \"shrink_polls_required\": 3,\n \"consecutive_failure_threshold\": 3\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.select.dev/v2/databricks-jcss-jobs/actions/batch-update-automated-savings")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-tenant-id"] = '<x-tenant-id>'
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"items\": [\n {\n \"job_id\": \"<string>\",\n \"databricks_workspace_id\": \"<string>\",\n \"insight_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n }\n ],\n \"enabled\": true,\n \"config\": {\n \"poll_interval\": 30,\n \"max_cap_enabled\": true,\n \"downscale_to_busy_enabled\": true,\n \"busy_tail_trim_enabled\": false,\n \"reclaim_release_cached_data\": false,\n \"grow_polls_required\": 2,\n \"shrink_polls_required\": 3,\n \"consecutive_failure_threshold\": 3\n }\n}"
response = http.request(request)
puts response.read_body{
"items": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"job_id": "<string>",
"databricks_connection_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"databricks_workspace_id": "<string>",
"connection_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"enabled": true,
"enabled_time": "<string>",
"disabled_time": "<string>",
"update_time": "<string>",
"config": {
"poll_interval": 30,
"max_cap_enabled": true,
"downscale_to_busy_enabled": true,
"busy_tail_trim_enabled": false,
"reclaim_release_cached_data": false,
"grow_polls_required": 2,
"shrink_polls_required": 3,
"consecutive_failure_threshold": 3
},
"permission_level": "is_owner",
"ineligibility_reason": "insufficient_permission",
"discovery_error": "<string>",
"last_heartbeat_time": "<string>"
}
],
"row_count": 123,
"failures": [
{
"title": "<string>",
"status": 123,
"detail": "<string>",
"code": "validation_failed",
"retryable": true,
"index": 123,
"type": "about:blank",
"details": [
{}
]
}
],
"page_token": "<string>"
}{
"title": "<string>",
"status": 123,
"detail": "<string>",
"code": "validation_failed",
"retryable": true,
"type": "about:blank",
"details": [
{}
]
}{
"title": "<string>",
"status": 123,
"detail": "<string>",
"code": "validation_failed",
"retryable": true,
"type": "about:blank",
"details": [
{}
]
}{
"title": "<string>",
"status": 123,
"detail": "<string>",
"code": "validation_failed",
"retryable": true,
"type": "about:blank",
"details": [
{}
]
}{
"title": "<string>",
"status": 123,
"detail": "<string>",
"code": "validation_failed",
"retryable": true,
"type": "about:blank",
"details": [
{}
]
}{
"title": "<string>",
"status": 123,
"detail": "<string>",
"code": "validation_failed",
"retryable": true,
"type": "about:blank",
"details": [
{}
]
}{
"title": "<string>",
"status": 123,
"detail": "<string>",
"code": "validation_failed",
"retryable": true,
"type": "about:blank",
"details": [
{}
]
}{
"title": "<string>",
"status": 123,
"detail": "<string>",
"code": "validation_failed",
"retryable": true,
"type": "about:blank",
"details": [
{}
]
}{
"title": "<string>",
"status": 123,
"detail": "<string>",
"code": "validation_failed",
"retryable": true,
"type": "about:blank",
"details": [
{}
]
}{
"title": "<string>",
"status": 123,
"detail": "<string>",
"code": "validation_failed",
"retryable": true,
"type": "about:blank",
"details": [
{}
]
}{
"title": "<string>",
"status": 123,
"detail": "<string>",
"code": "validation_failed",
"retryable": true,
"type": "about:blank",
"details": [
{}
]
}{
"title": "<string>",
"status": 123,
"detail": "<string>",
"code": "validation_failed",
"retryable": true,
"type": "about:blank",
"details": [
{}
]
}Body
Turn automated savings on or off for a batch of Databricks jobs.
Each entry is checked on its own. The accepted entries are saved, and each
rejected entry is reported with its position in items.
Response
Successful Response

