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
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
namestring required
descriptionstring
connectionDetailsConnectionDetailsrequired
Set
typeto"timescale".timescaleTimescaleConnectionDetails
Fields of
TimescaleConnectionDetailsdatabasestring required
hoststring required
portinteger required
usernamestring requiredThis is also the reference to the secret containing the password
passwordSecretRidstring (RID) requiredSecret Rid of password secret stored in Secrets Service.
Set
typeto"influx".influxInflux2ConnectionDetails
Fields of
Influx2ConnectionDetailshoststring required
portinteger required
headersmap of string toHeaderValueA map of header name to value
Set
typeto"plain".plainstring
Set
typeto"secretRid".secretRidstring (RID)
orgstring required
tokenSecretRidstring (RID) requiredSecret Rid of token secret stored in Secrets Service.
Set
typeto"influx1".influx1Influx1ConnectionDetails
Fields of
Influx1ConnectionDetailshoststring required
portinteger required
headersmap of string toHeaderValueA map of header name to value
credentialsPasswordCredentials
Fields of
PasswordCredentialsusernamestring required
passwordSecretRidstring (RID) requiredSecret Rid of password secret stored in Secrets Service.
Set
typeto"nominal".nominalNominalConnectionDetails
Fields of
NominalConnectionDetailsnominalDataSourceRidstring (RID) required
Set
typeto"timestream".timestreamTimestreamConnectionDetails
Fields of
TimestreamConnectionDetailsnominalRoleArnstring requiredThe role ARN owned by Nominal that has permission to assume the externalRoleArn.
nominalRoleRegionstring requiredAWS region that contains the Nominal role.
externalRegionstring requiredAWS region that contains the Timestream instance.
externalRoleArnstring requiredThe role ARN used to make queries to Timestream. This role is owned by the AWS account that owns the Timestream instance.
databasestring requiredDatabase inside of the Timestream instance to connect to.
Set
typeto"visualCrossing".visualCrossingVisualCrossingConnectionDetails
Fields of
VisualCrossingConnectionDetailsapiKeySecretRidstring (RID) requiredSecret Rid of API key stored in Secrets Service.
Set
typeto"bigQuery".bigQueryBigQueryConnectionDetails
Fields of
BigQueryConnectionDetailsregionstring requiredThe region of the BigQuery Project (e.g. “us-east1”)
projectstring requiredThe name of the BigQuery Project
datasetstring requiredThe name of the dataset within the project
tablestring requiredThe name of the table within the dataset
serviceAccountKeySecretRidstring (RID) requiredSecret Rid of service account key stored in Secrets Service.
metadatamap of string to stringMetadata information about the connection which is not relevant to the DB connection itself.
requiredTagNamesarray of stringAdditional tag name that are required to construct a fully qualified series.
availableTagValuesmap ofTagNameto array of stringIn 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.
scrapingScrapingConfig
Set
typeto"influx".influxInfluxScrapingConfig
Fields of
InfluxScrapingConfigfilterarray ofInfluxScrapingFilterFilters are ANDed together
Set
typeto"not".notInfluxScrapingFilter
Set
typeto"matchBucket".matchBucketarray of stringMatch any of the specified buckets
Set
typeto"matchMeasurement".matchMeasurementarray of stringMatch any of the specified measurements
seriesArchetypeConstructionInfluxSeriesArchetypeConstructionConfigrequired
Fields of
InfluxSeriesArchetypeConstructionConfigchannelNameComponentsarray ofInfluxChannelNameComponent
separatorstring required
Set
typeto"nominal".nominalNominalScrapingConfig
Fields of
NominalScrapingConfigchannelNameComponentsarray ofNominalChannelNameComponentchannelNameComponents will be combined, together with separator, to form a fully qualified channel name.
Set
typeto"channel".channelEmpty
Set
typeto"valueOfTagWithName".valueOfTagWithNamestringThe value of the specified TagName will be used. If the tag is not present, it will be omitted.
separatorstring required
Set
typeto"timestream".timestreamTimestreamScrapingConfig
Fields of
TimestreamScrapingConfigfilterarray ofTimestreamScrapingFilterIn order for data to be picked up by the scraper, it must match all filters in this list.
Set
typeto"matchTable".matchTablearray of stringMatch any of the specified tables in the database.
channelNameComponentsarray ofTimestreamChannelNameComponentchannelNameComponents will be combined, together with separator, to form a fully qualified channel name.
separatorstring required
maxLookBackPeriodHoursintegerThe 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.
Set
typeto"timescale".timescalePivotedTimescaleScrapingConfig
Fields of
PivotedTimescaleScrapingConfigfilterarray ofTimescaleScrapingFilterIn 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.
Set
typeto"not".Set
typeto"matchTable".matchTablearray of stringMatch any of the specified tables in the database.
Set
typeto"matchSchema".matchSchemaarray of stringMatch any of the specified schemas in the database.
timeColumnstring requiredThe name of the column that holds the timestamp.
nameColumnstring requiredThe name of the column that holds the series name.
valueColumnstring requiredThe name of the column that holds the series values.
dimensionColumnsarray of stringThe 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.
channelNameComponentsarray ofPivotedTimescaleChannelNameComponentchannelNameComponents will be combined, together with separator, to form a fully qualified channel name.
separatorstring required
Set
typeto"visualCrossing".visualCrossingVisualCrossingScrapingConfig
Fields of
VisualCrossingScrapingConfigavailableSeriesarray ofVisualCrossingAvailableSeriesdeprecatedlist of available channels Deprecated: No longer used for anything
Fields of
VisualCrossingAvailableSerieschannelstring required
unitstring
descriptionstring
typeVisualCrossingTyperequired
Values of
VisualCrossingTypeDOUBLE
STRING
Set
typeto"bigQuery".bigQueryBigQueryScrapingConfig
Fields of
BigQueryScrapingConfigtimeColumnstring requiredThe name of the column that holds the timestamp.
tagColumnsarray of stringThe name of the columns that should be interpreted as tag columns
channelNameComponentsBigQueryChannelNameComponentchannelNameComponents 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
BigQueryChannelNameComponentincludeProjectboolean requiredWhether to include the project name in the channel name.
includeDatasetboolean requiredWhether to include the dataset name in the channel name.
includeTableboolean requiredWhether to include the table name in the channel name.
separatorstringThe separator that delimits the parts of the channel name. If ommitted, the default is a “.”.
Set
typeto"api".apiApiScrapingConfig
Set
typeto"allChannels".allChannelsAllChannelsConnectionsScrapingConfig
Set
typeto"channelAllowList".channelAllowListChannelAllowListConnectionsScrapingConfig
Fields of
ChannelAllowListConnectionsScrapingConfigchannelAllowListarray of stringOnly channels in this set will be scraped. Must not be empty.
Set
typeto"channelBlockList".channelBlockListChannelBlockListConnectionsScrapingConfig
Fields of
ChannelBlockListConnectionsScrapingConfigchannelBlockListarray of stringOnly channels not in this set will be scraped. Must not be empty.
shouldScrapeboolean required
limitsLimitsConfig
Fields of
LimitsConfigmaxQueryRangeDuration
Fields of
DurationunitTemporalUnitrequired
Values of
TemporalUnitHOURS
DAYS
WEEKS
countinteger required
workspacestring (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.
markingRidsarray 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
ridstring (RID)
displayNamestringThe display name of the connection. For example: “Nominal production TimescaleDB”
descriptionstring
connectionDetailsConnectionDetails
Set
typeto"timescale".timescaleTimescaleConnectionDetails
Fields of
TimescaleConnectionDetailsdatabasestring
hoststring
portinteger
usernamestringThis is also the reference to the secret containing the password
passwordSecretRidstring (RID)Secret Rid of password secret stored in Secrets Service.
Set
typeto"influx".influxInflux2ConnectionDetails
Fields of
Influx2ConnectionDetailshoststring
portinteger
headersmap of string toHeaderValueA map of header name to value
Set
typeto"plain".plainstring
Set
typeto"secretRid".secretRidstring (RID)
orgstring
tokenSecretRidstring (RID)Secret Rid of token secret stored in Secrets Service.
Set
typeto"influx1".influx1Influx1ConnectionDetails
Fields of
Influx1ConnectionDetailshoststring
portinteger
headersmap of string toHeaderValueA map of header name to value
credentialsPasswordCredentials
Fields of
PasswordCredentialsusernamestring
passwordSecretRidstring (RID)Secret Rid of password secret stored in Secrets Service.
Set
typeto"nominal".nominalNominalConnectionDetails
Fields of
NominalConnectionDetailsnominalDataSourceRidstring (RID)
Set
typeto"timestream".timestreamTimestreamConnectionDetails
Fields of
TimestreamConnectionDetailsnominalRoleArnstringThe role ARN owned by Nominal that has permission to assume the externalRoleArn.
nominalRoleRegionstringAWS region that contains the Nominal role.
externalRegionstringAWS region that contains the Timestream instance.
externalRoleArnstringThe role ARN used to make queries to Timestream. This role is owned by the AWS account that owns the Timestream instance.
databasestringDatabase inside of the Timestream instance to connect to.
Set
typeto"visualCrossing".visualCrossingVisualCrossingConnectionDetails
Fields of
VisualCrossingConnectionDetailsapiKeySecretRidstring (RID)Secret Rid of API key stored in Secrets Service.
Set
typeto"bigQuery".bigQueryBigQueryConnectionDetails
Fields of
BigQueryConnectionDetailsregionstringThe region of the BigQuery Project (e.g. “us-east1”)
projectstringThe name of the BigQuery Project
datasetstringThe name of the dataset within the project
tablestringThe name of the table within the dataset
serviceAccountKeySecretRidstring (RID)Secret Rid of service account key stored in Secrets Service.
requiredTagNamesarray of stringAdditional tag names that should be supplied to construct a fully qualified series. These are suggested, rather than strictly required.
metadatamap of string to string
scrapingScrapingConfig
Set
typeto"influx".influxInfluxScrapingConfig
Fields of
InfluxScrapingConfigfilterarray ofInfluxScrapingFilterFilters are ANDed together
Set
typeto"not".notInfluxScrapingFilter
Set
typeto"matchBucket".matchBucketarray of stringMatch any of the specified buckets
Set
typeto"matchMeasurement".matchMeasurementarray of stringMatch any of the specified measurements
seriesArchetypeConstructionInfluxSeriesArchetypeConstructionConfig
Fields of
InfluxSeriesArchetypeConstructionConfigchannelNameComponentsarray ofInfluxChannelNameComponent
separatorstring
Set
typeto"nominal".nominalNominalScrapingConfig
Fields of
NominalScrapingConfigchannelNameComponentsarray ofNominalChannelNameComponentchannelNameComponents will be combined, together with separator, to form a fully qualified channel name.
Set
typeto"channel".channelEmpty
Set
typeto"valueOfTagWithName".valueOfTagWithNamestringThe value of the specified TagName will be used. If the tag is not present, it will be omitted.
separatorstring
Set
typeto"timestream".timestreamTimestreamScrapingConfig
Fields of
TimestreamScrapingConfigfilterarray ofTimestreamScrapingFilterIn order for data to be picked up by the scraper, it must match all filters in this list.
Set
typeto"matchTable".matchTablearray of stringMatch any of the specified tables in the database.
channelNameComponentsarray ofTimestreamChannelNameComponentchannelNameComponents will be combined, together with separator, to form a fully qualified channel name.
separatorstring
maxLookBackPeriodHoursintegerThe 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.
Set
typeto"timescale".timescalePivotedTimescaleScrapingConfig
Fields of
PivotedTimescaleScrapingConfigfilterarray ofTimescaleScrapingFilterIn 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.
Set
typeto"not".Set
typeto"matchTable".matchTablearray of stringMatch any of the specified tables in the database.
Set
typeto"matchSchema".matchSchemaarray of stringMatch any of the specified schemas in the database.
timeColumnstringThe name of the column that holds the timestamp.
nameColumnstringThe name of the column that holds the series name.
valueColumnstringThe name of the column that holds the series values.
dimensionColumnsarray of stringThe 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.
channelNameComponentsarray ofPivotedTimescaleChannelNameComponentchannelNameComponents will be combined, together with separator, to form a fully qualified channel name.
separatorstring
Set
typeto"visualCrossing".visualCrossingVisualCrossingScrapingConfig
Fields of
VisualCrossingScrapingConfigavailableSeriesarray ofVisualCrossingAvailableSeriesdeprecatedlist of available channels Deprecated: No longer used for anything
Fields of
VisualCrossingAvailableSerieschannelstring
unitstring
descriptionstring
typeVisualCrossingType
Values of
VisualCrossingTypeDOUBLE
STRING
Set
typeto"bigQuery".bigQueryBigQueryScrapingConfig
Fields of
BigQueryScrapingConfigtimeColumnstringThe name of the column that holds the timestamp.
tagColumnsarray of stringThe name of the columns that should be interpreted as tag columns
channelNameComponentsBigQueryChannelNameComponentchannelNameComponents 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
BigQueryChannelNameComponentincludeProjectbooleanWhether to include the project name in the channel name.
includeDatasetbooleanWhether to include the dataset name in the channel name.
includeTablebooleanWhether to include the table name in the channel name.
separatorstringThe separator that delimits the parts of the channel name. If ommitted, the default is a “.”.
Set
typeto"api".apiApiScrapingConfig
Set
typeto"allChannels".allChannelsAllChannelsConnectionsScrapingConfig
Set
typeto"channelAllowList".channelAllowListChannelAllowListConnectionsScrapingConfig
Fields of
ChannelAllowListConnectionsScrapingConfigchannelAllowListarray of stringOnly channels in this set will be scraped. Must not be empty.
Set
typeto"channelBlockList".channelBlockListChannelBlockListConnectionsScrapingConfig
Fields of
ChannelBlockListConnectionsScrapingConfigchannelBlockListarray of stringOnly channels not in this set will be scraped. Must not be empty.
shouldScrapebooleanThe connection will be scraped iff this flag is set and scrapingConfig is present.
limitsLimitsConfig
Fields of
LimitsConfigmaxQueryRangeDuration
Fields of
DurationunitTemporalUnit
Values of
TemporalUnitHOURS
DAYS
WEEKS
countinteger
connectionStatusConnectionStatus
Fields of
ConnectionStatusisConnectedboolean
isArchivedboolean
Request
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
}'
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())
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())
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
{
"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
includeArchivedbooleanWhether to include archived connections in the response. By default, this is false.
workspacesarray 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.
Fields of Connection
ridstring (RID)
displayNamestringThe display name of the connection. For example: “Nominal production TimescaleDB”
descriptionstring
connectionDetailsConnectionDetails
Set
typeto"timescale".timescaleTimescaleConnectionDetails
Fields of
TimescaleConnectionDetailsdatabasestring
hoststring
portinteger
usernamestringThis is also the reference to the secret containing the password
passwordSecretRidstring (RID)Secret Rid of password secret stored in Secrets Service.
Set
typeto"influx".influxInflux2ConnectionDetails
Fields of
Influx2ConnectionDetailshoststring
portinteger
headersmap of string toHeaderValueA map of header name to value
Set
typeto"plain".plainstring
Set
typeto"secretRid".secretRidstring (RID)
orgstring
tokenSecretRidstring (RID)Secret Rid of token secret stored in Secrets Service.
Set
typeto"influx1".influx1Influx1ConnectionDetails
Fields of
Influx1ConnectionDetailshoststring
portinteger
headersmap of string toHeaderValueA map of header name to value
credentialsPasswordCredentials
Fields of
PasswordCredentialsusernamestring
passwordSecretRidstring (RID)Secret Rid of password secret stored in Secrets Service.
Set
typeto"nominal".nominalNominalConnectionDetails
Fields of
NominalConnectionDetailsnominalDataSourceRidstring (RID)
Set
typeto"timestream".timestreamTimestreamConnectionDetails
Fields of
TimestreamConnectionDetailsnominalRoleArnstringThe role ARN owned by Nominal that has permission to assume the externalRoleArn.
nominalRoleRegionstringAWS region that contains the Nominal role.
externalRegionstringAWS region that contains the Timestream instance.
externalRoleArnstringThe role ARN used to make queries to Timestream. This role is owned by the AWS account that owns the Timestream instance.
databasestringDatabase inside of the Timestream instance to connect to.
Set
typeto"visualCrossing".visualCrossingVisualCrossingConnectionDetails
Fields of
VisualCrossingConnectionDetailsapiKeySecretRidstring (RID)Secret Rid of API key stored in Secrets Service.
Set
typeto"bigQuery".bigQueryBigQueryConnectionDetails
Fields of
BigQueryConnectionDetailsregionstringThe region of the BigQuery Project (e.g. “us-east1”)
projectstringThe name of the BigQuery Project
datasetstringThe name of the dataset within the project
tablestringThe name of the table within the dataset
serviceAccountKeySecretRidstring (RID)Secret Rid of service account key stored in Secrets Service.
requiredTagNamesarray of stringAdditional tag names that should be supplied to construct a fully qualified series. These are suggested, rather than strictly required.
metadatamap of string to string
scrapingScrapingConfig
Set
typeto"influx".influxInfluxScrapingConfig
Fields of
InfluxScrapingConfigfilterarray ofInfluxScrapingFilterFilters are ANDed together
Set
typeto"not".notInfluxScrapingFilter
Set
typeto"matchBucket".matchBucketarray of stringMatch any of the specified buckets
Set
typeto"matchMeasurement".matchMeasurementarray of stringMatch any of the specified measurements
seriesArchetypeConstructionInfluxSeriesArchetypeConstructionConfig
Fields of
InfluxSeriesArchetypeConstructionConfigchannelNameComponentsarray ofInfluxChannelNameComponent
separatorstring
Set
typeto"nominal".nominalNominalScrapingConfig
Fields of
NominalScrapingConfigchannelNameComponentsarray ofNominalChannelNameComponentchannelNameComponents will be combined, together with separator, to form a fully qualified channel name.
Set
typeto"channel".channelEmpty
Set
typeto"valueOfTagWithName".valueOfTagWithNamestringThe value of the specified TagName will be used. If the tag is not present, it will be omitted.
separatorstring
Set
typeto"timestream".timestreamTimestreamScrapingConfig
Fields of
TimestreamScrapingConfigfilterarray ofTimestreamScrapingFilterIn order for data to be picked up by the scraper, it must match all filters in this list.
Set
typeto"matchTable".matchTablearray of stringMatch any of the specified tables in the database.
channelNameComponentsarray ofTimestreamChannelNameComponentchannelNameComponents will be combined, together with separator, to form a fully qualified channel name.
separatorstring
maxLookBackPeriodHoursintegerThe 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.
Set
typeto"timescale".timescalePivotedTimescaleScrapingConfig
Fields of
PivotedTimescaleScrapingConfigfilterarray ofTimescaleScrapingFilterIn 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.
Set
typeto"not".Set
typeto"matchTable".matchTablearray of stringMatch any of the specified tables in the database.
Set
typeto"matchSchema".matchSchemaarray of stringMatch any of the specified schemas in the database.
timeColumnstringThe name of the column that holds the timestamp.
nameColumnstringThe name of the column that holds the series name.
valueColumnstringThe name of the column that holds the series values.
dimensionColumnsarray of stringThe 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.
channelNameComponentsarray ofPivotedTimescaleChannelNameComponentchannelNameComponents will be combined, together with separator, to form a fully qualified channel name.
separatorstring
Set
typeto"visualCrossing".visualCrossingVisualCrossingScrapingConfig
Fields of
VisualCrossingScrapingConfigavailableSeriesarray ofVisualCrossingAvailableSeriesdeprecatedlist of available channels Deprecated: No longer used for anything
Fields of
VisualCrossingAvailableSerieschannelstring
unitstring
descriptionstring
typeVisualCrossingType
Values of
VisualCrossingTypeDOUBLE
STRING
Set
typeto"bigQuery".bigQueryBigQueryScrapingConfig
Fields of
BigQueryScrapingConfigtimeColumnstringThe name of the column that holds the timestamp.
tagColumnsarray of stringThe name of the columns that should be interpreted as tag columns
channelNameComponentsBigQueryChannelNameComponentchannelNameComponents 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
BigQueryChannelNameComponentincludeProjectbooleanWhether to include the project name in the channel name.
includeDatasetbooleanWhether to include the dataset name in the channel name.
includeTablebooleanWhether to include the table name in the channel name.
separatorstringThe separator that delimits the parts of the channel name. If ommitted, the default is a “.”.
Set
typeto"api".apiApiScrapingConfig
Set
typeto"allChannels".allChannelsAllChannelsConnectionsScrapingConfig
Set
typeto"channelAllowList".channelAllowListChannelAllowListConnectionsScrapingConfig
Fields of
ChannelAllowListConnectionsScrapingConfigchannelAllowListarray of stringOnly channels in this set will be scraped. Must not be empty.
Set
typeto"channelBlockList".channelBlockListChannelBlockListConnectionsScrapingConfig
Fields of
ChannelBlockListConnectionsScrapingConfigchannelBlockListarray of stringOnly channels not in this set will be scraped. Must not be empty.
shouldScrapebooleanThe connection will be scraped iff this flag is set and scrapingConfig is present.
limitsLimitsConfig
Fields of
LimitsConfigmaxQueryRangeDuration
Fields of
DurationunitTemporalUnit
Values of
TemporalUnitHOURS
DAYS
WEEKS
countinteger
connectionStatusConnectionStatus
Fields of
ConnectionStatusisConnectedboolean
isArchivedboolean
Request
curl "https://api.gov.nominal.io/api/data-source/connection/v1/connections" \
-H "Authorization: Bearer <api key>"
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())
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())
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
[
{
"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
ridstring (RID) required
Body
namestring
descriptionstring
metadatamap of string to string
connectionDetailsConnectionDetails
Set
typeto"timescale".timescaleTimescaleConnectionDetails
Fields of
TimescaleConnectionDetailsdatabasestring required
hoststring required
portinteger required
usernamestring requiredThis is also the reference to the secret containing the password
passwordSecretRidstring (RID) requiredSecret Rid of password secret stored in Secrets Service.
Set
typeto"influx".influxInflux2ConnectionDetails
Fields of
Influx2ConnectionDetailshoststring required
portinteger required
headersmap of string toHeaderValueA map of header name to value
Set
typeto"plain".plainstring
Set
typeto"secretRid".secretRidstring (RID)
orgstring required
tokenSecretRidstring (RID) requiredSecret Rid of token secret stored in Secrets Service.
Set
typeto"influx1".influx1Influx1ConnectionDetails
Fields of
Influx1ConnectionDetailshoststring required
portinteger required
headersmap of string toHeaderValueA map of header name to value
credentialsPasswordCredentials
Fields of
PasswordCredentialsusernamestring required
passwordSecretRidstring (RID) requiredSecret Rid of password secret stored in Secrets Service.
Set
typeto"nominal".nominalNominalConnectionDetails
Fields of
NominalConnectionDetailsnominalDataSourceRidstring (RID) required
Set
typeto"timestream".timestreamTimestreamConnectionDetails
Fields of
TimestreamConnectionDetailsnominalRoleArnstring requiredThe role ARN owned by Nominal that has permission to assume the externalRoleArn.
nominalRoleRegionstring requiredAWS region that contains the Nominal role.
externalRegionstring requiredAWS region that contains the Timestream instance.
externalRoleArnstring requiredThe role ARN used to make queries to Timestream. This role is owned by the AWS account that owns the Timestream instance.
databasestring requiredDatabase inside of the Timestream instance to connect to.
Set
typeto"visualCrossing".visualCrossingVisualCrossingConnectionDetails
Fields of
VisualCrossingConnectionDetailsapiKeySecretRidstring (RID) requiredSecret Rid of API key stored in Secrets Service.
Set
typeto"bigQuery".bigQueryBigQueryConnectionDetails
Fields of
BigQueryConnectionDetailsregionstring requiredThe region of the BigQuery Project (e.g. “us-east1”)
projectstring requiredThe name of the BigQuery Project
datasetstring requiredThe name of the dataset within the project
tablestring requiredThe name of the table within the dataset
serviceAccountKeySecretRidstring (RID) requiredSecret Rid of service account key stored in Secrets Service.
requiredTagNamesarray of string
availableTagValuesmap ofTagNameto array of stringIn 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.
scrapingScrapingConfig
Set
typeto"influx".influxInfluxScrapingConfig
Fields of
InfluxScrapingConfigfilterarray ofInfluxScrapingFilterFilters are ANDed together
Set
typeto"not".notInfluxScrapingFilter
Set
typeto"matchBucket".matchBucketarray of stringMatch any of the specified buckets
Set
typeto"matchMeasurement".matchMeasurementarray of stringMatch any of the specified measurements
seriesArchetypeConstructionInfluxSeriesArchetypeConstructionConfigrequired
Fields of
InfluxSeriesArchetypeConstructionConfigchannelNameComponentsarray ofInfluxChannelNameComponent
separatorstring required
Set
typeto"nominal".nominalNominalScrapingConfig
Fields of
NominalScrapingConfigchannelNameComponentsarray ofNominalChannelNameComponentchannelNameComponents will be combined, together with separator, to form a fully qualified channel name.
Set
typeto"channel".channelEmpty
Set
typeto"valueOfTagWithName".valueOfTagWithNamestringThe value of the specified TagName will be used. If the tag is not present, it will be omitted.
separatorstring required
Set
typeto"timestream".timestreamTimestreamScrapingConfig
Fields of
TimestreamScrapingConfigfilterarray ofTimestreamScrapingFilterIn order for data to be picked up by the scraper, it must match all filters in this list.
Set
typeto"matchTable".matchTablearray of stringMatch any of the specified tables in the database.
channelNameComponentsarray ofTimestreamChannelNameComponentchannelNameComponents will be combined, together with separator, to form a fully qualified channel name.
separatorstring required
maxLookBackPeriodHoursintegerThe 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.
Set
typeto"timescale".timescalePivotedTimescaleScrapingConfig
Fields of
PivotedTimescaleScrapingConfigfilterarray ofTimescaleScrapingFilterIn 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.
Set
typeto"not".Set
typeto"matchTable".matchTablearray of stringMatch any of the specified tables in the database.
Set
typeto"matchSchema".matchSchemaarray of stringMatch any of the specified schemas in the database.
timeColumnstring requiredThe name of the column that holds the timestamp.
nameColumnstring requiredThe name of the column that holds the series name.
valueColumnstring requiredThe name of the column that holds the series values.
dimensionColumnsarray of stringThe 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.
channelNameComponentsarray ofPivotedTimescaleChannelNameComponentchannelNameComponents will be combined, together with separator, to form a fully qualified channel name.
separatorstring required
Set
typeto"visualCrossing".visualCrossingVisualCrossingScrapingConfig
Fields of
VisualCrossingScrapingConfigavailableSeriesarray ofVisualCrossingAvailableSeriesdeprecatedlist of available channels Deprecated: No longer used for anything
Fields of
VisualCrossingAvailableSerieschannelstring required
unitstring
descriptionstring
typeVisualCrossingTyperequired
Values of
VisualCrossingTypeDOUBLE
STRING
Set
typeto"bigQuery".bigQueryBigQueryScrapingConfig
Fields of
BigQueryScrapingConfigtimeColumnstring requiredThe name of the column that holds the timestamp.
tagColumnsarray of stringThe name of the columns that should be interpreted as tag columns
channelNameComponentsBigQueryChannelNameComponentchannelNameComponents 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
BigQueryChannelNameComponentincludeProjectboolean requiredWhether to include the project name in the channel name.
includeDatasetboolean requiredWhether to include the dataset name in the channel name.
includeTableboolean requiredWhether to include the table name in the channel name.
separatorstringThe separator that delimits the parts of the channel name. If ommitted, the default is a “.”.
Set
typeto"api".apiApiScrapingConfig
Set
typeto"allChannels".allChannelsAllChannelsConnectionsScrapingConfig
Set
typeto"channelAllowList".channelAllowListChannelAllowListConnectionsScrapingConfig
Fields of
ChannelAllowListConnectionsScrapingConfigchannelAllowListarray of stringOnly channels in this set will be scraped. Must not be empty.
Set
typeto"channelBlockList".channelBlockListChannelBlockListConnectionsScrapingConfig
Fields of
ChannelBlockListConnectionsScrapingConfigchannelBlockListarray of stringOnly channels not in this set will be scraped. Must not be empty.
shouldScrapeboolean
limitsLimitsConfig
Fields of
LimitsConfigmaxQueryRangeDuration
Fields of
DurationunitTemporalUnitrequired
Values of
TemporalUnitHOURS
DAYS
WEEKS
countinteger required
Response
ridstring (RID)
displayNamestringThe display name of the connection. For example: “Nominal production TimescaleDB”
descriptionstring
connectionDetailsConnectionDetails
Set
typeto"timescale".timescaleTimescaleConnectionDetails
Fields of
TimescaleConnectionDetailsdatabasestring
hoststring
portinteger
usernamestringThis is also the reference to the secret containing the password
passwordSecretRidstring (RID)Secret Rid of password secret stored in Secrets Service.
Set
typeto"influx".influxInflux2ConnectionDetails
Fields of
Influx2ConnectionDetailshoststring
portinteger
headersmap of string toHeaderValueA map of header name to value
Set
typeto"plain".plainstring
Set
typeto"secretRid".secretRidstring (RID)
orgstring
tokenSecretRidstring (RID)Secret Rid of token secret stored in Secrets Service.
Set
typeto"influx1".influx1Influx1ConnectionDetails
Fields of
Influx1ConnectionDetailshoststring
portinteger
headersmap of string toHeaderValueA map of header name to value
credentialsPasswordCredentials
Fields of
PasswordCredentialsusernamestring
passwordSecretRidstring (RID)Secret Rid of password secret stored in Secrets Service.
Set
typeto"nominal".nominalNominalConnectionDetails
Fields of
NominalConnectionDetailsnominalDataSourceRidstring (RID)
Set
typeto"timestream".timestreamTimestreamConnectionDetails
Fields of
TimestreamConnectionDetailsnominalRoleArnstringThe role ARN owned by Nominal that has permission to assume the externalRoleArn.
nominalRoleRegionstringAWS region that contains the Nominal role.
externalRegionstringAWS region that contains the Timestream instance.
externalRoleArnstringThe role ARN used to make queries to Timestream. This role is owned by the AWS account that owns the Timestream instance.
databasestringDatabase inside of the Timestream instance to connect to.
Set
typeto"visualCrossing".visualCrossingVisualCrossingConnectionDetails
Fields of
VisualCrossingConnectionDetailsapiKeySecretRidstring (RID)Secret Rid of API key stored in Secrets Service.
Set
typeto"bigQuery".bigQueryBigQueryConnectionDetails
Fields of
BigQueryConnectionDetailsregionstringThe region of the BigQuery Project (e.g. “us-east1”)
projectstringThe name of the BigQuery Project
datasetstringThe name of the dataset within the project
tablestringThe name of the table within the dataset
serviceAccountKeySecretRidstring (RID)Secret Rid of service account key stored in Secrets Service.
requiredTagNamesarray of stringAdditional tag names that should be supplied to construct a fully qualified series. These are suggested, rather than strictly required.
metadatamap of string to string
scrapingScrapingConfig
Set
typeto"influx".influxInfluxScrapingConfig
Fields of
InfluxScrapingConfigfilterarray ofInfluxScrapingFilterFilters are ANDed together
Set
typeto"not".notInfluxScrapingFilter
Set
typeto"matchBucket".matchBucketarray of stringMatch any of the specified buckets
Set
typeto"matchMeasurement".matchMeasurementarray of stringMatch any of the specified measurements
seriesArchetypeConstructionInfluxSeriesArchetypeConstructionConfig
Fields of
InfluxSeriesArchetypeConstructionConfigchannelNameComponentsarray ofInfluxChannelNameComponent
separatorstring
Set
typeto"nominal".nominalNominalScrapingConfig
Fields of
NominalScrapingConfigchannelNameComponentsarray ofNominalChannelNameComponentchannelNameComponents will be combined, together with separator, to form a fully qualified channel name.
Set
typeto"channel".channelEmpty
Set
typeto"valueOfTagWithName".valueOfTagWithNamestringThe value of the specified TagName will be used. If the tag is not present, it will be omitted.
separatorstring
Set
typeto"timestream".timestreamTimestreamScrapingConfig
Fields of
TimestreamScrapingConfigfilterarray ofTimestreamScrapingFilterIn order for data to be picked up by the scraper, it must match all filters in this list.
Set
typeto"matchTable".matchTablearray of stringMatch any of the specified tables in the database.
channelNameComponentsarray ofTimestreamChannelNameComponentchannelNameComponents will be combined, together with separator, to form a fully qualified channel name.
separatorstring
maxLookBackPeriodHoursintegerThe 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.
Set
typeto"timescale".timescalePivotedTimescaleScrapingConfig
Fields of
PivotedTimescaleScrapingConfigfilterarray ofTimescaleScrapingFilterIn 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.
Set
typeto"not".Set
typeto"matchTable".matchTablearray of stringMatch any of the specified tables in the database.
Set
typeto"matchSchema".matchSchemaarray of stringMatch any of the specified schemas in the database.
timeColumnstringThe name of the column that holds the timestamp.
nameColumnstringThe name of the column that holds the series name.
valueColumnstringThe name of the column that holds the series values.
dimensionColumnsarray of stringThe 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.
channelNameComponentsarray ofPivotedTimescaleChannelNameComponentchannelNameComponents will be combined, together with separator, to form a fully qualified channel name.
separatorstring
Set
typeto"visualCrossing".visualCrossingVisualCrossingScrapingConfig
Fields of
VisualCrossingScrapingConfigavailableSeriesarray ofVisualCrossingAvailableSeriesdeprecatedlist of available channels Deprecated: No longer used for anything
Fields of
VisualCrossingAvailableSerieschannelstring
unitstring
descriptionstring
typeVisualCrossingType
Values of
VisualCrossingTypeDOUBLE
STRING
Set
typeto"bigQuery".bigQueryBigQueryScrapingConfig
Fields of
BigQueryScrapingConfigtimeColumnstringThe name of the column that holds the timestamp.
tagColumnsarray of stringThe name of the columns that should be interpreted as tag columns
channelNameComponentsBigQueryChannelNameComponentchannelNameComponents 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
BigQueryChannelNameComponentincludeProjectbooleanWhether to include the project name in the channel name.
includeDatasetbooleanWhether to include the dataset name in the channel name.
includeTablebooleanWhether to include the table name in the channel name.
separatorstringThe separator that delimits the parts of the channel name. If ommitted, the default is a “.”.
Set
typeto"api".apiApiScrapingConfig
Set
typeto"allChannels".allChannelsAllChannelsConnectionsScrapingConfig
Set
typeto"channelAllowList".channelAllowListChannelAllowListConnectionsScrapingConfig
Fields of
ChannelAllowListConnectionsScrapingConfigchannelAllowListarray of stringOnly channels in this set will be scraped. Must not be empty.
Set
typeto"channelBlockList".channelBlockListChannelBlockListConnectionsScrapingConfig
Fields of
ChannelBlockListConnectionsScrapingConfigchannelBlockListarray of stringOnly channels not in this set will be scraped. Must not be empty.
shouldScrapebooleanThe connection will be scraped iff this flag is set and scrapingConfig is present.
limitsLimitsConfig
Fields of
LimitsConfigmaxQueryRangeDuration
Fields of
DurationunitTemporalUnit
Values of
TemporalUnitHOURS
DAYS
WEEKS
countinteger
connectionStatusConnectionStatus
Fields of
ConnectionStatusisConnectedboolean
isArchivedboolean
Request
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
}
}
}'
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())
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())
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
{
"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
ridstring (RID) required
Body
isConnectedboolean required
Response
No content (HTTP 204).
Request
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
}'
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()
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()
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
ridstring (RID) required
Response
ridstring (RID)
displayNamestringThe display name of the connection. For example: “Nominal production TimescaleDB”
descriptionstring
connectionDetailsConnectionDetails
Set
typeto"timescale".timescaleTimescaleConnectionDetails
Fields of
TimescaleConnectionDetailsdatabasestring
hoststring
portinteger
usernamestringThis is also the reference to the secret containing the password
passwordSecretRidstring (RID)Secret Rid of password secret stored in Secrets Service.
Set
typeto"influx".influxInflux2ConnectionDetails
Fields of
Influx2ConnectionDetailshoststring
portinteger
headersmap of string toHeaderValueA map of header name to value
Set
typeto"plain".plainstring
Set
typeto"secretRid".secretRidstring (RID)
orgstring
tokenSecretRidstring (RID)Secret Rid of token secret stored in Secrets Service.
Set
typeto"influx1".influx1Influx1ConnectionDetails
Fields of
Influx1ConnectionDetailshoststring
portinteger
headersmap of string toHeaderValueA map of header name to value
credentialsPasswordCredentials
Fields of
PasswordCredentialsusernamestring
passwordSecretRidstring (RID)Secret Rid of password secret stored in Secrets Service.
Set
typeto"nominal".nominalNominalConnectionDetails
Fields of
NominalConnectionDetailsnominalDataSourceRidstring (RID)
Set
typeto"timestream".timestreamTimestreamConnectionDetails
Fields of
TimestreamConnectionDetailsnominalRoleArnstringThe role ARN owned by Nominal that has permission to assume the externalRoleArn.
nominalRoleRegionstringAWS region that contains the Nominal role.
externalRegionstringAWS region that contains the Timestream instance.
externalRoleArnstringThe role ARN used to make queries to Timestream. This role is owned by the AWS account that owns the Timestream instance.
databasestringDatabase inside of the Timestream instance to connect to.
Set
typeto"visualCrossing".visualCrossingVisualCrossingConnectionDetails
Fields of
VisualCrossingConnectionDetailsapiKeySecretRidstring (RID)Secret Rid of API key stored in Secrets Service.
Set
typeto"bigQuery".bigQueryBigQueryConnectionDetails
Fields of
BigQueryConnectionDetailsregionstringThe region of the BigQuery Project (e.g. “us-east1”)
projectstringThe name of the BigQuery Project
datasetstringThe name of the dataset within the project
tablestringThe name of the table within the dataset
serviceAccountKeySecretRidstring (RID)Secret Rid of service account key stored in Secrets Service.
requiredTagNamesarray of stringAdditional tag names that should be supplied to construct a fully qualified series. These are suggested, rather than strictly required.
metadatamap of string to string
scrapingScrapingConfig
Set
typeto"influx".influxInfluxScrapingConfig
Fields of
InfluxScrapingConfigfilterarray ofInfluxScrapingFilterFilters are ANDed together
Set
typeto"not".notInfluxScrapingFilter
Set
typeto"matchBucket".matchBucketarray of stringMatch any of the specified buckets
Set
typeto"matchMeasurement".matchMeasurementarray of stringMatch any of the specified measurements
seriesArchetypeConstructionInfluxSeriesArchetypeConstructionConfig
Fields of
InfluxSeriesArchetypeConstructionConfigchannelNameComponentsarray ofInfluxChannelNameComponent
separatorstring
Set
typeto"nominal".nominalNominalScrapingConfig
Fields of
NominalScrapingConfigchannelNameComponentsarray ofNominalChannelNameComponentchannelNameComponents will be combined, together with separator, to form a fully qualified channel name.
Set
typeto"channel".channelEmpty
Set
typeto"valueOfTagWithName".valueOfTagWithNamestringThe value of the specified TagName will be used. If the tag is not present, it will be omitted.
separatorstring
Set
typeto"timestream".timestreamTimestreamScrapingConfig
Fields of
TimestreamScrapingConfigfilterarray ofTimestreamScrapingFilterIn order for data to be picked up by the scraper, it must match all filters in this list.
Set
typeto"matchTable".matchTablearray of stringMatch any of the specified tables in the database.
channelNameComponentsarray ofTimestreamChannelNameComponentchannelNameComponents will be combined, together with separator, to form a fully qualified channel name.
separatorstring
maxLookBackPeriodHoursintegerThe 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.
Set
typeto"timescale".timescalePivotedTimescaleScrapingConfig
Fields of
PivotedTimescaleScrapingConfigfilterarray ofTimescaleScrapingFilterIn 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.
Set
typeto"not".Set
typeto"matchTable".matchTablearray of stringMatch any of the specified tables in the database.
Set
typeto"matchSchema".matchSchemaarray of stringMatch any of the specified schemas in the database.
timeColumnstringThe name of the column that holds the timestamp.
nameColumnstringThe name of the column that holds the series name.
valueColumnstringThe name of the column that holds the series values.
dimensionColumnsarray of stringThe 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.
channelNameComponentsarray ofPivotedTimescaleChannelNameComponentchannelNameComponents will be combined, together with separator, to form a fully qualified channel name.
separatorstring
Set
typeto"visualCrossing".visualCrossingVisualCrossingScrapingConfig
Fields of
VisualCrossingScrapingConfigavailableSeriesarray ofVisualCrossingAvailableSeriesdeprecatedlist of available channels Deprecated: No longer used for anything
Fields of
VisualCrossingAvailableSerieschannelstring
unitstring
descriptionstring
typeVisualCrossingType
Values of
VisualCrossingTypeDOUBLE
STRING
Set
typeto"bigQuery".bigQueryBigQueryScrapingConfig
Fields of
BigQueryScrapingConfigtimeColumnstringThe name of the column that holds the timestamp.
tagColumnsarray of stringThe name of the columns that should be interpreted as tag columns
channelNameComponentsBigQueryChannelNameComponentchannelNameComponents 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
BigQueryChannelNameComponentincludeProjectbooleanWhether to include the project name in the channel name.
includeDatasetbooleanWhether to include the dataset name in the channel name.
includeTablebooleanWhether to include the table name in the channel name.
separatorstringThe separator that delimits the parts of the channel name. If ommitted, the default is a “.”.
Set
typeto"api".apiApiScrapingConfig
Set
typeto"allChannels".allChannelsAllChannelsConnectionsScrapingConfig
Set
typeto"channelAllowList".channelAllowListChannelAllowListConnectionsScrapingConfig
Fields of
ChannelAllowListConnectionsScrapingConfigchannelAllowListarray of stringOnly channels in this set will be scraped. Must not be empty.
Set
typeto"channelBlockList".channelBlockListChannelBlockListConnectionsScrapingConfig
Fields of
ChannelBlockListConnectionsScrapingConfigchannelBlockListarray of stringOnly channels not in this set will be scraped. Must not be empty.
shouldScrapebooleanThe connection will be scraped iff this flag is set and scrapingConfig is present.
limitsLimitsConfig
Fields of
LimitsConfigmaxQueryRangeDuration
Fields of
DurationunitTemporalUnit
Values of
TemporalUnitHOURS
DAYS
WEEKS
countinteger
connectionStatusConnectionStatus
Fields of
ConnectionStatusisConnectedboolean
isArchivedboolean
Request
curl "https://api.gov.nominal.io/api/data-source/connection/v1/connection/<rid>" \
-H "Authorization: Bearer <api key>"
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())
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())
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
{
"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.
Fields of Connection
ridstring (RID)
displayNamestringThe display name of the connection. For example: “Nominal production TimescaleDB”
descriptionstring
connectionDetailsConnectionDetails
Set
typeto"timescale".timescaleTimescaleConnectionDetails
Fields of
TimescaleConnectionDetailsdatabasestring
hoststring
portinteger
usernamestringThis is also the reference to the secret containing the password
passwordSecretRidstring (RID)Secret Rid of password secret stored in Secrets Service.
Set
typeto"influx".influxInflux2ConnectionDetails
Fields of
Influx2ConnectionDetailshoststring
portinteger
headersmap of string toHeaderValueA map of header name to value
Set
typeto"plain".plainstring
Set
typeto"secretRid".secretRidstring (RID)
orgstring
tokenSecretRidstring (RID)Secret Rid of token secret stored in Secrets Service.
Set
typeto"influx1".influx1Influx1ConnectionDetails
Fields of
Influx1ConnectionDetailshoststring
portinteger
headersmap of string toHeaderValueA map of header name to value
credentialsPasswordCredentials
Fields of
PasswordCredentialsusernamestring
passwordSecretRidstring (RID)Secret Rid of password secret stored in Secrets Service.
Set
typeto"nominal".nominalNominalConnectionDetails
Fields of
NominalConnectionDetailsnominalDataSourceRidstring (RID)
Set
typeto"timestream".timestreamTimestreamConnectionDetails
Fields of
TimestreamConnectionDetailsnominalRoleArnstringThe role ARN owned by Nominal that has permission to assume the externalRoleArn.
nominalRoleRegionstringAWS region that contains the Nominal role.
externalRegionstringAWS region that contains the Timestream instance.
externalRoleArnstringThe role ARN used to make queries to Timestream. This role is owned by the AWS account that owns the Timestream instance.
databasestringDatabase inside of the Timestream instance to connect to.
Set
typeto"visualCrossing".visualCrossingVisualCrossingConnectionDetails
Fields of
VisualCrossingConnectionDetailsapiKeySecretRidstring (RID)Secret Rid of API key stored in Secrets Service.
Set
typeto"bigQuery".bigQueryBigQueryConnectionDetails
Fields of
BigQueryConnectionDetailsregionstringThe region of the BigQuery Project (e.g. “us-east1”)
projectstringThe name of the BigQuery Project
datasetstringThe name of the dataset within the project
tablestringThe name of the table within the dataset
serviceAccountKeySecretRidstring (RID)Secret Rid of service account key stored in Secrets Service.
requiredTagNamesarray of stringAdditional tag names that should be supplied to construct a fully qualified series. These are suggested, rather than strictly required.
metadatamap of string to string
scrapingScrapingConfig
Set
typeto"influx".influxInfluxScrapingConfig
Fields of
InfluxScrapingConfigfilterarray ofInfluxScrapingFilterFilters are ANDed together
Set
typeto"not".notInfluxScrapingFilter
Set
typeto"matchBucket".matchBucketarray of stringMatch any of the specified buckets
Set
typeto"matchMeasurement".matchMeasurementarray of stringMatch any of the specified measurements
seriesArchetypeConstructionInfluxSeriesArchetypeConstructionConfig
Fields of
InfluxSeriesArchetypeConstructionConfigchannelNameComponentsarray ofInfluxChannelNameComponent
separatorstring
Set
typeto"nominal".nominalNominalScrapingConfig
Fields of
NominalScrapingConfigchannelNameComponentsarray ofNominalChannelNameComponentchannelNameComponents will be combined, together with separator, to form a fully qualified channel name.
Set
typeto"channel".channelEmpty
Set
typeto"valueOfTagWithName".valueOfTagWithNamestringThe value of the specified TagName will be used. If the tag is not present, it will be omitted.
separatorstring
Set
typeto"timestream".timestreamTimestreamScrapingConfig
Fields of
TimestreamScrapingConfigfilterarray ofTimestreamScrapingFilterIn order for data to be picked up by the scraper, it must match all filters in this list.
Set
typeto"matchTable".matchTablearray of stringMatch any of the specified tables in the database.
channelNameComponentsarray ofTimestreamChannelNameComponentchannelNameComponents will be combined, together with separator, to form a fully qualified channel name.
separatorstring
maxLookBackPeriodHoursintegerThe 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.
Set
typeto"timescale".timescalePivotedTimescaleScrapingConfig
Fields of
PivotedTimescaleScrapingConfigfilterarray ofTimescaleScrapingFilterIn 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.
Set
typeto"not".Set
typeto"matchTable".matchTablearray of stringMatch any of the specified tables in the database.
Set
typeto"matchSchema".matchSchemaarray of stringMatch any of the specified schemas in the database.
timeColumnstringThe name of the column that holds the timestamp.
nameColumnstringThe name of the column that holds the series name.
valueColumnstringThe name of the column that holds the series values.
dimensionColumnsarray of stringThe 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.
channelNameComponentsarray ofPivotedTimescaleChannelNameComponentchannelNameComponents will be combined, together with separator, to form a fully qualified channel name.
separatorstring
Set
typeto"visualCrossing".visualCrossingVisualCrossingScrapingConfig
Fields of
VisualCrossingScrapingConfigavailableSeriesarray ofVisualCrossingAvailableSeriesdeprecatedlist of available channels Deprecated: No longer used for anything
Fields of
VisualCrossingAvailableSerieschannelstring
unitstring
descriptionstring
typeVisualCrossingType
Values of
VisualCrossingTypeDOUBLE
STRING
Set
typeto"bigQuery".bigQueryBigQueryScrapingConfig
Fields of
BigQueryScrapingConfigtimeColumnstringThe name of the column that holds the timestamp.
tagColumnsarray of stringThe name of the columns that should be interpreted as tag columns
channelNameComponentsBigQueryChannelNameComponentchannelNameComponents 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
BigQueryChannelNameComponentincludeProjectbooleanWhether to include the project name in the channel name.
includeDatasetbooleanWhether to include the dataset name in the channel name.
includeTablebooleanWhether to include the table name in the channel name.
separatorstringThe separator that delimits the parts of the channel name. If ommitted, the default is a “.”.
Set
typeto"api".apiApiScrapingConfig
Set
typeto"allChannels".allChannelsAllChannelsConnectionsScrapingConfig
Set
typeto"channelAllowList".channelAllowListChannelAllowListConnectionsScrapingConfig
Fields of
ChannelAllowListConnectionsScrapingConfigchannelAllowListarray of stringOnly channels in this set will be scraped. Must not be empty.
Set
typeto"channelBlockList".channelBlockListChannelBlockListConnectionsScrapingConfig
Fields of
ChannelBlockListConnectionsScrapingConfigchannelBlockListarray of stringOnly channels not in this set will be scraped. Must not be empty.
shouldScrapebooleanThe connection will be scraped iff this flag is set and scrapingConfig is present.
limitsLimitsConfig
Fields of
LimitsConfigmaxQueryRangeDuration
Fields of
DurationunitTemporalUnit
Values of
TemporalUnitHOURS
DAYS
WEEKS
countinteger
connectionStatusConnectionStatus
Fields of
ConnectionStatusisConnectedboolean
isArchivedboolean
Request
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>"
]'
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())
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())
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
[
{
"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
includeArchivedbooleanWhether to include archived connections in the response. By default, this is false.
workspacesarray 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.
pageSizeintegerNumber of connections to return per page. Defaults to 100. Will return at most 1000 records per page.
nextPageTokenstringToken to retrieve the next page of results.
Response
connectionsarray ofConnection
Fields of
Connectionridstring (RID)
displayNamestringThe display name of the connection. For example: “Nominal production TimescaleDB”
descriptionstring
connectionDetailsConnectionDetails
Set
typeto"timescale".timescaleTimescaleConnectionDetails
Fields of
TimescaleConnectionDetailsdatabasestring
hoststring
portinteger
usernamestringThis is also the reference to the secret containing the password
passwordSecretRidstring (RID)Secret Rid of password secret stored in Secrets Service.
Set
typeto"influx".influxInflux2ConnectionDetails
Fields of
Influx2ConnectionDetailshoststring
portinteger
headersmap of string toHeaderValueA map of header name to value
Set
typeto"plain".plainstring
Set
typeto"secretRid".secretRidstring (RID)
orgstring
tokenSecretRidstring (RID)Secret Rid of token secret stored in Secrets Service.
Set
typeto"influx1".influx1Influx1ConnectionDetails
Fields of
Influx1ConnectionDetailshoststring
portinteger
headersmap of string toHeaderValueA map of header name to value
credentialsPasswordCredentials
Fields of
PasswordCredentialsusernamestring
passwordSecretRidstring (RID)Secret Rid of password secret stored in Secrets Service.
Set
typeto"nominal".nominalNominalConnectionDetails
Fields of
NominalConnectionDetailsnominalDataSourceRidstring (RID)
Set
typeto"timestream".timestreamTimestreamConnectionDetails
Fields of
TimestreamConnectionDetailsnominalRoleArnstringThe role ARN owned by Nominal that has permission to assume the externalRoleArn.
nominalRoleRegionstringAWS region that contains the Nominal role.
externalRegionstringAWS region that contains the Timestream instance.
externalRoleArnstringThe role ARN used to make queries to Timestream. This role is owned by the AWS account that owns the Timestream instance.
databasestringDatabase inside of the Timestream instance to connect to.
Set
typeto"visualCrossing".visualCrossingVisualCrossingConnectionDetails
Fields of
VisualCrossingConnectionDetailsapiKeySecretRidstring (RID)Secret Rid of API key stored in Secrets Service.
Set
typeto"bigQuery".bigQueryBigQueryConnectionDetails
Fields of
BigQueryConnectionDetailsregionstringThe region of the BigQuery Project (e.g. “us-east1”)
projectstringThe name of the BigQuery Project
datasetstringThe name of the dataset within the project
tablestringThe name of the table within the dataset
serviceAccountKeySecretRidstring (RID)Secret Rid of service account key stored in Secrets Service.
requiredTagNamesarray of stringAdditional tag names that should be supplied to construct a fully qualified series. These are suggested, rather than strictly required.
metadatamap of string to string
scrapingScrapingConfig
Set
typeto"influx".influxInfluxScrapingConfig
Fields of
InfluxScrapingConfigfilterarray ofInfluxScrapingFilterFilters are ANDed together
Set
typeto"not".notInfluxScrapingFilter
Set
typeto"matchBucket".matchBucketarray of stringMatch any of the specified buckets
Set
typeto"matchMeasurement".matchMeasurementarray of stringMatch any of the specified measurements
seriesArchetypeConstructionInfluxSeriesArchetypeConstructionConfig
Fields of
InfluxSeriesArchetypeConstructionConfigchannelNameComponentsarray ofInfluxChannelNameComponent
separatorstring
Set
typeto"nominal".nominalNominalScrapingConfig
Fields of
NominalScrapingConfigchannelNameComponentsarray ofNominalChannelNameComponentchannelNameComponents will be combined, together with separator, to form a fully qualified channel name.
Set
typeto"channel".channelEmpty
Set
typeto"valueOfTagWithName".valueOfTagWithNamestringThe value of the specified TagName will be used. If the tag is not present, it will be omitted.
separatorstring
Set
typeto"timestream".timestreamTimestreamScrapingConfig
Fields of
TimestreamScrapingConfigfilterarray ofTimestreamScrapingFilterIn order for data to be picked up by the scraper, it must match all filters in this list.
Set
typeto"matchTable".matchTablearray of stringMatch any of the specified tables in the database.
channelNameComponentsarray ofTimestreamChannelNameComponentchannelNameComponents will be combined, together with separator, to form a fully qualified channel name.
separatorstring
maxLookBackPeriodHoursintegerThe 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.
Set
typeto"timescale".timescalePivotedTimescaleScrapingConfig
Fields of
PivotedTimescaleScrapingConfigfilterarray ofTimescaleScrapingFilterIn 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.
Set
typeto"not".Set
typeto"matchTable".matchTablearray of stringMatch any of the specified tables in the database.
Set
typeto"matchSchema".matchSchemaarray of stringMatch any of the specified schemas in the database.
timeColumnstringThe name of the column that holds the timestamp.
nameColumnstringThe name of the column that holds the series name.
valueColumnstringThe name of the column that holds the series values.
dimensionColumnsarray of stringThe 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.
channelNameComponentsarray ofPivotedTimescaleChannelNameComponentchannelNameComponents will be combined, together with separator, to form a fully qualified channel name.
separatorstring
Set
typeto"visualCrossing".visualCrossingVisualCrossingScrapingConfig
Fields of
VisualCrossingScrapingConfigavailableSeriesarray ofVisualCrossingAvailableSeriesdeprecatedlist of available channels Deprecated: No longer used for anything
Fields of
VisualCrossingAvailableSerieschannelstring
unitstring
descriptionstring
typeVisualCrossingType
Values of
VisualCrossingTypeDOUBLE
STRING
Set
typeto"bigQuery".bigQueryBigQueryScrapingConfig
Fields of
BigQueryScrapingConfigtimeColumnstringThe name of the column that holds the timestamp.
tagColumnsarray of stringThe name of the columns that should be interpreted as tag columns
channelNameComponentsBigQueryChannelNameComponentchannelNameComponents 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
BigQueryChannelNameComponentincludeProjectbooleanWhether to include the project name in the channel name.
includeDatasetbooleanWhether to include the dataset name in the channel name.
includeTablebooleanWhether to include the table name in the channel name.
separatorstringThe separator that delimits the parts of the channel name. If ommitted, the default is a “.”.
Set
typeto"api".apiApiScrapingConfig
Set
typeto"allChannels".allChannelsAllChannelsConnectionsScrapingConfig
Set
typeto"channelAllowList".channelAllowListChannelAllowListConnectionsScrapingConfig
Fields of
ChannelAllowListConnectionsScrapingConfigchannelAllowListarray of stringOnly channels in this set will be scraped. Must not be empty.
Set
typeto"channelBlockList".channelBlockListChannelBlockListConnectionsScrapingConfig
Fields of
ChannelBlockListConnectionsScrapingConfigchannelBlockListarray of stringOnly channels not in this set will be scraped. Must not be empty.
shouldScrapebooleanThe connection will be scraped iff this flag is set and scrapingConfig is present.
limitsLimitsConfig
Fields of
LimitsConfigmaxQueryRangeDuration
Fields of
DurationunitTemporalUnit
Values of
TemporalUnitHOURS
DAYS
WEEKS
countinteger
connectionStatusConnectionStatus
Fields of
ConnectionStatusisConnectedboolean
isArchivedboolean
nextPageTokenstring
Request
curl "https://api.gov.nominal.io/api/data-source/connection/v2/connections" \
-H "Authorization: Bearer <api key>"
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())
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())
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
{
"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
nominalDataSourceRidsarray of string (RID)The set of Nominal data source RIDs to filter connections by.
workspacesarray 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.
pageSizeintegerNumber of connections to return per page. Defaults to 100. Will return at most 1000 records per page.
nextPageTokenstringToken to retrieve the next page of results.
Response
connectionsarray ofConnection
Fields of
Connectionridstring (RID)
displayNamestringThe display name of the connection. For example: “Nominal production TimescaleDB”
descriptionstring
connectionDetailsConnectionDetails
Set
typeto"timescale".timescaleTimescaleConnectionDetails
Fields of
TimescaleConnectionDetailsdatabasestring
hoststring
portinteger
usernamestringThis is also the reference to the secret containing the password
passwordSecretRidstring (RID)Secret Rid of password secret stored in Secrets Service.
Set
typeto"influx".influxInflux2ConnectionDetails
Fields of
Influx2ConnectionDetailshoststring
portinteger
headersmap of string toHeaderValueA map of header name to value
Set
typeto"plain".plainstring
Set
typeto"secretRid".secretRidstring (RID)
orgstring
tokenSecretRidstring (RID)Secret Rid of token secret stored in Secrets Service.
Set
typeto"influx1".influx1Influx1ConnectionDetails
Fields of
Influx1ConnectionDetailshoststring
portinteger
headersmap of string toHeaderValueA map of header name to value
credentialsPasswordCredentials
Fields of
PasswordCredentialsusernamestring
passwordSecretRidstring (RID)Secret Rid of password secret stored in Secrets Service.
Set
typeto"nominal".nominalNominalConnectionDetails
Fields of
NominalConnectionDetailsnominalDataSourceRidstring (RID)
Set
typeto"timestream".timestreamTimestreamConnectionDetails
Fields of
TimestreamConnectionDetailsnominalRoleArnstringThe role ARN owned by Nominal that has permission to assume the externalRoleArn.
nominalRoleRegionstringAWS region that contains the Nominal role.
externalRegionstringAWS region that contains the Timestream instance.
externalRoleArnstringThe role ARN used to make queries to Timestream. This role is owned by the AWS account that owns the Timestream instance.
databasestringDatabase inside of the Timestream instance to connect to.
Set
typeto"visualCrossing".visualCrossingVisualCrossingConnectionDetails
Fields of
VisualCrossingConnectionDetailsapiKeySecretRidstring (RID)Secret Rid of API key stored in Secrets Service.
Set
typeto"bigQuery".bigQueryBigQueryConnectionDetails
Fields of
BigQueryConnectionDetailsregionstringThe region of the BigQuery Project (e.g. “us-east1”)
projectstringThe name of the BigQuery Project
datasetstringThe name of the dataset within the project
tablestringThe name of the table within the dataset
serviceAccountKeySecretRidstring (RID)Secret Rid of service account key stored in Secrets Service.
requiredTagNamesarray of stringAdditional tag names that should be supplied to construct a fully qualified series. These are suggested, rather than strictly required.
metadatamap of string to string
scrapingScrapingConfig
Set
typeto"influx".influxInfluxScrapingConfig
Fields of
InfluxScrapingConfigfilterarray ofInfluxScrapingFilterFilters are ANDed together
Set
typeto"not".notInfluxScrapingFilter
Set
typeto"matchBucket".matchBucketarray of stringMatch any of the specified buckets
Set
typeto"matchMeasurement".matchMeasurementarray of stringMatch any of the specified measurements
seriesArchetypeConstructionInfluxSeriesArchetypeConstructionConfig
Fields of
InfluxSeriesArchetypeConstructionConfigchannelNameComponentsarray ofInfluxChannelNameComponent
separatorstring
Set
typeto"nominal".nominalNominalScrapingConfig
Fields of
NominalScrapingConfigchannelNameComponentsarray ofNominalChannelNameComponentchannelNameComponents will be combined, together with separator, to form a fully qualified channel name.
Set
typeto"channel".channelEmpty
Set
typeto"valueOfTagWithName".valueOfTagWithNamestringThe value of the specified TagName will be used. If the tag is not present, it will be omitted.
separatorstring
Set
typeto"timestream".timestreamTimestreamScrapingConfig
Fields of
TimestreamScrapingConfigfilterarray ofTimestreamScrapingFilterIn order for data to be picked up by the scraper, it must match all filters in this list.
Set
typeto"matchTable".matchTablearray of stringMatch any of the specified tables in the database.
channelNameComponentsarray ofTimestreamChannelNameComponentchannelNameComponents will be combined, together with separator, to form a fully qualified channel name.
separatorstring
maxLookBackPeriodHoursintegerThe 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.
Set
typeto"timescale".timescalePivotedTimescaleScrapingConfig
Fields of
PivotedTimescaleScrapingConfigfilterarray ofTimescaleScrapingFilterIn 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.
Set
typeto"not".Set
typeto"matchTable".matchTablearray of stringMatch any of the specified tables in the database.
Set
typeto"matchSchema".matchSchemaarray of stringMatch any of the specified schemas in the database.
timeColumnstringThe name of the column that holds the timestamp.
nameColumnstringThe name of the column that holds the series name.
valueColumnstringThe name of the column that holds the series values.
dimensionColumnsarray of stringThe 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.
channelNameComponentsarray ofPivotedTimescaleChannelNameComponentchannelNameComponents will be combined, together with separator, to form a fully qualified channel name.
separatorstring
Set
typeto"visualCrossing".visualCrossingVisualCrossingScrapingConfig
Fields of
VisualCrossingScrapingConfigavailableSeriesarray ofVisualCrossingAvailableSeriesdeprecatedlist of available channels Deprecated: No longer used for anything
Fields of
VisualCrossingAvailableSerieschannelstring
unitstring
descriptionstring
typeVisualCrossingType
Values of
VisualCrossingTypeDOUBLE
STRING
Set
typeto"bigQuery".bigQueryBigQueryScrapingConfig
Fields of
BigQueryScrapingConfigtimeColumnstringThe name of the column that holds the timestamp.
tagColumnsarray of stringThe name of the columns that should be interpreted as tag columns
channelNameComponentsBigQueryChannelNameComponentchannelNameComponents 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
BigQueryChannelNameComponentincludeProjectbooleanWhether to include the project name in the channel name.
includeDatasetbooleanWhether to include the dataset name in the channel name.
includeTablebooleanWhether to include the table name in the channel name.
separatorstringThe separator that delimits the parts of the channel name. If ommitted, the default is a “.”.
Set
typeto"api".apiApiScrapingConfig
Set
typeto"allChannels".allChannelsAllChannelsConnectionsScrapingConfig
Set
typeto"channelAllowList".channelAllowListChannelAllowListConnectionsScrapingConfig
Fields of
ChannelAllowListConnectionsScrapingConfigchannelAllowListarray of stringOnly channels in this set will be scraped. Must not be empty.
Set
typeto"channelBlockList".channelBlockListChannelBlockListConnectionsScrapingConfig
Fields of
ChannelBlockListConnectionsScrapingConfigchannelBlockListarray of stringOnly channels not in this set will be scraped. Must not be empty.
shouldScrapebooleanThe connection will be scraped iff this flag is set and scrapingConfig is present.
limitsLimitsConfig
Fields of
LimitsConfigmaxQueryRangeDuration
Fields of
DurationunitTemporalUnit
Values of
TemporalUnitHOURS
DAYS
WEEKS
countinteger
connectionStatusConnectionStatus
Fields of
ConnectionStatusisConnectedboolean
isArchivedboolean
nextPageTokenstring
Request
curl "https://api.gov.nominal.io/api/data-source/connection/v2/connections/by-datasource" \
-H "Authorization: Bearer <api key>"
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())
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())
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
{
"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
ridstring (RID) required
Response
No content (HTTP 204).
Request
curl -X POST "https://api.gov.nominal.io/api/data-source/connection/v1/connections/<rid>/archive" \
-H "Authorization: Bearer <api key>"
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()
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()
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
ridstring (RID) required
Response
No content (HTTP 204).
Request
curl -X POST "https://api.gov.nominal.io/api/data-source/connection/v1/connections/<rid>/unarchive" \
-H "Authorization: Bearer <api key>"
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()
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()
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 shows how these errors are sent.
Each error’s errorName is Connection: followed by its name below.
Status |
Name |
Notes |
|---|---|---|
400 |
|
Cannot manually add tags to a Nominal connection. |
400 |
|
|
400 |
|
|
403 |
|
|
404 |
|
|
404 |
|
|
404 |
|
|
404 |
|
|
500 |
|
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.
allChannelsAllChannelsConnectionsScrapingConfig
channelAllowListChannelAllowListConnectionsScrapingConfig
channelBlockListChannelBlockListConnectionsScrapingConfig
BigQueryChannelNameComponent#
includeProjectboolean requiredWhether to include the project name in the channel name.
includeDatasetboolean requiredWhether to include the dataset name in the channel name.
includeTableboolean requiredWhether to include the table name in the channel name.
BigQueryConnectionDetails#
regionstring requiredThe region of the BigQuery Project (e.g. “us-east1”)
projectstring requiredThe name of the BigQuery Project
datasetstring requiredThe name of the dataset within the project
tablestring requiredThe name of the table within the dataset
serviceAccountKeySecretRidstring (RID) requiredSecret Rid of service account key stored in Secrets Service.
BigQueryScrapingConfig#
timeColumnstring requiredThe name of the column that holds the timestamp.
tagColumnsarray of stringThe name of the columns that should be interpreted as tag columns
channelNameComponentsBigQueryChannelNameComponentchannelNameComponents will be combined, together with separator, to form a fully qualified channel name. By default, we don’t add anything to the column name.
separatorstringThe separator that delimits the parts of the channel name. If ommitted, the default is a “.”.
ChannelAllowListConnectionsScrapingConfig#
channelAllowListarray of stringOnly channels in this set will be scraped. Must not be empty.
ChannelBlockListConnectionsScrapingConfig#
channelBlockListarray of stringOnly channels not in this set will be scraped. Must not be empty.
Connection#
ridstring (RID) required
displayNamestring requiredThe display name of the connection. For example: “Nominal production TimescaleDB”
descriptionstring
connectionDetailsConnectionDetailsrequired
requiredTagNamesarray of stringAdditional tag names that should be supplied to construct a fully qualified series. These are suggested, rather than strictly required.
metadatamap of string to string
scrapingScrapingConfig
shouldScrapeboolean requiredThe connection will be scraped iff this flag is set and scrapingConfig is present.
limitsLimitsConfig
connectionStatusConnectionStatusrequired
isArchivedboolean required
ConnectionDetails#
Set type to the name of one of the other fields, and set only that field.
timescaleTimescaleConnectionDetails
influxInflux2ConnectionDetails
influx1Influx1ConnectionDetails
nominalNominalConnectionDetails
timestreamTimestreamConnectionDetails
visualCrossingVisualCrossingConnectionDetails
bigQueryBigQueryConnectionDetails
ConnectionStatus#
isConnectedboolean required
Duration#
unitTemporalUnitrequired
countinteger required
Empty#
An empty JSON object, {}.
HeaderValue#
Set type to the name of one of the other fields, and set only that field.
plainstring
secretRidstring (RID)
Influx1ConnectionDetails#
hoststring required
portinteger required
headersmap of string toHeaderValueA map of header name to value
credentialsPasswordCredentials
Influx2ConnectionDetails#
hoststring required
portinteger required
headersmap of string toHeaderValueA map of header name to value
orgstring required
tokenSecretRidstring (RID) requiredSecret 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.
InfluxScrapingConfig#
filterarray ofInfluxScrapingFilterFilters are ANDed together
seriesArchetypeConstructionInfluxSeriesArchetypeConstructionConfigrequired
InfluxScrapingFilter#
Set type to the name of one of the other fields, and set only that field.
notInfluxScrapingFilter
matchBucketarray of stringMatch any of the specified buckets
matchMeasurementarray of stringMatch 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.
channelNameComponentsarray ofInfluxChannelNameComponent
separatorstring required
LimitsConfig#
maxQueryRangeDuration
NominalChannelNameComponent#
Set type to the name of one of the other fields, and set only that field.
channelEmpty
valueOfTagWithNamestringThe value of the specified TagName will be used. If the tag is not present, it will be omitted.
NominalConnectionDetails#
nominalDataSourceRidstring (RID) required
NominalScrapingConfig#
channelNameComponentsarray ofNominalChannelNameComponentchannelNameComponents will be combined, together with separator, to form a fully qualified channel name.
separatorstring required
PasswordCredentials#
usernamestring required
passwordSecretRidstring (RID) requiredSecret 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.
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
filterarray ofTimescaleScrapingFilterIn 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.
timeColumnstring requiredThe name of the column that holds the timestamp.
nameColumnstring requiredThe name of the column that holds the series name.
valueColumnstring requiredThe name of the column that holds the series values.
dimensionColumnsarray of stringThe 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.
channelNameComponentsarray ofPivotedTimescaleChannelNameComponentchannelNameComponents will be combined, together with separator, to form a fully qualified channel name.
separatorstring required
ScrapingConfig#
Set type to the name of one of the other fields, and set only that field.
influxInfluxScrapingConfig
nominalNominalScrapingConfig
timestreamTimestreamScrapingConfig
timescalePivotedTimescaleScrapingConfig
visualCrossingVisualCrossingScrapingConfig
bigQueryBigQueryScrapingConfig
apiApiScrapingConfig
TemporalUnit#
HOURS
DAYS
WEEKS
TimescaleConnectionDetails#
databasestring required
hoststring required
portinteger required
usernamestring requiredThis is also the reference to the secret containing the password
passwordSecretRidstring (RID) requiredSecret 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.
notTimescaleScrapingFilter
matchTablearray of stringMatch any of the specified tables in the database.
matchSchemaarray of stringMatch 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.
TimestreamConnectionDetails#
nominalRoleArnstring requiredThe role ARN owned by Nominal that has permission to assume the externalRoleArn.
nominalRoleRegionstring requiredAWS region that contains the Nominal role.
externalRegionstring requiredAWS region that contains the Timestream instance.
externalRoleArnstring requiredThe role ARN used to make queries to Timestream. This role is owned by the AWS account that owns the Timestream instance.
databasestring requiredDatabase inside of the Timestream instance to connect to.
TimestreamScrapingConfig#
filterarray ofTimestreamScrapingFilterIn order for data to be picked up by the scraper, it must match all filters in this list.
channelNameComponentsarray ofTimestreamChannelNameComponentchannelNameComponents will be combined, together with separator, to form a fully qualified channel name.
separatorstring required
maxLookBackPeriodHoursintegerThe 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.
matchTablearray of stringMatch any of the specified tables in the database.
VisualCrossingAvailableSeries#
Deprecated and not used for anything anymore, see record VisualCrossingAvailableSeries instead.
channelstring required
unitstring
descriptionstring
typeVisualCrossingTyperequired
VisualCrossingConnectionDetails#
apiKeySecretRidstring (RID) requiredSecret Rid of API key stored in Secrets Service.
VisualCrossingScrapingConfig#
availableSeriesarray ofVisualCrossingAvailableSeriesdeprecatedlist of available channels Deprecated: No longer used for anything
VisualCrossingType#
DOUBLE
STRING
Page design based on Scalar, MIT License.