Series metadata service#
[INTERNAL] Series metadata represents the constant information about data in a series - specifically, the name, units, a description, and the tags. Series metadata can be used to query points from specific series depending on the tag value selections.
OpenAPI file: SeriesMetadataService.json
Endpoints#
Batch get#
POST /timeseries/archetype/v1/series-archetype/batch-get
Batch get series metadata by DataSourceRid.
Body
datasourcesarray of string (RID)
Response
responsesmap ofDataSourceRidto array ofSeriesMetadata
Fields of
SeriesMetadataridstring (RID)
channelstring
dataSourceRidstring (RID)
locatorLocatorTemplate
Set
typeto"timescaleDb".timescaleDbTimescaleDbLocatorTemplate
Fields of
TimescaleDbLocatorTemplatetablestring
schemastring
columnstring
timeColumnstring
typeTimescaleType
Values of
TimescaleTypeBOOLEAN
DOUBLE
STRING
Set
typeto"influx".influxInflux2LocatorTemplate
Fields of
Influx2LocatorTemplatebucketstring
measurementstring
valueColumnstringIf omitted, defaults to
_value. Can be used to extract tag values.fieldstring
typeInfluxType
Values of
InfluxTypeBOOLEAN
NUMERIC
STRING
Set
typeto"influx1".influx1Influx1LocatorTemplate
Fields of
Influx1LocatorTemplatedatabasestring
measurementstring
fieldstring
typeInfluxType
Set
typeto"nominal".nominalNominalLocatorTemplate
Fields of
NominalLocatorTemplatechannelstring
typeNominalDataType
Values of
NominalDataTypeDOUBLE
STRING
LOG
INT64
UINT64
DOUBLE_ARRAY
STRING_ARRAY
STRUCT
VIDEO
SPATIAL
Set
typeto"timestream".timestreamTimestreamLocatorTemplate
Fields of
TimestreamLocatorTemplatetablestring
measurestring
attributestring
typeTimestreamType
Values of
TimestreamTypeDOUBLE
STRING
Set
typeto"visualCrossing".visualCrossingVisualCrossingLocatorTemplate
Fields of
VisualCrossingLocatorTemplatefieldstring
endpointVisualCrossingEndpointUriDefaults to HISTORY.
Values of
VisualCrossingEndpointUriHISTORY
TIMELINE
typeVisualCrossingType
Values of
VisualCrossingTypeDOUBLE
STRING
Set
typeto"bigQuery".bigQueryBigQueryLocatorTemplate
Fields of
BigQueryLocatorTemplatevalueColumnstring
timeColumnstring
typeBigQueryType
Values of
BigQueryTypeDOUBLE
STRING
Set
typeto"video".videoVideoLocatorTemplate
Fields of
VideoLocatorTemplatechannelstring
Set
typeto"spatial".spatialSpatialLocatorTemplate
Fields of
SpatialLocatorTemplatechannelstring
unitstring
descriptionstring
tagsmap ofTagNameto string deprecatedTags specified here will take precedence over tags specified in the RunDatasource, in the case that both specify the same TagName. Deprecated: Deprecated. Should not be used.
seriesDataTypeSeriesDataType
Values of
SeriesDataTypeDOUBLE
STRING
LOG
INT
UINT
DOUBLE_ARRAY
STRING_ARRAY
STRUCT
VIDEO
SPATIAL
channelKindChannelKindClassifies how the channel is used. Omitted values should be treated as STANDARD.
Values of
ChannelKindSTANDARD
COMMAND
Request
curl -X POST "https://api.gov.nominal.io/api/timeseries/archetype/v1/series-archetype/batch-get" \
-H "Authorization: Bearer <api key>" \
-H "Content-Type: application/json" \
--data '{
"datasources": [
"<data source rid>"
]
}'
import requests
response = requests.post(
"https://api.gov.nominal.io/api/timeseries/archetype/v1/series-archetype/batch-get",
headers={"Authorization": "Bearer <api key>"},
json={"datasources": ["<data source rid>"]},
)
response.raise_for_status()
print(response.json())
import httpx
response = httpx.post(
"https://api.gov.nominal.io/api/timeseries/archetype/v1/series-archetype/batch-get",
headers={"Authorization": "Bearer <api key>"},
json={"datasources": ["<data source 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/timeseries/archetype/v1/series-archetype/batch-get",
headers={"Authorization": "Bearer <api key>"},
json={"datasources": ["<data source rid>"]},
) as response:
response.raise_for_status()
print(await response.json())
asyncio.run(main())
Response: 200
{
"responses": {
"<key>": [
{
"rid": "<series metadata rid>",
"channel": "<channel>",
"dataSourceRid": "<data source rid>",
"locator": {
"type": "timescaleDb",
"timescaleDb": {
"table": "<table name>",
"schema": "<schema name>",
"column": "<column name>",
"timeColumn": "<column name>",
"type": "BOOLEAN"
}
},
"unit": "<unit>",
"description": "<description>",
"tags": {
"<key>": "<tag value>"
},
"seriesDataType": "DOUBLE",
"channelKind": "STANDARD"
}
]
}
}
Create#
POST /timeseries/archetype/v1/series-archetype
Create new series metadata.
Body
channelstring requiredThis name should be unique amongst SeriesMetadata within the data source. All series created from this metadata will share this name.
dataSourceRidstring (RID) required
locatorLocatorTemplaterequired
Set
typeto"timescaleDb".timescaleDbTimescaleDbLocatorTemplate
Fields of
TimescaleDbLocatorTemplatetablestring required
schemastring required
columnstring required
timeColumnstring required
typeTimescaleTyperequired
Values of
TimescaleTypeBOOLEAN
DOUBLE
STRING
Set
typeto"influx".influxInflux2LocatorTemplate
Fields of
Influx2LocatorTemplatebucketstring required
measurementstring required
valueColumnstringIf omitted, defaults to
_value. Can be used to extract tag values.fieldstring required
typeInfluxTyperequired
Values of
InfluxTypeBOOLEAN
NUMERIC
STRING
Set
typeto"influx1".influx1Influx1LocatorTemplate
Fields of
Influx1LocatorTemplatedatabasestring required
measurementstring required
fieldstring required
typeInfluxTyperequired
Set
typeto"nominal".nominalNominalLocatorTemplate
Fields of
NominalLocatorTemplatechannelstring required
typeNominalDataTyperequired
Values of
NominalDataTypeDOUBLE
STRING
LOG
INT64
UINT64
DOUBLE_ARRAY
STRING_ARRAY
STRUCT
VIDEO
SPATIAL
Set
typeto"timestream".timestreamTimestreamLocatorTemplate
Fields of
TimestreamLocatorTemplatetablestring required
measurestring required
attributestring
typeTimestreamTyperequired
Values of
TimestreamTypeDOUBLE
STRING
Set
typeto"visualCrossing".visualCrossingVisualCrossingLocatorTemplate
Fields of
VisualCrossingLocatorTemplatefieldstring required
endpointVisualCrossingEndpointUriDefaults to HISTORY.
Values of
VisualCrossingEndpointUriHISTORY
TIMELINE
typeVisualCrossingTyperequired
Values of
VisualCrossingTypeDOUBLE
STRING
Set
typeto"bigQuery".bigQueryBigQueryLocatorTemplate
Fields of
BigQueryLocatorTemplatevalueColumnstring required
timeColumnstring required
typeBigQueryTyperequired
Values of
BigQueryTypeDOUBLE
STRING
Set
typeto"video".videoVideoLocatorTemplate
Fields of
VideoLocatorTemplatechannelstring required
Set
typeto"spatial".spatialSpatialLocatorTemplate
Fields of
SpatialLocatorTemplatechannelstring required
unitstring
descriptionstring
channelKindChannelKindClassifies how the channel is used. Omitted values default to STANDARD.
Values of
ChannelKindSTANDARD
COMMAND
tagsmap ofTagNameto string deprecatedTags specified here will take precedence over tags specified in the RunDatasource, in the case that both specify the same TagName. Deprecated: Deprecated. Should not be used.
Response
No content (HTTP 204).
Request
curl -X POST "https://api.gov.nominal.io/api/timeseries/archetype/v1/series-archetype" \
-H "Authorization: Bearer <api key>" \
-H "Content-Type: application/json" \
--data '{
"channel": "<channel>",
"dataSourceRid": "<data source rid>",
"locator": {
"type": "timescaleDb",
"timescaleDb": {
"table": "<table name>",
"schema": "<schema name>",
"column": "<column name>",
"timeColumn": "<column name>",
"type": "BOOLEAN"
}
}
}'
import requests
response = requests.post(
"https://api.gov.nominal.io/api/timeseries/archetype/v1/series-archetype",
headers={"Authorization": "Bearer <api key>"},
json={
"channel": "<channel>",
"dataSourceRid": "<data source rid>",
"locator": {
"type": "timescaleDb",
"timescaleDb": {
"table": "<table name>",
"schema": "<schema name>",
"column": "<column name>",
"timeColumn": "<column name>",
"type": "BOOLEAN",
},
},
},
)
response.raise_for_status()
import httpx
response = httpx.post(
"https://api.gov.nominal.io/api/timeseries/archetype/v1/series-archetype",
headers={"Authorization": "Bearer <api key>"},
json={
"channel": "<channel>",
"dataSourceRid": "<data source rid>",
"locator": {
"type": "timescaleDb",
"timescaleDb": {
"table": "<table name>",
"schema": "<schema name>",
"column": "<column name>",
"timeColumn": "<column name>",
"type": "BOOLEAN",
},
},
},
)
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/timeseries/archetype/v1/series-archetype",
headers={"Authorization": "Bearer <api key>"},
json={
"channel": "<channel>",
"dataSourceRid": "<data source rid>",
"locator": {
"type": "timescaleDb",
"timescaleDb": {
"table": "<table name>",
"schema": "<schema name>",
"column": "<column name>",
"timeColumn": "<column name>",
"type": "BOOLEAN",
},
},
},
) as response:
response.raise_for_status()
asyncio.run(main())
Response: 204
No content.
Batch create#
POST /timeseries/archetype/v1/series-archetype/batch-create
Idempotently creates series metadata.
Body
requestsarray ofCreateSeriesMetadataRequest
Fields of
CreateSeriesMetadataRequestchannelstring requiredThis name should be unique amongst SeriesMetadata within the data source. All series created from this metadata will share this name.
dataSourceRidstring (RID) required
locatorLocatorTemplaterequired
Set
typeto"timescaleDb".timescaleDbTimescaleDbLocatorTemplate
Fields of
TimescaleDbLocatorTemplatetablestring required
schemastring required
columnstring required
timeColumnstring required
typeTimescaleTyperequired
Values of
TimescaleTypeBOOLEAN
DOUBLE
STRING
Set
typeto"influx".influxInflux2LocatorTemplate
Fields of
Influx2LocatorTemplatebucketstring required
measurementstring required
valueColumnstringIf omitted, defaults to
_value. Can be used to extract tag values.fieldstring required
typeInfluxTyperequired
Values of
InfluxTypeBOOLEAN
NUMERIC
STRING
Set
typeto"influx1".influx1Influx1LocatorTemplate
Fields of
Influx1LocatorTemplatedatabasestring required
measurementstring required
fieldstring required
typeInfluxTyperequired
Set
typeto"nominal".nominalNominalLocatorTemplate
Fields of
NominalLocatorTemplatechannelstring required
typeNominalDataTyperequired
Values of
NominalDataTypeDOUBLE
STRING
LOG
INT64
UINT64
DOUBLE_ARRAY
STRING_ARRAY
STRUCT
VIDEO
SPATIAL
Set
typeto"timestream".timestreamTimestreamLocatorTemplate
Fields of
TimestreamLocatorTemplatetablestring required
measurestring required
attributestring
typeTimestreamTyperequired
Values of
TimestreamTypeDOUBLE
STRING
Set
typeto"visualCrossing".visualCrossingVisualCrossingLocatorTemplate
Fields of
VisualCrossingLocatorTemplatefieldstring required
endpointVisualCrossingEndpointUriDefaults to HISTORY.
Values of
VisualCrossingEndpointUriHISTORY
TIMELINE
typeVisualCrossingTyperequired
Values of
VisualCrossingTypeDOUBLE
STRING
Set
typeto"bigQuery".bigQueryBigQueryLocatorTemplate
Fields of
BigQueryLocatorTemplatevalueColumnstring required
timeColumnstring required
typeBigQueryTyperequired
Values of
BigQueryTypeDOUBLE
STRING
Set
typeto"video".videoVideoLocatorTemplate
Fields of
VideoLocatorTemplatechannelstring required
Set
typeto"spatial".spatialSpatialLocatorTemplate
Fields of
SpatialLocatorTemplatechannelstring required
unitstring
descriptionstring
channelKindChannelKindClassifies how the channel is used. Omitted values default to STANDARD.
Values of
ChannelKindSTANDARD
COMMAND
tagsmap ofTagNameto string deprecatedTags specified here will take precedence over tags specified in the RunDatasource, in the case that both specify the same TagName. Deprecated: Deprecated. Should not be used.
Response
No content (HTTP 204).
Request
curl -X POST "https://api.gov.nominal.io/api/timeseries/archetype/v1/series-archetype/batch-create" \
-H "Authorization: Bearer <api key>" \
-H "Content-Type: application/json" \
--data '{
"requests": [
{
"channel": "<channel>",
"dataSourceRid": "<data source rid>",
"locator": {
"type": "timescaleDb",
"timescaleDb": {
"table": "<table name>",
"schema": "<schema name>",
"column": "<column name>",
"timeColumn": "<column name>",
"type": "BOOLEAN"
}
}
}
]
}'
import requests
response = requests.post(
"https://api.gov.nominal.io/api/timeseries/archetype/v1/series-archetype/batch-create",
headers={"Authorization": "Bearer <api key>"},
json={
"requests": [
{
"channel": "<channel>",
"dataSourceRid": "<data source rid>",
"locator": {
"type": "timescaleDb",
"timescaleDb": {
"table": "<table name>",
"schema": "<schema name>",
"column": "<column name>",
"timeColumn": "<column name>",
"type": "BOOLEAN",
},
},
},
],
},
)
response.raise_for_status()
import httpx
response = httpx.post(
"https://api.gov.nominal.io/api/timeseries/archetype/v1/series-archetype/batch-create",
headers={"Authorization": "Bearer <api key>"},
json={
"requests": [
{
"channel": "<channel>",
"dataSourceRid": "<data source rid>",
"locator": {
"type": "timescaleDb",
"timescaleDb": {
"table": "<table name>",
"schema": "<schema name>",
"column": "<column name>",
"timeColumn": "<column name>",
"type": "BOOLEAN",
},
},
},
],
},
)
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/timeseries/archetype/v1/series-archetype/batch-create",
headers={"Authorization": "Bearer <api key>"},
json={
"requests": [
{
"channel": "<channel>",
"dataSourceRid": "<data source rid>",
"locator": {
"type": "timescaleDb",
"timescaleDb": {
"table": "<table name>",
"schema": "<schema name>",
"column": "<column name>",
"timeColumn": "<column name>",
"type": "BOOLEAN",
},
},
},
],
},
) as response:
response.raise_for_status()
asyncio.run(main())
Response: 204
No content.
Create or update#
POST /timeseries/archetype/v1/series-archetype/create-or-update
Upserts series metadata. Creates new series metadata if it does not exist for the given channel and data source. If it already exists, updates the locator and any provided unit and description fields while preserving existing values for fields not supplied.
Body
channelstring requiredThis name should be unique amongst SeriesMetadata within the data source. All series created from this metadata will share this name.
dataSourceRidstring (RID) required
locatorLocatorTemplaterequired
Set
typeto"timescaleDb".timescaleDbTimescaleDbLocatorTemplate
Fields of
TimescaleDbLocatorTemplatetablestring required
schemastring required
columnstring required
timeColumnstring required
typeTimescaleTyperequired
Values of
TimescaleTypeBOOLEAN
DOUBLE
STRING
Set
typeto"influx".influxInflux2LocatorTemplate
Fields of
Influx2LocatorTemplatebucketstring required
measurementstring required
valueColumnstringIf omitted, defaults to
_value. Can be used to extract tag values.fieldstring required
typeInfluxTyperequired
Values of
InfluxTypeBOOLEAN
NUMERIC
STRING
Set
typeto"influx1".influx1Influx1LocatorTemplate
Fields of
Influx1LocatorTemplatedatabasestring required
measurementstring required
fieldstring required
typeInfluxTyperequired
Set
typeto"nominal".nominalNominalLocatorTemplate
Fields of
NominalLocatorTemplatechannelstring required
typeNominalDataTyperequired
Values of
NominalDataTypeDOUBLE
STRING
LOG
INT64
UINT64
DOUBLE_ARRAY
STRING_ARRAY
STRUCT
VIDEO
SPATIAL
Set
typeto"timestream".timestreamTimestreamLocatorTemplate
Fields of
TimestreamLocatorTemplatetablestring required
measurestring required
attributestring
typeTimestreamTyperequired
Values of
TimestreamTypeDOUBLE
STRING
Set
typeto"visualCrossing".visualCrossingVisualCrossingLocatorTemplate
Fields of
VisualCrossingLocatorTemplatefieldstring required
endpointVisualCrossingEndpointUriDefaults to HISTORY.
Values of
VisualCrossingEndpointUriHISTORY
TIMELINE
typeVisualCrossingTyperequired
Values of
VisualCrossingTypeDOUBLE
STRING
Set
typeto"bigQuery".bigQueryBigQueryLocatorTemplate
Fields of
BigQueryLocatorTemplatevalueColumnstring required
timeColumnstring required
typeBigQueryTyperequired
Values of
BigQueryTypeDOUBLE
STRING
Set
typeto"video".videoVideoLocatorTemplate
Fields of
VideoLocatorTemplatechannelstring required
Set
typeto"spatial".spatialSpatialLocatorTemplate
Fields of
SpatialLocatorTemplatechannelstring required
unitstring
descriptionstring
channelKindChannelKindClassifies how the channel is used. Omitted values default to STANDARD.
Values of
ChannelKindSTANDARD
COMMAND
tagsmap ofTagNameto string deprecatedTags specified here will take precedence over tags specified in the RunDatasource, in the case that both specify the same TagName. Deprecated: Deprecated. Should not be used.
Response
No content (HTTP 204).
Request
curl -X POST "https://api.gov.nominal.io/api/timeseries/archetype/v1/series-archetype/create-or-update" \
-H "Authorization: Bearer <api key>" \
-H "Content-Type: application/json" \
--data '{
"channel": "<channel>",
"dataSourceRid": "<data source rid>",
"locator": {
"type": "timescaleDb",
"timescaleDb": {
"table": "<table name>",
"schema": "<schema name>",
"column": "<column name>",
"timeColumn": "<column name>",
"type": "BOOLEAN"
}
}
}'
import requests
response = requests.post(
"https://api.gov.nominal.io/api/timeseries/archetype/v1/series-archetype/create-or-update",
headers={"Authorization": "Bearer <api key>"},
json={
"channel": "<channel>",
"dataSourceRid": "<data source rid>",
"locator": {
"type": "timescaleDb",
"timescaleDb": {
"table": "<table name>",
"schema": "<schema name>",
"column": "<column name>",
"timeColumn": "<column name>",
"type": "BOOLEAN",
},
},
},
)
response.raise_for_status()
import httpx
response = httpx.post(
"https://api.gov.nominal.io/api/timeseries/archetype/v1/series-archetype/create-or-update",
headers={"Authorization": "Bearer <api key>"},
json={
"channel": "<channel>",
"dataSourceRid": "<data source rid>",
"locator": {
"type": "timescaleDb",
"timescaleDb": {
"table": "<table name>",
"schema": "<schema name>",
"column": "<column name>",
"timeColumn": "<column name>",
"type": "BOOLEAN",
},
},
},
)
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/timeseries/archetype/v1/series-archetype/create-or-update",
headers={"Authorization": "Bearer <api key>"},
json={
"channel": "<channel>",
"dataSourceRid": "<data source rid>",
"locator": {
"type": "timescaleDb",
"timescaleDb": {
"table": "<table name>",
"schema": "<schema name>",
"column": "<column name>",
"timeColumn": "<column name>",
"type": "BOOLEAN",
},
},
},
) as response:
response.raise_for_status()
asyncio.run(main())
Response: 204
No content.
Batch create or update#
POST /timeseries/archetype/v1/series-archetype/batch-create-or-update
Batch version of createOrUpdate.
Body
requestsarray ofCreateSeriesMetadataRequest
Fields of
CreateSeriesMetadataRequestchannelstring requiredThis name should be unique amongst SeriesMetadata within the data source. All series created from this metadata will share this name.
dataSourceRidstring (RID) required
locatorLocatorTemplaterequired
Set
typeto"timescaleDb".timescaleDbTimescaleDbLocatorTemplate
Fields of
TimescaleDbLocatorTemplatetablestring required
schemastring required
columnstring required
timeColumnstring required
typeTimescaleTyperequired
Values of
TimescaleTypeBOOLEAN
DOUBLE
STRING
Set
typeto"influx".influxInflux2LocatorTemplate
Fields of
Influx2LocatorTemplatebucketstring required
measurementstring required
valueColumnstringIf omitted, defaults to
_value. Can be used to extract tag values.fieldstring required
typeInfluxTyperequired
Values of
InfluxTypeBOOLEAN
NUMERIC
STRING
Set
typeto"influx1".influx1Influx1LocatorTemplate
Fields of
Influx1LocatorTemplatedatabasestring required
measurementstring required
fieldstring required
typeInfluxTyperequired
Set
typeto"nominal".nominalNominalLocatorTemplate
Fields of
NominalLocatorTemplatechannelstring required
typeNominalDataTyperequired
Values of
NominalDataTypeDOUBLE
STRING
LOG
INT64
UINT64
DOUBLE_ARRAY
STRING_ARRAY
STRUCT
VIDEO
SPATIAL
Set
typeto"timestream".timestreamTimestreamLocatorTemplate
Fields of
TimestreamLocatorTemplatetablestring required
measurestring required
attributestring
typeTimestreamTyperequired
Values of
TimestreamTypeDOUBLE
STRING
Set
typeto"visualCrossing".visualCrossingVisualCrossingLocatorTemplate
Fields of
VisualCrossingLocatorTemplatefieldstring required
endpointVisualCrossingEndpointUriDefaults to HISTORY.
Values of
VisualCrossingEndpointUriHISTORY
TIMELINE
typeVisualCrossingTyperequired
Values of
VisualCrossingTypeDOUBLE
STRING
Set
typeto"bigQuery".bigQueryBigQueryLocatorTemplate
Fields of
BigQueryLocatorTemplatevalueColumnstring required
timeColumnstring required
typeBigQueryTyperequired
Values of
BigQueryTypeDOUBLE
STRING
Set
typeto"video".videoVideoLocatorTemplate
Fields of
VideoLocatorTemplatechannelstring required
Set
typeto"spatial".spatialSpatialLocatorTemplate
Fields of
SpatialLocatorTemplatechannelstring required
unitstring
descriptionstring
channelKindChannelKindClassifies how the channel is used. Omitted values default to STANDARD.
Values of
ChannelKindSTANDARD
COMMAND
tagsmap ofTagNameto string deprecatedTags specified here will take precedence over tags specified in the RunDatasource, in the case that both specify the same TagName. Deprecated: Deprecated. Should not be used.
Response
No content (HTTP 204).
Request
curl -X POST "https://api.gov.nominal.io/api/timeseries/archetype/v1/series-archetype/batch-create-or-update" \
-H "Authorization: Bearer <api key>" \
-H "Content-Type: application/json" \
--data '{
"requests": [
{
"channel": "<channel>",
"dataSourceRid": "<data source rid>",
"locator": {
"type": "timescaleDb",
"timescaleDb": {
"table": "<table name>",
"schema": "<schema name>",
"column": "<column name>",
"timeColumn": "<column name>",
"type": "BOOLEAN"
}
}
}
]
}'
import requests
response = requests.post(
"https://api.gov.nominal.io/api/timeseries/archetype/v1/series-archetype/batch-create-or-update",
headers={"Authorization": "Bearer <api key>"},
json={
"requests": [
{
"channel": "<channel>",
"dataSourceRid": "<data source rid>",
"locator": {
"type": "timescaleDb",
"timescaleDb": {
"table": "<table name>",
"schema": "<schema name>",
"column": "<column name>",
"timeColumn": "<column name>",
"type": "BOOLEAN",
},
},
},
],
},
)
response.raise_for_status()
import httpx
response = httpx.post(
"https://api.gov.nominal.io/api/timeseries/archetype/v1/series-archetype/batch-create-or-update",
headers={"Authorization": "Bearer <api key>"},
json={
"requests": [
{
"channel": "<channel>",
"dataSourceRid": "<data source rid>",
"locator": {
"type": "timescaleDb",
"timescaleDb": {
"table": "<table name>",
"schema": "<schema name>",
"column": "<column name>",
"timeColumn": "<column name>",
"type": "BOOLEAN",
},
},
},
],
},
)
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/timeseries/archetype/v1/series-archetype/batch-create-or-update",
headers={"Authorization": "Bearer <api key>"},
json={
"requests": [
{
"channel": "<channel>",
"dataSourceRid": "<data source rid>",
"locator": {
"type": "timescaleDb",
"timescaleDb": {
"table": "<table name>",
"schema": "<schema name>",
"column": "<column name>",
"timeColumn": "<column name>",
"type": "BOOLEAN",
},
},
},
],
},
) as response:
response.raise_for_status()
asyncio.run(main())
Response: 204
No content.
Get#
GET /timeseries/archetype/v1/series-archetype/{rid}
Get series metadata from its series metadata rid.
Path parameters
ridstring (RID) required
Response
ridstring (RID)
channelstring
dataSourceRidstring (RID)
locatorLocatorTemplate
Set
typeto"timescaleDb".timescaleDbTimescaleDbLocatorTemplate
Fields of
TimescaleDbLocatorTemplatetablestring
schemastring
columnstring
timeColumnstring
typeTimescaleType
Values of
TimescaleTypeBOOLEAN
DOUBLE
STRING
Set
typeto"influx".influxInflux2LocatorTemplate
Fields of
Influx2LocatorTemplatebucketstring
measurementstring
valueColumnstringIf omitted, defaults to
_value. Can be used to extract tag values.fieldstring
typeInfluxType
Values of
InfluxTypeBOOLEAN
NUMERIC
STRING
Set
typeto"influx1".influx1Influx1LocatorTemplate
Fields of
Influx1LocatorTemplatedatabasestring
measurementstring
fieldstring
typeInfluxType
Set
typeto"nominal".nominalNominalLocatorTemplate
Fields of
NominalLocatorTemplatechannelstring
typeNominalDataType
Values of
NominalDataTypeDOUBLE
STRING
LOG
INT64
UINT64
DOUBLE_ARRAY
STRING_ARRAY
STRUCT
VIDEO
SPATIAL
Set
typeto"timestream".timestreamTimestreamLocatorTemplate
Fields of
TimestreamLocatorTemplatetablestring
measurestring
attributestring
typeTimestreamType
Values of
TimestreamTypeDOUBLE
STRING
Set
typeto"visualCrossing".visualCrossingVisualCrossingLocatorTemplate
Fields of
VisualCrossingLocatorTemplatefieldstring
endpointVisualCrossingEndpointUriDefaults to HISTORY.
Values of
VisualCrossingEndpointUriHISTORY
TIMELINE
typeVisualCrossingType
Values of
VisualCrossingTypeDOUBLE
STRING
Set
typeto"bigQuery".bigQueryBigQueryLocatorTemplate
Fields of
BigQueryLocatorTemplatevalueColumnstring
timeColumnstring
typeBigQueryType
Values of
BigQueryTypeDOUBLE
STRING
Set
typeto"video".videoVideoLocatorTemplate
Fields of
VideoLocatorTemplatechannelstring
Set
typeto"spatial".spatialSpatialLocatorTemplate
Fields of
SpatialLocatorTemplatechannelstring
unitstring
descriptionstring
tagsmap ofTagNameto string deprecatedTags specified here will take precedence over tags specified in the RunDatasource, in the case that both specify the same TagName. Deprecated: Deprecated. Should not be used.
seriesDataTypeSeriesDataType
Values of
SeriesDataTypeDOUBLE
STRING
LOG
INT
UINT
DOUBLE_ARRAY
STRING_ARRAY
STRUCT
VIDEO
SPATIAL
channelKindChannelKindClassifies how the channel is used. Omitted values should be treated as STANDARD.
Values of
ChannelKindSTANDARD
COMMAND
Request
curl "https://api.gov.nominal.io/api/timeseries/archetype/v1/series-archetype/<rid>" \
-H "Authorization: Bearer <api key>"
import requests
response = requests.get(
"https://api.gov.nominal.io/api/timeseries/archetype/v1/series-archetype/<rid>",
headers={"Authorization": "Bearer <api key>"},
)
response.raise_for_status()
print(response.json())
import httpx
response = httpx.get(
"https://api.gov.nominal.io/api/timeseries/archetype/v1/series-archetype/<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/timeseries/archetype/v1/series-archetype/<rid>",
headers={"Authorization": "Bearer <api key>"},
) as response:
response.raise_for_status()
print(await response.json())
asyncio.run(main())
Response: 200
{
"rid": "<series metadata rid>",
"channel": "<channel>",
"dataSourceRid": "<data source rid>",
"locator": {
"type": "timescaleDb",
"timescaleDb": {
"table": "<table name>",
"schema": "<schema name>",
"column": "<column name>",
"timeColumn": "<column name>",
"type": "BOOLEAN"
}
},
"unit": "<unit>",
"description": "<description>",
"tags": {
"<key>": "<tag value>"
},
"seriesDataType": "DOUBLE",
"channelKind": "STANDARD"
}
Update metadata#
POST /timeseries/archetype/v1/series-archetype/{rid}/metadata
Update existing series metadata. Throws SeriesMetadataNotFound if the series metadata does not exist.
Path parameters
ridstring (RID) required
Body
unitstring deprecatedDeprecated: Deprecated. Use unitUpdate instead.
unitUpdateUnitUpdate
Set
typeto"unit".unitstring
Set
typeto"clearUnit".clearUnitEmpty
descriptionstring
channelKindChannelKindUpdates the channel kind. Omitted values preserve the current setting.
Values of
ChannelKindSTANDARD
COMMAND
Response
ridstring (RID)
channelstring
dataSourceRidstring (RID)
locatorLocatorTemplate
Set
typeto"timescaleDb".timescaleDbTimescaleDbLocatorTemplate
Fields of
TimescaleDbLocatorTemplatetablestring
schemastring
columnstring
timeColumnstring
typeTimescaleType
Values of
TimescaleTypeBOOLEAN
DOUBLE
STRING
Set
typeto"influx".influxInflux2LocatorTemplate
Fields of
Influx2LocatorTemplatebucketstring
measurementstring
valueColumnstringIf omitted, defaults to
_value. Can be used to extract tag values.fieldstring
typeInfluxType
Values of
InfluxTypeBOOLEAN
NUMERIC
STRING
Set
typeto"influx1".influx1Influx1LocatorTemplate
Fields of
Influx1LocatorTemplatedatabasestring
measurementstring
fieldstring
typeInfluxType
Set
typeto"nominal".nominalNominalLocatorTemplate
Fields of
NominalLocatorTemplatechannelstring
typeNominalDataType
Values of
NominalDataTypeDOUBLE
STRING
LOG
INT64
UINT64
DOUBLE_ARRAY
STRING_ARRAY
STRUCT
VIDEO
SPATIAL
Set
typeto"timestream".timestreamTimestreamLocatorTemplate
Fields of
TimestreamLocatorTemplatetablestring
measurestring
attributestring
typeTimestreamType
Values of
TimestreamTypeDOUBLE
STRING
Set
typeto"visualCrossing".visualCrossingVisualCrossingLocatorTemplate
Fields of
VisualCrossingLocatorTemplatefieldstring
endpointVisualCrossingEndpointUriDefaults to HISTORY.
Values of
VisualCrossingEndpointUriHISTORY
TIMELINE
typeVisualCrossingType
Values of
VisualCrossingTypeDOUBLE
STRING
Set
typeto"bigQuery".bigQueryBigQueryLocatorTemplate
Fields of
BigQueryLocatorTemplatevalueColumnstring
timeColumnstring
typeBigQueryType
Values of
BigQueryTypeDOUBLE
STRING
Set
typeto"video".videoVideoLocatorTemplate
Fields of
VideoLocatorTemplatechannelstring
Set
typeto"spatial".spatialSpatialLocatorTemplate
Fields of
SpatialLocatorTemplatechannelstring
unitstring
descriptionstring
tagsmap ofTagNameto string deprecatedTags specified here will take precedence over tags specified in the RunDatasource, in the case that both specify the same TagName. Deprecated: Deprecated. Should not be used.
seriesDataTypeSeriesDataType
Values of
SeriesDataTypeDOUBLE
STRING
LOG
INT
UINT
DOUBLE_ARRAY
STRING_ARRAY
STRUCT
VIDEO
SPATIAL
channelKindChannelKindClassifies how the channel is used. Omitted values should be treated as STANDARD.
Values of
ChannelKindSTANDARD
COMMAND
Request
curl -X POST "https://api.gov.nominal.io/api/timeseries/archetype/v1/series-archetype/<rid>/metadata" \
-H "Authorization: Bearer <api key>" \
-H "Content-Type: application/json" \
--data '{
"unit": "<unit>",
"unitUpdate": {
"type": "unit",
"unit": "<unit>"
},
"description": "<description>",
"channelKind": "STANDARD"
}'
import requests
response = requests.post(
"https://api.gov.nominal.io/api/timeseries/archetype/v1/series-archetype/<rid>/metadata",
headers={"Authorization": "Bearer <api key>"},
json={
"unit": "<unit>",
"unitUpdate": {"type": "unit", "unit": "<unit>"},
"description": "<description>",
"channelKind": "STANDARD",
},
)
response.raise_for_status()
print(response.json())
import httpx
response = httpx.post(
"https://api.gov.nominal.io/api/timeseries/archetype/v1/series-archetype/<rid>/metadata",
headers={"Authorization": "Bearer <api key>"},
json={
"unit": "<unit>",
"unitUpdate": {"type": "unit", "unit": "<unit>"},
"description": "<description>",
"channelKind": "STANDARD",
},
)
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/timeseries/archetype/v1/series-archetype/<rid>/metadata",
headers={"Authorization": "Bearer <api key>"},
json={
"unit": "<unit>",
"unitUpdate": {"type": "unit", "unit": "<unit>"},
"description": "<description>",
"channelKind": "STANDARD",
},
) as response:
response.raise_for_status()
print(await response.json())
asyncio.run(main())
Response: 200
{
"rid": "<series metadata rid>",
"channel": "<channel>",
"dataSourceRid": "<data source rid>",
"locator": {
"type": "timescaleDb",
"timescaleDb": {
"table": "<table name>",
"schema": "<schema name>",
"column": "<column name>",
"timeColumn": "<column name>",
"type": "BOOLEAN"
}
},
"unit": "<unit>",
"description": "<description>",
"tags": {
"<key>": "<tag value>"
},
"seriesDataType": "DOUBLE",
"channelKind": "STANDARD"
}
Change data type#
POST /timeseries/archetype/v1/series-archetype/change-data-type
This endpoint lets an authorized workspace caller change how one nominal dataset channel is interpreted. This updates metadata and future series resolution. It does not rewrite historical point rows.
Body
dataSourceRidstring (RID) requiredIdentifies the data source whose channel metadata should be changed.
channelstring requiredIdentifies the channel name within the data source.
expectedCurrentTypeNominalDataTyperequiredProvides the exact nominal type the caller expects to be stored in the locator before the change.
Values of
NominalDataTypeDOUBLE
STRING
LOG
INT64
UINT64
DOUBLE_ARRAY
STRING_ARRAY
STRUCT
VIDEO
SPATIAL
newTypeNominalDataTyperequiredProvides the exact nominal type future series resolution should use.
Response
seriesMetadataRidstring (RID)Identifies the series metadata row being changed.
oldTypeNominalDataTypeReports the exact nominal type read from the existing locator.
Values of
NominalDataTypeDOUBLE
STRING
LOG
INT64
UINT64
DOUBLE_ARRAY
STRING_ARRAY
STRUCT
VIDEO
SPATIAL
newTypeNominalDataTypeReports the exact nominal type requested by the caller.
Request
curl -X POST "https://api.gov.nominal.io/api/timeseries/archetype/v1/series-archetype/change-data-type" \
-H "Authorization: Bearer <api key>" \
-H "Content-Type: application/json" \
--data '{
"dataSourceRid": "<data source rid>",
"channel": "<channel>",
"expectedCurrentType": "DOUBLE",
"newType": "DOUBLE"
}'
import requests
response = requests.post(
"https://api.gov.nominal.io/api/timeseries/archetype/v1/series-archetype/change-data-type",
headers={"Authorization": "Bearer <api key>"},
json={
"dataSourceRid": "<data source rid>",
"channel": "<channel>",
"expectedCurrentType": "DOUBLE",
"newType": "DOUBLE",
},
)
response.raise_for_status()
print(response.json())
import httpx
response = httpx.post(
"https://api.gov.nominal.io/api/timeseries/archetype/v1/series-archetype/change-data-type",
headers={"Authorization": "Bearer <api key>"},
json={
"dataSourceRid": "<data source rid>",
"channel": "<channel>",
"expectedCurrentType": "DOUBLE",
"newType": "DOUBLE",
},
)
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/timeseries/archetype/v1/series-archetype/change-data-type",
headers={"Authorization": "Bearer <api key>"},
json={
"dataSourceRid": "<data source rid>",
"channel": "<channel>",
"expectedCurrentType": "DOUBLE",
"newType": "DOUBLE",
},
) as response:
response.raise_for_status()
print(await response.json())
asyncio.run(main())
Response: 200
{
"seriesMetadataRid": "<series metadata rid>",
"oldType": "DOUBLE",
"newType": "DOUBLE"
}
Batch create video series#
POST /timeseries/archetype/v1/series-archetype/video-channel
Batch creates series metadata for video channels if they don’t exist. Idempotent - returns existing SeriesMetadataRid if already exists.
Body
requestsarray ofCreateVideoSeriesRequest
Fields of
CreateVideoSeriesRequestdatasetRidstring (RID) required
channelstring required
tagsmap ofTagNameto string
timeBoundsTimeBoundsrequired
Response
responsesarray ofCreateVideoSeriesResponse
Fields of
CreateVideoSeriesResponseseriesMetadataRidstring (RID)
seriesUuidstring (UUID)
Request
curl -X POST "https://api.gov.nominal.io/api/timeseries/archetype/v1/series-archetype/video-channel" \
-H "Authorization: Bearer <api key>" \
-H "Content-Type: application/json" \
--data '{
"requests": [
{
"datasetRid": "<dataset rid>",
"channel": "<channel>",
"timeBounds": {
"start": {
"seconds": 1,
"nanos": 1
},
"end": {
"seconds": 1,
"nanos": 1
}
}
}
]
}'
import requests
response = requests.post(
"https://api.gov.nominal.io/api/timeseries/archetype/v1/series-archetype/video-channel",
headers={"Authorization": "Bearer <api key>"},
json={
"requests": [
{
"datasetRid": "<dataset rid>",
"channel": "<channel>",
"timeBounds": {
"start": {"seconds": 1, "nanos": 1},
"end": {"seconds": 1, "nanos": 1},
},
},
],
},
)
response.raise_for_status()
print(response.json())
import httpx
response = httpx.post(
"https://api.gov.nominal.io/api/timeseries/archetype/v1/series-archetype/video-channel",
headers={"Authorization": "Bearer <api key>"},
json={
"requests": [
{
"datasetRid": "<dataset rid>",
"channel": "<channel>",
"timeBounds": {
"start": {"seconds": 1, "nanos": 1},
"end": {"seconds": 1, "nanos": 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.post(
"https://api.gov.nominal.io/api/timeseries/archetype/v1/series-archetype/video-channel",
headers={"Authorization": "Bearer <api key>"},
json={
"requests": [
{
"datasetRid": "<dataset rid>",
"channel": "<channel>",
"timeBounds": {
"start": {"seconds": 1, "nanos": 1},
"end": {"seconds": 1, "nanos": 1},
},
},
],
},
) as response:
response.raise_for_status()
print(await response.json())
asyncio.run(main())
Response: 200
{
"responses": [
{
"seriesMetadataRid": "<series metadata rid>",
"seriesUuid": "<series uuid>"
}
]
}
Errors#
Errors shows how these errors are sent.
Each error’s errorName is SeriesMetadata: followed by its name below.
Status |
Name |
Notes |
|---|---|---|
400 |
|
|
400 |
|
|
400 |
|
|
404 |
|
The error supports both series metadata lookup shapes. RID-based lookups populate |
Types#
BigQueryLocatorTemplate#
valueColumnstring required
timeColumnstring required
typeBigQueryTyperequired
BigQueryType#
DOUBLE
STRING
ChannelKind#
Classifies how a channel is used. COMMAND channels accept commands through the Command Service.
STANDARD
COMMAND
CreateSeriesMetadataRequest#
channelstring requiredThis name should be unique amongst SeriesMetadata within the data source. All series created from this metadata will share this name.
dataSourceRidstring (RID) required
locatorLocatorTemplaterequired
unitstring
descriptionstring
channelKindChannelKindClassifies how the channel is used. Omitted values default to STANDARD.
tagsmap ofTagNameto string deprecatedTags specified here will take precedence over tags specified in the RunDatasource, in the case that both specify the same TagName. Deprecated: Deprecated. Should not be used.
CreateVideoSeriesRequest#
Creates series and metadata for a video channel if it doesn’t exist. Returns the SeriesMetadataRid of the created or existing series metadata.
datasetRidstring (RID) required
channelstring required
tagsmap ofTagNameto string
timeBoundsTimeBoundsrequired
CreateVideoSeriesResponse#
seriesMetadataRidstring (RID) required
seriesUuidstring (UUID) required
Empty#
An empty JSON object, {}.
Influx1LocatorTemplate#
databasestring required
measurementstring required
fieldstring required
typeInfluxTyperequired
Influx2LocatorTemplate#
bucketstring required
measurementstring required
valueColumnstringIf omitted, defaults to
_value. Can be used to extract tag values.fieldstring required
typeInfluxTyperequired
InfluxType#
BOOLEAN
NUMERIC
STRING
LocatorTemplate#
Set type to the name of one of the other fields, and set only that field.
timescaleDbTimescaleDbLocatorTemplate
influxInflux2LocatorTemplate
influx1Influx1LocatorTemplate
nominalNominalLocatorTemplate
timestreamTimestreamLocatorTemplate
visualCrossingVisualCrossingLocatorTemplate
bigQueryBigQueryLocatorTemplate
videoVideoLocatorTemplate
spatialSpatialLocatorTemplate
NominalDataType#
The data types supported by Nominal’s database.
DOUBLE
STRING
LOG
INT64
UINT64
DOUBLE_ARRAY
STRING_ARRAY
STRUCT
VIDEO
SPATIAL
NominalLocatorTemplate#
channelstring required
typeNominalDataTyperequired
SeriesDataType#
The data types that are available for querying.
DOUBLE
STRING
LOG
INT
UINT
DOUBLE_ARRAY
STRING_ARRAY
STRUCT
VIDEO
SPATIAL
SeriesMetadata#
ridstring (RID) required
channelstring required
dataSourceRidstring (RID) required
locatorLocatorTemplaterequired
unitstring
descriptionstring
tagsmap ofTagNameto string deprecatedTags specified here will take precedence over tags specified in the RunDatasource, in the case that both specify the same TagName. Deprecated: Deprecated. Should not be used.
seriesDataTypeSeriesDataType
channelKindChannelKindClassifies how the channel is used. Omitted values should be treated as STANDARD.
SpatialLocatorTemplate#
channelstring required
TimeBounds#
Time bounds for the video file. Used to update the series time bounds
TimescaleDbLocatorTemplate#
tablestring required
schemastring required
columnstring required
timeColumnstring required
typeTimescaleTyperequired
TimescaleType#
BOOLEAN
DOUBLE
STRING
Timestamp#
Deprecated for new APIs. Use google.protobuf.Timestamp for absolute instants in proto APIs.
This legacy nanosecond precision timestamp type is represented by an epoch time in seconds and a nanosecond offset. The nanosecond offset is from the start of the epoch second, so must be less than 1 billion.
secondsinteger (int64) required
nanosinteger (int64) required
TimestreamLocatorTemplate#
tablestring required
measurestring required
attributestring
typeTimestreamTyperequired
TimestreamType#
DOUBLE
STRING
UnitUpdate#
UnitUpdate is used to either set a unit, or to clear an existing unit.
Set type to the name of one of the other fields, and set only that field.
unitstring
clearUnitEmpty
VideoLocatorTemplate#
channelstring required
VisualCrossingEndpointUri#
HISTORY
TIMELINE
VisualCrossingLocatorTemplate#
fieldstring required
endpointVisualCrossingEndpointUriDefaults to HISTORY.
typeVisualCrossingTyperequired
VisualCrossingType#
DOUBLE
STRING
Page design based on Scalar, MIT License.