Saltar al contenido principal
PATCH
/
v1
/
management
/
connections
/
{id}
Update a connection
curl --request PATCH \
  --url https://reporter.sandbox.lerian.net/v1/management/connections/{id} \
  --header 'Content-Type: application/json' \
  --data '
{
  "configName": "production-db-updated",
  "host": "new-db.example.com",
  "port": 5433,
  "schema": "analytics",
  "userName": "new_dbuser",
  "password": "new_secretpassword",
  "metadata": {
    "environment": "production",
    "team": "data-platform"
  }
}
'
{
  "id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
  "configName": "production-db-updated",
  "productName": "my-product",
  "type": "POSTGRESQL",
  "host": "new-db.example.com",
  "port": 5433,
  "databaseName": "mydatabase",
  "userName": "new_dbuser",
  "schema": "analytics",
  "ssl": {
    "mode": "require"
  },
  "metadata": {
    "environment": "production",
    "team": "data-platform"
  },
  "createdAt": "2024-01-15T10:30:00Z",
  "updatedAt": "2024-01-16T14:20:00Z"
}

Encabezados

Authorization
string

The authorization token in the Bearer <token> format.

Important: This header is required if your environment has Access Manager enabled. For more information, refer to the Access Manager documentation.

Ejemplo:

"Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..."

Parámetros de ruta

id
string<uuid>
requerido

Unique identifier of the connection (UUID format).

Ejemplo:

"019996b8-f3d1-7d2b-a192-6e91464d82fc"

Cuerpo

application/json

Request body for updating an existing database connection. All fields are optional.

configName
string

Unique identifier name for this connection configuration. Must be between 3 and 100 characters.

Required string length: 3 - 100
Ejemplo:

"production-db-updated"

type
enum<string>

Database engine type.

Opciones disponibles:
ORACLE,
SQL_SERVER,
POSTGRESQL,
MONGODB,
MYSQL
Ejemplo:

"POSTGRESQL"

host
string

Hostname or IP address of the database server.

Ejemplo:

"new-db.example.com"

port
integer

Network port number for the database connection.

Rango requerido: 1 <= x <= 65535
Ejemplo:

5433

databaseName
string

Name of the database to connect to on the target server.

Ejemplo:

"mydatabase"

userName
string

Username credential for database authentication.

Ejemplo:

"new_dbuser"

password
string<password>

Password credential for database authentication. This value is encrypted upon storage.

Ejemplo:

"new_secretpassword"

schema
string

Database schema name (for example, public, analytics). Useful for PostgreSQL databases with custom schemas.

Ejemplo:

"analytics"

ssl
object

SSL configuration object containing certificate and security options.

metadata
object

An object containing key-value pairs for storing additional connection-related information. Keys (max 100 characters) and values (max 2000 characters) must be strings. Nested objects are not allowed.

Ejemplo:
{
"environment": "production",
"team": "data-engineering"
}

Respuesta

Indicates that the connection was successfully updated.

Response object containing connection details.

id
string<uuid>
requerido

Unique identifier of the connection (UUID format).

Ejemplo:

"a1b2c3d4-e5f6-7890-abcd-ef1234567890"

configName
string
requerido

Unique identifier name for this connection configuration.

Ejemplo:

"production-db"

type
enum<string>
requerido

Database engine type. Supported values: ORACLE, SQL_SERVER, POSTGRESQL, MONGODB, MYSQL. Note that the data source type field in the List Data Sources endpoint returns lowercase identifiers (postgresql, mongodb).

Opciones disponibles:
ORACLE,
SQL_SERVER,
POSTGRESQL,
MONGODB,
MYSQL
Ejemplo:

"POSTGRESQL"

host
string
requerido

Hostname or IP address of the database server.

Ejemplo:

"db.example.com"

port
integer
requerido

Network port number for the database connection.

Ejemplo:

5432

databaseName
string
requerido

Name of the database to connect to on the target server.

Ejemplo:

"mydatabase"

userName
string
requerido

Username credential for database authentication.

Ejemplo:

"dbuser"

createdAt
string<date-time>
requerido

ISO 8601 timestamp indicating when the connection was created.

Ejemplo:

"2024-01-15T10:30:00Z"

productName
string

The product name associated with this connection. May be empty if the connection has not been assigned to a product.

Ejemplo:

"my-product"

schema
string

Database schema name, when set.

Ejemplo:

"public"

ssl
object

SSL configuration object containing certificate and security options.

metadata
object

An object containing key-value pairs for storing additional connection-related information. Keys (max 100 characters) and values (max 2000 characters) must be strings. Nested objects are not allowed.

Ejemplo:
{
"environment": "production",
"team": "data-engineering"
}
updatedAt
string<date-time>

ISO 8601 timestamp indicating when the connection was last updated.

Ejemplo:

"2024-01-15T10:30:00Z"