Update a BigQuery connection
curl --request PATCH \
--url https://api.select.dev/v2/bigquery-connections/{bigquery_connection_id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'x-tenant-id: <x-tenant-id>' \
--data '
{
"name": "<string>",
"gcp_project_id": "<string>",
"bigquery_dataset_id": "<string>",
"billing_account_id": "<string>",
"billing_project_id": "<string>",
"service_account": "<string>",
"sync_enabled": true,
"query_sanitization_enabled": true
}
'import requests
url = "https://api.select.dev/v2/bigquery-connections/{bigquery_connection_id}"
payload = {
"name": "<string>",
"gcp_project_id": "<string>",
"bigquery_dataset_id": "<string>",
"billing_account_id": "<string>",
"billing_project_id": "<string>",
"service_account": "<string>",
"sync_enabled": True,
"query_sanitization_enabled": True
}
headers = {
"x-tenant-id": "<x-tenant-id>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {
'x-tenant-id': '<x-tenant-id>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
name: '<string>',
gcp_project_id: '<string>',
bigquery_dataset_id: '<string>',
billing_account_id: '<string>',
billing_project_id: '<string>',
service_account: '<string>',
sync_enabled: true,
query_sanitization_enabled: true
})
};
fetch('https://api.select.dev/v2/bigquery-connections/{bigquery_connection_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.select.dev/v2/bigquery-connections/{bigquery_connection_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'name' => '<string>',
'gcp_project_id' => '<string>',
'bigquery_dataset_id' => '<string>',
'billing_account_id' => '<string>',
'billing_project_id' => '<string>',
'service_account' => '<string>',
'sync_enabled' => true,
'query_sanitization_enabled' => true
]),
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/bigquery-connections/{bigquery_connection_id}"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"gcp_project_id\": \"<string>\",\n \"bigquery_dataset_id\": \"<string>\",\n \"billing_account_id\": \"<string>\",\n \"billing_project_id\": \"<string>\",\n \"service_account\": \"<string>\",\n \"sync_enabled\": true,\n \"query_sanitization_enabled\": true\n}")
req, _ := http.NewRequest("PATCH", 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.patch("https://api.select.dev/v2/bigquery-connections/{bigquery_connection_id}")
.header("x-tenant-id", "<x-tenant-id>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"gcp_project_id\": \"<string>\",\n \"bigquery_dataset_id\": \"<string>\",\n \"billing_account_id\": \"<string>\",\n \"billing_project_id\": \"<string>\",\n \"service_account\": \"<string>\",\n \"sync_enabled\": true,\n \"query_sanitization_enabled\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.select.dev/v2/bigquery-connections/{bigquery_connection_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["x-tenant-id"] = '<x-tenant-id>'
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"gcp_project_id\": \"<string>\",\n \"bigquery_dataset_id\": \"<string>\",\n \"billing_account_id\": \"<string>\",\n \"billing_project_id\": \"<string>\",\n \"service_account\": \"<string>\",\n \"sync_enabled\": true,\n \"query_sanitization_enabled\": true\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"etag": "<string>",
"name": "<string>",
"gcp_project_id": "<string>",
"regions": [
"<string>"
],
"is_doit": true,
"connection_id": "<string>",
"sync_enabled": true,
"query_sanitization_enabled": true,
"create_time": "<string>",
"update_time": "<string>",
"bigquery_dataset_id": "<string>",
"billing_account_id": "<string>",
"billing_project_id": "<string>",
"service_account": "<string>",
"gcp_organization_id": "<string>",
"gcp_organization_name": "<string>",
"doit_billing_status": "active",
"added_by_email": "<string>",
"last_successful_sync_time": "<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": [
{}
]
}{
"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": [
{}
]
}bigquery-connections
Update a BigQuery connection
Update a BigQuery connection.
Merge-patch: only the fields you send change; omitted fields are left as-is.
PATCH
/
bigquery-connections
/
{bigquery_connection_id}
Update a BigQuery connection
curl --request PATCH \
--url https://api.select.dev/v2/bigquery-connections/{bigquery_connection_id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'x-tenant-id: <x-tenant-id>' \
--data '
{
"name": "<string>",
"gcp_project_id": "<string>",
"bigquery_dataset_id": "<string>",
"billing_account_id": "<string>",
"billing_project_id": "<string>",
"service_account": "<string>",
"sync_enabled": true,
"query_sanitization_enabled": true
}
'import requests
url = "https://api.select.dev/v2/bigquery-connections/{bigquery_connection_id}"
payload = {
"name": "<string>",
"gcp_project_id": "<string>",
"bigquery_dataset_id": "<string>",
"billing_account_id": "<string>",
"billing_project_id": "<string>",
"service_account": "<string>",
"sync_enabled": True,
"query_sanitization_enabled": True
}
headers = {
"x-tenant-id": "<x-tenant-id>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {
'x-tenant-id': '<x-tenant-id>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
name: '<string>',
gcp_project_id: '<string>',
bigquery_dataset_id: '<string>',
billing_account_id: '<string>',
billing_project_id: '<string>',
service_account: '<string>',
sync_enabled: true,
query_sanitization_enabled: true
})
};
fetch('https://api.select.dev/v2/bigquery-connections/{bigquery_connection_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.select.dev/v2/bigquery-connections/{bigquery_connection_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'name' => '<string>',
'gcp_project_id' => '<string>',
'bigquery_dataset_id' => '<string>',
'billing_account_id' => '<string>',
'billing_project_id' => '<string>',
'service_account' => '<string>',
'sync_enabled' => true,
'query_sanitization_enabled' => true
]),
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/bigquery-connections/{bigquery_connection_id}"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"gcp_project_id\": \"<string>\",\n \"bigquery_dataset_id\": \"<string>\",\n \"billing_account_id\": \"<string>\",\n \"billing_project_id\": \"<string>\",\n \"service_account\": \"<string>\",\n \"sync_enabled\": true,\n \"query_sanitization_enabled\": true\n}")
req, _ := http.NewRequest("PATCH", 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.patch("https://api.select.dev/v2/bigquery-connections/{bigquery_connection_id}")
.header("x-tenant-id", "<x-tenant-id>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"gcp_project_id\": \"<string>\",\n \"bigquery_dataset_id\": \"<string>\",\n \"billing_account_id\": \"<string>\",\n \"billing_project_id\": \"<string>\",\n \"service_account\": \"<string>\",\n \"sync_enabled\": true,\n \"query_sanitization_enabled\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.select.dev/v2/bigquery-connections/{bigquery_connection_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["x-tenant-id"] = '<x-tenant-id>'
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"gcp_project_id\": \"<string>\",\n \"bigquery_dataset_id\": \"<string>\",\n \"billing_account_id\": \"<string>\",\n \"billing_project_id\": \"<string>\",\n \"service_account\": \"<string>\",\n \"sync_enabled\": true,\n \"query_sanitization_enabled\": true\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"etag": "<string>",
"name": "<string>",
"gcp_project_id": "<string>",
"regions": [
"<string>"
],
"is_doit": true,
"connection_id": "<string>",
"sync_enabled": true,
"query_sanitization_enabled": true,
"create_time": "<string>",
"update_time": "<string>",
"bigquery_dataset_id": "<string>",
"billing_account_id": "<string>",
"billing_project_id": "<string>",
"service_account": "<string>",
"gcp_organization_id": "<string>",
"gcp_organization_name": "<string>",
"doit_billing_status": "active",
"added_by_email": "<string>",
"last_successful_sync_time": "<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": [
{}
]
}{
"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
application/json
A merge-patch update to an existing BigQuery connection: an omitted
field is left unchanged, and null clears it.
Every field mirrors its BigQueryConnectionCreate counterpart. is_doit
cannot be changed once the connection is added, so it has no counterpart
here.
Response
Successful Response
A connection to one BigQuery project.
Whether SELECT can read this connection's spend from DoiT's billing data. pending while SELECT confirms access, active once spend is flowing, and inactive if it cannot be read — contact support. Null when is_doit is false.
Available options:
active, pending, inactive 
