Upsert external connection as code
Create or update a data-app external connection from its code representation. Enterprise only; requires the manage ExternalConnection permission. The body nests the document under `connection`; the optional `secret` rides alongside it and is never part of the YAML document.
Authentication: personal access token. The spec defines an api_key security
scheme — send an Authorization: ApiKey <your-personal-access-token> header
(value format: ApiKey <your key>). A session_cookie scheme (connect.sid)
exists for browser sessions. Operations in this spec declare security: [], an
artifact of the upstream spec generator — authentication is still enforced by the
server.
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
projectUuid | string | Yes | |
slug | string | Yes |
Query parameters
| Name | Type | Required | Description |
|---|---|---|---|
force | boolean | No |
Request body
{
"secret": "string",
"connection": {
"customHeaders": {},
"oauthClientAuthMethod": {},
"oauthClientId": "string",
"oauthTokenUrl": "string",
"oauthScopes": [
"string"
],
"apiKeyLocation": {},
"apiKeyName": "string",
"rateLimitPerMinute": 0,
"timeoutMs": 0,
"requestMaxBytes": 0,
"responseMaxBytes": 0,
"allowedContentTypes": [
"string"
],
"allowedMethods": [
"GET"
],
"allowedPathPrefixes": [
"string"
],
"instructions": "string",
"allowDataAppBuilderLinking": true,
"allowBrowserImages": true,
"origin": "string",
"authType": "none",
"name": "string",
"slug": "string",
"version": 0,
"contentType": "external_connection"
}
}Responses
200 — Success
{
"results": {
"action": "create"
},
"status": "ok"
}default — Error
{
"error": {
"data": "string",
"message": "string",
"name": "string",
"statusCode": 0
},
"status": "error"
}