# Connection service

A Connection contains the relevant metadata and information to be used as a data source for runs. The Connection Service is responsible for creating, updating, and retrieving database connections.

OpenAPI file: [`ConnectionService.json`](https://dev.nominal.io/api/_downloads/76e207a1008622c79514eb534c5c85ac/ConnectionService.json)

## Endpoints

### Create connection

POST `/data-source/connection/v1/connections`

**Deprecated:** Use CatalogService#createDataset to create a dataset, then ConnectionService#registerExternalConnectionConfig to register external connection config on it.

Creates a new connection.

Body

`name` string required
:   ​

`description` string
:   ​

`connectionDetails` [`ConnectionDetails`](https://dev.nominal.io/api/rest/connection-service.md#connectiondetails) required
:   ​

    **timescale**

    Set `type` to `"timescale"`.

    `timescale` [`TimescaleConnectionDetails`](https://dev.nominal.io/api/rest/connection-service.md#timescaleconnectiondetails)
    :   ​

        Fields of `TimescaleConnectionDetails`

        `database` string required
        :   ​

        `host` string required
        :   ​

        `port` integer required
        :   ​

        `username` string required
        :   This is also the reference to the secret containing the password

        `passwordSecretRid` string (RID) required
        :   Secret Rid of password secret stored in Secrets Service.

    **influx**

    Set `type` to `"influx"`.

    `influx` [`Influx2ConnectionDetails`](https://dev.nominal.io/api/rest/connection-service.md#influx2connectiondetails)
    :   ​

        Fields of `Influx2ConnectionDetails`

        `host` string required
        :   ​

        `port` integer required
        :   ​

        `headers` map of string to [`HeaderValue`](https://dev.nominal.io/api/rest/connection-service.md#headervalue)
        :   A map of header name to value

            **plain**

            Set `type` to `"plain"`.

            `plain` string
            :   ​

            **secretRid**

            Set `type` to `"secretRid"`.

            `secretRid` string (RID)
            :   ​

        `org` string required
        :   ​

        `tokenSecretRid` string (RID) required
        :   Secret Rid of token secret stored in Secrets Service.

    **influx1**

    Set `type` to `"influx1"`.

    `influx1` [`Influx1ConnectionDetails`](https://dev.nominal.io/api/rest/connection-service.md#influx1connectiondetails)
    :   ​

        Fields of `Influx1ConnectionDetails`

        `host` string required
        :   ​

        `port` integer required
        :   ​

        `headers` map of string to [`HeaderValue`](https://dev.nominal.io/api/rest/connection-service.md#headervalue)
        :   A map of header name to value

        `credentials` [`PasswordCredentials`](https://dev.nominal.io/api/rest/connection-service.md#passwordcredentials)
        :   ​

            Fields of `PasswordCredentials`

            `username` string required
            :   ​

            `passwordSecretRid` string (RID) required
            :   Secret Rid of password secret stored in Secrets Service.

    **nominal**

    Set `type` to `"nominal"`.

    `nominal` [`NominalConnectionDetails`](https://dev.nominal.io/api/rest/connection-service.md#nominalconnectiondetails)
    :   ​

        Fields of `NominalConnectionDetails`

        `nominalDataSourceRid` string (RID) required
        :   ​

    **timestream**

    Set `type` to `"timestream"`.

    `timestream` [`TimestreamConnectionDetails`](https://dev.nominal.io/api/rest/connection-service.md#timestreamconnectiondetails)
    :   ​

        Fields of `TimestreamConnectionDetails`

        `nominalRoleArn` string required
        :   The role ARN owned by Nominal that has permission to assume the externalRoleArn.

        `nominalRoleRegion` string required
        :   AWS region that contains the Nominal role.

        `externalRegion` string required
        :   AWS region that contains the Timestream instance.

        `externalRoleArn` string required
        :   The role ARN used to make queries to Timestream. This role is owned by the AWS account that owns the Timestream instance.

        `database` string required
        :   Database inside of the Timestream instance to connect to.

    **visualCrossing**

    Set `type` to `"visualCrossing"`.

    `visualCrossing` [`VisualCrossingConnectionDetails`](https://dev.nominal.io/api/rest/connection-service.md#visualcrossingconnectiondetails)
    :   ​

        Fields of `VisualCrossingConnectionDetails`

        `apiKeySecretRid` string (RID) required
        :   Secret Rid of API key stored in Secrets Service.

    **bigQuery**

    Set `type` to `"bigQuery"`.

    `bigQuery` [`BigQueryConnectionDetails`](https://dev.nominal.io/api/rest/connection-service.md#bigqueryconnectiondetails)
    :   ​

        Fields of `BigQueryConnectionDetails`

        `region` string required
        :   The region of the BigQuery Project (e.g. “us-east1”)

        `project` string required
        :   The name of the BigQuery Project

        `dataset` string required
        :   The name of the dataset within the project

        `table` string required
        :   The name of the table within the dataset

        `serviceAccountKeySecretRid` string (RID) required
        :   Secret Rid of service account key stored in Secrets Service.

`metadata` map of string to string
:   Metadata information about the connection which is not relevant to the DB connection itself.

`requiredTagNames` array of string
:   Additional tag name that are required to construct a fully qualified series.

`availableTagValues` map of `TagName` to array of string
:   In most cases, this does not to be set by the user. Throws if populated for Nominal connections, which have their tags automatically indexed in the underlying database. Tags for external connections are periodically scraped. Tags should only be updated manually for Visual crossing connections.

`scraping` [`ScrapingConfig`](https://dev.nominal.io/api/rest/connection-service.md#scrapingconfig)
:   ​

    **influx**

    Set `type` to `"influx"`.

    `influx` [`InfluxScrapingConfig`](https://dev.nominal.io/api/rest/connection-service.md#influxscrapingconfig)
    :   ​

        Fields of `InfluxScrapingConfig`

        `filter` array of [`InfluxScrapingFilter`](https://dev.nominal.io/api/rest/connection-service.md#influxscrapingfilter)
        :   Filters are ANDed together

            **not**

            Set `type` to `"not"`.

            `not` [`InfluxScrapingFilter`](https://dev.nominal.io/api/rest/connection-service.md#influxscrapingfilter)
            :   ​

            **matchBucket**

            Set `type` to `"matchBucket"`.

            `matchBucket` array of string
            :   Match any of the specified buckets

            **matchMeasurement**

            Set `type` to `"matchMeasurement"`.

            `matchMeasurement` array of string
            :   Match any of the specified measurements

        `seriesArchetypeConstruction` [`InfluxSeriesArchetypeConstructionConfig`](https://dev.nominal.io/api/rest/connection-service.md#influxseriesarchetypeconstructionconfig) required
        :   ​

            Fields of `InfluxSeriesArchetypeConstructionConfig`

            `channelNameComponents` array of [`InfluxChannelNameComponent`](https://dev.nominal.io/api/rest/connection-service.md#influxchannelnamecomponent)
            :   ​

                **bucket**

                Set `type` to `"bucket"`.

                `bucket` [`Empty`](https://dev.nominal.io/api/rest/connection-service.md#empty)
                :   ​

                **measurement**

                Set `type` to `"measurement"`.

                `measurement` [`Empty`](https://dev.nominal.io/api/rest/connection-service.md#empty)
                :   ​

                **field**

                Set `type` to `"field"`.

                `field` [`Empty`](https://dev.nominal.io/api/rest/connection-service.md#empty)
                :   ​

            `separator` string required
            :   ​

    **nominal**

    Set `type` to `"nominal"`.

    `nominal` [`NominalScrapingConfig`](https://dev.nominal.io/api/rest/connection-service.md#nominalscrapingconfig)
    :   ​

        Fields of `NominalScrapingConfig`

        `channelNameComponents` array of [`NominalChannelNameComponent`](https://dev.nominal.io/api/rest/connection-service.md#nominalchannelnamecomponent)
        :   channelNameComponents will be combined, together with separator, to form a fully qualified channel name.

            **channel**

            Set `type` to `"channel"`.

            `channel` [`Empty`](https://dev.nominal.io/api/rest/connection-service.md#empty)
            :   ​

            **valueOfTagWithName**

            Set `type` to `"valueOfTagWithName"`.

            `valueOfTagWithName` string
            :   The value of the specified TagName will be used. If the tag is not present, it will be omitted.

        `separator` string required
        :   ​

    **timestream**

    Set `type` to `"timestream"`.

    `timestream` [`TimestreamScrapingConfig`](https://dev.nominal.io/api/rest/connection-service.md#timestreamscrapingconfig)
    :   ​

        Fields of `TimestreamScrapingConfig`

        `filter` array of [`TimestreamScrapingFilter`](https://dev.nominal.io/api/rest/connection-service.md#timestreamscrapingfilter)
        :   In order for data to be picked up by the scraper, it must match all filters in this list.

            **matchTable**

            Set `type` to `"matchTable"`.

            `matchTable` array of string
            :   Match any of the specified tables in the database.

        `channelNameComponents` array of [`TimestreamChannelNameComponent`](https://dev.nominal.io/api/rest/connection-service.md#timestreamchannelnamecomponent)
        :   channelNameComponents will be combined, together with separator, to form a fully qualified channel name.

            **table**

            Set `type` to `"table"`.

            `table` [`Empty`](https://dev.nominal.io/api/rest/connection-service.md#empty)
            :   ​

            **measure**

            Set `type` to `"measure"`.

            `measure` [`Empty`](https://dev.nominal.io/api/rest/connection-service.md#empty)
            :   ​

            **attribute**

            Set `type` to `"attribute"`.

            `attribute` [`Empty`](https://dev.nominal.io/api/rest/connection-service.md#empty)
            :   ​

            **valueOfTagWithName**

            Set `type` to `"valueOfTagWithName"`.

            `valueOfTagWithName` string
            :   The value of the specified TagName will be used. If the tag is not present, it will be omitted.

        `separator` string required
        :   ​

        `maxLookBackPeriodHours` integer
        :   The maximum time in hours to look back over series data to find unique measure and tag combinations. If not specified, the default look back period will be used.

    **timescale**

    Set `type` to `"timescale"`.

    `timescale` [`PivotedTimescaleScrapingConfig`](https://dev.nominal.io/api/rest/connection-service.md#pivotedtimescalescrapingconfig)
    :   ​

        Fields of `PivotedTimescaleScrapingConfig`

        `filter` array of [`TimescaleScrapingFilter`](https://dev.nominal.io/api/rest/connection-service.md#timescalescrapingfilter)
        :   In order for data to be picked up by the scraper, it must match all filters in this list. To exclude chunks of data, it’s possible to use a not filter.

            **not**

            Set `type` to `"not"`.

            `not` [`TimescaleScrapingFilter`](https://dev.nominal.io/api/rest/connection-service.md#timescalescrapingfilter)
            :   ​

            **matchTable**

            Set `type` to `"matchTable"`.

            `matchTable` array of string
            :   Match any of the specified tables in the database.

            **matchSchema**

            Set `type` to `"matchSchema"`.

            `matchSchema` array of string
            :   Match any of the specified schemas in the database.

        `timeColumn` string required
        :   The name of the column that holds the timestamp.

        `nameColumn` string required
        :   The name of the column that holds the series name.

        `valueColumn` string required
        :   The name of the column that holds the series values.

        `dimensionColumns` array of string
        :   The names of the columns that comprise a dimension. They should have a database index for efficient filtering. We do not discover dimensions based on hypertable schema because they are not necessarily configured properly.

        `channelNameComponents` array of [`PivotedTimescaleChannelNameComponent`](https://dev.nominal.io/api/rest/connection-service.md#pivotedtimescalechannelnamecomponent)
        :   channelNameComponents will be combined, together with separator, to form a fully qualified channel name.

            **table**

            Set `type` to `"table"`.

            `table` [`Empty`](https://dev.nominal.io/api/rest/connection-service.md#empty)
            :   ​

            **name**

            Set `type` to `"name"`.

            `name` [`Empty`](https://dev.nominal.io/api/rest/connection-service.md#empty)
            :   The value of the name column.

        `separator` string required
        :   ​

    **visualCrossing**

    Set `type` to `"visualCrossing"`.

    `visualCrossing` [`VisualCrossingScrapingConfig`](https://dev.nominal.io/api/rest/connection-service.md#visualcrossingscrapingconfig)
    :   ​

        Fields of `VisualCrossingScrapingConfig`

        `availableSeries` array of [`VisualCrossingAvailableSeries`](https://dev.nominal.io/api/rest/connection-service.md#visualcrossingavailableseries) deprecated
        :   list of available channels **Deprecated:** No longer used for anything

            Fields of `VisualCrossingAvailableSeries`

            `channel` string required
            :   ​

            `unit` string
            :   ​

            `description` string
            :   ​

            `type` [`VisualCrossingType`](https://dev.nominal.io/api/rest/connection-service.md#visualcrossingtype) required
            :   ​

                Values of `VisualCrossingType`

                `DOUBLE`
                :   ​

                `STRING`
                :   ​

    **bigQuery**

    Set `type` to `"bigQuery"`.

    `bigQuery` [`BigQueryScrapingConfig`](https://dev.nominal.io/api/rest/connection-service.md#bigqueryscrapingconfig)
    :   ​

        Fields of `BigQueryScrapingConfig`

        `timeColumn` string required
        :   The name of the column that holds the timestamp.

        `tagColumns` array of string
        :   The name of the columns that should be interpreted as tag columns

        `channelNameComponents` [`BigQueryChannelNameComponent`](https://dev.nominal.io/api/rest/connection-service.md#bigquerychannelnamecomponent)
        :   channelNameComponents will be combined, together with separator, to form a fully qualified channel name. By default, we don’t add anything to the column name.

            Fields of `BigQueryChannelNameComponent`

            `includeProject` boolean required
            :   Whether to include the project name in the channel name.

            `includeDataset` boolean required
            :   Whether to include the dataset name in the channel name.

            `includeTable` boolean required
            :   Whether to include the table name in the channel name.

        `separator` string
        :   The separator that delimits the parts of the channel name. If ommitted, the default is a “.”.

    **api**

    Set `type` to `"api"`.

    `api` [`ApiScrapingConfig`](https://dev.nominal.io/api/rest/connection-service.md#apiscrapingconfig)
    :   ​

        **allChannels**

        Set `type` to `"allChannels"`.

        `allChannels` [`AllChannelsConnectionsScrapingConfig`](https://dev.nominal.io/api/rest/connection-service.md#allchannelsconnectionsscrapingconfig)
        :   ​

        **channelAllowList**

        Set `type` to `"channelAllowList"`.

        `channelAllowList` [`ChannelAllowListConnectionsScrapingConfig`](https://dev.nominal.io/api/rest/connection-service.md#channelallowlistconnectionsscrapingconfig)
        :   ​

            Fields of `ChannelAllowListConnectionsScrapingConfig`

            `channelAllowList` array of string
            :   Only channels in this set will be scraped. Must not be empty.

        **channelBlockList**

        Set `type` to `"channelBlockList"`.

        `channelBlockList` [`ChannelBlockListConnectionsScrapingConfig`](https://dev.nominal.io/api/rest/connection-service.md#channelblocklistconnectionsscrapingconfig)
        :   ​

            Fields of `ChannelBlockListConnectionsScrapingConfig`

            `channelBlockList` array of string
            :   Only channels not in this set will be scraped. Must not be empty.

`shouldScrape` boolean required
:   ​

`limits` [`LimitsConfig`](https://dev.nominal.io/api/rest/connection-service.md#limitsconfig)
:   ​

    Fields of `LimitsConfig`

    `maxQueryRange` [`Duration`](https://dev.nominal.io/api/rest/connection-service.md#duration)
    :   ​

        Fields of `Duration`

        `unit` [`TemporalUnit`](https://dev.nominal.io/api/rest/connection-service.md#temporalunit) required
        :   ​

            Values of `TemporalUnit`

            `HOURS`
            :   ​

            `DAYS`
            :   ​

            `WEEKS`
            :   ​

        `count` integer required
        :   ​

`workspace` string (RID)
:   The workspace in which to create the connection. If not provided, the connection will be created in the default workspace for the user’s organization, if the default workspace for the organization is configured.

`markingRids` array of string (RID)
:   The markings to apply to the created connection. If not provided, the connection will be visible to all users in the same workspace.

Response

`rid` string (RID)
:   ​

`displayName` string
:   The display name of the connection. For example: “Nominal production TimescaleDB”

`description` string
:   ​

`connectionDetails` [`ConnectionDetails`](https://dev.nominal.io/api/rest/connection-service.md#connectiondetails)
:   ​

    **timescale**

    Set `type` to `"timescale"`.

    `timescale` [`TimescaleConnectionDetails`](https://dev.nominal.io/api/rest/connection-service.md#timescaleconnectiondetails)
    :   ​

        Fields of `TimescaleConnectionDetails`

        `database` string
        :   ​

        `host` string
        :   ​

        `port` integer
        :   ​

        `username` string
        :   This is also the reference to the secret containing the password

        `passwordSecretRid` string (RID)
        :   Secret Rid of password secret stored in Secrets Service.

    **influx**

    Set `type` to `"influx"`.

    `influx` [`Influx2ConnectionDetails`](https://dev.nominal.io/api/rest/connection-service.md#influx2connectiondetails)
    :   ​

        Fields of `Influx2ConnectionDetails`

        `host` string
        :   ​

        `port` integer
        :   ​

        `headers` map of string to [`HeaderValue`](https://dev.nominal.io/api/rest/connection-service.md#headervalue)
        :   A map of header name to value

            **plain**

            Set `type` to `"plain"`.

            `plain` string
            :   ​

            **secretRid**

            Set `type` to `"secretRid"`.

            `secretRid` string (RID)
            :   ​

        `org` string
        :   ​

        `tokenSecretRid` string (RID)
        :   Secret Rid of token secret stored in Secrets Service.

    **influx1**

    Set `type` to `"influx1"`.

    `influx1` [`Influx1ConnectionDetails`](https://dev.nominal.io/api/rest/connection-service.md#influx1connectiondetails)
    :   ​

        Fields of `Influx1ConnectionDetails`

        `host` string
        :   ​

        `port` integer
        :   ​

        `headers` map of string to [`HeaderValue`](https://dev.nominal.io/api/rest/connection-service.md#headervalue)
        :   A map of header name to value

        `credentials` [`PasswordCredentials`](https://dev.nominal.io/api/rest/connection-service.md#passwordcredentials)
        :   ​

            Fields of `PasswordCredentials`

            `username` string
            :   ​

            `passwordSecretRid` string (RID)
            :   Secret Rid of password secret stored in Secrets Service.

    **nominal**

    Set `type` to `"nominal"`.

    `nominal` [`NominalConnectionDetails`](https://dev.nominal.io/api/rest/connection-service.md#nominalconnectiondetails)
    :   ​

        Fields of `NominalConnectionDetails`

        `nominalDataSourceRid` string (RID)
        :   ​

    **timestream**

    Set `type` to `"timestream"`.

    `timestream` [`TimestreamConnectionDetails`](https://dev.nominal.io/api/rest/connection-service.md#timestreamconnectiondetails)
    :   ​

        Fields of `TimestreamConnectionDetails`

        `nominalRoleArn` string
        :   The role ARN owned by Nominal that has permission to assume the externalRoleArn.

        `nominalRoleRegion` string
        :   AWS region that contains the Nominal role.

        `externalRegion` string
        :   AWS region that contains the Timestream instance.

        `externalRoleArn` string
        :   The role ARN used to make queries to Timestream. This role is owned by the AWS account that owns the Timestream instance.

        `database` string
        :   Database inside of the Timestream instance to connect to.

    **visualCrossing**

    Set `type` to `"visualCrossing"`.

    `visualCrossing` [`VisualCrossingConnectionDetails`](https://dev.nominal.io/api/rest/connection-service.md#visualcrossingconnectiondetails)
    :   ​

        Fields of `VisualCrossingConnectionDetails`

        `apiKeySecretRid` string (RID)
        :   Secret Rid of API key stored in Secrets Service.

    **bigQuery**

    Set `type` to `"bigQuery"`.

    `bigQuery` [`BigQueryConnectionDetails`](https://dev.nominal.io/api/rest/connection-service.md#bigqueryconnectiondetails)
    :   ​

        Fields of `BigQueryConnectionDetails`

        `region` string
        :   The region of the BigQuery Project (e.g. “us-east1”)

        `project` string
        :   The name of the BigQuery Project

        `dataset` string
        :   The name of the dataset within the project

        `table` string
        :   The name of the table within the dataset

        `serviceAccountKeySecretRid` string (RID)
        :   Secret Rid of service account key stored in Secrets Service.

`requiredTagNames` array of string
:   Additional tag names that should be supplied to construct a fully qualified series. These are suggested, rather than strictly required.

`metadata` map of string to string
:   ​

`scraping` [`ScrapingConfig`](https://dev.nominal.io/api/rest/connection-service.md#scrapingconfig)
:   ​

    **influx**

    Set `type` to `"influx"`.

    `influx` [`InfluxScrapingConfig`](https://dev.nominal.io/api/rest/connection-service.md#influxscrapingconfig)
    :   ​

        Fields of `InfluxScrapingConfig`

        `filter` array of [`InfluxScrapingFilter`](https://dev.nominal.io/api/rest/connection-service.md#influxscrapingfilter)
        :   Filters are ANDed together

            **not**

            Set `type` to `"not"`.

            `not` [`InfluxScrapingFilter`](https://dev.nominal.io/api/rest/connection-service.md#influxscrapingfilter)
            :   ​

            **matchBucket**

            Set `type` to `"matchBucket"`.

            `matchBucket` array of string
            :   Match any of the specified buckets

            **matchMeasurement**

            Set `type` to `"matchMeasurement"`.

            `matchMeasurement` array of string
            :   Match any of the specified measurements

        `seriesArchetypeConstruction` [`InfluxSeriesArchetypeConstructionConfig`](https://dev.nominal.io/api/rest/connection-service.md#influxseriesarchetypeconstructionconfig)
        :   ​

            Fields of `InfluxSeriesArchetypeConstructionConfig`

            `channelNameComponents` array of [`InfluxChannelNameComponent`](https://dev.nominal.io/api/rest/connection-service.md#influxchannelnamecomponent)
            :   ​

                **bucket**

                Set `type` to `"bucket"`.

                `bucket` [`Empty`](https://dev.nominal.io/api/rest/connection-service.md#empty)
                :   ​

                **measurement**

                Set `type` to `"measurement"`.

                `measurement` [`Empty`](https://dev.nominal.io/api/rest/connection-service.md#empty)
                :   ​

                **field**

                Set `type` to `"field"`.

                `field` [`Empty`](https://dev.nominal.io/api/rest/connection-service.md#empty)
                :   ​

            `separator` string
            :   ​

    **nominal**

    Set `type` to `"nominal"`.

    `nominal` [`NominalScrapingConfig`](https://dev.nominal.io/api/rest/connection-service.md#nominalscrapingconfig)
    :   ​

        Fields of `NominalScrapingConfig`

        `channelNameComponents` array of [`NominalChannelNameComponent`](https://dev.nominal.io/api/rest/connection-service.md#nominalchannelnamecomponent)
        :   channelNameComponents will be combined, together with separator, to form a fully qualified channel name.

            **channel**

            Set `type` to `"channel"`.

            `channel` [`Empty`](https://dev.nominal.io/api/rest/connection-service.md#empty)
            :   ​

            **valueOfTagWithName**

            Set `type` to `"valueOfTagWithName"`.

            `valueOfTagWithName` string
            :   The value of the specified TagName will be used. If the tag is not present, it will be omitted.

        `separator` string
        :   ​

    **timestream**

    Set `type` to `"timestream"`.

    `timestream` [`TimestreamScrapingConfig`](https://dev.nominal.io/api/rest/connection-service.md#timestreamscrapingconfig)
    :   ​

        Fields of `TimestreamScrapingConfig`

        `filter` array of [`TimestreamScrapingFilter`](https://dev.nominal.io/api/rest/connection-service.md#timestreamscrapingfilter)
        :   In order for data to be picked up by the scraper, it must match all filters in this list.

            **matchTable**

            Set `type` to `"matchTable"`.

            `matchTable` array of string
            :   Match any of the specified tables in the database.

        `channelNameComponents` array of [`TimestreamChannelNameComponent`](https://dev.nominal.io/api/rest/connection-service.md#timestreamchannelnamecomponent)
        :   channelNameComponents will be combined, together with separator, to form a fully qualified channel name.

            **table**

            Set `type` to `"table"`.

            `table` [`Empty`](https://dev.nominal.io/api/rest/connection-service.md#empty)
            :   ​

            **measure**

            Set `type` to `"measure"`.

            `measure` [`Empty`](https://dev.nominal.io/api/rest/connection-service.md#empty)
            :   ​

            **attribute**

            Set `type` to `"attribute"`.

            `attribute` [`Empty`](https://dev.nominal.io/api/rest/connection-service.md#empty)
            :   ​

            **valueOfTagWithName**

            Set `type` to `"valueOfTagWithName"`.

            `valueOfTagWithName` string
            :   The value of the specified TagName will be used. If the tag is not present, it will be omitted.

        `separator` string
        :   ​

        `maxLookBackPeriodHours` integer
        :   The maximum time in hours to look back over series data to find unique measure and tag combinations. If not specified, the default look back period will be used.

    **timescale**

    Set `type` to `"timescale"`.

    `timescale` [`PivotedTimescaleScrapingConfig`](https://dev.nominal.io/api/rest/connection-service.md#pivotedtimescalescrapingconfig)
    :   ​

        Fields of `PivotedTimescaleScrapingConfig`

        `filter` array of [`TimescaleScrapingFilter`](https://dev.nominal.io/api/rest/connection-service.md#timescalescrapingfilter)
        :   In order for data to be picked up by the scraper, it must match all filters in this list. To exclude chunks of data, it’s possible to use a not filter.

            **not**

            Set `type` to `"not"`.

            `not` [`TimescaleScrapingFilter`](https://dev.nominal.io/api/rest/connection-service.md#timescalescrapingfilter)
            :   ​

            **matchTable**

            Set `type` to `"matchTable"`.

            `matchTable` array of string
            :   Match any of the specified tables in the database.

            **matchSchema**

            Set `type` to `"matchSchema"`.

            `matchSchema` array of string
            :   Match any of the specified schemas in the database.

        `timeColumn` string
        :   The name of the column that holds the timestamp.

        `nameColumn` string
        :   The name of the column that holds the series name.

        `valueColumn` string
        :   The name of the column that holds the series values.

        `dimensionColumns` array of string
        :   The names of the columns that comprise a dimension. They should have a database index for efficient filtering. We do not discover dimensions based on hypertable schema because they are not necessarily configured properly.

        `channelNameComponents` array of [`PivotedTimescaleChannelNameComponent`](https://dev.nominal.io/api/rest/connection-service.md#pivotedtimescalechannelnamecomponent)
        :   channelNameComponents will be combined, together with separator, to form a fully qualified channel name.

            **table**

            Set `type` to `"table"`.

            `table` [`Empty`](https://dev.nominal.io/api/rest/connection-service.md#empty)
            :   ​

            **name**

            Set `type` to `"name"`.

            `name` [`Empty`](https://dev.nominal.io/api/rest/connection-service.md#empty)
            :   The value of the name column.

        `separator` string
        :   ​

    **visualCrossing**

    Set `type` to `"visualCrossing"`.

    `visualCrossing` [`VisualCrossingScrapingConfig`](https://dev.nominal.io/api/rest/connection-service.md#visualcrossingscrapingconfig)
    :   ​

        Fields of `VisualCrossingScrapingConfig`

        `availableSeries` array of [`VisualCrossingAvailableSeries`](https://dev.nominal.io/api/rest/connection-service.md#visualcrossingavailableseries) deprecated
        :   list of available channels **Deprecated:** No longer used for anything

            Fields of `VisualCrossingAvailableSeries`

            `channel` string
            :   ​

            `unit` string
            :   ​

            `description` string
            :   ​

            `type` [`VisualCrossingType`](https://dev.nominal.io/api/rest/connection-service.md#visualcrossingtype)
            :   ​

                Values of `VisualCrossingType`

                `DOUBLE`
                :   ​

                `STRING`
                :   ​

    **bigQuery**

    Set `type` to `"bigQuery"`.

    `bigQuery` [`BigQueryScrapingConfig`](https://dev.nominal.io/api/rest/connection-service.md#bigqueryscrapingconfig)
    :   ​

        Fields of `BigQueryScrapingConfig`

        `timeColumn` string
        :   The name of the column that holds the timestamp.

        `tagColumns` array of string
        :   The name of the columns that should be interpreted as tag columns

        `channelNameComponents` [`BigQueryChannelNameComponent`](https://dev.nominal.io/api/rest/connection-service.md#bigquerychannelnamecomponent)
        :   channelNameComponents will be combined, together with separator, to form a fully qualified channel name. By default, we don’t add anything to the column name.

            Fields of `BigQueryChannelNameComponent`

            `includeProject` boolean
            :   Whether to include the project name in the channel name.

            `includeDataset` boolean
            :   Whether to include the dataset name in the channel name.

            `includeTable` boolean
            :   Whether to include the table name in the channel name.

        `separator` string
        :   The separator that delimits the parts of the channel name. If ommitted, the default is a “.”.

    **api**

    Set `type` to `"api"`.

    `api` [`ApiScrapingConfig`](https://dev.nominal.io/api/rest/connection-service.md#apiscrapingconfig)
    :   ​

        **allChannels**

        Set `type` to `"allChannels"`.

        `allChannels` [`AllChannelsConnectionsScrapingConfig`](https://dev.nominal.io/api/rest/connection-service.md#allchannelsconnectionsscrapingconfig)
        :   ​

        **channelAllowList**

        Set `type` to `"channelAllowList"`.

        `channelAllowList` [`ChannelAllowListConnectionsScrapingConfig`](https://dev.nominal.io/api/rest/connection-service.md#channelallowlistconnectionsscrapingconfig)
        :   ​

            Fields of `ChannelAllowListConnectionsScrapingConfig`

            `channelAllowList` array of string
            :   Only channels in this set will be scraped. Must not be empty.

        **channelBlockList**

        Set `type` to `"channelBlockList"`.

        `channelBlockList` [`ChannelBlockListConnectionsScrapingConfig`](https://dev.nominal.io/api/rest/connection-service.md#channelblocklistconnectionsscrapingconfig)
        :   ​

            Fields of `ChannelBlockListConnectionsScrapingConfig`

            `channelBlockList` array of string
            :   Only channels not in this set will be scraped. Must not be empty.

`shouldScrape` boolean
:   The connection will be scraped iff this flag is set and scrapingConfig is present.

`limits` [`LimitsConfig`](https://dev.nominal.io/api/rest/connection-service.md#limitsconfig)
:   ​

    Fields of `LimitsConfig`

    `maxQueryRange` [`Duration`](https://dev.nominal.io/api/rest/connection-service.md#duration)
    :   ​

        Fields of `Duration`

        `unit` [`TemporalUnit`](https://dev.nominal.io/api/rest/connection-service.md#temporalunit)
        :   ​

            Values of `TemporalUnit`

            `HOURS`
            :   ​

            `DAYS`
            :   ​

            `WEEKS`
            :   ​

        `count` integer
        :   ​

`connectionStatus` [`ConnectionStatus`](https://dev.nominal.io/api/rest/connection-service.md#connectionstatus)
:   ​

    Fields of `ConnectionStatus`

    `isConnected` boolean
    :   ​

`isArchived` boolean
:   ​

Request

**curl**

```shell
curl -X POST "https://api.gov.nominal.io/api/data-source/connection/v1/connections" \
  -H "Authorization: Bearer <api key>" \
  -H "Content-Type: application/json" \
  --data '{
  "name": "<name>",
  "connectionDetails": {
    "type": "timescale",
    "timescale": {
      "database": "<database>",
      "host": "<host>",
      "port": 1,
      "username": "<username>",
      "passwordSecretRid": "<secret rid>"
    }
  },
  "shouldScrape": true
}'
```

**requests**

```python
import requests

response = requests.post(
    "https://api.gov.nominal.io/api/data-source/connection/v1/connections",
    headers={"Authorization": "Bearer <api key>"},
    json={
        "name": "<name>",
        "connectionDetails": {
            "type": "timescale",
            "timescale": {
                "database": "<database>",
                "host": "<host>",
                "port": 1,
                "username": "<username>",
                "passwordSecretRid": "<secret rid>",
            },
        },
        "shouldScrape": True,
    },
)
response.raise_for_status()
print(response.json())
```

**httpx**

```python
import httpx

response = httpx.post(
    "https://api.gov.nominal.io/api/data-source/connection/v1/connections",
    headers={"Authorization": "Bearer <api key>"},
    json={
        "name": "<name>",
        "connectionDetails": {
            "type": "timescale",
            "timescale": {
                "database": "<database>",
                "host": "<host>",
                "port": 1,
                "username": "<username>",
                "passwordSecretRid": "<secret rid>",
            },
        },
        "shouldScrape": True,
    },
)
response.raise_for_status()
print(response.json())
```

**aiohttp**

```python
import asyncio

import aiohttp

async def main() -> None:
    async with aiohttp.ClientSession() as session:
        async with session.post(
            "https://api.gov.nominal.io/api/data-source/connection/v1/connections",
            headers={"Authorization": "Bearer <api key>"},
            json={
                "name": "<name>",
                "connectionDetails": {
                    "type": "timescale",
                    "timescale": {
                        "database": "<database>",
                        "host": "<host>",
                        "port": 1,
                        "username": "<username>",
                        "passwordSecretRid": "<secret rid>",
                    },
                },
                "shouldScrape": True,
            },
        ) as response:
            response.raise_for_status()
            print(await response.json())

asyncio.run(main())
```

Response: `200`

```json
{
  "rid": "<connection rid>",
  "displayName": "<display name>",
  "description": "<description>",
  "connectionDetails": {
    "type": "timescale",
    "timescale": {
      "database": "<database>",
      "host": "<host>",
      "port": 1,
      "username": "<username>",
      "passwordSecretRid": "<secret rid>"
    }
  },
  "requiredTagNames": [
    "<tag name>"
  ],
  "metadata": {
    "<key>": "<value>"
  },
  "scraping": {
    "type": "influx",
    "influx": {
      "filter": [
        {
          "type": "matchBucket",
          "matchBucket": [
            "<bucket name>"
          ]
        }
      ],
      "seriesArchetypeConstruction": {
        "channelNameComponents": [
          {
            "type": "bucket",
            "bucket": {}
          }
        ],
        "separator": "<separator>"
      }
    }
  },
  "shouldScrape": true,
  "limits": {
    "maxQueryRange": {
      "unit": "HOURS",
      "count": 1
    }
  },
  "connectionStatus": {
    "isConnected": true
  },
  "isArchived": true
}
```

### List connections

GET `/data-source/connection/v1/connections`

**Deprecated:** Use listConnectionsV2 for paginated results.

Lists all connections.

Query parameters

`includeArchived` boolean
:   Whether to include archived connections in the response. By default, this is false.

`workspaces` array of string (RID)
:   If supplied, will return only the connections within the supplied workspaces. If empty will return all connections for workspaces that the user is permitted to see.

Response

The body is an array of [`Connection`](https://dev.nominal.io/api/rest/connection-service.md#connection).

Fields of `Connection`

`rid` string (RID)
:   ​

`displayName` string
:   The display name of the connection. For example: “Nominal production TimescaleDB”

`description` string
:   ​

`connectionDetails` [`ConnectionDetails`](https://dev.nominal.io/api/rest/connection-service.md#connectiondetails)
:   ​

    **timescale**

    Set `type` to `"timescale"`.

    `timescale` [`TimescaleConnectionDetails`](https://dev.nominal.io/api/rest/connection-service.md#timescaleconnectiondetails)
    :   ​

        Fields of `TimescaleConnectionDetails`

        `database` string
        :   ​

        `host` string
        :   ​

        `port` integer
        :   ​

        `username` string
        :   This is also the reference to the secret containing the password

        `passwordSecretRid` string (RID)
        :   Secret Rid of password secret stored in Secrets Service.

    **influx**

    Set `type` to `"influx"`.

    `influx` [`Influx2ConnectionDetails`](https://dev.nominal.io/api/rest/connection-service.md#influx2connectiondetails)
    :   ​

        Fields of `Influx2ConnectionDetails`

        `host` string
        :   ​

        `port` integer
        :   ​

        `headers` map of string to [`HeaderValue`](https://dev.nominal.io/api/rest/connection-service.md#headervalue)
        :   A map of header name to value

            **plain**

            Set `type` to `"plain"`.

            `plain` string
            :   ​

            **secretRid**

            Set `type` to `"secretRid"`.

            `secretRid` string (RID)
            :   ​

        `org` string
        :   ​

        `tokenSecretRid` string (RID)
        :   Secret Rid of token secret stored in Secrets Service.

    **influx1**

    Set `type` to `"influx1"`.

    `influx1` [`Influx1ConnectionDetails`](https://dev.nominal.io/api/rest/connection-service.md#influx1connectiondetails)
    :   ​

        Fields of `Influx1ConnectionDetails`

        `host` string
        :   ​

        `port` integer
        :   ​

        `headers` map of string to [`HeaderValue`](https://dev.nominal.io/api/rest/connection-service.md#headervalue)
        :   A map of header name to value

        `credentials` [`PasswordCredentials`](https://dev.nominal.io/api/rest/connection-service.md#passwordcredentials)
        :   ​

            Fields of `PasswordCredentials`

            `username` string
            :   ​

            `passwordSecretRid` string (RID)
            :   Secret Rid of password secret stored in Secrets Service.

    **nominal**

    Set `type` to `"nominal"`.

    `nominal` [`NominalConnectionDetails`](https://dev.nominal.io/api/rest/connection-service.md#nominalconnectiondetails)
    :   ​

        Fields of `NominalConnectionDetails`

        `nominalDataSourceRid` string (RID)
        :   ​

    **timestream**

    Set `type` to `"timestream"`.

    `timestream` [`TimestreamConnectionDetails`](https://dev.nominal.io/api/rest/connection-service.md#timestreamconnectiondetails)
    :   ​

        Fields of `TimestreamConnectionDetails`

        `nominalRoleArn` string
        :   The role ARN owned by Nominal that has permission to assume the externalRoleArn.

        `nominalRoleRegion` string
        :   AWS region that contains the Nominal role.

        `externalRegion` string
        :   AWS region that contains the Timestream instance.

        `externalRoleArn` string
        :   The role ARN used to make queries to Timestream. This role is owned by the AWS account that owns the Timestream instance.

        `database` string
        :   Database inside of the Timestream instance to connect to.

    **visualCrossing**

    Set `type` to `"visualCrossing"`.

    `visualCrossing` [`VisualCrossingConnectionDetails`](https://dev.nominal.io/api/rest/connection-service.md#visualcrossingconnectiondetails)
    :   ​

        Fields of `VisualCrossingConnectionDetails`

        `apiKeySecretRid` string (RID)
        :   Secret Rid of API key stored in Secrets Service.

    **bigQuery**

    Set `type` to `"bigQuery"`.

    `bigQuery` [`BigQueryConnectionDetails`](https://dev.nominal.io/api/rest/connection-service.md#bigqueryconnectiondetails)
    :   ​

        Fields of `BigQueryConnectionDetails`

        `region` string
        :   The region of the BigQuery Project (e.g. “us-east1”)

        `project` string
        :   The name of the BigQuery Project

        `dataset` string
        :   The name of the dataset within the project

        `table` string
        :   The name of the table within the dataset

        `serviceAccountKeySecretRid` string (RID)
        :   Secret Rid of service account key stored in Secrets Service.

`requiredTagNames` array of string
:   Additional tag names that should be supplied to construct a fully qualified series. These are suggested, rather than strictly required.

`metadata` map of string to string
:   ​

`scraping` [`ScrapingConfig`](https://dev.nominal.io/api/rest/connection-service.md#scrapingconfig)
:   ​

    **influx**

    Set `type` to `"influx"`.

    `influx` [`InfluxScrapingConfig`](https://dev.nominal.io/api/rest/connection-service.md#influxscrapingconfig)
    :   ​

        Fields of `InfluxScrapingConfig`

        `filter` array of [`InfluxScrapingFilter`](https://dev.nominal.io/api/rest/connection-service.md#influxscrapingfilter)
        :   Filters are ANDed together

            **not**

            Set `type` to `"not"`.

            `not` [`InfluxScrapingFilter`](https://dev.nominal.io/api/rest/connection-service.md#influxscrapingfilter)
            :   ​

            **matchBucket**

            Set `type` to `"matchBucket"`.

            `matchBucket` array of string
            :   Match any of the specified buckets

            **matchMeasurement**

            Set `type` to `"matchMeasurement"`.

            `matchMeasurement` array of string
            :   Match any of the specified measurements

        `seriesArchetypeConstruction` [`InfluxSeriesArchetypeConstructionConfig`](https://dev.nominal.io/api/rest/connection-service.md#influxseriesarchetypeconstructionconfig)
        :   ​

            Fields of `InfluxSeriesArchetypeConstructionConfig`

            `channelNameComponents` array of [`InfluxChannelNameComponent`](https://dev.nominal.io/api/rest/connection-service.md#influxchannelnamecomponent)
            :   ​

                **bucket**

                Set `type` to `"bucket"`.

                `bucket` [`Empty`](https://dev.nominal.io/api/rest/connection-service.md#empty)
                :   ​

                **measurement**

                Set `type` to `"measurement"`.

                `measurement` [`Empty`](https://dev.nominal.io/api/rest/connection-service.md#empty)
                :   ​

                **field**

                Set `type` to `"field"`.

                `field` [`Empty`](https://dev.nominal.io/api/rest/connection-service.md#empty)
                :   ​

            `separator` string
            :   ​

    **nominal**

    Set `type` to `"nominal"`.

    `nominal` [`NominalScrapingConfig`](https://dev.nominal.io/api/rest/connection-service.md#nominalscrapingconfig)
    :   ​

        Fields of `NominalScrapingConfig`

        `channelNameComponents` array of [`NominalChannelNameComponent`](https://dev.nominal.io/api/rest/connection-service.md#nominalchannelnamecomponent)
        :   channelNameComponents will be combined, together with separator, to form a fully qualified channel name.

            **channel**

            Set `type` to `"channel"`.

            `channel` [`Empty`](https://dev.nominal.io/api/rest/connection-service.md#empty)
            :   ​

            **valueOfTagWithName**

            Set `type` to `"valueOfTagWithName"`.

            `valueOfTagWithName` string
            :   The value of the specified TagName will be used. If the tag is not present, it will be omitted.

        `separator` string
        :   ​

    **timestream**

    Set `type` to `"timestream"`.

    `timestream` [`TimestreamScrapingConfig`](https://dev.nominal.io/api/rest/connection-service.md#timestreamscrapingconfig)
    :   ​

        Fields of `TimestreamScrapingConfig`

        `filter` array of [`TimestreamScrapingFilter`](https://dev.nominal.io/api/rest/connection-service.md#timestreamscrapingfilter)
        :   In order for data to be picked up by the scraper, it must match all filters in this list.

            **matchTable**

            Set `type` to `"matchTable"`.

            `matchTable` array of string
            :   Match any of the specified tables in the database.

        `channelNameComponents` array of [`TimestreamChannelNameComponent`](https://dev.nominal.io/api/rest/connection-service.md#timestreamchannelnamecomponent)
        :   channelNameComponents will be combined, together with separator, to form a fully qualified channel name.

            **table**

            Set `type` to `"table"`.

            `table` [`Empty`](https://dev.nominal.io/api/rest/connection-service.md#empty)
            :   ​

            **measure**

            Set `type` to `"measure"`.

            `measure` [`Empty`](https://dev.nominal.io/api/rest/connection-service.md#empty)
            :   ​

            **attribute**

            Set `type` to `"attribute"`.

            `attribute` [`Empty`](https://dev.nominal.io/api/rest/connection-service.md#empty)
            :   ​

            **valueOfTagWithName**

            Set `type` to `"valueOfTagWithName"`.

            `valueOfTagWithName` string
            :   The value of the specified TagName will be used. If the tag is not present, it will be omitted.

        `separator` string
        :   ​

        `maxLookBackPeriodHours` integer
        :   The maximum time in hours to look back over series data to find unique measure and tag combinations. If not specified, the default look back period will be used.

    **timescale**

    Set `type` to `"timescale"`.

    `timescale` [`PivotedTimescaleScrapingConfig`](https://dev.nominal.io/api/rest/connection-service.md#pivotedtimescalescrapingconfig)
    :   ​

        Fields of `PivotedTimescaleScrapingConfig`

        `filter` array of [`TimescaleScrapingFilter`](https://dev.nominal.io/api/rest/connection-service.md#timescalescrapingfilter)
        :   In order for data to be picked up by the scraper, it must match all filters in this list. To exclude chunks of data, it’s possible to use a not filter.

            **not**

            Set `type` to `"not"`.

            `not` [`TimescaleScrapingFilter`](https://dev.nominal.io/api/rest/connection-service.md#timescalescrapingfilter)
            :   ​

            **matchTable**

            Set `type` to `"matchTable"`.

            `matchTable` array of string
            :   Match any of the specified tables in the database.

            **matchSchema**

            Set `type` to `"matchSchema"`.

            `matchSchema` array of string
            :   Match any of the specified schemas in the database.

        `timeColumn` string
        :   The name of the column that holds the timestamp.

        `nameColumn` string
        :   The name of the column that holds the series name.

        `valueColumn` string
        :   The name of the column that holds the series values.

        `dimensionColumns` array of string
        :   The names of the columns that comprise a dimension. They should have a database index for efficient filtering. We do not discover dimensions based on hypertable schema because they are not necessarily configured properly.

        `channelNameComponents` array of [`PivotedTimescaleChannelNameComponent`](https://dev.nominal.io/api/rest/connection-service.md#pivotedtimescalechannelnamecomponent)
        :   channelNameComponents will be combined, together with separator, to form a fully qualified channel name.

            **table**

            Set `type` to `"table"`.

            `table` [`Empty`](https://dev.nominal.io/api/rest/connection-service.md#empty)
            :   ​

            **name**

            Set `type` to `"name"`.

            `name` [`Empty`](https://dev.nominal.io/api/rest/connection-service.md#empty)
            :   The value of the name column.

        `separator` string
        :   ​

    **visualCrossing**

    Set `type` to `"visualCrossing"`.

    `visualCrossing` [`VisualCrossingScrapingConfig`](https://dev.nominal.io/api/rest/connection-service.md#visualcrossingscrapingconfig)
    :   ​

        Fields of `VisualCrossingScrapingConfig`

        `availableSeries` array of [`VisualCrossingAvailableSeries`](https://dev.nominal.io/api/rest/connection-service.md#visualcrossingavailableseries) deprecated
        :   list of available channels **Deprecated:** No longer used for anything

            Fields of `VisualCrossingAvailableSeries`

            `channel` string
            :   ​

            `unit` string
            :   ​

            `description` string
            :   ​

            `type` [`VisualCrossingType`](https://dev.nominal.io/api/rest/connection-service.md#visualcrossingtype)
            :   ​

                Values of `VisualCrossingType`

                `DOUBLE`
                :   ​

                `STRING`
                :   ​

    **bigQuery**

    Set `type` to `"bigQuery"`.

    `bigQuery` [`BigQueryScrapingConfig`](https://dev.nominal.io/api/rest/connection-service.md#bigqueryscrapingconfig)
    :   ​

        Fields of `BigQueryScrapingConfig`

        `timeColumn` string
        :   The name of the column that holds the timestamp.

        `tagColumns` array of string
        :   The name of the columns that should be interpreted as tag columns

        `channelNameComponents` [`BigQueryChannelNameComponent`](https://dev.nominal.io/api/rest/connection-service.md#bigquerychannelnamecomponent)
        :   channelNameComponents will be combined, together with separator, to form a fully qualified channel name. By default, we don’t add anything to the column name.

            Fields of `BigQueryChannelNameComponent`

            `includeProject` boolean
            :   Whether to include the project name in the channel name.

            `includeDataset` boolean
            :   Whether to include the dataset name in the channel name.

            `includeTable` boolean
            :   Whether to include the table name in the channel name.

        `separator` string
        :   The separator that delimits the parts of the channel name. If ommitted, the default is a “.”.

    **api**

    Set `type` to `"api"`.

    `api` [`ApiScrapingConfig`](https://dev.nominal.io/api/rest/connection-service.md#apiscrapingconfig)
    :   ​

        **allChannels**

        Set `type` to `"allChannels"`.

        `allChannels` [`AllChannelsConnectionsScrapingConfig`](https://dev.nominal.io/api/rest/connection-service.md#allchannelsconnectionsscrapingconfig)
        :   ​

        **channelAllowList**

        Set `type` to `"channelAllowList"`.

        `channelAllowList` [`ChannelAllowListConnectionsScrapingConfig`](https://dev.nominal.io/api/rest/connection-service.md#channelallowlistconnectionsscrapingconfig)
        :   ​

            Fields of `ChannelAllowListConnectionsScrapingConfig`

            `channelAllowList` array of string
            :   Only channels in this set will be scraped. Must not be empty.

        **channelBlockList**

        Set `type` to `"channelBlockList"`.

        `channelBlockList` [`ChannelBlockListConnectionsScrapingConfig`](https://dev.nominal.io/api/rest/connection-service.md#channelblocklistconnectionsscrapingconfig)
        :   ​

            Fields of `ChannelBlockListConnectionsScrapingConfig`

            `channelBlockList` array of string
            :   Only channels not in this set will be scraped. Must not be empty.

`shouldScrape` boolean
:   The connection will be scraped iff this flag is set and scrapingConfig is present.

`limits` [`LimitsConfig`](https://dev.nominal.io/api/rest/connection-service.md#limitsconfig)
:   ​

    Fields of `LimitsConfig`

    `maxQueryRange` [`Duration`](https://dev.nominal.io/api/rest/connection-service.md#duration)
    :   ​

        Fields of `Duration`

        `unit` [`TemporalUnit`](https://dev.nominal.io/api/rest/connection-service.md#temporalunit)
        :   ​

            Values of `TemporalUnit`

            `HOURS`
            :   ​

            `DAYS`
            :   ​

            `WEEKS`
            :   ​

        `count` integer
        :   ​

`connectionStatus` [`ConnectionStatus`](https://dev.nominal.io/api/rest/connection-service.md#connectionstatus)
:   ​

    Fields of `ConnectionStatus`

    `isConnected` boolean
    :   ​

`isArchived` boolean
:   ​

Request

**curl**

```shell
curl "https://api.gov.nominal.io/api/data-source/connection/v1/connections" \
  -H "Authorization: Bearer <api key>"
```

**requests**

```python
import requests

response = requests.get(
    "https://api.gov.nominal.io/api/data-source/connection/v1/connections",
    headers={"Authorization": "Bearer <api key>"},
)
response.raise_for_status()
print(response.json())
```

**httpx**

```python
import httpx

response = httpx.get(
    "https://api.gov.nominal.io/api/data-source/connection/v1/connections",
    headers={"Authorization": "Bearer <api key>"},
)
response.raise_for_status()
print(response.json())
```

**aiohttp**

```python
import asyncio

import aiohttp

async def main() -> None:
    async with aiohttp.ClientSession() as session:
        async with session.get(
            "https://api.gov.nominal.io/api/data-source/connection/v1/connections",
            headers={"Authorization": "Bearer <api key>"},
        ) as response:
            response.raise_for_status()
            print(await response.json())

asyncio.run(main())
```

Response: `200`

```json
[
  {
    "rid": "<connection rid>",
    "displayName": "<display name>",
    "description": "<description>",
    "connectionDetails": {
      "type": "timescale",
      "timescale": {
        "database": "<database>",
        "host": "<host>",
        "port": 1,
        "username": "<username>",
        "passwordSecretRid": "<secret rid>"
      }
    },
    "requiredTagNames": [
      "<tag name>"
    ],
    "metadata": {
      "<key>": "<value>"
    },
    "scraping": {
      "type": "influx",
      "influx": {
        "filter": [
          {
            "type": "matchBucket",
            "matchBucket": [
              "<bucket name>"
            ]
          }
        ],
        "seriesArchetypeConstruction": {
          "channelNameComponents": [
            {
              "type": "bucket",
              "bucket": {}
            }
          ],
          "separator": "<separator>"
        }
      }
    },
    "shouldScrape": true,
    "limits": {
      "maxQueryRange": {
        "unit": "HOURS",
        "count": 1
      }
    },
    "connectionStatus": {
      "isConnected": true
    },
    "isArchived": true
  }
]
```

### Update connection

PUT `/data-source/connection/v1/connection/{rid}/details`

Updates an existing connection.

Path parameters

`rid` string (RID) required
:   ​

Body

`name` string
:   ​

`description` string
:   ​

`metadata` map of string to string
:   ​

`connectionDetails` [`ConnectionDetails`](https://dev.nominal.io/api/rest/connection-service.md#connectiondetails)
:   ​

    **timescale**

    Set `type` to `"timescale"`.

    `timescale` [`TimescaleConnectionDetails`](https://dev.nominal.io/api/rest/connection-service.md#timescaleconnectiondetails)
    :   ​

        Fields of `TimescaleConnectionDetails`

        `database` string required
        :   ​

        `host` string required
        :   ​

        `port` integer required
        :   ​

        `username` string required
        :   This is also the reference to the secret containing the password

        `passwordSecretRid` string (RID) required
        :   Secret Rid of password secret stored in Secrets Service.

    **influx**

    Set `type` to `"influx"`.

    `influx` [`Influx2ConnectionDetails`](https://dev.nominal.io/api/rest/connection-service.md#influx2connectiondetails)
    :   ​

        Fields of `Influx2ConnectionDetails`

        `host` string required
        :   ​

        `port` integer required
        :   ​

        `headers` map of string to [`HeaderValue`](https://dev.nominal.io/api/rest/connection-service.md#headervalue)
        :   A map of header name to value

            **plain**

            Set `type` to `"plain"`.

            `plain` string
            :   ​

            **secretRid**

            Set `type` to `"secretRid"`.

            `secretRid` string (RID)
            :   ​

        `org` string required
        :   ​

        `tokenSecretRid` string (RID) required
        :   Secret Rid of token secret stored in Secrets Service.

    **influx1**

    Set `type` to `"influx1"`.

    `influx1` [`Influx1ConnectionDetails`](https://dev.nominal.io/api/rest/connection-service.md#influx1connectiondetails)
    :   ​

        Fields of `Influx1ConnectionDetails`

        `host` string required
        :   ​

        `port` integer required
        :   ​

        `headers` map of string to [`HeaderValue`](https://dev.nominal.io/api/rest/connection-service.md#headervalue)
        :   A map of header name to value

        `credentials` [`PasswordCredentials`](https://dev.nominal.io/api/rest/connection-service.md#passwordcredentials)
        :   ​

            Fields of `PasswordCredentials`

            `username` string required
            :   ​

            `passwordSecretRid` string (RID) required
            :   Secret Rid of password secret stored in Secrets Service.

    **nominal**

    Set `type` to `"nominal"`.

    `nominal` [`NominalConnectionDetails`](https://dev.nominal.io/api/rest/connection-service.md#nominalconnectiondetails)
    :   ​

        Fields of `NominalConnectionDetails`

        `nominalDataSourceRid` string (RID) required
        :   ​

    **timestream**

    Set `type` to `"timestream"`.

    `timestream` [`TimestreamConnectionDetails`](https://dev.nominal.io/api/rest/connection-service.md#timestreamconnectiondetails)
    :   ​

        Fields of `TimestreamConnectionDetails`

        `nominalRoleArn` string required
        :   The role ARN owned by Nominal that has permission to assume the externalRoleArn.

        `nominalRoleRegion` string required
        :   AWS region that contains the Nominal role.

        `externalRegion` string required
        :   AWS region that contains the Timestream instance.

        `externalRoleArn` string required
        :   The role ARN used to make queries to Timestream. This role is owned by the AWS account that owns the Timestream instance.

        `database` string required
        :   Database inside of the Timestream instance to connect to.

    **visualCrossing**

    Set `type` to `"visualCrossing"`.

    `visualCrossing` [`VisualCrossingConnectionDetails`](https://dev.nominal.io/api/rest/connection-service.md#visualcrossingconnectiondetails)
    :   ​

        Fields of `VisualCrossingConnectionDetails`

        `apiKeySecretRid` string (RID) required
        :   Secret Rid of API key stored in Secrets Service.

    **bigQuery**

    Set `type` to `"bigQuery"`.

    `bigQuery` [`BigQueryConnectionDetails`](https://dev.nominal.io/api/rest/connection-service.md#bigqueryconnectiondetails)
    :   ​

        Fields of `BigQueryConnectionDetails`

        `region` string required
        :   The region of the BigQuery Project (e.g. “us-east1”)

        `project` string required
        :   The name of the BigQuery Project

        `dataset` string required
        :   The name of the dataset within the project

        `table` string required
        :   The name of the table within the dataset

        `serviceAccountKeySecretRid` string (RID) required
        :   Secret Rid of service account key stored in Secrets Service.

`requiredTagNames` array of string
:   ​

`availableTagValues` map of `TagName` to array of string
:   In most cases, this does not to be set by the user. Throws if populated for Nominal connections, which have their tags automatically indexed in the underlying database. Tags for external connections are periodically scraped. Tags should only be updated manually for Visual crossing connections.

`scraping` [`ScrapingConfig`](https://dev.nominal.io/api/rest/connection-service.md#scrapingconfig)
:   ​

    **influx**

    Set `type` to `"influx"`.

    `influx` [`InfluxScrapingConfig`](https://dev.nominal.io/api/rest/connection-service.md#influxscrapingconfig)
    :   ​

        Fields of `InfluxScrapingConfig`

        `filter` array of [`InfluxScrapingFilter`](https://dev.nominal.io/api/rest/connection-service.md#influxscrapingfilter)
        :   Filters are ANDed together

            **not**

            Set `type` to `"not"`.

            `not` [`InfluxScrapingFilter`](https://dev.nominal.io/api/rest/connection-service.md#influxscrapingfilter)
            :   ​

            **matchBucket**

            Set `type` to `"matchBucket"`.

            `matchBucket` array of string
            :   Match any of the specified buckets

            **matchMeasurement**

            Set `type` to `"matchMeasurement"`.

            `matchMeasurement` array of string
            :   Match any of the specified measurements

        `seriesArchetypeConstruction` [`InfluxSeriesArchetypeConstructionConfig`](https://dev.nominal.io/api/rest/connection-service.md#influxseriesarchetypeconstructionconfig) required
        :   ​

            Fields of `InfluxSeriesArchetypeConstructionConfig`

            `channelNameComponents` array of [`InfluxChannelNameComponent`](https://dev.nominal.io/api/rest/connection-service.md#influxchannelnamecomponent)
            :   ​

                **bucket**

                Set `type` to `"bucket"`.

                `bucket` [`Empty`](https://dev.nominal.io/api/rest/connection-service.md#empty)
                :   ​

                **measurement**

                Set `type` to `"measurement"`.

                `measurement` [`Empty`](https://dev.nominal.io/api/rest/connection-service.md#empty)
                :   ​

                **field**

                Set `type` to `"field"`.

                `field` [`Empty`](https://dev.nominal.io/api/rest/connection-service.md#empty)
                :   ​

            `separator` string required
            :   ​

    **nominal**

    Set `type` to `"nominal"`.

    `nominal` [`NominalScrapingConfig`](https://dev.nominal.io/api/rest/connection-service.md#nominalscrapingconfig)
    :   ​

        Fields of `NominalScrapingConfig`

        `channelNameComponents` array of [`NominalChannelNameComponent`](https://dev.nominal.io/api/rest/connection-service.md#nominalchannelnamecomponent)
        :   channelNameComponents will be combined, together with separator, to form a fully qualified channel name.

            **channel**

            Set `type` to `"channel"`.

            `channel` [`Empty`](https://dev.nominal.io/api/rest/connection-service.md#empty)
            :   ​

            **valueOfTagWithName**

            Set `type` to `"valueOfTagWithName"`.

            `valueOfTagWithName` string
            :   The value of the specified TagName will be used. If the tag is not present, it will be omitted.

        `separator` string required
        :   ​

    **timestream**

    Set `type` to `"timestream"`.

    `timestream` [`TimestreamScrapingConfig`](https://dev.nominal.io/api/rest/connection-service.md#timestreamscrapingconfig)
    :   ​

        Fields of `TimestreamScrapingConfig`

        `filter` array of [`TimestreamScrapingFilter`](https://dev.nominal.io/api/rest/connection-service.md#timestreamscrapingfilter)
        :   In order for data to be picked up by the scraper, it must match all filters in this list.

            **matchTable**

            Set `type` to `"matchTable"`.

            `matchTable` array of string
            :   Match any of the specified tables in the database.

        `channelNameComponents` array of [`TimestreamChannelNameComponent`](https://dev.nominal.io/api/rest/connection-service.md#timestreamchannelnamecomponent)
        :   channelNameComponents will be combined, together with separator, to form a fully qualified channel name.

            **table**

            Set `type` to `"table"`.

            `table` [`Empty`](https://dev.nominal.io/api/rest/connection-service.md#empty)
            :   ​

            **measure**

            Set `type` to `"measure"`.

            `measure` [`Empty`](https://dev.nominal.io/api/rest/connection-service.md#empty)
            :   ​

            **attribute**

            Set `type` to `"attribute"`.

            `attribute` [`Empty`](https://dev.nominal.io/api/rest/connection-service.md#empty)
            :   ​

            **valueOfTagWithName**

            Set `type` to `"valueOfTagWithName"`.

            `valueOfTagWithName` string
            :   The value of the specified TagName will be used. If the tag is not present, it will be omitted.

        `separator` string required
        :   ​

        `maxLookBackPeriodHours` integer
        :   The maximum time in hours to look back over series data to find unique measure and tag combinations. If not specified, the default look back period will be used.

    **timescale**

    Set `type` to `"timescale"`.

    `timescale` [`PivotedTimescaleScrapingConfig`](https://dev.nominal.io/api/rest/connection-service.md#pivotedtimescalescrapingconfig)
    :   ​

        Fields of `PivotedTimescaleScrapingConfig`

        `filter` array of [`TimescaleScrapingFilter`](https://dev.nominal.io/api/rest/connection-service.md#timescalescrapingfilter)
        :   In order for data to be picked up by the scraper, it must match all filters in this list. To exclude chunks of data, it’s possible to use a not filter.

            **not**

            Set `type` to `"not"`.

            `not` [`TimescaleScrapingFilter`](https://dev.nominal.io/api/rest/connection-service.md#timescalescrapingfilter)
            :   ​

            **matchTable**

            Set `type` to `"matchTable"`.

            `matchTable` array of string
            :   Match any of the specified tables in the database.

            **matchSchema**

            Set `type` to `"matchSchema"`.

            `matchSchema` array of string
            :   Match any of the specified schemas in the database.

        `timeColumn` string required
        :   The name of the column that holds the timestamp.

        `nameColumn` string required
        :   The name of the column that holds the series name.

        `valueColumn` string required
        :   The name of the column that holds the series values.

        `dimensionColumns` array of string
        :   The names of the columns that comprise a dimension. They should have a database index for efficient filtering. We do not discover dimensions based on hypertable schema because they are not necessarily configured properly.

        `channelNameComponents` array of [`PivotedTimescaleChannelNameComponent`](https://dev.nominal.io/api/rest/connection-service.md#pivotedtimescalechannelnamecomponent)
        :   channelNameComponents will be combined, together with separator, to form a fully qualified channel name.

            **table**

            Set `type` to `"table"`.

            `table` [`Empty`](https://dev.nominal.io/api/rest/connection-service.md#empty)
            :   ​

            **name**

            Set `type` to `"name"`.

            `name` [`Empty`](https://dev.nominal.io/api/rest/connection-service.md#empty)
            :   The value of the name column.

        `separator` string required
        :   ​

    **visualCrossing**

    Set `type` to `"visualCrossing"`.

    `visualCrossing` [`VisualCrossingScrapingConfig`](https://dev.nominal.io/api/rest/connection-service.md#visualcrossingscrapingconfig)
    :   ​

        Fields of `VisualCrossingScrapingConfig`

        `availableSeries` array of [`VisualCrossingAvailableSeries`](https://dev.nominal.io/api/rest/connection-service.md#visualcrossingavailableseries) deprecated
        :   list of available channels **Deprecated:** No longer used for anything

            Fields of `VisualCrossingAvailableSeries`

            `channel` string required
            :   ​

            `unit` string
            :   ​

            `description` string
            :   ​

            `type` [`VisualCrossingType`](https://dev.nominal.io/api/rest/connection-service.md#visualcrossingtype) required
            :   ​

                Values of `VisualCrossingType`

                `DOUBLE`
                :   ​

                `STRING`
                :   ​

    **bigQuery**

    Set `type` to `"bigQuery"`.

    `bigQuery` [`BigQueryScrapingConfig`](https://dev.nominal.io/api/rest/connection-service.md#bigqueryscrapingconfig)
    :   ​

        Fields of `BigQueryScrapingConfig`

        `timeColumn` string required
        :   The name of the column that holds the timestamp.

        `tagColumns` array of string
        :   The name of the columns that should be interpreted as tag columns

        `channelNameComponents` [`BigQueryChannelNameComponent`](https://dev.nominal.io/api/rest/connection-service.md#bigquerychannelnamecomponent)
        :   channelNameComponents will be combined, together with separator, to form a fully qualified channel name. By default, we don’t add anything to the column name.

            Fields of `BigQueryChannelNameComponent`

            `includeProject` boolean required
            :   Whether to include the project name in the channel name.

            `includeDataset` boolean required
            :   Whether to include the dataset name in the channel name.

            `includeTable` boolean required
            :   Whether to include the table name in the channel name.

        `separator` string
        :   The separator that delimits the parts of the channel name. If ommitted, the default is a “.”.

    **api**

    Set `type` to `"api"`.

    `api` [`ApiScrapingConfig`](https://dev.nominal.io/api/rest/connection-service.md#apiscrapingconfig)
    :   ​

        **allChannels**

        Set `type` to `"allChannels"`.

        `allChannels` [`AllChannelsConnectionsScrapingConfig`](https://dev.nominal.io/api/rest/connection-service.md#allchannelsconnectionsscrapingconfig)
        :   ​

        **channelAllowList**

        Set `type` to `"channelAllowList"`.

        `channelAllowList` [`ChannelAllowListConnectionsScrapingConfig`](https://dev.nominal.io/api/rest/connection-service.md#channelallowlistconnectionsscrapingconfig)
        :   ​

            Fields of `ChannelAllowListConnectionsScrapingConfig`

            `channelAllowList` array of string
            :   Only channels in this set will be scraped. Must not be empty.

        **channelBlockList**

        Set `type` to `"channelBlockList"`.

        `channelBlockList` [`ChannelBlockListConnectionsScrapingConfig`](https://dev.nominal.io/api/rest/connection-service.md#channelblocklistconnectionsscrapingconfig)
        :   ​

            Fields of `ChannelBlockListConnectionsScrapingConfig`

            `channelBlockList` array of string
            :   Only channels not in this set will be scraped. Must not be empty.

`shouldScrape` boolean
:   ​

`limits` [`LimitsConfig`](https://dev.nominal.io/api/rest/connection-service.md#limitsconfig)
:   ​

    Fields of `LimitsConfig`

    `maxQueryRange` [`Duration`](https://dev.nominal.io/api/rest/connection-service.md#duration)
    :   ​

        Fields of `Duration`

        `unit` [`TemporalUnit`](https://dev.nominal.io/api/rest/connection-service.md#temporalunit) required
        :   ​

            Values of `TemporalUnit`

            `HOURS`
            :   ​

            `DAYS`
            :   ​

            `WEEKS`
            :   ​

        `count` integer required
        :   ​

Response

`rid` string (RID)
:   ​

`displayName` string
:   The display name of the connection. For example: “Nominal production TimescaleDB”

`description` string
:   ​

`connectionDetails` [`ConnectionDetails`](https://dev.nominal.io/api/rest/connection-service.md#connectiondetails)
:   ​

    **timescale**

    Set `type` to `"timescale"`.

    `timescale` [`TimescaleConnectionDetails`](https://dev.nominal.io/api/rest/connection-service.md#timescaleconnectiondetails)
    :   ​

        Fields of `TimescaleConnectionDetails`

        `database` string
        :   ​

        `host` string
        :   ​

        `port` integer
        :   ​

        `username` string
        :   This is also the reference to the secret containing the password

        `passwordSecretRid` string (RID)
        :   Secret Rid of password secret stored in Secrets Service.

    **influx**

    Set `type` to `"influx"`.

    `influx` [`Influx2ConnectionDetails`](https://dev.nominal.io/api/rest/connection-service.md#influx2connectiondetails)
    :   ​

        Fields of `Influx2ConnectionDetails`

        `host` string
        :   ​

        `port` integer
        :   ​

        `headers` map of string to [`HeaderValue`](https://dev.nominal.io/api/rest/connection-service.md#headervalue)
        :   A map of header name to value

            **plain**

            Set `type` to `"plain"`.

            `plain` string
            :   ​

            **secretRid**

            Set `type` to `"secretRid"`.

            `secretRid` string (RID)
            :   ​

        `org` string
        :   ​

        `tokenSecretRid` string (RID)
        :   Secret Rid of token secret stored in Secrets Service.

    **influx1**

    Set `type` to `"influx1"`.

    `influx1` [`Influx1ConnectionDetails`](https://dev.nominal.io/api/rest/connection-service.md#influx1connectiondetails)
    :   ​

        Fields of `Influx1ConnectionDetails`

        `host` string
        :   ​

        `port` integer
        :   ​

        `headers` map of string to [`HeaderValue`](https://dev.nominal.io/api/rest/connection-service.md#headervalue)
        :   A map of header name to value

        `credentials` [`PasswordCredentials`](https://dev.nominal.io/api/rest/connection-service.md#passwordcredentials)
        :   ​

            Fields of `PasswordCredentials`

            `username` string
            :   ​

            `passwordSecretRid` string (RID)
            :   Secret Rid of password secret stored in Secrets Service.

    **nominal**

    Set `type` to `"nominal"`.

    `nominal` [`NominalConnectionDetails`](https://dev.nominal.io/api/rest/connection-service.md#nominalconnectiondetails)
    :   ​

        Fields of `NominalConnectionDetails`

        `nominalDataSourceRid` string (RID)
        :   ​

    **timestream**

    Set `type` to `"timestream"`.

    `timestream` [`TimestreamConnectionDetails`](https://dev.nominal.io/api/rest/connection-service.md#timestreamconnectiondetails)
    :   ​

        Fields of `TimestreamConnectionDetails`

        `nominalRoleArn` string
        :   The role ARN owned by Nominal that has permission to assume the externalRoleArn.

        `nominalRoleRegion` string
        :   AWS region that contains the Nominal role.

        `externalRegion` string
        :   AWS region that contains the Timestream instance.

        `externalRoleArn` string
        :   The role ARN used to make queries to Timestream. This role is owned by the AWS account that owns the Timestream instance.

        `database` string
        :   Database inside of the Timestream instance to connect to.

    **visualCrossing**

    Set `type` to `"visualCrossing"`.

    `visualCrossing` [`VisualCrossingConnectionDetails`](https://dev.nominal.io/api/rest/connection-service.md#visualcrossingconnectiondetails)
    :   ​

        Fields of `VisualCrossingConnectionDetails`

        `apiKeySecretRid` string (RID)
        :   Secret Rid of API key stored in Secrets Service.

    **bigQuery**

    Set `type` to `"bigQuery"`.

    `bigQuery` [`BigQueryConnectionDetails`](https://dev.nominal.io/api/rest/connection-service.md#bigqueryconnectiondetails)
    :   ​

        Fields of `BigQueryConnectionDetails`

        `region` string
        :   The region of the BigQuery Project (e.g. “us-east1”)

        `project` string
        :   The name of the BigQuery Project

        `dataset` string
        :   The name of the dataset within the project

        `table` string
        :   The name of the table within the dataset

        `serviceAccountKeySecretRid` string (RID)
        :   Secret Rid of service account key stored in Secrets Service.

`requiredTagNames` array of string
:   Additional tag names that should be supplied to construct a fully qualified series. These are suggested, rather than strictly required.

`metadata` map of string to string
:   ​

`scraping` [`ScrapingConfig`](https://dev.nominal.io/api/rest/connection-service.md#scrapingconfig)
:   ​

    **influx**

    Set `type` to `"influx"`.

    `influx` [`InfluxScrapingConfig`](https://dev.nominal.io/api/rest/connection-service.md#influxscrapingconfig)
    :   ​

        Fields of `InfluxScrapingConfig`

        `filter` array of [`InfluxScrapingFilter`](https://dev.nominal.io/api/rest/connection-service.md#influxscrapingfilter)
        :   Filters are ANDed together

            **not**

            Set `type` to `"not"`.

            `not` [`InfluxScrapingFilter`](https://dev.nominal.io/api/rest/connection-service.md#influxscrapingfilter)
            :   ​

            **matchBucket**

            Set `type` to `"matchBucket"`.

            `matchBucket` array of string
            :   Match any of the specified buckets

            **matchMeasurement**

            Set `type` to `"matchMeasurement"`.

            `matchMeasurement` array of string
            :   Match any of the specified measurements

        `seriesArchetypeConstruction` [`InfluxSeriesArchetypeConstructionConfig`](https://dev.nominal.io/api/rest/connection-service.md#influxseriesarchetypeconstructionconfig)
        :   ​

            Fields of `InfluxSeriesArchetypeConstructionConfig`

            `channelNameComponents` array of [`InfluxChannelNameComponent`](https://dev.nominal.io/api/rest/connection-service.md#influxchannelnamecomponent)
            :   ​

                **bucket**

                Set `type` to `"bucket"`.

                `bucket` [`Empty`](https://dev.nominal.io/api/rest/connection-service.md#empty)
                :   ​

                **measurement**

                Set `type` to `"measurement"`.

                `measurement` [`Empty`](https://dev.nominal.io/api/rest/connection-service.md#empty)
                :   ​

                **field**

                Set `type` to `"field"`.

                `field` [`Empty`](https://dev.nominal.io/api/rest/connection-service.md#empty)
                :   ​

            `separator` string
            :   ​

    **nominal**

    Set `type` to `"nominal"`.

    `nominal` [`NominalScrapingConfig`](https://dev.nominal.io/api/rest/connection-service.md#nominalscrapingconfig)
    :   ​

        Fields of `NominalScrapingConfig`

        `channelNameComponents` array of [`NominalChannelNameComponent`](https://dev.nominal.io/api/rest/connection-service.md#nominalchannelnamecomponent)
        :   channelNameComponents will be combined, together with separator, to form a fully qualified channel name.

            **channel**

            Set `type` to `"channel"`.

            `channel` [`Empty`](https://dev.nominal.io/api/rest/connection-service.md#empty)
            :   ​

            **valueOfTagWithName**

            Set `type` to `"valueOfTagWithName"`.

            `valueOfTagWithName` string
            :   The value of the specified TagName will be used. If the tag is not present, it will be omitted.

        `separator` string
        :   ​

    **timestream**

    Set `type` to `"timestream"`.

    `timestream` [`TimestreamScrapingConfig`](https://dev.nominal.io/api/rest/connection-service.md#timestreamscrapingconfig)
    :   ​

        Fields of `TimestreamScrapingConfig`

        `filter` array of [`TimestreamScrapingFilter`](https://dev.nominal.io/api/rest/connection-service.md#timestreamscrapingfilter)
        :   In order for data to be picked up by the scraper, it must match all filters in this list.

            **matchTable**

            Set `type` to `"matchTable"`.

            `matchTable` array of string
            :   Match any of the specified tables in the database.

        `channelNameComponents` array of [`TimestreamChannelNameComponent`](https://dev.nominal.io/api/rest/connection-service.md#timestreamchannelnamecomponent)
        :   channelNameComponents will be combined, together with separator, to form a fully qualified channel name.

            **table**

            Set `type` to `"table"`.

            `table` [`Empty`](https://dev.nominal.io/api/rest/connection-service.md#empty)
            :   ​

            **measure**

            Set `type` to `"measure"`.

            `measure` [`Empty`](https://dev.nominal.io/api/rest/connection-service.md#empty)
            :   ​

            **attribute**

            Set `type` to `"attribute"`.

            `attribute` [`Empty`](https://dev.nominal.io/api/rest/connection-service.md#empty)
            :   ​

            **valueOfTagWithName**

            Set `type` to `"valueOfTagWithName"`.

            `valueOfTagWithName` string
            :   The value of the specified TagName will be used. If the tag is not present, it will be omitted.

        `separator` string
        :   ​

        `maxLookBackPeriodHours` integer
        :   The maximum time in hours to look back over series data to find unique measure and tag combinations. If not specified, the default look back period will be used.

    **timescale**

    Set `type` to `"timescale"`.

    `timescale` [`PivotedTimescaleScrapingConfig`](https://dev.nominal.io/api/rest/connection-service.md#pivotedtimescalescrapingconfig)
    :   ​

        Fields of `PivotedTimescaleScrapingConfig`

        `filter` array of [`TimescaleScrapingFilter`](https://dev.nominal.io/api/rest/connection-service.md#timescalescrapingfilter)
        :   In order for data to be picked up by the scraper, it must match all filters in this list. To exclude chunks of data, it’s possible to use a not filter.

            **not**

            Set `type` to `"not"`.

            `not` [`TimescaleScrapingFilter`](https://dev.nominal.io/api/rest/connection-service.md#timescalescrapingfilter)
            :   ​

            **matchTable**

            Set `type` to `"matchTable"`.

            `matchTable` array of string
            :   Match any of the specified tables in the database.

            **matchSchema**

            Set `type` to `"matchSchema"`.

            `matchSchema` array of string
            :   Match any of the specified schemas in the database.

        `timeColumn` string
        :   The name of the column that holds the timestamp.

        `nameColumn` string
        :   The name of the column that holds the series name.

        `valueColumn` string
        :   The name of the column that holds the series values.

        `dimensionColumns` array of string
        :   The names of the columns that comprise a dimension. They should have a database index for efficient filtering. We do not discover dimensions based on hypertable schema because they are not necessarily configured properly.

        `channelNameComponents` array of [`PivotedTimescaleChannelNameComponent`](https://dev.nominal.io/api/rest/connection-service.md#pivotedtimescalechannelnamecomponent)
        :   channelNameComponents will be combined, together with separator, to form a fully qualified channel name.

            **table**

            Set `type` to `"table"`.

            `table` [`Empty`](https://dev.nominal.io/api/rest/connection-service.md#empty)
            :   ​

            **name**

            Set `type` to `"name"`.

            `name` [`Empty`](https://dev.nominal.io/api/rest/connection-service.md#empty)
            :   The value of the name column.

        `separator` string
        :   ​

    **visualCrossing**

    Set `type` to `"visualCrossing"`.

    `visualCrossing` [`VisualCrossingScrapingConfig`](https://dev.nominal.io/api/rest/connection-service.md#visualcrossingscrapingconfig)
    :   ​

        Fields of `VisualCrossingScrapingConfig`

        `availableSeries` array of [`VisualCrossingAvailableSeries`](https://dev.nominal.io/api/rest/connection-service.md#visualcrossingavailableseries) deprecated
        :   list of available channels **Deprecated:** No longer used for anything

            Fields of `VisualCrossingAvailableSeries`

            `channel` string
            :   ​

            `unit` string
            :   ​

            `description` string
            :   ​

            `type` [`VisualCrossingType`](https://dev.nominal.io/api/rest/connection-service.md#visualcrossingtype)
            :   ​

                Values of `VisualCrossingType`

                `DOUBLE`
                :   ​

                `STRING`
                :   ​

    **bigQuery**

    Set `type` to `"bigQuery"`.

    `bigQuery` [`BigQueryScrapingConfig`](https://dev.nominal.io/api/rest/connection-service.md#bigqueryscrapingconfig)
    :   ​

        Fields of `BigQueryScrapingConfig`

        `timeColumn` string
        :   The name of the column that holds the timestamp.

        `tagColumns` array of string
        :   The name of the columns that should be interpreted as tag columns

        `channelNameComponents` [`BigQueryChannelNameComponent`](https://dev.nominal.io/api/rest/connection-service.md#bigquerychannelnamecomponent)
        :   channelNameComponents will be combined, together with separator, to form a fully qualified channel name. By default, we don’t add anything to the column name.

            Fields of `BigQueryChannelNameComponent`

            `includeProject` boolean
            :   Whether to include the project name in the channel name.

            `includeDataset` boolean
            :   Whether to include the dataset name in the channel name.

            `includeTable` boolean
            :   Whether to include the table name in the channel name.

        `separator` string
        :   The separator that delimits the parts of the channel name. If ommitted, the default is a “.”.

    **api**

    Set `type` to `"api"`.

    `api` [`ApiScrapingConfig`](https://dev.nominal.io/api/rest/connection-service.md#apiscrapingconfig)
    :   ​

        **allChannels**

        Set `type` to `"allChannels"`.

        `allChannels` [`AllChannelsConnectionsScrapingConfig`](https://dev.nominal.io/api/rest/connection-service.md#allchannelsconnectionsscrapingconfig)
        :   ​

        **channelAllowList**

        Set `type` to `"channelAllowList"`.

        `channelAllowList` [`ChannelAllowListConnectionsScrapingConfig`](https://dev.nominal.io/api/rest/connection-service.md#channelallowlistconnectionsscrapingconfig)
        :   ​

            Fields of `ChannelAllowListConnectionsScrapingConfig`

            `channelAllowList` array of string
            :   Only channels in this set will be scraped. Must not be empty.

        **channelBlockList**

        Set `type` to `"channelBlockList"`.

        `channelBlockList` [`ChannelBlockListConnectionsScrapingConfig`](https://dev.nominal.io/api/rest/connection-service.md#channelblocklistconnectionsscrapingconfig)
        :   ​

            Fields of `ChannelBlockListConnectionsScrapingConfig`

            `channelBlockList` array of string
            :   Only channels not in this set will be scraped. Must not be empty.

`shouldScrape` boolean
:   The connection will be scraped iff this flag is set and scrapingConfig is present.

`limits` [`LimitsConfig`](https://dev.nominal.io/api/rest/connection-service.md#limitsconfig)
:   ​

    Fields of `LimitsConfig`

    `maxQueryRange` [`Duration`](https://dev.nominal.io/api/rest/connection-service.md#duration)
    :   ​

        Fields of `Duration`

        `unit` [`TemporalUnit`](https://dev.nominal.io/api/rest/connection-service.md#temporalunit)
        :   ​

            Values of `TemporalUnit`

            `HOURS`
            :   ​

            `DAYS`
            :   ​

            `WEEKS`
            :   ​

        `count` integer
        :   ​

`connectionStatus` [`ConnectionStatus`](https://dev.nominal.io/api/rest/connection-service.md#connectionstatus)
:   ​

    Fields of `ConnectionStatus`

    `isConnected` boolean
    :   ​

`isArchived` boolean
:   ​

Request

**curl**

```shell
curl -X PUT "https://api.gov.nominal.io/api/data-source/connection/v1/connection/<rid>/details" \
  -H "Authorization: Bearer <api key>" \
  -H "Content-Type: application/json" \
  --data '{
  "name": "<name>",
  "description": "<description>",
  "metadata": {
    "<key>": "<value>"
  },
  "connectionDetails": {
    "type": "timescale",
    "timescale": {
      "database": "<database>",
      "host": "<host>",
      "port": 1,
      "username": "<username>",
      "passwordSecretRid": "<secret rid>"
    }
  },
  "requiredTagNames": [
    "<tag name>"
  ],
  "availableTagValues": {
    "<key>": [
      "<tag value>"
    ]
  },
  "scraping": {
    "type": "influx",
    "influx": {
      "seriesArchetypeConstruction": {
        "separator": "<separator>"
      }
    }
  },
  "shouldScrape": true,
  "limits": {
    "maxQueryRange": {
      "unit": "HOURS",
      "count": 1
    }
  }
}'
```

**requests**

```python
import requests

response = requests.put(
    "https://api.gov.nominal.io/api/data-source/connection/v1/connection/<rid>/details",
    headers={"Authorization": "Bearer <api key>"},
    json={
        "name": "<name>",
        "description": "<description>",
        "metadata": {"<key>": "<value>"},
        "connectionDetails": {
            "type": "timescale",
            "timescale": {
                "database": "<database>",
                "host": "<host>",
                "port": 1,
                "username": "<username>",
                "passwordSecretRid": "<secret rid>",
            },
        },
        "requiredTagNames": ["<tag name>"],
        "availableTagValues": {"<key>": ["<tag value>"]},
        "scraping": {
            "type": "influx",
            "influx": {"seriesArchetypeConstruction": {"separator": "<separator>"}},
        },
        "shouldScrape": True,
        "limits": {"maxQueryRange": {"unit": "HOURS", "count": 1}},
    },
)
response.raise_for_status()
print(response.json())
```

**httpx**

```python
import httpx

response = httpx.put(
    "https://api.gov.nominal.io/api/data-source/connection/v1/connection/<rid>/details",
    headers={"Authorization": "Bearer <api key>"},
    json={
        "name": "<name>",
        "description": "<description>",
        "metadata": {"<key>": "<value>"},
        "connectionDetails": {
            "type": "timescale",
            "timescale": {
                "database": "<database>",
                "host": "<host>",
                "port": 1,
                "username": "<username>",
                "passwordSecretRid": "<secret rid>",
            },
        },
        "requiredTagNames": ["<tag name>"],
        "availableTagValues": {"<key>": ["<tag value>"]},
        "scraping": {
            "type": "influx",
            "influx": {"seriesArchetypeConstruction": {"separator": "<separator>"}},
        },
        "shouldScrape": True,
        "limits": {"maxQueryRange": {"unit": "HOURS", "count": 1}},
    },
)
response.raise_for_status()
print(response.json())
```

**aiohttp**

```python
import asyncio

import aiohttp

async def main() -> None:
    async with aiohttp.ClientSession() as session:
        async with session.put(
            "https://api.gov.nominal.io/api/data-source/connection/v1/connection/<rid>/details",
            headers={"Authorization": "Bearer <api key>"},
            json={
                "name": "<name>",
                "description": "<description>",
                "metadata": {"<key>": "<value>"},
                "connectionDetails": {
                    "type": "timescale",
                    "timescale": {
                        "database": "<database>",
                        "host": "<host>",
                        "port": 1,
                        "username": "<username>",
                        "passwordSecretRid": "<secret rid>",
                    },
                },
                "requiredTagNames": ["<tag name>"],
                "availableTagValues": {"<key>": ["<tag value>"]},
                "scraping": {
                    "type": "influx",
                    "influx": {
                        "seriesArchetypeConstruction": {"separator": "<separator>"},
                    },
                },
                "shouldScrape": True,
                "limits": {"maxQueryRange": {"unit": "HOURS", "count": 1}},
            },
        ) as response:
            response.raise_for_status()
            print(await response.json())

asyncio.run(main())
```

Response: `200`

```json
{
  "rid": "<connection rid>",
  "displayName": "<display name>",
  "description": "<description>",
  "connectionDetails": {
    "type": "timescale",
    "timescale": {
      "database": "<database>",
      "host": "<host>",
      "port": 1,
      "username": "<username>",
      "passwordSecretRid": "<secret rid>"
    }
  },
  "requiredTagNames": [
    "<tag name>"
  ],
  "metadata": {
    "<key>": "<value>"
  },
  "scraping": {
    "type": "influx",
    "influx": {
      "filter": [
        {
          "type": "matchBucket",
          "matchBucket": [
            "<bucket name>"
          ]
        }
      ],
      "seriesArchetypeConstruction": {
        "channelNameComponents": [
          {
            "type": "bucket",
            "bucket": {}
          }
        ],
        "separator": "<separator>"
      }
    }
  },
  "shouldScrape": true,
  "limits": {
    "maxQueryRange": {
      "unit": "HOURS",
      "count": 1
    }
  },
  "connectionStatus": {
    "isConnected": true
  },
  "isArchived": true
}
```

### Update connection status

PUT `/data-source/connection/v1/connection/{rid}/status`

Updates an existing connection status.

Path parameters

`rid` string (RID) required
:   ​

Body

`isConnected` boolean required
:   ​

Response

No content (HTTP 204).

Request

**curl**

```shell
curl -X PUT "https://api.gov.nominal.io/api/data-source/connection/v1/connection/<rid>/status" \
  -H "Authorization: Bearer <api key>" \
  -H "Content-Type: application/json" \
  --data '{
  "isConnected": true
}'
```

**requests**

```python
import requests

response = requests.put(
    "https://api.gov.nominal.io/api/data-source/connection/v1/connection/<rid>/status",
    headers={"Authorization": "Bearer <api key>"},
    json={"isConnected": True},
)
response.raise_for_status()
```

**httpx**

```python
import httpx

response = httpx.put(
    "https://api.gov.nominal.io/api/data-source/connection/v1/connection/<rid>/status",
    headers={"Authorization": "Bearer <api key>"},
    json={"isConnected": True},
)
response.raise_for_status()
```

**aiohttp**

```python
import asyncio

import aiohttp

async def main() -> None:
    async with aiohttp.ClientSession() as session:
        async with session.put(
            "https://api.gov.nominal.io/api/data-source/connection/v1/connection/<rid>/status",
            headers={"Authorization": "Bearer <api key>"},
            json={"isConnected": True},
        ) as response:
            response.raise_for_status()

asyncio.run(main())
```

Response: `204`

No content.

### Get connection

GET `/data-source/connection/v1/connection/{rid}`

Gets a connection by its RID.

Path parameters

`rid` string (RID) required
:   ​

Response

`rid` string (RID)
:   ​

`displayName` string
:   The display name of the connection. For example: “Nominal production TimescaleDB”

`description` string
:   ​

`connectionDetails` [`ConnectionDetails`](https://dev.nominal.io/api/rest/connection-service.md#connectiondetails)
:   ​

    **timescale**

    Set `type` to `"timescale"`.

    `timescale` [`TimescaleConnectionDetails`](https://dev.nominal.io/api/rest/connection-service.md#timescaleconnectiondetails)
    :   ​

        Fields of `TimescaleConnectionDetails`

        `database` string
        :   ​

        `host` string
        :   ​

        `port` integer
        :   ​

        `username` string
        :   This is also the reference to the secret containing the password

        `passwordSecretRid` string (RID)
        :   Secret Rid of password secret stored in Secrets Service.

    **influx**

    Set `type` to `"influx"`.

    `influx` [`Influx2ConnectionDetails`](https://dev.nominal.io/api/rest/connection-service.md#influx2connectiondetails)
    :   ​

        Fields of `Influx2ConnectionDetails`

        `host` string
        :   ​

        `port` integer
        :   ​

        `headers` map of string to [`HeaderValue`](https://dev.nominal.io/api/rest/connection-service.md#headervalue)
        :   A map of header name to value

            **plain**

            Set `type` to `"plain"`.

            `plain` string
            :   ​

            **secretRid**

            Set `type` to `"secretRid"`.

            `secretRid` string (RID)
            :   ​

        `org` string
        :   ​

        `tokenSecretRid` string (RID)
        :   Secret Rid of token secret stored in Secrets Service.

    **influx1**

    Set `type` to `"influx1"`.

    `influx1` [`Influx1ConnectionDetails`](https://dev.nominal.io/api/rest/connection-service.md#influx1connectiondetails)
    :   ​

        Fields of `Influx1ConnectionDetails`

        `host` string
        :   ​

        `port` integer
        :   ​

        `headers` map of string to [`HeaderValue`](https://dev.nominal.io/api/rest/connection-service.md#headervalue)
        :   A map of header name to value

        `credentials` [`PasswordCredentials`](https://dev.nominal.io/api/rest/connection-service.md#passwordcredentials)
        :   ​

            Fields of `PasswordCredentials`

            `username` string
            :   ​

            `passwordSecretRid` string (RID)
            :   Secret Rid of password secret stored in Secrets Service.

    **nominal**

    Set `type` to `"nominal"`.

    `nominal` [`NominalConnectionDetails`](https://dev.nominal.io/api/rest/connection-service.md#nominalconnectiondetails)
    :   ​

        Fields of `NominalConnectionDetails`

        `nominalDataSourceRid` string (RID)
        :   ​

    **timestream**

    Set `type` to `"timestream"`.

    `timestream` [`TimestreamConnectionDetails`](https://dev.nominal.io/api/rest/connection-service.md#timestreamconnectiondetails)
    :   ​

        Fields of `TimestreamConnectionDetails`

        `nominalRoleArn` string
        :   The role ARN owned by Nominal that has permission to assume the externalRoleArn.

        `nominalRoleRegion` string
        :   AWS region that contains the Nominal role.

        `externalRegion` string
        :   AWS region that contains the Timestream instance.

        `externalRoleArn` string
        :   The role ARN used to make queries to Timestream. This role is owned by the AWS account that owns the Timestream instance.

        `database` string
        :   Database inside of the Timestream instance to connect to.

    **visualCrossing**

    Set `type` to `"visualCrossing"`.

    `visualCrossing` [`VisualCrossingConnectionDetails`](https://dev.nominal.io/api/rest/connection-service.md#visualcrossingconnectiondetails)
    :   ​

        Fields of `VisualCrossingConnectionDetails`

        `apiKeySecretRid` string (RID)
        :   Secret Rid of API key stored in Secrets Service.

    **bigQuery**

    Set `type` to `"bigQuery"`.

    `bigQuery` [`BigQueryConnectionDetails`](https://dev.nominal.io/api/rest/connection-service.md#bigqueryconnectiondetails)
    :   ​

        Fields of `BigQueryConnectionDetails`

        `region` string
        :   The region of the BigQuery Project (e.g. “us-east1”)

        `project` string
        :   The name of the BigQuery Project

        `dataset` string
        :   The name of the dataset within the project

        `table` string
        :   The name of the table within the dataset

        `serviceAccountKeySecretRid` string (RID)
        :   Secret Rid of service account key stored in Secrets Service.

`requiredTagNames` array of string
:   Additional tag names that should be supplied to construct a fully qualified series. These are suggested, rather than strictly required.

`metadata` map of string to string
:   ​

`scraping` [`ScrapingConfig`](https://dev.nominal.io/api/rest/connection-service.md#scrapingconfig)
:   ​

    **influx**

    Set `type` to `"influx"`.

    `influx` [`InfluxScrapingConfig`](https://dev.nominal.io/api/rest/connection-service.md#influxscrapingconfig)
    :   ​

        Fields of `InfluxScrapingConfig`

        `filter` array of [`InfluxScrapingFilter`](https://dev.nominal.io/api/rest/connection-service.md#influxscrapingfilter)
        :   Filters are ANDed together

            **not**

            Set `type` to `"not"`.

            `not` [`InfluxScrapingFilter`](https://dev.nominal.io/api/rest/connection-service.md#influxscrapingfilter)
            :   ​

            **matchBucket**

            Set `type` to `"matchBucket"`.

            `matchBucket` array of string
            :   Match any of the specified buckets

            **matchMeasurement**

            Set `type` to `"matchMeasurement"`.

            `matchMeasurement` array of string
            :   Match any of the specified measurements

        `seriesArchetypeConstruction` [`InfluxSeriesArchetypeConstructionConfig`](https://dev.nominal.io/api/rest/connection-service.md#influxseriesarchetypeconstructionconfig)
        :   ​

            Fields of `InfluxSeriesArchetypeConstructionConfig`

            `channelNameComponents` array of [`InfluxChannelNameComponent`](https://dev.nominal.io/api/rest/connection-service.md#influxchannelnamecomponent)
            :   ​

                **bucket**

                Set `type` to `"bucket"`.

                `bucket` [`Empty`](https://dev.nominal.io/api/rest/connection-service.md#empty)
                :   ​

                **measurement**

                Set `type` to `"measurement"`.

                `measurement` [`Empty`](https://dev.nominal.io/api/rest/connection-service.md#empty)
                :   ​

                **field**

                Set `type` to `"field"`.

                `field` [`Empty`](https://dev.nominal.io/api/rest/connection-service.md#empty)
                :   ​

            `separator` string
            :   ​

    **nominal**

    Set `type` to `"nominal"`.

    `nominal` [`NominalScrapingConfig`](https://dev.nominal.io/api/rest/connection-service.md#nominalscrapingconfig)
    :   ​

        Fields of `NominalScrapingConfig`

        `channelNameComponents` array of [`NominalChannelNameComponent`](https://dev.nominal.io/api/rest/connection-service.md#nominalchannelnamecomponent)
        :   channelNameComponents will be combined, together with separator, to form a fully qualified channel name.

            **channel**

            Set `type` to `"channel"`.

            `channel` [`Empty`](https://dev.nominal.io/api/rest/connection-service.md#empty)
            :   ​

            **valueOfTagWithName**

            Set `type` to `"valueOfTagWithName"`.

            `valueOfTagWithName` string
            :   The value of the specified TagName will be used. If the tag is not present, it will be omitted.

        `separator` string
        :   ​

    **timestream**

    Set `type` to `"timestream"`.

    `timestream` [`TimestreamScrapingConfig`](https://dev.nominal.io/api/rest/connection-service.md#timestreamscrapingconfig)
    :   ​

        Fields of `TimestreamScrapingConfig`

        `filter` array of [`TimestreamScrapingFilter`](https://dev.nominal.io/api/rest/connection-service.md#timestreamscrapingfilter)
        :   In order for data to be picked up by the scraper, it must match all filters in this list.

            **matchTable**

            Set `type` to `"matchTable"`.

            `matchTable` array of string
            :   Match any of the specified tables in the database.

        `channelNameComponents` array of [`TimestreamChannelNameComponent`](https://dev.nominal.io/api/rest/connection-service.md#timestreamchannelnamecomponent)
        :   channelNameComponents will be combined, together with separator, to form a fully qualified channel name.

            **table**

            Set `type` to `"table"`.

            `table` [`Empty`](https://dev.nominal.io/api/rest/connection-service.md#empty)
            :   ​

            **measure**

            Set `type` to `"measure"`.

            `measure` [`Empty`](https://dev.nominal.io/api/rest/connection-service.md#empty)
            :   ​

            **attribute**

            Set `type` to `"attribute"`.

            `attribute` [`Empty`](https://dev.nominal.io/api/rest/connection-service.md#empty)
            :   ​

            **valueOfTagWithName**

            Set `type` to `"valueOfTagWithName"`.

            `valueOfTagWithName` string
            :   The value of the specified TagName will be used. If the tag is not present, it will be omitted.

        `separator` string
        :   ​

        `maxLookBackPeriodHours` integer
        :   The maximum time in hours to look back over series data to find unique measure and tag combinations. If not specified, the default look back period will be used.

    **timescale**

    Set `type` to `"timescale"`.

    `timescale` [`PivotedTimescaleScrapingConfig`](https://dev.nominal.io/api/rest/connection-service.md#pivotedtimescalescrapingconfig)
    :   ​

        Fields of `PivotedTimescaleScrapingConfig`

        `filter` array of [`TimescaleScrapingFilter`](https://dev.nominal.io/api/rest/connection-service.md#timescalescrapingfilter)
        :   In order for data to be picked up by the scraper, it must match all filters in this list. To exclude chunks of data, it’s possible to use a not filter.

            **not**

            Set `type` to `"not"`.

            `not` [`TimescaleScrapingFilter`](https://dev.nominal.io/api/rest/connection-service.md#timescalescrapingfilter)
            :   ​

            **matchTable**

            Set `type` to `"matchTable"`.

            `matchTable` array of string
            :   Match any of the specified tables in the database.

            **matchSchema**

            Set `type` to `"matchSchema"`.

            `matchSchema` array of string
            :   Match any of the specified schemas in the database.

        `timeColumn` string
        :   The name of the column that holds the timestamp.

        `nameColumn` string
        :   The name of the column that holds the series name.

        `valueColumn` string
        :   The name of the column that holds the series values.

        `dimensionColumns` array of string
        :   The names of the columns that comprise a dimension. They should have a database index for efficient filtering. We do not discover dimensions based on hypertable schema because they are not necessarily configured properly.

        `channelNameComponents` array of [`PivotedTimescaleChannelNameComponent`](https://dev.nominal.io/api/rest/connection-service.md#pivotedtimescalechannelnamecomponent)
        :   channelNameComponents will be combined, together with separator, to form a fully qualified channel name.

            **table**

            Set `type` to `"table"`.

            `table` [`Empty`](https://dev.nominal.io/api/rest/connection-service.md#empty)
            :   ​

            **name**

            Set `type` to `"name"`.

            `name` [`Empty`](https://dev.nominal.io/api/rest/connection-service.md#empty)
            :   The value of the name column.

        `separator` string
        :   ​

    **visualCrossing**

    Set `type` to `"visualCrossing"`.

    `visualCrossing` [`VisualCrossingScrapingConfig`](https://dev.nominal.io/api/rest/connection-service.md#visualcrossingscrapingconfig)
    :   ​

        Fields of `VisualCrossingScrapingConfig`

        `availableSeries` array of [`VisualCrossingAvailableSeries`](https://dev.nominal.io/api/rest/connection-service.md#visualcrossingavailableseries) deprecated
        :   list of available channels **Deprecated:** No longer used for anything

            Fields of `VisualCrossingAvailableSeries`

            `channel` string
            :   ​

            `unit` string
            :   ​

            `description` string
            :   ​

            `type` [`VisualCrossingType`](https://dev.nominal.io/api/rest/connection-service.md#visualcrossingtype)
            :   ​

                Values of `VisualCrossingType`

                `DOUBLE`
                :   ​

                `STRING`
                :   ​

    **bigQuery**

    Set `type` to `"bigQuery"`.

    `bigQuery` [`BigQueryScrapingConfig`](https://dev.nominal.io/api/rest/connection-service.md#bigqueryscrapingconfig)
    :   ​

        Fields of `BigQueryScrapingConfig`

        `timeColumn` string
        :   The name of the column that holds the timestamp.

        `tagColumns` array of string
        :   The name of the columns that should be interpreted as tag columns

        `channelNameComponents` [`BigQueryChannelNameComponent`](https://dev.nominal.io/api/rest/connection-service.md#bigquerychannelnamecomponent)
        :   channelNameComponents will be combined, together with separator, to form a fully qualified channel name. By default, we don’t add anything to the column name.

            Fields of `BigQueryChannelNameComponent`

            `includeProject` boolean
            :   Whether to include the project name in the channel name.

            `includeDataset` boolean
            :   Whether to include the dataset name in the channel name.

            `includeTable` boolean
            :   Whether to include the table name in the channel name.

        `separator` string
        :   The separator that delimits the parts of the channel name. If ommitted, the default is a “.”.

    **api**

    Set `type` to `"api"`.

    `api` [`ApiScrapingConfig`](https://dev.nominal.io/api/rest/connection-service.md#apiscrapingconfig)
    :   ​

        **allChannels**

        Set `type` to `"allChannels"`.

        `allChannels` [`AllChannelsConnectionsScrapingConfig`](https://dev.nominal.io/api/rest/connection-service.md#allchannelsconnectionsscrapingconfig)
        :   ​

        **channelAllowList**

        Set `type` to `"channelAllowList"`.

        `channelAllowList` [`ChannelAllowListConnectionsScrapingConfig`](https://dev.nominal.io/api/rest/connection-service.md#channelallowlistconnectionsscrapingconfig)
        :   ​

            Fields of `ChannelAllowListConnectionsScrapingConfig`

            `channelAllowList` array of string
            :   Only channels in this set will be scraped. Must not be empty.

        **channelBlockList**

        Set `type` to `"channelBlockList"`.

        `channelBlockList` [`ChannelBlockListConnectionsScrapingConfig`](https://dev.nominal.io/api/rest/connection-service.md#channelblocklistconnectionsscrapingconfig)
        :   ​

            Fields of `ChannelBlockListConnectionsScrapingConfig`

            `channelBlockList` array of string
            :   Only channels not in this set will be scraped. Must not be empty.

`shouldScrape` boolean
:   The connection will be scraped iff this flag is set and scrapingConfig is present.

`limits` [`LimitsConfig`](https://dev.nominal.io/api/rest/connection-service.md#limitsconfig)
:   ​

    Fields of `LimitsConfig`

    `maxQueryRange` [`Duration`](https://dev.nominal.io/api/rest/connection-service.md#duration)
    :   ​

        Fields of `Duration`

        `unit` [`TemporalUnit`](https://dev.nominal.io/api/rest/connection-service.md#temporalunit)
        :   ​

            Values of `TemporalUnit`

            `HOURS`
            :   ​

            `DAYS`
            :   ​

            `WEEKS`
            :   ​

        `count` integer
        :   ​

`connectionStatus` [`ConnectionStatus`](https://dev.nominal.io/api/rest/connection-service.md#connectionstatus)
:   ​

    Fields of `ConnectionStatus`

    `isConnected` boolean
    :   ​

`isArchived` boolean
:   ​

Request

**curl**

```shell
curl "https://api.gov.nominal.io/api/data-source/connection/v1/connection/<rid>" \
  -H "Authorization: Bearer <api key>"
```

**requests**

```python
import requests

response = requests.get(
    "https://api.gov.nominal.io/api/data-source/connection/v1/connection/<rid>",
    headers={"Authorization": "Bearer <api key>"},
)
response.raise_for_status()
print(response.json())
```

**httpx**

```python
import httpx

response = httpx.get(
    "https://api.gov.nominal.io/api/data-source/connection/v1/connection/<rid>",
    headers={"Authorization": "Bearer <api key>"},
)
response.raise_for_status()
print(response.json())
```

**aiohttp**

```python
import asyncio

import aiohttp

async def main() -> None:
    async with aiohttp.ClientSession() as session:
        async with session.get(
            "https://api.gov.nominal.io/api/data-source/connection/v1/connection/<rid>",
            headers={"Authorization": "Bearer <api key>"},
        ) as response:
            response.raise_for_status()
            print(await response.json())

asyncio.run(main())
```

Response: `200`

```json
{
  "rid": "<connection rid>",
  "displayName": "<display name>",
  "description": "<description>",
  "connectionDetails": {
    "type": "timescale",
    "timescale": {
      "database": "<database>",
      "host": "<host>",
      "port": 1,
      "username": "<username>",
      "passwordSecretRid": "<secret rid>"
    }
  },
  "requiredTagNames": [
    "<tag name>"
  ],
  "metadata": {
    "<key>": "<value>"
  },
  "scraping": {
    "type": "influx",
    "influx": {
      "filter": [
        {
          "type": "matchBucket",
          "matchBucket": [
            "<bucket name>"
          ]
        }
      ],
      "seriesArchetypeConstruction": {
        "channelNameComponents": [
          {
            "type": "bucket",
            "bucket": {}
          }
        ],
        "separator": "<separator>"
      }
    }
  },
  "shouldScrape": true,
  "limits": {
    "maxQueryRange": {
      "unit": "HOURS",
      "count": 1
    }
  },
  "connectionStatus": {
    "isConnected": true
  },
  "isArchived": true
}
```

### Get connections

POST `/data-source/connection/v1/connection/multiple`

Gets a set of connections by their RIDs.

Body

The body is an array of string (RID).

Response

The body is an array of [`Connection`](https://dev.nominal.io/api/rest/connection-service.md#connection).

Fields of `Connection`

`rid` string (RID)
:   ​

`displayName` string
:   The display name of the connection. For example: “Nominal production TimescaleDB”

`description` string
:   ​

`connectionDetails` [`ConnectionDetails`](https://dev.nominal.io/api/rest/connection-service.md#connectiondetails)
:   ​

    **timescale**

    Set `type` to `"timescale"`.

    `timescale` [`TimescaleConnectionDetails`](https://dev.nominal.io/api/rest/connection-service.md#timescaleconnectiondetails)
    :   ​

        Fields of `TimescaleConnectionDetails`

        `database` string
        :   ​

        `host` string
        :   ​

        `port` integer
        :   ​

        `username` string
        :   This is also the reference to the secret containing the password

        `passwordSecretRid` string (RID)
        :   Secret Rid of password secret stored in Secrets Service.

    **influx**

    Set `type` to `"influx"`.

    `influx` [`Influx2ConnectionDetails`](https://dev.nominal.io/api/rest/connection-service.md#influx2connectiondetails)
    :   ​

        Fields of `Influx2ConnectionDetails`

        `host` string
        :   ​

        `port` integer
        :   ​

        `headers` map of string to [`HeaderValue`](https://dev.nominal.io/api/rest/connection-service.md#headervalue)
        :   A map of header name to value

            **plain**

            Set `type` to `"plain"`.

            `plain` string
            :   ​

            **secretRid**

            Set `type` to `"secretRid"`.

            `secretRid` string (RID)
            :   ​

        `org` string
        :   ​

        `tokenSecretRid` string (RID)
        :   Secret Rid of token secret stored in Secrets Service.

    **influx1**

    Set `type` to `"influx1"`.

    `influx1` [`Influx1ConnectionDetails`](https://dev.nominal.io/api/rest/connection-service.md#influx1connectiondetails)
    :   ​

        Fields of `Influx1ConnectionDetails`

        `host` string
        :   ​

        `port` integer
        :   ​

        `headers` map of string to [`HeaderValue`](https://dev.nominal.io/api/rest/connection-service.md#headervalue)
        :   A map of header name to value

        `credentials` [`PasswordCredentials`](https://dev.nominal.io/api/rest/connection-service.md#passwordcredentials)
        :   ​

            Fields of `PasswordCredentials`

            `username` string
            :   ​

            `passwordSecretRid` string (RID)
            :   Secret Rid of password secret stored in Secrets Service.

    **nominal**

    Set `type` to `"nominal"`.

    `nominal` [`NominalConnectionDetails`](https://dev.nominal.io/api/rest/connection-service.md#nominalconnectiondetails)
    :   ​

        Fields of `NominalConnectionDetails`

        `nominalDataSourceRid` string (RID)
        :   ​

    **timestream**

    Set `type` to `"timestream"`.

    `timestream` [`TimestreamConnectionDetails`](https://dev.nominal.io/api/rest/connection-service.md#timestreamconnectiondetails)
    :   ​

        Fields of `TimestreamConnectionDetails`

        `nominalRoleArn` string
        :   The role ARN owned by Nominal that has permission to assume the externalRoleArn.

        `nominalRoleRegion` string
        :   AWS region that contains the Nominal role.

        `externalRegion` string
        :   AWS region that contains the Timestream instance.

        `externalRoleArn` string
        :   The role ARN used to make queries to Timestream. This role is owned by the AWS account that owns the Timestream instance.

        `database` string
        :   Database inside of the Timestream instance to connect to.

    **visualCrossing**

    Set `type` to `"visualCrossing"`.

    `visualCrossing` [`VisualCrossingConnectionDetails`](https://dev.nominal.io/api/rest/connection-service.md#visualcrossingconnectiondetails)
    :   ​

        Fields of `VisualCrossingConnectionDetails`

        `apiKeySecretRid` string (RID)
        :   Secret Rid of API key stored in Secrets Service.

    **bigQuery**

    Set `type` to `"bigQuery"`.

    `bigQuery` [`BigQueryConnectionDetails`](https://dev.nominal.io/api/rest/connection-service.md#bigqueryconnectiondetails)
    :   ​

        Fields of `BigQueryConnectionDetails`

        `region` string
        :   The region of the BigQuery Project (e.g. “us-east1”)

        `project` string
        :   The name of the BigQuery Project

        `dataset` string
        :   The name of the dataset within the project

        `table` string
        :   The name of the table within the dataset

        `serviceAccountKeySecretRid` string (RID)
        :   Secret Rid of service account key stored in Secrets Service.

`requiredTagNames` array of string
:   Additional tag names that should be supplied to construct a fully qualified series. These are suggested, rather than strictly required.

`metadata` map of string to string
:   ​

`scraping` [`ScrapingConfig`](https://dev.nominal.io/api/rest/connection-service.md#scrapingconfig)
:   ​

    **influx**

    Set `type` to `"influx"`.

    `influx` [`InfluxScrapingConfig`](https://dev.nominal.io/api/rest/connection-service.md#influxscrapingconfig)
    :   ​

        Fields of `InfluxScrapingConfig`

        `filter` array of [`InfluxScrapingFilter`](https://dev.nominal.io/api/rest/connection-service.md#influxscrapingfilter)
        :   Filters are ANDed together

            **not**

            Set `type` to `"not"`.

            `not` [`InfluxScrapingFilter`](https://dev.nominal.io/api/rest/connection-service.md#influxscrapingfilter)
            :   ​

            **matchBucket**

            Set `type` to `"matchBucket"`.

            `matchBucket` array of string
            :   Match any of the specified buckets

            **matchMeasurement**

            Set `type` to `"matchMeasurement"`.

            `matchMeasurement` array of string
            :   Match any of the specified measurements

        `seriesArchetypeConstruction` [`InfluxSeriesArchetypeConstructionConfig`](https://dev.nominal.io/api/rest/connection-service.md#influxseriesarchetypeconstructionconfig)
        :   ​

            Fields of `InfluxSeriesArchetypeConstructionConfig`

            `channelNameComponents` array of [`InfluxChannelNameComponent`](https://dev.nominal.io/api/rest/connection-service.md#influxchannelnamecomponent)
            :   ​

                **bucket**

                Set `type` to `"bucket"`.

                `bucket` [`Empty`](https://dev.nominal.io/api/rest/connection-service.md#empty)
                :   ​

                **measurement**

                Set `type` to `"measurement"`.

                `measurement` [`Empty`](https://dev.nominal.io/api/rest/connection-service.md#empty)
                :   ​

                **field**

                Set `type` to `"field"`.

                `field` [`Empty`](https://dev.nominal.io/api/rest/connection-service.md#empty)
                :   ​

            `separator` string
            :   ​

    **nominal**

    Set `type` to `"nominal"`.

    `nominal` [`NominalScrapingConfig`](https://dev.nominal.io/api/rest/connection-service.md#nominalscrapingconfig)
    :   ​

        Fields of `NominalScrapingConfig`

        `channelNameComponents` array of [`NominalChannelNameComponent`](https://dev.nominal.io/api/rest/connection-service.md#nominalchannelnamecomponent)
        :   channelNameComponents will be combined, together with separator, to form a fully qualified channel name.

            **channel**

            Set `type` to `"channel"`.

            `channel` [`Empty`](https://dev.nominal.io/api/rest/connection-service.md#empty)
            :   ​

            **valueOfTagWithName**

            Set `type` to `"valueOfTagWithName"`.

            `valueOfTagWithName` string
            :   The value of the specified TagName will be used. If the tag is not present, it will be omitted.

        `separator` string
        :   ​

    **timestream**

    Set `type` to `"timestream"`.

    `timestream` [`TimestreamScrapingConfig`](https://dev.nominal.io/api/rest/connection-service.md#timestreamscrapingconfig)
    :   ​

        Fields of `TimestreamScrapingConfig`

        `filter` array of [`TimestreamScrapingFilter`](https://dev.nominal.io/api/rest/connection-service.md#timestreamscrapingfilter)
        :   In order for data to be picked up by the scraper, it must match all filters in this list.

            **matchTable**

            Set `type` to `"matchTable"`.

            `matchTable` array of string
            :   Match any of the specified tables in the database.

        `channelNameComponents` array of [`TimestreamChannelNameComponent`](https://dev.nominal.io/api/rest/connection-service.md#timestreamchannelnamecomponent)
        :   channelNameComponents will be combined, together with separator, to form a fully qualified channel name.

            **table**

            Set `type` to `"table"`.

            `table` [`Empty`](https://dev.nominal.io/api/rest/connection-service.md#empty)
            :   ​

            **measure**

            Set `type` to `"measure"`.

            `measure` [`Empty`](https://dev.nominal.io/api/rest/connection-service.md#empty)
            :   ​

            **attribute**

            Set `type` to `"attribute"`.

            `attribute` [`Empty`](https://dev.nominal.io/api/rest/connection-service.md#empty)
            :   ​

            **valueOfTagWithName**

            Set `type` to `"valueOfTagWithName"`.

            `valueOfTagWithName` string
            :   The value of the specified TagName will be used. If the tag is not present, it will be omitted.

        `separator` string
        :   ​

        `maxLookBackPeriodHours` integer
        :   The maximum time in hours to look back over series data to find unique measure and tag combinations. If not specified, the default look back period will be used.

    **timescale**

    Set `type` to `"timescale"`.

    `timescale` [`PivotedTimescaleScrapingConfig`](https://dev.nominal.io/api/rest/connection-service.md#pivotedtimescalescrapingconfig)
    :   ​

        Fields of `PivotedTimescaleScrapingConfig`

        `filter` array of [`TimescaleScrapingFilter`](https://dev.nominal.io/api/rest/connection-service.md#timescalescrapingfilter)
        :   In order for data to be picked up by the scraper, it must match all filters in this list. To exclude chunks of data, it’s possible to use a not filter.

            **not**

            Set `type` to `"not"`.

            `not` [`TimescaleScrapingFilter`](https://dev.nominal.io/api/rest/connection-service.md#timescalescrapingfilter)
            :   ​

            **matchTable**

            Set `type` to `"matchTable"`.

            `matchTable` array of string
            :   Match any of the specified tables in the database.

            **matchSchema**

            Set `type` to `"matchSchema"`.

            `matchSchema` array of string
            :   Match any of the specified schemas in the database.

        `timeColumn` string
        :   The name of the column that holds the timestamp.

        `nameColumn` string
        :   The name of the column that holds the series name.

        `valueColumn` string
        :   The name of the column that holds the series values.

        `dimensionColumns` array of string
        :   The names of the columns that comprise a dimension. They should have a database index for efficient filtering. We do not discover dimensions based on hypertable schema because they are not necessarily configured properly.

        `channelNameComponents` array of [`PivotedTimescaleChannelNameComponent`](https://dev.nominal.io/api/rest/connection-service.md#pivotedtimescalechannelnamecomponent)
        :   channelNameComponents will be combined, together with separator, to form a fully qualified channel name.

            **table**

            Set `type` to `"table"`.

            `table` [`Empty`](https://dev.nominal.io/api/rest/connection-service.md#empty)
            :   ​

            **name**

            Set `type` to `"name"`.

            `name` [`Empty`](https://dev.nominal.io/api/rest/connection-service.md#empty)
            :   The value of the name column.

        `separator` string
        :   ​

    **visualCrossing**

    Set `type` to `"visualCrossing"`.

    `visualCrossing` [`VisualCrossingScrapingConfig`](https://dev.nominal.io/api/rest/connection-service.md#visualcrossingscrapingconfig)
    :   ​

        Fields of `VisualCrossingScrapingConfig`

        `availableSeries` array of [`VisualCrossingAvailableSeries`](https://dev.nominal.io/api/rest/connection-service.md#visualcrossingavailableseries) deprecated
        :   list of available channels **Deprecated:** No longer used for anything

            Fields of `VisualCrossingAvailableSeries`

            `channel` string
            :   ​

            `unit` string
            :   ​

            `description` string
            :   ​

            `type` [`VisualCrossingType`](https://dev.nominal.io/api/rest/connection-service.md#visualcrossingtype)
            :   ​

                Values of `VisualCrossingType`

                `DOUBLE`
                :   ​

                `STRING`
                :   ​

    **bigQuery**

    Set `type` to `"bigQuery"`.

    `bigQuery` [`BigQueryScrapingConfig`](https://dev.nominal.io/api/rest/connection-service.md#bigqueryscrapingconfig)
    :   ​

        Fields of `BigQueryScrapingConfig`

        `timeColumn` string
        :   The name of the column that holds the timestamp.

        `tagColumns` array of string
        :   The name of the columns that should be interpreted as tag columns

        `channelNameComponents` [`BigQueryChannelNameComponent`](https://dev.nominal.io/api/rest/connection-service.md#bigquerychannelnamecomponent)
        :   channelNameComponents will be combined, together with separator, to form a fully qualified channel name. By default, we don’t add anything to the column name.

            Fields of `BigQueryChannelNameComponent`

            `includeProject` boolean
            :   Whether to include the project name in the channel name.

            `includeDataset` boolean
            :   Whether to include the dataset name in the channel name.

            `includeTable` boolean
            :   Whether to include the table name in the channel name.

        `separator` string
        :   The separator that delimits the parts of the channel name. If ommitted, the default is a “.”.

    **api**

    Set `type` to `"api"`.

    `api` [`ApiScrapingConfig`](https://dev.nominal.io/api/rest/connection-service.md#apiscrapingconfig)
    :   ​

        **allChannels**

        Set `type` to `"allChannels"`.

        `allChannels` [`AllChannelsConnectionsScrapingConfig`](https://dev.nominal.io/api/rest/connection-service.md#allchannelsconnectionsscrapingconfig)
        :   ​

        **channelAllowList**

        Set `type` to `"channelAllowList"`.

        `channelAllowList` [`ChannelAllowListConnectionsScrapingConfig`](https://dev.nominal.io/api/rest/connection-service.md#channelallowlistconnectionsscrapingconfig)
        :   ​

            Fields of `ChannelAllowListConnectionsScrapingConfig`

            `channelAllowList` array of string
            :   Only channels in this set will be scraped. Must not be empty.

        **channelBlockList**

        Set `type` to `"channelBlockList"`.

        `channelBlockList` [`ChannelBlockListConnectionsScrapingConfig`](https://dev.nominal.io/api/rest/connection-service.md#channelblocklistconnectionsscrapingconfig)
        :   ​

            Fields of `ChannelBlockListConnectionsScrapingConfig`

            `channelBlockList` array of string
            :   Only channels not in this set will be scraped. Must not be empty.

`shouldScrape` boolean
:   The connection will be scraped iff this flag is set and scrapingConfig is present.

`limits` [`LimitsConfig`](https://dev.nominal.io/api/rest/connection-service.md#limitsconfig)
:   ​

    Fields of `LimitsConfig`

    `maxQueryRange` [`Duration`](https://dev.nominal.io/api/rest/connection-service.md#duration)
    :   ​

        Fields of `Duration`

        `unit` [`TemporalUnit`](https://dev.nominal.io/api/rest/connection-service.md#temporalunit)
        :   ​

            Values of `TemporalUnit`

            `HOURS`
            :   ​

            `DAYS`
            :   ​

            `WEEKS`
            :   ​

        `count` integer
        :   ​

`connectionStatus` [`ConnectionStatus`](https://dev.nominal.io/api/rest/connection-service.md#connectionstatus)
:   ​

    Fields of `ConnectionStatus`

    `isConnected` boolean
    :   ​

`isArchived` boolean
:   ​

Request

**curl**

```shell
curl -X POST "https://api.gov.nominal.io/api/data-source/connection/v1/connection/multiple" \
  -H "Authorization: Bearer <api key>" \
  -H "Content-Type: application/json" \
  --data '[
  "<connection rid>"
]'
```

**requests**

```python
import requests

response = requests.post(
    "https://api.gov.nominal.io/api/data-source/connection/v1/connection/multiple",
    headers={"Authorization": "Bearer <api key>"},
    json=["<connection rid>"],
)
response.raise_for_status()
print(response.json())
```

**httpx**

```python
import httpx

response = httpx.post(
    "https://api.gov.nominal.io/api/data-source/connection/v1/connection/multiple",
    headers={"Authorization": "Bearer <api key>"},
    json=["<connection rid>"],
)
response.raise_for_status()
print(response.json())
```

**aiohttp**

```python
import asyncio

import aiohttp

async def main() -> None:
    async with aiohttp.ClientSession() as session:
        async with session.post(
            "https://api.gov.nominal.io/api/data-source/connection/v1/connection/multiple",
            headers={"Authorization": "Bearer <api key>"},
            json=["<connection rid>"],
        ) as response:
            response.raise_for_status()
            print(await response.json())

asyncio.run(main())
```

Response: `200`

```json
[
  {
    "rid": "<connection rid>",
    "displayName": "<display name>",
    "description": "<description>",
    "connectionDetails": {
      "type": "timescale",
      "timescale": {
        "database": "<database>",
        "host": "<host>",
        "port": 1,
        "username": "<username>",
        "passwordSecretRid": "<secret rid>"
      }
    },
    "requiredTagNames": [
      "<tag name>"
    ],
    "metadata": {
      "<key>": "<value>"
    },
    "scraping": {
      "type": "influx",
      "influx": {
        "filter": [
          {
            "type": "matchBucket",
            "matchBucket": [
              "<bucket name>"
            ]
          }
        ],
        "seriesArchetypeConstruction": {
          "channelNameComponents": [
            {
              "type": "bucket",
              "bucket": {}
            }
          ],
          "separator": "<separator>"
        }
      }
    },
    "shouldScrape": true,
    "limits": {
      "maxQueryRange": {
        "unit": "HOURS",
        "count": 1
      }
    },
    "connectionStatus": {
      "isConnected": true
    },
    "isArchived": true
  }
]
```

### List connections v2

GET `/data-source/connection/v2/connections`

Lists connections with pagination. Returns connections ordered by creation time descending.

Query parameters

`includeArchived` boolean
:   Whether to include archived connections in the response. By default, this is false.

`workspaces` array of string (RID)
:   If supplied, will return only the connections within the supplied workspaces. If empty will return all connections for workspaces that the user is permitted to see.

`pageSize` integer
:   Number of connections to return per page. Defaults to 100. Will return at most 1000 records per page.

`nextPageToken` string
:   Token to retrieve the next page of results.

Response

`connections` array of [`Connection`](https://dev.nominal.io/api/rest/connection-service.md#connection)
:   ​

    Fields of `Connection`

    `rid` string (RID)
    :   ​

    `displayName` string
    :   The display name of the connection. For example: “Nominal production TimescaleDB”

    `description` string
    :   ​

    `connectionDetails` [`ConnectionDetails`](https://dev.nominal.io/api/rest/connection-service.md#connectiondetails)
    :   ​

        **timescale**

        Set `type` to `"timescale"`.

        `timescale` [`TimescaleConnectionDetails`](https://dev.nominal.io/api/rest/connection-service.md#timescaleconnectiondetails)
        :   ​

            Fields of `TimescaleConnectionDetails`

            `database` string
            :   ​

            `host` string
            :   ​

            `port` integer
            :   ​

            `username` string
            :   This is also the reference to the secret containing the password

            `passwordSecretRid` string (RID)
            :   Secret Rid of password secret stored in Secrets Service.

        **influx**

        Set `type` to `"influx"`.

        `influx` [`Influx2ConnectionDetails`](https://dev.nominal.io/api/rest/connection-service.md#influx2connectiondetails)
        :   ​

            Fields of `Influx2ConnectionDetails`

            `host` string
            :   ​

            `port` integer
            :   ​

            `headers` map of string to [`HeaderValue`](https://dev.nominal.io/api/rest/connection-service.md#headervalue)
            :   A map of header name to value

                **plain**

                Set `type` to `"plain"`.

                `plain` string
                :   ​

                **secretRid**

                Set `type` to `"secretRid"`.

                `secretRid` string (RID)
                :   ​

            `org` string
            :   ​

            `tokenSecretRid` string (RID)
            :   Secret Rid of token secret stored in Secrets Service.

        **influx1**

        Set `type` to `"influx1"`.

        `influx1` [`Influx1ConnectionDetails`](https://dev.nominal.io/api/rest/connection-service.md#influx1connectiondetails)
        :   ​

            Fields of `Influx1ConnectionDetails`

            `host` string
            :   ​

            `port` integer
            :   ​

            `headers` map of string to [`HeaderValue`](https://dev.nominal.io/api/rest/connection-service.md#headervalue)
            :   A map of header name to value

            `credentials` [`PasswordCredentials`](https://dev.nominal.io/api/rest/connection-service.md#passwordcredentials)
            :   ​

                Fields of `PasswordCredentials`

                `username` string
                :   ​

                `passwordSecretRid` string (RID)
                :   Secret Rid of password secret stored in Secrets Service.

        **nominal**

        Set `type` to `"nominal"`.

        `nominal` [`NominalConnectionDetails`](https://dev.nominal.io/api/rest/connection-service.md#nominalconnectiondetails)
        :   ​

            Fields of `NominalConnectionDetails`

            `nominalDataSourceRid` string (RID)
            :   ​

        **timestream**

        Set `type` to `"timestream"`.

        `timestream` [`TimestreamConnectionDetails`](https://dev.nominal.io/api/rest/connection-service.md#timestreamconnectiondetails)
        :   ​

            Fields of `TimestreamConnectionDetails`

            `nominalRoleArn` string
            :   The role ARN owned by Nominal that has permission to assume the externalRoleArn.

            `nominalRoleRegion` string
            :   AWS region that contains the Nominal role.

            `externalRegion` string
            :   AWS region that contains the Timestream instance.

            `externalRoleArn` string
            :   The role ARN used to make queries to Timestream. This role is owned by the AWS account that owns the Timestream instance.

            `database` string
            :   Database inside of the Timestream instance to connect to.

        **visualCrossing**

        Set `type` to `"visualCrossing"`.

        `visualCrossing` [`VisualCrossingConnectionDetails`](https://dev.nominal.io/api/rest/connection-service.md#visualcrossingconnectiondetails)
        :   ​

            Fields of `VisualCrossingConnectionDetails`

            `apiKeySecretRid` string (RID)
            :   Secret Rid of API key stored in Secrets Service.

        **bigQuery**

        Set `type` to `"bigQuery"`.

        `bigQuery` [`BigQueryConnectionDetails`](https://dev.nominal.io/api/rest/connection-service.md#bigqueryconnectiondetails)
        :   ​

            Fields of `BigQueryConnectionDetails`

            `region` string
            :   The region of the BigQuery Project (e.g. “us-east1”)

            `project` string
            :   The name of the BigQuery Project

            `dataset` string
            :   The name of the dataset within the project

            `table` string
            :   The name of the table within the dataset

            `serviceAccountKeySecretRid` string (RID)
            :   Secret Rid of service account key stored in Secrets Service.

    `requiredTagNames` array of string
    :   Additional tag names that should be supplied to construct a fully qualified series. These are suggested, rather than strictly required.

    `metadata` map of string to string
    :   ​

    `scraping` [`ScrapingConfig`](https://dev.nominal.io/api/rest/connection-service.md#scrapingconfig)
    :   ​

        **influx**

        Set `type` to `"influx"`.

        `influx` [`InfluxScrapingConfig`](https://dev.nominal.io/api/rest/connection-service.md#influxscrapingconfig)
        :   ​

            Fields of `InfluxScrapingConfig`

            `filter` array of [`InfluxScrapingFilter`](https://dev.nominal.io/api/rest/connection-service.md#influxscrapingfilter)
            :   Filters are ANDed together

                **not**

                Set `type` to `"not"`.

                `not` [`InfluxScrapingFilter`](https://dev.nominal.io/api/rest/connection-service.md#influxscrapingfilter)
                :   ​

                **matchBucket**

                Set `type` to `"matchBucket"`.

                `matchBucket` array of string
                :   Match any of the specified buckets

                **matchMeasurement**

                Set `type` to `"matchMeasurement"`.

                `matchMeasurement` array of string
                :   Match any of the specified measurements

            `seriesArchetypeConstruction` [`InfluxSeriesArchetypeConstructionConfig`](https://dev.nominal.io/api/rest/connection-service.md#influxseriesarchetypeconstructionconfig)
            :   ​

                Fields of `InfluxSeriesArchetypeConstructionConfig`

                `channelNameComponents` array of [`InfluxChannelNameComponent`](https://dev.nominal.io/api/rest/connection-service.md#influxchannelnamecomponent)
                :   ​

                    **bucket**

                    Set `type` to `"bucket"`.

                    `bucket` [`Empty`](https://dev.nominal.io/api/rest/connection-service.md#empty)
                    :   ​

                    **measurement**

                    Set `type` to `"measurement"`.

                    `measurement` [`Empty`](https://dev.nominal.io/api/rest/connection-service.md#empty)
                    :   ​

                    **field**

                    Set `type` to `"field"`.

                    `field` [`Empty`](https://dev.nominal.io/api/rest/connection-service.md#empty)
                    :   ​

                `separator` string
                :   ​

        **nominal**

        Set `type` to `"nominal"`.

        `nominal` [`NominalScrapingConfig`](https://dev.nominal.io/api/rest/connection-service.md#nominalscrapingconfig)
        :   ​

            Fields of `NominalScrapingConfig`

            `channelNameComponents` array of [`NominalChannelNameComponent`](https://dev.nominal.io/api/rest/connection-service.md#nominalchannelnamecomponent)
            :   channelNameComponents will be combined, together with separator, to form a fully qualified channel name.

                **channel**

                Set `type` to `"channel"`.

                `channel` [`Empty`](https://dev.nominal.io/api/rest/connection-service.md#empty)
                :   ​

                **valueOfTagWithName**

                Set `type` to `"valueOfTagWithName"`.

                `valueOfTagWithName` string
                :   The value of the specified TagName will be used. If the tag is not present, it will be omitted.

            `separator` string
            :   ​

        **timestream**

        Set `type` to `"timestream"`.

        `timestream` [`TimestreamScrapingConfig`](https://dev.nominal.io/api/rest/connection-service.md#timestreamscrapingconfig)
        :   ​

            Fields of `TimestreamScrapingConfig`

            `filter` array of [`TimestreamScrapingFilter`](https://dev.nominal.io/api/rest/connection-service.md#timestreamscrapingfilter)
            :   In order for data to be picked up by the scraper, it must match all filters in this list.

                **matchTable**

                Set `type` to `"matchTable"`.

                `matchTable` array of string
                :   Match any of the specified tables in the database.

            `channelNameComponents` array of [`TimestreamChannelNameComponent`](https://dev.nominal.io/api/rest/connection-service.md#timestreamchannelnamecomponent)
            :   channelNameComponents will be combined, together with separator, to form a fully qualified channel name.

                **table**

                Set `type` to `"table"`.

                `table` [`Empty`](https://dev.nominal.io/api/rest/connection-service.md#empty)
                :   ​

                **measure**

                Set `type` to `"measure"`.

                `measure` [`Empty`](https://dev.nominal.io/api/rest/connection-service.md#empty)
                :   ​

                **attribute**

                Set `type` to `"attribute"`.

                `attribute` [`Empty`](https://dev.nominal.io/api/rest/connection-service.md#empty)
                :   ​

                **valueOfTagWithName**

                Set `type` to `"valueOfTagWithName"`.

                `valueOfTagWithName` string
                :   The value of the specified TagName will be used. If the tag is not present, it will be omitted.

            `separator` string
            :   ​

            `maxLookBackPeriodHours` integer
            :   The maximum time in hours to look back over series data to find unique measure and tag combinations. If not specified, the default look back period will be used.

        **timescale**

        Set `type` to `"timescale"`.

        `timescale` [`PivotedTimescaleScrapingConfig`](https://dev.nominal.io/api/rest/connection-service.md#pivotedtimescalescrapingconfig)
        :   ​

            Fields of `PivotedTimescaleScrapingConfig`

            `filter` array of [`TimescaleScrapingFilter`](https://dev.nominal.io/api/rest/connection-service.md#timescalescrapingfilter)
            :   In order for data to be picked up by the scraper, it must match all filters in this list. To exclude chunks of data, it’s possible to use a not filter.

                **not**

                Set `type` to `"not"`.

                `not` [`TimescaleScrapingFilter`](https://dev.nominal.io/api/rest/connection-service.md#timescalescrapingfilter)
                :   ​

                **matchTable**

                Set `type` to `"matchTable"`.

                `matchTable` array of string
                :   Match any of the specified tables in the database.

                **matchSchema**

                Set `type` to `"matchSchema"`.

                `matchSchema` array of string
                :   Match any of the specified schemas in the database.

            `timeColumn` string
            :   The name of the column that holds the timestamp.

            `nameColumn` string
            :   The name of the column that holds the series name.

            `valueColumn` string
            :   The name of the column that holds the series values.

            `dimensionColumns` array of string
            :   The names of the columns that comprise a dimension. They should have a database index for efficient filtering. We do not discover dimensions based on hypertable schema because they are not necessarily configured properly.

            `channelNameComponents` array of [`PivotedTimescaleChannelNameComponent`](https://dev.nominal.io/api/rest/connection-service.md#pivotedtimescalechannelnamecomponent)
            :   channelNameComponents will be combined, together with separator, to form a fully qualified channel name.

                **table**

                Set `type` to `"table"`.

                `table` [`Empty`](https://dev.nominal.io/api/rest/connection-service.md#empty)
                :   ​

                **name**

                Set `type` to `"name"`.

                `name` [`Empty`](https://dev.nominal.io/api/rest/connection-service.md#empty)
                :   The value of the name column.

            `separator` string
            :   ​

        **visualCrossing**

        Set `type` to `"visualCrossing"`.

        `visualCrossing` [`VisualCrossingScrapingConfig`](https://dev.nominal.io/api/rest/connection-service.md#visualcrossingscrapingconfig)
        :   ​

            Fields of `VisualCrossingScrapingConfig`

            `availableSeries` array of [`VisualCrossingAvailableSeries`](https://dev.nominal.io/api/rest/connection-service.md#visualcrossingavailableseries) deprecated
            :   list of available channels **Deprecated:** No longer used for anything

                Fields of `VisualCrossingAvailableSeries`

                `channel` string
                :   ​

                `unit` string
                :   ​

                `description` string
                :   ​

                `type` [`VisualCrossingType`](https://dev.nominal.io/api/rest/connection-service.md#visualcrossingtype)
                :   ​

                    Values of `VisualCrossingType`

                    `DOUBLE`
                    :   ​

                    `STRING`
                    :   ​

        **bigQuery**

        Set `type` to `"bigQuery"`.

        `bigQuery` [`BigQueryScrapingConfig`](https://dev.nominal.io/api/rest/connection-service.md#bigqueryscrapingconfig)
        :   ​

            Fields of `BigQueryScrapingConfig`

            `timeColumn` string
            :   The name of the column that holds the timestamp.

            `tagColumns` array of string
            :   The name of the columns that should be interpreted as tag columns

            `channelNameComponents` [`BigQueryChannelNameComponent`](https://dev.nominal.io/api/rest/connection-service.md#bigquerychannelnamecomponent)
            :   channelNameComponents will be combined, together with separator, to form a fully qualified channel name. By default, we don’t add anything to the column name.

                Fields of `BigQueryChannelNameComponent`

                `includeProject` boolean
                :   Whether to include the project name in the channel name.

                `includeDataset` boolean
                :   Whether to include the dataset name in the channel name.

                `includeTable` boolean
                :   Whether to include the table name in the channel name.

            `separator` string
            :   The separator that delimits the parts of the channel name. If ommitted, the default is a “.”.

        **api**

        Set `type` to `"api"`.

        `api` [`ApiScrapingConfig`](https://dev.nominal.io/api/rest/connection-service.md#apiscrapingconfig)
        :   ​

            **allChannels**

            Set `type` to `"allChannels"`.

            `allChannels` [`AllChannelsConnectionsScrapingConfig`](https://dev.nominal.io/api/rest/connection-service.md#allchannelsconnectionsscrapingconfig)
            :   ​

            **channelAllowList**

            Set `type` to `"channelAllowList"`.

            `channelAllowList` [`ChannelAllowListConnectionsScrapingConfig`](https://dev.nominal.io/api/rest/connection-service.md#channelallowlistconnectionsscrapingconfig)
            :   ​

                Fields of `ChannelAllowListConnectionsScrapingConfig`

                `channelAllowList` array of string
                :   Only channels in this set will be scraped. Must not be empty.

            **channelBlockList**

            Set `type` to `"channelBlockList"`.

            `channelBlockList` [`ChannelBlockListConnectionsScrapingConfig`](https://dev.nominal.io/api/rest/connection-service.md#channelblocklistconnectionsscrapingconfig)
            :   ​

                Fields of `ChannelBlockListConnectionsScrapingConfig`

                `channelBlockList` array of string
                :   Only channels not in this set will be scraped. Must not be empty.

    `shouldScrape` boolean
    :   The connection will be scraped iff this flag is set and scrapingConfig is present.

    `limits` [`LimitsConfig`](https://dev.nominal.io/api/rest/connection-service.md#limitsconfig)
    :   ​

        Fields of `LimitsConfig`

        `maxQueryRange` [`Duration`](https://dev.nominal.io/api/rest/connection-service.md#duration)
        :   ​

            Fields of `Duration`

            `unit` [`TemporalUnit`](https://dev.nominal.io/api/rest/connection-service.md#temporalunit)
            :   ​

                Values of `TemporalUnit`

                `HOURS`
                :   ​

                `DAYS`
                :   ​

                `WEEKS`
                :   ​

            `count` integer
            :   ​

    `connectionStatus` [`ConnectionStatus`](https://dev.nominal.io/api/rest/connection-service.md#connectionstatus)
    :   ​

        Fields of `ConnectionStatus`

        `isConnected` boolean
        :   ​

    `isArchived` boolean
    :   ​

`nextPageToken` string
:   ​

Request

**curl**

```shell
curl "https://api.gov.nominal.io/api/data-source/connection/v2/connections" \
  -H "Authorization: Bearer <api key>"
```

**requests**

```python
import requests

response = requests.get(
    "https://api.gov.nominal.io/api/data-source/connection/v2/connections",
    headers={"Authorization": "Bearer <api key>"},
)
response.raise_for_status()
print(response.json())
```

**httpx**

```python
import httpx

response = httpx.get(
    "https://api.gov.nominal.io/api/data-source/connection/v2/connections",
    headers={"Authorization": "Bearer <api key>"},
)
response.raise_for_status()
print(response.json())
```

**aiohttp**

```python
import asyncio

import aiohttp

async def main() -> None:
    async with aiohttp.ClientSession() as session:
        async with session.get(
            "https://api.gov.nominal.io/api/data-source/connection/v2/connections",
            headers={"Authorization": "Bearer <api key>"},
        ) as response:
            response.raise_for_status()
            print(await response.json())

asyncio.run(main())
```

Response: `200`

```json
{
  "connections": [
    {
      "rid": "<connection rid>",
      "displayName": "<display name>",
      "description": "<description>",
      "connectionDetails": {
        "type": "timescale",
        "timescale": {
          "database": "<database>",
          "host": "<host>",
          "port": 1,
          "username": "<username>",
          "passwordSecretRid": "<secret rid>"
        }
      },
      "requiredTagNames": [
        "<tag name>"
      ],
      "metadata": {
        "<key>": "<value>"
      },
      "scraping": {
        "type": "influx",
        "influx": {
          "filter": [
            {
              "type": "matchBucket",
              "matchBucket": [
                "<bucket name>"
              ]
            }
          ],
          "seriesArchetypeConstruction": {
            "channelNameComponents": [
              {
                "type": "bucket",
                "bucket": {}
              }
            ],
            "separator": "<separator>"
          }
        }
      },
      "shouldScrape": true,
      "limits": {
        "maxQueryRange": {
          "unit": "HOURS",
          "count": 1
        }
      },
      "connectionStatus": {
        "isConnected": true
      },
      "isArchived": true
    }
  ],
  "nextPageToken": "<token>"
}
```

### List connections by Nominal data source

GET `/data-source/connection/v2/connections/by-datasource`

Lists connections that reference the specified Nominal data sources, with pagination. Only returns connections within the caller’s organization.

Query parameters

`nominalDataSourceRids` array of string (RID)
:   The set of Nominal data source RIDs to filter connections by.

`workspaces` array of string (RID)
:   If supplied, will return only the connections within the supplied workspaces. If empty will return all connections for workspaces that the user is permitted to see.

`pageSize` integer
:   Number of connections to return per page. Defaults to 100. Will return at most 1000 records per page.

`nextPageToken` string
:   Token to retrieve the next page of results.

Response

`connections` array of [`Connection`](https://dev.nominal.io/api/rest/connection-service.md#connection)
:   ​

    Fields of `Connection`

    `rid` string (RID)
    :   ​

    `displayName` string
    :   The display name of the connection. For example: “Nominal production TimescaleDB”

    `description` string
    :   ​

    `connectionDetails` [`ConnectionDetails`](https://dev.nominal.io/api/rest/connection-service.md#connectiondetails)
    :   ​

        **timescale**

        Set `type` to `"timescale"`.

        `timescale` [`TimescaleConnectionDetails`](https://dev.nominal.io/api/rest/connection-service.md#timescaleconnectiondetails)
        :   ​

            Fields of `TimescaleConnectionDetails`

            `database` string
            :   ​

            `host` string
            :   ​

            `port` integer
            :   ​

            `username` string
            :   This is also the reference to the secret containing the password

            `passwordSecretRid` string (RID)
            :   Secret Rid of password secret stored in Secrets Service.

        **influx**

        Set `type` to `"influx"`.

        `influx` [`Influx2ConnectionDetails`](https://dev.nominal.io/api/rest/connection-service.md#influx2connectiondetails)
        :   ​

            Fields of `Influx2ConnectionDetails`

            `host` string
            :   ​

            `port` integer
            :   ​

            `headers` map of string to [`HeaderValue`](https://dev.nominal.io/api/rest/connection-service.md#headervalue)
            :   A map of header name to value

                **plain**

                Set `type` to `"plain"`.

                `plain` string
                :   ​

                **secretRid**

                Set `type` to `"secretRid"`.

                `secretRid` string (RID)
                :   ​

            `org` string
            :   ​

            `tokenSecretRid` string (RID)
            :   Secret Rid of token secret stored in Secrets Service.

        **influx1**

        Set `type` to `"influx1"`.

        `influx1` [`Influx1ConnectionDetails`](https://dev.nominal.io/api/rest/connection-service.md#influx1connectiondetails)
        :   ​

            Fields of `Influx1ConnectionDetails`

            `host` string
            :   ​

            `port` integer
            :   ​

            `headers` map of string to [`HeaderValue`](https://dev.nominal.io/api/rest/connection-service.md#headervalue)
            :   A map of header name to value

            `credentials` [`PasswordCredentials`](https://dev.nominal.io/api/rest/connection-service.md#passwordcredentials)
            :   ​

                Fields of `PasswordCredentials`

                `username` string
                :   ​

                `passwordSecretRid` string (RID)
                :   Secret Rid of password secret stored in Secrets Service.

        **nominal**

        Set `type` to `"nominal"`.

        `nominal` [`NominalConnectionDetails`](https://dev.nominal.io/api/rest/connection-service.md#nominalconnectiondetails)
        :   ​

            Fields of `NominalConnectionDetails`

            `nominalDataSourceRid` string (RID)
            :   ​

        **timestream**

        Set `type` to `"timestream"`.

        `timestream` [`TimestreamConnectionDetails`](https://dev.nominal.io/api/rest/connection-service.md#timestreamconnectiondetails)
        :   ​

            Fields of `TimestreamConnectionDetails`

            `nominalRoleArn` string
            :   The role ARN owned by Nominal that has permission to assume the externalRoleArn.

            `nominalRoleRegion` string
            :   AWS region that contains the Nominal role.

            `externalRegion` string
            :   AWS region that contains the Timestream instance.

            `externalRoleArn` string
            :   The role ARN used to make queries to Timestream. This role is owned by the AWS account that owns the Timestream instance.

            `database` string
            :   Database inside of the Timestream instance to connect to.

        **visualCrossing**

        Set `type` to `"visualCrossing"`.

        `visualCrossing` [`VisualCrossingConnectionDetails`](https://dev.nominal.io/api/rest/connection-service.md#visualcrossingconnectiondetails)
        :   ​

            Fields of `VisualCrossingConnectionDetails`

            `apiKeySecretRid` string (RID)
            :   Secret Rid of API key stored in Secrets Service.

        **bigQuery**

        Set `type` to `"bigQuery"`.

        `bigQuery` [`BigQueryConnectionDetails`](https://dev.nominal.io/api/rest/connection-service.md#bigqueryconnectiondetails)
        :   ​

            Fields of `BigQueryConnectionDetails`

            `region` string
            :   The region of the BigQuery Project (e.g. “us-east1”)

            `project` string
            :   The name of the BigQuery Project

            `dataset` string
            :   The name of the dataset within the project

            `table` string
            :   The name of the table within the dataset

            `serviceAccountKeySecretRid` string (RID)
            :   Secret Rid of service account key stored in Secrets Service.

    `requiredTagNames` array of string
    :   Additional tag names that should be supplied to construct a fully qualified series. These are suggested, rather than strictly required.

    `metadata` map of string to string
    :   ​

    `scraping` [`ScrapingConfig`](https://dev.nominal.io/api/rest/connection-service.md#scrapingconfig)
    :   ​

        **influx**

        Set `type` to `"influx"`.

        `influx` [`InfluxScrapingConfig`](https://dev.nominal.io/api/rest/connection-service.md#influxscrapingconfig)
        :   ​

            Fields of `InfluxScrapingConfig`

            `filter` array of [`InfluxScrapingFilter`](https://dev.nominal.io/api/rest/connection-service.md#influxscrapingfilter)
            :   Filters are ANDed together

                **not**

                Set `type` to `"not"`.

                `not` [`InfluxScrapingFilter`](https://dev.nominal.io/api/rest/connection-service.md#influxscrapingfilter)
                :   ​

                **matchBucket**

                Set `type` to `"matchBucket"`.

                `matchBucket` array of string
                :   Match any of the specified buckets

                **matchMeasurement**

                Set `type` to `"matchMeasurement"`.

                `matchMeasurement` array of string
                :   Match any of the specified measurements

            `seriesArchetypeConstruction` [`InfluxSeriesArchetypeConstructionConfig`](https://dev.nominal.io/api/rest/connection-service.md#influxseriesarchetypeconstructionconfig)
            :   ​

                Fields of `InfluxSeriesArchetypeConstructionConfig`

                `channelNameComponents` array of [`InfluxChannelNameComponent`](https://dev.nominal.io/api/rest/connection-service.md#influxchannelnamecomponent)
                :   ​

                    **bucket**

                    Set `type` to `"bucket"`.

                    `bucket` [`Empty`](https://dev.nominal.io/api/rest/connection-service.md#empty)
                    :   ​

                    **measurement**

                    Set `type` to `"measurement"`.

                    `measurement` [`Empty`](https://dev.nominal.io/api/rest/connection-service.md#empty)
                    :   ​

                    **field**

                    Set `type` to `"field"`.

                    `field` [`Empty`](https://dev.nominal.io/api/rest/connection-service.md#empty)
                    :   ​

                `separator` string
                :   ​

        **nominal**

        Set `type` to `"nominal"`.

        `nominal` [`NominalScrapingConfig`](https://dev.nominal.io/api/rest/connection-service.md#nominalscrapingconfig)
        :   ​

            Fields of `NominalScrapingConfig`

            `channelNameComponents` array of [`NominalChannelNameComponent`](https://dev.nominal.io/api/rest/connection-service.md#nominalchannelnamecomponent)
            :   channelNameComponents will be combined, together with separator, to form a fully qualified channel name.

                **channel**

                Set `type` to `"channel"`.

                `channel` [`Empty`](https://dev.nominal.io/api/rest/connection-service.md#empty)
                :   ​

                **valueOfTagWithName**

                Set `type` to `"valueOfTagWithName"`.

                `valueOfTagWithName` string
                :   The value of the specified TagName will be used. If the tag is not present, it will be omitted.

            `separator` string
            :   ​

        **timestream**

        Set `type` to `"timestream"`.

        `timestream` [`TimestreamScrapingConfig`](https://dev.nominal.io/api/rest/connection-service.md#timestreamscrapingconfig)
        :   ​

            Fields of `TimestreamScrapingConfig`

            `filter` array of [`TimestreamScrapingFilter`](https://dev.nominal.io/api/rest/connection-service.md#timestreamscrapingfilter)
            :   In order for data to be picked up by the scraper, it must match all filters in this list.

                **matchTable**

                Set `type` to `"matchTable"`.

                `matchTable` array of string
                :   Match any of the specified tables in the database.

            `channelNameComponents` array of [`TimestreamChannelNameComponent`](https://dev.nominal.io/api/rest/connection-service.md#timestreamchannelnamecomponent)
            :   channelNameComponents will be combined, together with separator, to form a fully qualified channel name.

                **table**

                Set `type` to `"table"`.

                `table` [`Empty`](https://dev.nominal.io/api/rest/connection-service.md#empty)
                :   ​

                **measure**

                Set `type` to `"measure"`.

                `measure` [`Empty`](https://dev.nominal.io/api/rest/connection-service.md#empty)
                :   ​

                **attribute**

                Set `type` to `"attribute"`.

                `attribute` [`Empty`](https://dev.nominal.io/api/rest/connection-service.md#empty)
                :   ​

                **valueOfTagWithName**

                Set `type` to `"valueOfTagWithName"`.

                `valueOfTagWithName` string
                :   The value of the specified TagName will be used. If the tag is not present, it will be omitted.

            `separator` string
            :   ​

            `maxLookBackPeriodHours` integer
            :   The maximum time in hours to look back over series data to find unique measure and tag combinations. If not specified, the default look back period will be used.

        **timescale**

        Set `type` to `"timescale"`.

        `timescale` [`PivotedTimescaleScrapingConfig`](https://dev.nominal.io/api/rest/connection-service.md#pivotedtimescalescrapingconfig)
        :   ​

            Fields of `PivotedTimescaleScrapingConfig`

            `filter` array of [`TimescaleScrapingFilter`](https://dev.nominal.io/api/rest/connection-service.md#timescalescrapingfilter)
            :   In order for data to be picked up by the scraper, it must match all filters in this list. To exclude chunks of data, it’s possible to use a not filter.

                **not**

                Set `type` to `"not"`.

                `not` [`TimescaleScrapingFilter`](https://dev.nominal.io/api/rest/connection-service.md#timescalescrapingfilter)
                :   ​

                **matchTable**

                Set `type` to `"matchTable"`.

                `matchTable` array of string
                :   Match any of the specified tables in the database.

                **matchSchema**

                Set `type` to `"matchSchema"`.

                `matchSchema` array of string
                :   Match any of the specified schemas in the database.

            `timeColumn` string
            :   The name of the column that holds the timestamp.

            `nameColumn` string
            :   The name of the column that holds the series name.

            `valueColumn` string
            :   The name of the column that holds the series values.

            `dimensionColumns` array of string
            :   The names of the columns that comprise a dimension. They should have a database index for efficient filtering. We do not discover dimensions based on hypertable schema because they are not necessarily configured properly.

            `channelNameComponents` array of [`PivotedTimescaleChannelNameComponent`](https://dev.nominal.io/api/rest/connection-service.md#pivotedtimescalechannelnamecomponent)
            :   channelNameComponents will be combined, together with separator, to form a fully qualified channel name.

                **table**

                Set `type` to `"table"`.

                `table` [`Empty`](https://dev.nominal.io/api/rest/connection-service.md#empty)
                :   ​

                **name**

                Set `type` to `"name"`.

                `name` [`Empty`](https://dev.nominal.io/api/rest/connection-service.md#empty)
                :   The value of the name column.

            `separator` string
            :   ​

        **visualCrossing**

        Set `type` to `"visualCrossing"`.

        `visualCrossing` [`VisualCrossingScrapingConfig`](https://dev.nominal.io/api/rest/connection-service.md#visualcrossingscrapingconfig)
        :   ​

            Fields of `VisualCrossingScrapingConfig`

            `availableSeries` array of [`VisualCrossingAvailableSeries`](https://dev.nominal.io/api/rest/connection-service.md#visualcrossingavailableseries) deprecated
            :   list of available channels **Deprecated:** No longer used for anything

                Fields of `VisualCrossingAvailableSeries`

                `channel` string
                :   ​

                `unit` string
                :   ​

                `description` string
                :   ​

                `type` [`VisualCrossingType`](https://dev.nominal.io/api/rest/connection-service.md#visualcrossingtype)
                :   ​

                    Values of `VisualCrossingType`

                    `DOUBLE`
                    :   ​

                    `STRING`
                    :   ​

        **bigQuery**

        Set `type` to `"bigQuery"`.

        `bigQuery` [`BigQueryScrapingConfig`](https://dev.nominal.io/api/rest/connection-service.md#bigqueryscrapingconfig)
        :   ​

            Fields of `BigQueryScrapingConfig`

            `timeColumn` string
            :   The name of the column that holds the timestamp.

            `tagColumns` array of string
            :   The name of the columns that should be interpreted as tag columns

            `channelNameComponents` [`BigQueryChannelNameComponent`](https://dev.nominal.io/api/rest/connection-service.md#bigquerychannelnamecomponent)
            :   channelNameComponents will be combined, together with separator, to form a fully qualified channel name. By default, we don’t add anything to the column name.

                Fields of `BigQueryChannelNameComponent`

                `includeProject` boolean
                :   Whether to include the project name in the channel name.

                `includeDataset` boolean
                :   Whether to include the dataset name in the channel name.

                `includeTable` boolean
                :   Whether to include the table name in the channel name.

            `separator` string
            :   The separator that delimits the parts of the channel name. If ommitted, the default is a “.”.

        **api**

        Set `type` to `"api"`.

        `api` [`ApiScrapingConfig`](https://dev.nominal.io/api/rest/connection-service.md#apiscrapingconfig)
        :   ​

            **allChannels**

            Set `type` to `"allChannels"`.

            `allChannels` [`AllChannelsConnectionsScrapingConfig`](https://dev.nominal.io/api/rest/connection-service.md#allchannelsconnectionsscrapingconfig)
            :   ​

            **channelAllowList**

            Set `type` to `"channelAllowList"`.

            `channelAllowList` [`ChannelAllowListConnectionsScrapingConfig`](https://dev.nominal.io/api/rest/connection-service.md#channelallowlistconnectionsscrapingconfig)
            :   ​

                Fields of `ChannelAllowListConnectionsScrapingConfig`

                `channelAllowList` array of string
                :   Only channels in this set will be scraped. Must not be empty.

            **channelBlockList**

            Set `type` to `"channelBlockList"`.

            `channelBlockList` [`ChannelBlockListConnectionsScrapingConfig`](https://dev.nominal.io/api/rest/connection-service.md#channelblocklistconnectionsscrapingconfig)
            :   ​

                Fields of `ChannelBlockListConnectionsScrapingConfig`

                `channelBlockList` array of string
                :   Only channels not in this set will be scraped. Must not be empty.

    `shouldScrape` boolean
    :   The connection will be scraped iff this flag is set and scrapingConfig is present.

    `limits` [`LimitsConfig`](https://dev.nominal.io/api/rest/connection-service.md#limitsconfig)
    :   ​

        Fields of `LimitsConfig`

        `maxQueryRange` [`Duration`](https://dev.nominal.io/api/rest/connection-service.md#duration)
        :   ​

            Fields of `Duration`

            `unit` [`TemporalUnit`](https://dev.nominal.io/api/rest/connection-service.md#temporalunit)
            :   ​

                Values of `TemporalUnit`

                `HOURS`
                :   ​

                `DAYS`
                :   ​

                `WEEKS`
                :   ​

            `count` integer
            :   ​

    `connectionStatus` [`ConnectionStatus`](https://dev.nominal.io/api/rest/connection-service.md#connectionstatus)
    :   ​

        Fields of `ConnectionStatus`

        `isConnected` boolean
        :   ​

    `isArchived` boolean
    :   ​

`nextPageToken` string
:   ​

Request

**curl**

```shell
curl "https://api.gov.nominal.io/api/data-source/connection/v2/connections/by-datasource" \
  -H "Authorization: Bearer <api key>"
```

**requests**

```python
import requests

response = requests.get(
    "https://api.gov.nominal.io/api/data-source/connection/v2/connections/by-datasource",
    headers={"Authorization": "Bearer <api key>"},
)
response.raise_for_status()
print(response.json())
```

**httpx**

```python
import httpx

response = httpx.get(
    "https://api.gov.nominal.io/api/data-source/connection/v2/connections/by-datasource",
    headers={"Authorization": "Bearer <api key>"},
)
response.raise_for_status()
print(response.json())
```

**aiohttp**

```python
import asyncio

import aiohttp

async def main() -> None:
    async with aiohttp.ClientSession() as session:
        async with session.get(
            "https://api.gov.nominal.io/api/data-source/connection/v2/connections/by-datasource",
            headers={"Authorization": "Bearer <api key>"},
        ) as response:
            response.raise_for_status()
            print(await response.json())

asyncio.run(main())
```

Response: `200`

```json
{
  "connections": [
    {
      "rid": "<connection rid>",
      "displayName": "<display name>",
      "description": "<description>",
      "connectionDetails": {
        "type": "timescale",
        "timescale": {
          "database": "<database>",
          "host": "<host>",
          "port": 1,
          "username": "<username>",
          "passwordSecretRid": "<secret rid>"
        }
      },
      "requiredTagNames": [
        "<tag name>"
      ],
      "metadata": {
        "<key>": "<value>"
      },
      "scraping": {
        "type": "influx",
        "influx": {
          "filter": [
            {
              "type": "matchBucket",
              "matchBucket": [
                "<bucket name>"
              ]
            }
          ],
          "seriesArchetypeConstruction": {
            "channelNameComponents": [
              {
                "type": "bucket",
                "bucket": {}
              }
            ],
            "separator": "<separator>"
          }
        }
      },
      "shouldScrape": true,
      "limits": {
        "maxQueryRange": {
          "unit": "HOURS",
          "count": 1
        }
      },
      "connectionStatus": {
        "isConnected": true
      },
      "isArchived": true
    }
  ],
  "nextPageToken": "<token>"
}
```

### Archive connection

POST `/data-source/connection/v1/connections/{rid}/archive`

Archives a connection, which simply tags the connection for a client to filter.

Path parameters

`rid` string (RID) required
:   ​

Response

No content (HTTP 204).

Request

**curl**

```shell
curl -X POST "https://api.gov.nominal.io/api/data-source/connection/v1/connections/<rid>/archive" \
  -H "Authorization: Bearer <api key>"
```

**requests**

```python
import requests

response = requests.post(
    "https://api.gov.nominal.io/api/data-source/connection/v1/connections/<rid>/archive",
    headers={"Authorization": "Bearer <api key>"},
)
response.raise_for_status()
```

**httpx**

```python
import httpx

response = httpx.post(
    "https://api.gov.nominal.io/api/data-source/connection/v1/connections/<rid>/archive",
    headers={"Authorization": "Bearer <api key>"},
)
response.raise_for_status()
```

**aiohttp**

```python
import asyncio

import aiohttp

async def main() -> None:
    async with aiohttp.ClientSession() as session:
        async with session.post(
            "https://api.gov.nominal.io/api/data-source/connection/v1/connections/<rid>/archive",
            headers={"Authorization": "Bearer <api key>"},
        ) as response:
            response.raise_for_status()

asyncio.run(main())
```

Response: `204`

No content.

### Unarchive connection

POST `/data-source/connection/v1/connections/{rid}/unarchive`

Undoes the archiving of a connection.

Path parameters

`rid` string (RID) required
:   ​

Response

No content (HTTP 204).

Request

**curl**

```shell
curl -X POST "https://api.gov.nominal.io/api/data-source/connection/v1/connections/<rid>/unarchive" \
  -H "Authorization: Bearer <api key>"
```

**requests**

```python
import requests

response = requests.post(
    "https://api.gov.nominal.io/api/data-source/connection/v1/connections/<rid>/unarchive",
    headers={"Authorization": "Bearer <api key>"},
)
response.raise_for_status()
```

**httpx**

```python
import httpx

response = httpx.post(
    "https://api.gov.nominal.io/api/data-source/connection/v1/connections/<rid>/unarchive",
    headers={"Authorization": "Bearer <api key>"},
)
response.raise_for_status()
```

**aiohttp**

```python
import asyncio

import aiohttp

async def main() -> None:
    async with aiohttp.ClientSession() as session:
        async with session.post(
            "https://api.gov.nominal.io/api/data-source/connection/v1/connections/<rid>/unarchive",
            headers={"Authorization": "Bearer <api key>"},
        ) as response:
            response.raise_for_status()

asyncio.run(main())
```

Response: `204`

No content.

## Errors

[Errors](https://dev.nominal.io/api/legacy.md#errors) shows how these errors are sent.

Each error’s `errorName` is `Connection:` followed by its name below.

| Status | Name | Notes |
| --- | --- | --- |
| 400 | `FailedToAddTagsToConnection` | Cannot manually add tags to a Nominal connection. |
| 400 | `NoSecretRidProvided` |  |
| 400 | `PopulateSeriesTimeRangeTooLarge` |  |
| 403 | `NotAllowedToCreateConnection` |  |
| 404 | `ConnectionNotFound` |  |
| 404 | `DatasetRidNotFound` |  |
| 404 | `DatasourceRidNotFound` |  |
| 404 | `SecretsNotFound` |  |
| 500 | `FailedToCreateConnection` |  |

## Types

### AllChannelsConnectionsScrapingConfig

An empty JSON object, `{}`.

### ApiScrapingConfig

This config is used to scrape data from an external connections service.

Set `type` to the name of one of the other fields, and set only that field.

`allChannels` [`AllChannelsConnectionsScrapingConfig`](https://dev.nominal.io/api/rest/connection-service.md#allchannelsconnectionsscrapingconfig)
:   ​

`channelAllowList` [`ChannelAllowListConnectionsScrapingConfig`](https://dev.nominal.io/api/rest/connection-service.md#channelallowlistconnectionsscrapingconfig)
:   ​

`channelBlockList` [`ChannelBlockListConnectionsScrapingConfig`](https://dev.nominal.io/api/rest/connection-service.md#channelblocklistconnectionsscrapingconfig)
:   ​

### BigQueryChannelNameComponent

`includeProject` boolean required
:   Whether to include the project name in the channel name.

`includeDataset` boolean required
:   Whether to include the dataset name in the channel name.

`includeTable` boolean required
:   Whether to include the table name in the channel name.

### BigQueryConnectionDetails

`region` string required
:   The region of the BigQuery Project (e.g. “us-east1”)

`project` string required
:   The name of the BigQuery Project

`dataset` string required
:   The name of the dataset within the project

`table` string required
:   The name of the table within the dataset

`serviceAccountKeySecretRid` string (RID) required
:   Secret Rid of service account key stored in Secrets Service.

### BigQueryScrapingConfig

`timeColumn` string required
:   The name of the column that holds the timestamp.

`tagColumns` array of string
:   The name of the columns that should be interpreted as tag columns

`channelNameComponents` [`BigQueryChannelNameComponent`](https://dev.nominal.io/api/rest/connection-service.md#bigquerychannelnamecomponent)
:   channelNameComponents will be combined, together with separator, to form a fully qualified channel name. By default, we don’t add anything to the column name.

`separator` string
:   The separator that delimits the parts of the channel name. If ommitted, the default is a “.”.

### ChannelAllowListConnectionsScrapingConfig

`channelAllowList` array of string
:   Only channels in this set will be scraped. Must not be empty.

### ChannelBlockListConnectionsScrapingConfig

`channelBlockList` array of string
:   Only channels not in this set will be scraped. Must not be empty.

### Connection

`rid` string (RID) required
:   ​

`displayName` string required
:   The display name of the connection. For example: “Nominal production TimescaleDB”

`description` string
:   ​

`connectionDetails` [`ConnectionDetails`](https://dev.nominal.io/api/rest/connection-service.md#connectiondetails) required
:   ​

`requiredTagNames` array of string
:   Additional tag names that should be supplied to construct a fully qualified series. These are suggested, rather than strictly required.

`metadata` map of string to string
:   ​

`scraping` [`ScrapingConfig`](https://dev.nominal.io/api/rest/connection-service.md#scrapingconfig)
:   ​

`shouldScrape` boolean required
:   The connection will be scraped iff this flag is set and scrapingConfig is present.

`limits` [`LimitsConfig`](https://dev.nominal.io/api/rest/connection-service.md#limitsconfig)
:   ​

`connectionStatus` [`ConnectionStatus`](https://dev.nominal.io/api/rest/connection-service.md#connectionstatus) required
:   ​

`isArchived` boolean required
:   ​

### ConnectionDetails

Set `type` to the name of one of the other fields, and set only that field.

`timescale` [`TimescaleConnectionDetails`](https://dev.nominal.io/api/rest/connection-service.md#timescaleconnectiondetails)
:   ​

`influx` [`Influx2ConnectionDetails`](https://dev.nominal.io/api/rest/connection-service.md#influx2connectiondetails)
:   ​

`influx1` [`Influx1ConnectionDetails`](https://dev.nominal.io/api/rest/connection-service.md#influx1connectiondetails)
:   ​

`nominal` [`NominalConnectionDetails`](https://dev.nominal.io/api/rest/connection-service.md#nominalconnectiondetails)
:   ​

`timestream` [`TimestreamConnectionDetails`](https://dev.nominal.io/api/rest/connection-service.md#timestreamconnectiondetails)
:   ​

`visualCrossing` [`VisualCrossingConnectionDetails`](https://dev.nominal.io/api/rest/connection-service.md#visualcrossingconnectiondetails)
:   ​

`bigQuery` [`BigQueryConnectionDetails`](https://dev.nominal.io/api/rest/connection-service.md#bigqueryconnectiondetails)
:   ​

### ConnectionStatus

`isConnected` boolean required
:   ​

### Duration

`unit` [`TemporalUnit`](https://dev.nominal.io/api/rest/connection-service.md#temporalunit) required
:   ​

`count` integer required
:   ​

### Empty

An empty JSON object, `{}`.

### HeaderValue

Set `type` to the name of one of the other fields, and set only that field.

`plain` string
:   ​

`secretRid` string (RID)
:   ​

### Influx1ConnectionDetails

`host` string required
:   ​

`port` integer required
:   ​

`headers` map of string to [`HeaderValue`](https://dev.nominal.io/api/rest/connection-service.md#headervalue)
:   A map of header name to value

`credentials` [`PasswordCredentials`](https://dev.nominal.io/api/rest/connection-service.md#passwordcredentials)
:   ​

### Influx2ConnectionDetails

`host` string required
:   ​

`port` integer required
:   ​

`headers` map of string to [`HeaderValue`](https://dev.nominal.io/api/rest/connection-service.md#headervalue)
:   A map of header name to value

`org` string required
:   ​

`tokenSecretRid` string (RID) required
:   Secret Rid of token secret stored in Secrets Service.

### InfluxChannelNameComponent

Set `type` to the name of one of the other fields, and set only that field.

`bucket` [`Empty`](https://dev.nominal.io/api/rest/connection-service.md#empty)
:   ​

`measurement` [`Empty`](https://dev.nominal.io/api/rest/connection-service.md#empty)
:   ​

`field` [`Empty`](https://dev.nominal.io/api/rest/connection-service.md#empty)
:   ​

### InfluxScrapingConfig

`filter` array of [`InfluxScrapingFilter`](https://dev.nominal.io/api/rest/connection-service.md#influxscrapingfilter)
:   Filters are ANDed together

`seriesArchetypeConstruction` [`InfluxSeriesArchetypeConstructionConfig`](https://dev.nominal.io/api/rest/connection-service.md#influxseriesarchetypeconstructionconfig) required
:   ​

### InfluxScrapingFilter

Set `type` to the name of one of the other fields, and set only that field.

`not` [`InfluxScrapingFilter`](https://dev.nominal.io/api/rest/connection-service.md#influxscrapingfilter)
:   ​

`matchBucket` array of string
:   Match any of the specified buckets

`matchMeasurement` array of string
:   Match any of the specified measurements

### InfluxSeriesArchetypeConstructionConfig

For example, for config of the form {components: [measurement, field, tag: vehicle], separator: “.”} will construct a channel that looks like vehicle_a.measurement.field. Tags will automatically be specified inside of the archetype.

`channelNameComponents` array of [`InfluxChannelNameComponent`](https://dev.nominal.io/api/rest/connection-service.md#influxchannelnamecomponent)
:   ​

`separator` string required
:   ​

### LimitsConfig

`maxQueryRange` [`Duration`](https://dev.nominal.io/api/rest/connection-service.md#duration)
:   ​

### NominalChannelNameComponent

Set `type` to the name of one of the other fields, and set only that field.

`channel` [`Empty`](https://dev.nominal.io/api/rest/connection-service.md#empty)
:   ​

`valueOfTagWithName` string
:   The value of the specified TagName will be used. If the tag is not present, it will be omitted.

### NominalConnectionDetails

`nominalDataSourceRid` string (RID) required
:   ​

### NominalScrapingConfig

`channelNameComponents` array of [`NominalChannelNameComponent`](https://dev.nominal.io/api/rest/connection-service.md#nominalchannelnamecomponent)
:   channelNameComponents will be combined, together with separator, to form a fully qualified channel name.

`separator` string required
:   ​

### PasswordCredentials

`username` string required
:   ​

`passwordSecretRid` string (RID) required
:   Secret Rid of password secret stored in Secrets Service.

### PivotedTimescaleChannelNameComponent

Set `type` to the name of one of the other fields, and set only that field.

`table` [`Empty`](https://dev.nominal.io/api/rest/connection-service.md#empty)
:   ​

`name` [`Empty`](https://dev.nominal.io/api/rest/connection-service.md#empty)
:   The value of the name column.

### PivotedTimescaleScrapingConfig

This config is used to scrape data from a Timescale database that has a pivoted schema. time | name | value | device 1 | temperature | 1 | a

`filter` array of [`TimescaleScrapingFilter`](https://dev.nominal.io/api/rest/connection-service.md#timescalescrapingfilter)
:   In order for data to be picked up by the scraper, it must match all filters in this list. To exclude chunks of data, it’s possible to use a not filter.

`timeColumn` string required
:   The name of the column that holds the timestamp.

`nameColumn` string required
:   The name of the column that holds the series name.

`valueColumn` string required
:   The name of the column that holds the series values.

`dimensionColumns` array of string
:   The names of the columns that comprise a dimension. They should have a database index for efficient filtering. We do not discover dimensions based on hypertable schema because they are not necessarily configured properly.

`channelNameComponents` array of [`PivotedTimescaleChannelNameComponent`](https://dev.nominal.io/api/rest/connection-service.md#pivotedtimescalechannelnamecomponent)
:   channelNameComponents will be combined, together with separator, to form a fully qualified channel name.

`separator` string required
:   ​

### ScrapingConfig

Set `type` to the name of one of the other fields, and set only that field.

`influx` [`InfluxScrapingConfig`](https://dev.nominal.io/api/rest/connection-service.md#influxscrapingconfig)
:   ​

`nominal` [`NominalScrapingConfig`](https://dev.nominal.io/api/rest/connection-service.md#nominalscrapingconfig)
:   ​

`timestream` [`TimestreamScrapingConfig`](https://dev.nominal.io/api/rest/connection-service.md#timestreamscrapingconfig)
:   ​

`timescale` [`PivotedTimescaleScrapingConfig`](https://dev.nominal.io/api/rest/connection-service.md#pivotedtimescalescrapingconfig)
:   ​

`visualCrossing` [`VisualCrossingScrapingConfig`](https://dev.nominal.io/api/rest/connection-service.md#visualcrossingscrapingconfig)
:   ​

`bigQuery` [`BigQueryScrapingConfig`](https://dev.nominal.io/api/rest/connection-service.md#bigqueryscrapingconfig)
:   ​

`api` [`ApiScrapingConfig`](https://dev.nominal.io/api/rest/connection-service.md#apiscrapingconfig)
:   ​

### TemporalUnit

`HOURS`
:   ​

`DAYS`
:   ​

`WEEKS`
:   ​

### TimescaleConnectionDetails

`database` string required
:   ​

`host` string required
:   ​

`port` integer required
:   ​

`username` string required
:   This is also the reference to the secret containing the password

`passwordSecretRid` string (RID) required
:   Secret Rid of password secret stored in Secrets Service.

### TimescaleScrapingFilter

Set `type` to the name of one of the other fields, and set only that field.

`not` [`TimescaleScrapingFilter`](https://dev.nominal.io/api/rest/connection-service.md#timescalescrapingfilter)
:   ​

`matchTable` array of string
:   Match any of the specified tables in the database.

`matchSchema` array of string
:   Match any of the specified schemas in the database.

### TimestreamChannelNameComponent

Set `type` to the name of one of the other fields, and set only that field.

`table` [`Empty`](https://dev.nominal.io/api/rest/connection-service.md#empty)
:   ​

`measure` [`Empty`](https://dev.nominal.io/api/rest/connection-service.md#empty)
:   ​

`attribute` [`Empty`](https://dev.nominal.io/api/rest/connection-service.md#empty)
:   ​

`valueOfTagWithName` string
:   The value of the specified TagName will be used. If the tag is not present, it will be omitted.

### TimestreamConnectionDetails

`nominalRoleArn` string required
:   The role ARN owned by Nominal that has permission to assume the externalRoleArn.

`nominalRoleRegion` string required
:   AWS region that contains the Nominal role.

`externalRegion` string required
:   AWS region that contains the Timestream instance.

`externalRoleArn` string required
:   The role ARN used to make queries to Timestream. This role is owned by the AWS account that owns the Timestream instance.

`database` string required
:   Database inside of the Timestream instance to connect to.

### TimestreamScrapingConfig

`filter` array of [`TimestreamScrapingFilter`](https://dev.nominal.io/api/rest/connection-service.md#timestreamscrapingfilter)
:   In order for data to be picked up by the scraper, it must match all filters in this list.

`channelNameComponents` array of [`TimestreamChannelNameComponent`](https://dev.nominal.io/api/rest/connection-service.md#timestreamchannelnamecomponent)
:   channelNameComponents will be combined, together with separator, to form a fully qualified channel name.

`separator` string required
:   ​

`maxLookBackPeriodHours` integer
:   The maximum time in hours to look back over series data to find unique measure and tag combinations. If not specified, the default look back period will be used.

### TimestreamScrapingFilter

Set `type` to the name of one of the other fields, and set only that field.

`matchTable` array of string
:   Match any of the specified tables in the database.

### VisualCrossingAvailableSeries

Deprecated and not used for anything anymore, see record VisualCrossingAvailableSeries instead.

`channel` string required
:   ​

`unit` string
:   ​

`description` string
:   ​

`type` [`VisualCrossingType`](https://dev.nominal.io/api/rest/connection-service.md#visualcrossingtype) required
:   ​

### VisualCrossingConnectionDetails

`apiKeySecretRid` string (RID) required
:   Secret Rid of API key stored in Secrets Service.

### VisualCrossingScrapingConfig

`availableSeries` array of [`VisualCrossingAvailableSeries`](https://dev.nominal.io/api/rest/connection-service.md#visualcrossingavailableseries) deprecated
:   list of available channels **Deprecated:** No longer used for anything

### VisualCrossingType

`DOUBLE`
:   ​

`STRING`
:   ​

Page design based on [Scalar](https://scalar.com), MIT License.
