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",
"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>"
}
]
}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.
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",
"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>"
}
]
}Authorizations
Enter your JWT token
Path Parameters
The identifier of the connection to update.
Body
The fields to update on the connection.
Request body for updating a connection; null members are left unchanged.
New display name; null leaves it unchanged.
New description; null leaves it unchanged.
Connection field values to update, keyed by field name; null leaves them unchanged.
Show child attributes
Show child attributes
Metadata to update, keyed by name; null leaves it unchanged.
Show child attributes
Show child attributes
Opaque state from the sign-in URL. When set on an OAuth method, credentials are taken from the stored sign-in and any client-supplied values for those keys are ignored.
Response
The updated connection.
Public-shape detail for /v1/Connections/{id} and create/update responses.
Identifier of the connection.
Display name of the connection.
Slug of the connection's application.
Which kind of connection this is: Regular, Key or MCPClient. Mirrors the parent application's AppConnectionType. The engini.io Connections page's "Keys" tab is exactly the Key subset. On-premise agents are served by /v1/on-prem-agents.
Whether the connection is shared/public.
Identifier of the user who created the connection.
When the connection was created.
Description of the connection.
Display name of the connection's application.
URL of the application's logo image.
Identifier of the user who last updated the connection; null if never updated.
When the connection was last updated; null if never updated.
Identifier of the authentication method used by the connection.
Name of the authentication type used by the connection.
Connection field values, keyed by field name (sensitive values may be masked).
Show child attributes
Show child attributes
Whether the connection uses selected database objects.
Last connection error message, if any.
Whether the connection is currently healthy/reachable.
Additional connection metadata, keyed by name.
Show child attributes
Show child attributes