Connections
What are Connections?
Connections allow your workspace to connect to external systems via queries. Workflows use them.
They're not necessary for workflows to make queries, but they help standardize configurations like base_url
or auth_method
.
Connection Versions
Connections are versioned objects. Versions can have either draft
or published
status. You can't edit published versions, but you can use them. This also means that most parameters are part of the Version rather than the Connection itself.
Connection Variables
Variables that are passed to this connection can be reused. For example, a connection version can have variables:
{
"api_version": "v2",
"header_auth_prefix": "Bearer"
}
And then reuse it like:
{
"base_query": {
"parameters": {
"base_url": "https://random_site.com/api/{{api_version}}",
"headers": {
"authorization": "{{header_auth_prefix}} {{auth_value}}"
},
"content_type": "json"
}
}
}
Connection Types
For now, Modernbanc supports http
and postgres
connections. In the future, we plan to add graphql
and other connection types.
In http
connections you can specify base queries, health-check queries, and authorization methods.
Base query
works as baseline settings for any query made through this connection. For example, if the base query hasbase_url
orurl
specified, then making a query without url will use those baseline values.Health-check query
is for checking if the other system is OK before making a request. If the health-check query fails, the original request will fail too.Auth methods
that are currently supported:oauth_2
. If you require custom authentication logic, you can make it happen via variables.
Query Parameters
Connection Version Parameters Example
Usage
Create connection
- Navigate to the Connections dropdown, or press
G
andC
. - Click the
Create
button, or pressC
, to create a new connection. - Enter a
Name
and optionalDescription
for the connection. - Click the
Edit
button in the top nav to edit the connection. - Click on the
Save
button in the top nav to save the connection after making changes.
To publish the connection, click the Publish
button in the top nav.
Update connection
If a connection is published, only the name
and description
fields can be updated. However, we can create a new connection version to change additional fields in the connection.
- Navigate to the Connections dropdown, or press
G
andC
. - Click on the
Create version
button in the top right corner. - Update the fields as needed.
- Click on the
Save
button in the top nav to save the connection after making changes.
To publish the connection if not already published, click the Publish
button in the top nav.