Update Cache Connection
curl --request POST \
--url https://cloud.cdata.com/api/job/cacheConnection \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"connectionString": "Server=<Server URL>;Port=5432;User=username;Password=password;Database=cachedb;"
}
'import requests
url = "https://cloud.cdata.com/api/job/cacheConnection"
payload = { "connectionString": "Server=<Server URL>;Port=5432;User=username;Password=password;Database=cachedb;" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
connectionString: 'Server=<Server URL>;Port=5432;User=username;Password=password;Database=cachedb;'
})
};
fetch('https://cloud.cdata.com/api/job/cacheConnection', 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://cloud.cdata.com/api/job/cacheConnection",
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([
'connectionString' => 'Server=<Server URL>;Port=5432;User=username;Password=password;Database=cachedb;'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"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://cloud.cdata.com/api/job/cacheConnection"
payload := strings.NewReader("{\n \"connectionString\": \"Server=<Server URL>;Port=5432;User=username;Password=password;Database=cachedb;\"\n}")
req, _ := http.NewRequest("POST", url, payload)
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://cloud.cdata.com/api/job/cacheConnection")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"connectionString\": \"Server=<Server URL>;Port=5432;User=username;Password=password;Database=cachedb;\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://cloud.cdata.com/api/job/cacheConnection")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"connectionString\": \"Server=<Server URL>;Port=5432;User=username;Password=password;Database=cachedb;\"\n}"
response = http.request(request)
puts response.read_body{
"connection": {
"accountId": "fee1ce9d-c40c-4ef6-8f8c-77461315713d",
"connectionString": "server=<Server URL>;port=5432;user=username;password=password;database=cachedb",
"connectionType": 0,
"created": "2025-11-20T15:26:43.096Z",
"driver": "PostgreSQL",
"driverVersion": "24.0.9172.0",
"id": "1c9b0ae6-3a6f-417a-8460-4ce5b5528540",
"isTested": false,
"lastModified": "2025-11-20T15:52:32.8444712Z",
"name": "CacheConnection",
"walletFilePresent": false,
"isCannedConnection": false
}
}Job API
キャッシュコネクションの更新
他のキャッシュ API 呼び出しで使用するキャッシュコネクションを作成または更新します。
POST
/
job
/
cacheConnection
Update Cache Connection
curl --request POST \
--url https://cloud.cdata.com/api/job/cacheConnection \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"connectionString": "Server=<Server URL>;Port=5432;User=username;Password=password;Database=cachedb;"
}
'import requests
url = "https://cloud.cdata.com/api/job/cacheConnection"
payload = { "connectionString": "Server=<Server URL>;Port=5432;User=username;Password=password;Database=cachedb;" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
connectionString: 'Server=<Server URL>;Port=5432;User=username;Password=password;Database=cachedb;'
})
};
fetch('https://cloud.cdata.com/api/job/cacheConnection', 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://cloud.cdata.com/api/job/cacheConnection",
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([
'connectionString' => 'Server=<Server URL>;Port=5432;User=username;Password=password;Database=cachedb;'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"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://cloud.cdata.com/api/job/cacheConnection"
payload := strings.NewReader("{\n \"connectionString\": \"Server=<Server URL>;Port=5432;User=username;Password=password;Database=cachedb;\"\n}")
req, _ := http.NewRequest("POST", url, payload)
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://cloud.cdata.com/api/job/cacheConnection")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"connectionString\": \"Server=<Server URL>;Port=5432;User=username;Password=password;Database=cachedb;\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://cloud.cdata.com/api/job/cacheConnection")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"connectionString\": \"Server=<Server URL>;Port=5432;User=username;Password=password;Database=cachedb;\"\n}"
response = http.request(request)
puts response.read_body{
"connection": {
"accountId": "fee1ce9d-c40c-4ef6-8f8c-77461315713d",
"connectionString": "server=<Server URL>;port=5432;user=username;password=password;database=cachedb",
"connectionType": 0,
"created": "2025-11-20T15:26:43.096Z",
"driver": "PostgreSQL",
"driverVersion": "24.0.9172.0",
"id": "1c9b0ae6-3a6f-417a-8460-4ce5b5528540",
"isTested": false,
"lastModified": "2025-11-20T15:52:32.8444712Z",
"name": "CacheConnection",
"walletFilePresent": false,
"isCannedConnection": false
}
}承認
JWT token authentication. Include the token in the Authorization header as Bearer {token}. See Authentication for more information on creating a token.
ボディ
application/json
The connection string used to configure the user's PostgreSQL connection. The connection string contains the fields Server, Port, User, Password, and Database, separated by semicolons. Optionally, you can include BrowsableSchemas to limit the schemas.
例:
"Server=<Server URL>;Port=5432;User=username;Password=password;Database=cachedb;"
レスポンス
200 - application/json
OK
このページは役に立ちましたか?
⌘I