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 queryworks as baseline settings for any query made through this connection. For example, if the base query hasbase_urlorurlspecified, then making a query without url will use those baseline values.Health-check queryis 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 methodsthat 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
GandC. - Click the
Createbutton, or pressC, to create a new connection. - Enter a
Nameand optionalDescriptionfor the connection. - Click the
Editbutton in the top nav to edit the connection. - Click on the
Savebutton 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
GandC. - Click on the
Create versionbutton in the top right corner. - Update the fields as needed.
- Click on the
Savebutton 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.