capabilities.work

Register a Connection After Testing It

A 4-step recipe with Apache Airflow. We can help you get access.

Recipe · 4 steps

Register a Connection After Testing It

Validate connection credentials, then persist and verify the connection.

  1. Ask Airflow to instantiate the hook for this connection type and actually attempt to reach the target system. Nothing is stored. Note that this endpoint is disabled unless the deployment sets test_connection to Enabled in the core config, s
  2. Persist the connection now that the credentials are known to work.
  3. Read the stored connection to confirm what Airflow persisted. The password is deliberately absent from the response; only the non-secret fields come back.
  4. List the connections to confirm the new one is present in the deployment's inventory, which is the view an operator audits against.
What you'll need to have ready
  • connectionId: The connection id DAGs will reference (e.g. "warehouse_postgres").
  • connType: The connection type, matching an installed provider hook (e.g. "postgres", "http", "aws", "snowflake").
  • host: The host name or endpoint for the target system.
  • schemaName: The schema or database name. Sent as the connection's "schema" field, which is named for the database concept rather than a JSON schema.
  • login: The user name or access key used to authenticate.
  • password: The secret used to authenticate. Airflow stores this encrypted with the Fernet key and never returns it on read.
  • port: The port on the target host.
  • extra: Provider-specific options as a JSON-encoded string, e.g. "{\"sslmode\": \"require\"}".
  • description: A human readable description of what this connection reaches.
For your developer

Arazzo workflow apache-airflow:register-connection, 4 operations: postApiV2ConnectionsTest → postApiV2Connections → getApiV2ConnectionsByConnectionId → getApiV2Connections. Specs on APIs.io.