Python
from engini import Engini
client = Engini() # reads ENGINI_API_KEY
client.connections.update(481, name="prod key", fields={"apiKey": "sk-new"})import { Engini } from "@engini/sdk";
const client = new Engini(); // reads ENGINI_API_KEY
await client.connections.update(481, { name: "prod key", fields: { apiKey: "sk-new" } });engini connections update 481 --name "prod key" --field apiKey=sk-newconst options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
connectionName: '<string>',
description: '<string>',
fields: {},
metadata: {},
oauthState: '<string>'
})
};
fetch('https://api.engini.io/v1/connections/{connectionId}', 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.engini.io/v1/connections/{connectionId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'connectionName' => '<string>',
'description' => '<string>',
'fields' => [
],
'metadata' => [
],
'oauthState' => '<string>'
]),
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://api.engini.io/v1/connections/{connectionId}"
payload := strings.NewReader("{\n \"connectionName\": \"<string>\",\n \"description\": \"<string>\",\n \"fields\": {},\n \"metadata\": {},\n \"oauthState\": \"<string>\"\n}")
req, _ := http.NewRequest("PUT", 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.put("https://api.engini.io/v1/connections/{connectionId}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"connectionName\": \"<string>\",\n \"description\": \"<string>\",\n \"fields\": {},\n \"metadata\": {},\n \"oauthState\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.engini.io/v1/connections/{connectionId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"connectionName\": \"<string>\",\n \"description\": \"<string>\",\n \"fields\": {},\n \"metadata\": {},\n \"oauthState\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"connectionId": 123,
"connectionName": "<string>",
"applicationSlug": "<string>",
"kind": "<string>",
"isPublic": true,
"createdBy": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"createdDate": "2023-11-07T05:31:56Z",
"workspace": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>"
},
"environment": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"type": "<string>"
},
"description": "<string>",
"applicationName": "<string>",
"applicationLogo": "<string>",
"updatedBy": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"updatedDate": "2023-11-07T05:31:56Z",
"authenticationId": 123,
"authenticationType": "<string>",
"fields": {},
"useSelectDBObjects": true,
"connectionError": "<string>",
"isAlive": true,
"metadata": {}
}{
"errorCode": "<string>",
"message": "<string>",
"requestId": "<string>",
"timestamp": "<string>",
"details": [
{
"field": "<string>",
"issue": "<string>"
}
]
}{
"errorCode": "<string>",
"message": "<string>",
"requestId": "<string>",
"timestamp": "<string>",
"details": [
{
"field": "<string>",
"issue": "<string>"
}
]
}{
"errorCode": "<string>",
"message": "<string>",
"requestId": "<string>",
"timestamp": "<string>",
"details": [
{
"field": "<string>",
"issue": "<string>"
}
]
}{
"errorCode": "<string>",
"message": "<string>",
"requestId": "<string>",
"timestamp": "<string>",
"details": [
{
"field": "<string>",
"issue": "<string>"
}
]
}{
"errorCode": "<string>",
"message": "<string>",
"requestId": "<string>",
"timestamp": "<string>",
"details": [
{
"field": "<string>",
"issue": "<string>"
}
]
}{
"errorCode": "<string>",
"message": "<string>",
"requestId": "<string>",
"timestamp": "<string>",
"details": [
{
"field": "<string>",
"issue": "<string>"
}
]
}Connections
Update connection
Updates a connection owned by the caller’s account. Only the fields present in the request body are changed; connectionName, description, fields, and metadata are each left unchanged when omitted (null). Supplying fields or metadata replaces the entire map, it does not merge with the existing one.
PUT
/
v1
/
connections
/
{connectionId}
Python
from engini import Engini
client = Engini() # reads ENGINI_API_KEY
client.connections.update(481, name="prod key", fields={"apiKey": "sk-new"})import { Engini } from "@engini/sdk";
const client = new Engini(); // reads ENGINI_API_KEY
await client.connections.update(481, { name: "prod key", fields: { apiKey: "sk-new" } });engini connections update 481 --name "prod key" --field apiKey=sk-newconst options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
connectionName: '<string>',
description: '<string>',
fields: {},
metadata: {},
oauthState: '<string>'
})
};
fetch('https://api.engini.io/v1/connections/{connectionId}', 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.engini.io/v1/connections/{connectionId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'connectionName' => '<string>',
'description' => '<string>',
'fields' => [
],
'metadata' => [
],
'oauthState' => '<string>'
]),
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://api.engini.io/v1/connections/{connectionId}"
payload := strings.NewReader("{\n \"connectionName\": \"<string>\",\n \"description\": \"<string>\",\n \"fields\": {},\n \"metadata\": {},\n \"oauthState\": \"<string>\"\n}")
req, _ := http.NewRequest("PUT", 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.put("https://api.engini.io/v1/connections/{connectionId}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"connectionName\": \"<string>\",\n \"description\": \"<string>\",\n \"fields\": {},\n \"metadata\": {},\n \"oauthState\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.engini.io/v1/connections/{connectionId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"connectionName\": \"<string>\",\n \"description\": \"<string>\",\n \"fields\": {},\n \"metadata\": {},\n \"oauthState\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"connectionId": 123,
"connectionName": "<string>",
"applicationSlug": "<string>",
"kind": "<string>",
"isPublic": true,
"createdBy": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"createdDate": "2023-11-07T05:31:56Z",
"workspace": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>"
},
"environment": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"type": "<string>"
},
"description": "<string>",
"applicationName": "<string>",
"applicationLogo": "<string>",
"updatedBy": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"updatedDate": "2023-11-07T05:31:56Z",
"authenticationId": 123,
"authenticationType": "<string>",
"fields": {},
"useSelectDBObjects": true,
"connectionError": "<string>",
"isAlive": true,
"metadata": {}
}{
"errorCode": "<string>",
"message": "<string>",
"requestId": "<string>",
"timestamp": "<string>",
"details": [
{
"field": "<string>",
"issue": "<string>"
}
]
}{
"errorCode": "<string>",
"message": "<string>",
"requestId": "<string>",
"timestamp": "<string>",
"details": [
{
"field": "<string>",
"issue": "<string>"
}
]
}{
"errorCode": "<string>",
"message": "<string>",
"requestId": "<string>",
"timestamp": "<string>",
"details": [
{
"field": "<string>",
"issue": "<string>"
}
]
}{
"errorCode": "<string>",
"message": "<string>",
"requestId": "<string>",
"timestamp": "<string>",
"details": [
{
"field": "<string>",
"issue": "<string>"
}
]
}{
"errorCode": "<string>",
"message": "<string>",
"requestId": "<string>",
"timestamp": "<string>",
"details": [
{
"field": "<string>",
"issue": "<string>"
}
]
}{
"errorCode": "<string>",
"message": "<string>",
"requestId": "<string>",
"timestamp": "<string>",
"details": [
{
"field": "<string>",
"issue": "<string>"
}
]
}Body
application/json
The fields to update on the connection.
Request body for updating a connection; null members are left unchanged.
Response
The updated connection.
Public-shape detail for /v1/Connections/{id} and create/update responses.