# 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`](https://dev.nominal.io/api/_downloads/757da0aa4e23a625bc8c48ec91d13e11/SeriesMetadataService.json)

## Endpoints

### Batch get

POST `/timeseries/archetype/v1/series-archetype/batch-get`

Batch get series metadata by DataSourceRid.

Body

`datasources` array of string (RID)
:   ​

Response

`responses` map of `DataSourceRid` to array of [`SeriesMetadata`](https://dev.nominal.io/api/rest/series-metadata-service.md#seriesmetadata)
:   ​

    Fields of `SeriesMetadata`

    `rid` string (RID)
    :   ​

    `channel` string
    :   ​

    `dataSourceRid` string (RID)
    :   ​

    `locator` [`LocatorTemplate`](https://dev.nominal.io/api/rest/series-metadata-service.md#locatortemplate)
    :   ​

        **timescaleDb**

        Set `type` to `"timescaleDb"`.

        `timescaleDb` [`TimescaleDbLocatorTemplate`](https://dev.nominal.io/api/rest/series-metadata-service.md#timescaledblocatortemplate)
        :   ​

            Fields of `TimescaleDbLocatorTemplate`

            `table` string
            :   ​

            `schema` string
            :   ​

            `column` string
            :   ​

            `timeColumn` string
            :   ​

            `type` [`TimescaleType`](https://dev.nominal.io/api/rest/series-metadata-service.md#timescaletype)
            :   ​

                Values of `TimescaleType`

                `BOOLEAN`
                :   ​

                `DOUBLE`
                :   ​

                `STRING`
                :   ​

        **influx**

        Set `type` to `"influx"`.

        `influx` [`Influx2LocatorTemplate`](https://dev.nominal.io/api/rest/series-metadata-service.md#influx2locatortemplate)
        :   ​

            Fields of `Influx2LocatorTemplate`

            `bucket` string
            :   ​

            `measurement` string
            :   ​

            `valueColumn` string
            :   If omitted, defaults to `_value`. Can be used to extract tag values.

            `field` string
            :   ​

            `type` [`InfluxType`](https://dev.nominal.io/api/rest/series-metadata-service.md#influxtype)
            :   ​

                Values of `InfluxType`

                `BOOLEAN`
                :   ​

                `NUMERIC`
                :   ​

                `STRING`
                :   ​

        **influx1**

        Set `type` to `"influx1"`.

        `influx1` [`Influx1LocatorTemplate`](https://dev.nominal.io/api/rest/series-metadata-service.md#influx1locatortemplate)
        :   ​

            Fields of `Influx1LocatorTemplate`

            `database` string
            :   ​

            `measurement` string
            :   ​

            `field` string
            :   ​

            `type` [`InfluxType`](https://dev.nominal.io/api/rest/series-metadata-service.md#influxtype)
            :   ​

        **nominal**

        Set `type` to `"nominal"`.

        `nominal` [`NominalLocatorTemplate`](https://dev.nominal.io/api/rest/series-metadata-service.md#nominallocatortemplate)
        :   ​

            Fields of `NominalLocatorTemplate`

            `channel` string
            :   ​

            `type` [`NominalDataType`](https://dev.nominal.io/api/rest/series-metadata-service.md#nominaldatatype)
            :   ​

                Values of `NominalDataType`

                `DOUBLE`
                :   ​

                `STRING`
                :   ​

                `LOG`
                :   ​

                `INT64`
                :   ​

                `UINT64`
                :   ​

                `DOUBLE_ARRAY`
                :   ​

                `STRING_ARRAY`
                :   ​

                `STRUCT`
                :   ​

                `VIDEO`
                :   ​

                `SPATIAL`
                :   ​

        **timestream**

        Set `type` to `"timestream"`.

        `timestream` [`TimestreamLocatorTemplate`](https://dev.nominal.io/api/rest/series-metadata-service.md#timestreamlocatortemplate)
        :   ​

            Fields of `TimestreamLocatorTemplate`

            `table` string
            :   ​

            `measure` string
            :   ​

            `attribute` string
            :   ​

            `type` [`TimestreamType`](https://dev.nominal.io/api/rest/series-metadata-service.md#timestreamtype)
            :   ​

                Values of `TimestreamType`

                `DOUBLE`
                :   ​

                `STRING`
                :   ​

        **visualCrossing**

        Set `type` to `"visualCrossing"`.

        `visualCrossing` [`VisualCrossingLocatorTemplate`](https://dev.nominal.io/api/rest/series-metadata-service.md#visualcrossinglocatortemplate)
        :   ​

            Fields of `VisualCrossingLocatorTemplate`

            `field` string
            :   ​

            `endpoint` [`VisualCrossingEndpointUri`](https://dev.nominal.io/api/rest/series-metadata-service.md#visualcrossingendpointuri)
            :   Defaults to HISTORY.

                Values of `VisualCrossingEndpointUri`

                `HISTORY`
                :   ​

                `TIMELINE`
                :   ​

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

                Values of `VisualCrossingType`

                `DOUBLE`
                :   ​

                `STRING`
                :   ​

        **bigQuery**

        Set `type` to `"bigQuery"`.

        `bigQuery` [`BigQueryLocatorTemplate`](https://dev.nominal.io/api/rest/series-metadata-service.md#bigquerylocatortemplate)
        :   ​

            Fields of `BigQueryLocatorTemplate`

            `valueColumn` string
            :   ​

            `timeColumn` string
            :   ​

            `type` [`BigQueryType`](https://dev.nominal.io/api/rest/series-metadata-service.md#bigquerytype)
            :   ​

                Values of `BigQueryType`

                `DOUBLE`
                :   ​

                `STRING`
                :   ​

        **video**

        Set `type` to `"video"`.

        `video` [`VideoLocatorTemplate`](https://dev.nominal.io/api/rest/series-metadata-service.md#videolocatortemplate)
        :   ​

            Fields of `VideoLocatorTemplate`

            `channel` string
            :   ​

        **spatial**

        Set `type` to `"spatial"`.

        `spatial` [`SpatialLocatorTemplate`](https://dev.nominal.io/api/rest/series-metadata-service.md#spatiallocatortemplate)
        :   ​

            Fields of `SpatialLocatorTemplate`

            `channel` string
            :   ​

    `unit` string
    :   ​

    `description` string
    :   ​

    `tags` map of `TagName` to string deprecated
    :   Tags 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.

    `seriesDataType` [`SeriesDataType`](https://dev.nominal.io/api/rest/series-metadata-service.md#seriesdatatype)
    :   ​

        Values of `SeriesDataType`

        `DOUBLE`
        :   ​

        `STRING`
        :   ​

        `LOG`
        :   ​

        `INT`
        :   ​

        `UINT`
        :   ​

        `DOUBLE_ARRAY`
        :   ​

        `STRING_ARRAY`
        :   ​

        `STRUCT`
        :   ​

        `VIDEO`
        :   ​

        `SPATIAL`
        :   ​

    `channelKind` [`ChannelKind`](https://dev.nominal.io/api/rest/series-metadata-service.md#channelkind)
    :   Classifies how the channel is used. Omitted values should be treated as STANDARD.

        Values of `ChannelKind`

        `STANDARD`
        :   ​

        `COMMAND`
        :   ​

Request

**curl**

```shell
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>"
  ]
}'
```

**requests**

```python
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())
```

**httpx**

```python
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())
```

**aiohttp**

```python
import asyncio

import aiohttp

async def main() -> None:
    async with aiohttp.ClientSession() as session:
        async with session.post(
            "https://api.gov.nominal.io/api/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`

```json
{
  "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

`channel` string required
:   This name should be unique amongst SeriesMetadata within the data source. All series created from this metadata will share this name.

`dataSourceRid` string (RID) required
:   ​

`locator` [`LocatorTemplate`](https://dev.nominal.io/api/rest/series-metadata-service.md#locatortemplate) required
:   ​

    **timescaleDb**

    Set `type` to `"timescaleDb"`.

    `timescaleDb` [`TimescaleDbLocatorTemplate`](https://dev.nominal.io/api/rest/series-metadata-service.md#timescaledblocatortemplate)
    :   ​

        Fields of `TimescaleDbLocatorTemplate`

        `table` string required
        :   ​

        `schema` string required
        :   ​

        `column` string required
        :   ​

        `timeColumn` string required
        :   ​

        `type` [`TimescaleType`](https://dev.nominal.io/api/rest/series-metadata-service.md#timescaletype) required
        :   ​

            Values of `TimescaleType`

            `BOOLEAN`
            :   ​

            `DOUBLE`
            :   ​

            `STRING`
            :   ​

    **influx**

    Set `type` to `"influx"`.

    `influx` [`Influx2LocatorTemplate`](https://dev.nominal.io/api/rest/series-metadata-service.md#influx2locatortemplate)
    :   ​

        Fields of `Influx2LocatorTemplate`

        `bucket` string required
        :   ​

        `measurement` string required
        :   ​

        `valueColumn` string
        :   If omitted, defaults to `_value`. Can be used to extract tag values.

        `field` string required
        :   ​

        `type` [`InfluxType`](https://dev.nominal.io/api/rest/series-metadata-service.md#influxtype) required
        :   ​

            Values of `InfluxType`

            `BOOLEAN`
            :   ​

            `NUMERIC`
            :   ​

            `STRING`
            :   ​

    **influx1**

    Set `type` to `"influx1"`.

    `influx1` [`Influx1LocatorTemplate`](https://dev.nominal.io/api/rest/series-metadata-service.md#influx1locatortemplate)
    :   ​

        Fields of `Influx1LocatorTemplate`

        `database` string required
        :   ​

        `measurement` string required
        :   ​

        `field` string required
        :   ​

        `type` [`InfluxType`](https://dev.nominal.io/api/rest/series-metadata-service.md#influxtype) required
        :   ​

    **nominal**

    Set `type` to `"nominal"`.

    `nominal` [`NominalLocatorTemplate`](https://dev.nominal.io/api/rest/series-metadata-service.md#nominallocatortemplate)
    :   ​

        Fields of `NominalLocatorTemplate`

        `channel` string required
        :   ​

        `type` [`NominalDataType`](https://dev.nominal.io/api/rest/series-metadata-service.md#nominaldatatype) required
        :   ​

            Values of `NominalDataType`

            `DOUBLE`
            :   ​

            `STRING`
            :   ​

            `LOG`
            :   ​

            `INT64`
            :   ​

            `UINT64`
            :   ​

            `DOUBLE_ARRAY`
            :   ​

            `STRING_ARRAY`
            :   ​

            `STRUCT`
            :   ​

            `VIDEO`
            :   ​

            `SPATIAL`
            :   ​

    **timestream**

    Set `type` to `"timestream"`.

    `timestream` [`TimestreamLocatorTemplate`](https://dev.nominal.io/api/rest/series-metadata-service.md#timestreamlocatortemplate)
    :   ​

        Fields of `TimestreamLocatorTemplate`

        `table` string required
        :   ​

        `measure` string required
        :   ​

        `attribute` string
        :   ​

        `type` [`TimestreamType`](https://dev.nominal.io/api/rest/series-metadata-service.md#timestreamtype) required
        :   ​

            Values of `TimestreamType`

            `DOUBLE`
            :   ​

            `STRING`
            :   ​

    **visualCrossing**

    Set `type` to `"visualCrossing"`.

    `visualCrossing` [`VisualCrossingLocatorTemplate`](https://dev.nominal.io/api/rest/series-metadata-service.md#visualcrossinglocatortemplate)
    :   ​

        Fields of `VisualCrossingLocatorTemplate`

        `field` string required
        :   ​

        `endpoint` [`VisualCrossingEndpointUri`](https://dev.nominal.io/api/rest/series-metadata-service.md#visualcrossingendpointuri)
        :   Defaults to HISTORY.

            Values of `VisualCrossingEndpointUri`

            `HISTORY`
            :   ​

            `TIMELINE`
            :   ​

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

            Values of `VisualCrossingType`

            `DOUBLE`
            :   ​

            `STRING`
            :   ​

    **bigQuery**

    Set `type` to `"bigQuery"`.

    `bigQuery` [`BigQueryLocatorTemplate`](https://dev.nominal.io/api/rest/series-metadata-service.md#bigquerylocatortemplate)
    :   ​

        Fields of `BigQueryLocatorTemplate`

        `valueColumn` string required
        :   ​

        `timeColumn` string required
        :   ​

        `type` [`BigQueryType`](https://dev.nominal.io/api/rest/series-metadata-service.md#bigquerytype) required
        :   ​

            Values of `BigQueryType`

            `DOUBLE`
            :   ​

            `STRING`
            :   ​

    **video**

    Set `type` to `"video"`.

    `video` [`VideoLocatorTemplate`](https://dev.nominal.io/api/rest/series-metadata-service.md#videolocatortemplate)
    :   ​

        Fields of `VideoLocatorTemplate`

        `channel` string required
        :   ​

    **spatial**

    Set `type` to `"spatial"`.

    `spatial` [`SpatialLocatorTemplate`](https://dev.nominal.io/api/rest/series-metadata-service.md#spatiallocatortemplate)
    :   ​

        Fields of `SpatialLocatorTemplate`

        `channel` string required
        :   ​

`unit` string
:   ​

`description` string
:   ​

`channelKind` [`ChannelKind`](https://dev.nominal.io/api/rest/series-metadata-service.md#channelkind)
:   Classifies how the channel is used. Omitted values default to STANDARD.

    Values of `ChannelKind`

    `STANDARD`
    :   ​

    `COMMAND`
    :   ​

`tags` map of `TagName` to string deprecated
:   Tags 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**

```shell
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"
    }
  }
}'
```

**requests**

```python
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()
```

**httpx**

```python
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()
```

**aiohttp**

```python
import asyncio

import aiohttp

async def main() -> None:
    async with aiohttp.ClientSession() as session:
        async with session.post(
            "https://api.gov.nominal.io/api/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

`requests` array of [`CreateSeriesMetadataRequest`](https://dev.nominal.io/api/rest/series-metadata-service.md#createseriesmetadatarequest)
:   ​

    Fields of `CreateSeriesMetadataRequest`

    `channel` string required
    :   This name should be unique amongst SeriesMetadata within the data source. All series created from this metadata will share this name.

    `dataSourceRid` string (RID) required
    :   ​

    `locator` [`LocatorTemplate`](https://dev.nominal.io/api/rest/series-metadata-service.md#locatortemplate) required
    :   ​

        **timescaleDb**

        Set `type` to `"timescaleDb"`.

        `timescaleDb` [`TimescaleDbLocatorTemplate`](https://dev.nominal.io/api/rest/series-metadata-service.md#timescaledblocatortemplate)
        :   ​

            Fields of `TimescaleDbLocatorTemplate`

            `table` string required
            :   ​

            `schema` string required
            :   ​

            `column` string required
            :   ​

            `timeColumn` string required
            :   ​

            `type` [`TimescaleType`](https://dev.nominal.io/api/rest/series-metadata-service.md#timescaletype) required
            :   ​

                Values of `TimescaleType`

                `BOOLEAN`
                :   ​

                `DOUBLE`
                :   ​

                `STRING`
                :   ​

        **influx**

        Set `type` to `"influx"`.

        `influx` [`Influx2LocatorTemplate`](https://dev.nominal.io/api/rest/series-metadata-service.md#influx2locatortemplate)
        :   ​

            Fields of `Influx2LocatorTemplate`

            `bucket` string required
            :   ​

            `measurement` string required
            :   ​

            `valueColumn` string
            :   If omitted, defaults to `_value`. Can be used to extract tag values.

            `field` string required
            :   ​

            `type` [`InfluxType`](https://dev.nominal.io/api/rest/series-metadata-service.md#influxtype) required
            :   ​

                Values of `InfluxType`

                `BOOLEAN`
                :   ​

                `NUMERIC`
                :   ​

                `STRING`
                :   ​

        **influx1**

        Set `type` to `"influx1"`.

        `influx1` [`Influx1LocatorTemplate`](https://dev.nominal.io/api/rest/series-metadata-service.md#influx1locatortemplate)
        :   ​

            Fields of `Influx1LocatorTemplate`

            `database` string required
            :   ​

            `measurement` string required
            :   ​

            `field` string required
            :   ​

            `type` [`InfluxType`](https://dev.nominal.io/api/rest/series-metadata-service.md#influxtype) required
            :   ​

        **nominal**

        Set `type` to `"nominal"`.

        `nominal` [`NominalLocatorTemplate`](https://dev.nominal.io/api/rest/series-metadata-service.md#nominallocatortemplate)
        :   ​

            Fields of `NominalLocatorTemplate`

            `channel` string required
            :   ​

            `type` [`NominalDataType`](https://dev.nominal.io/api/rest/series-metadata-service.md#nominaldatatype) required
            :   ​

                Values of `NominalDataType`

                `DOUBLE`
                :   ​

                `STRING`
                :   ​

                `LOG`
                :   ​

                `INT64`
                :   ​

                `UINT64`
                :   ​

                `DOUBLE_ARRAY`
                :   ​

                `STRING_ARRAY`
                :   ​

                `STRUCT`
                :   ​

                `VIDEO`
                :   ​

                `SPATIAL`
                :   ​

        **timestream**

        Set `type` to `"timestream"`.

        `timestream` [`TimestreamLocatorTemplate`](https://dev.nominal.io/api/rest/series-metadata-service.md#timestreamlocatortemplate)
        :   ​

            Fields of `TimestreamLocatorTemplate`

            `table` string required
            :   ​

            `measure` string required
            :   ​

            `attribute` string
            :   ​

            `type` [`TimestreamType`](https://dev.nominal.io/api/rest/series-metadata-service.md#timestreamtype) required
            :   ​

                Values of `TimestreamType`

                `DOUBLE`
                :   ​

                `STRING`
                :   ​

        **visualCrossing**

        Set `type` to `"visualCrossing"`.

        `visualCrossing` [`VisualCrossingLocatorTemplate`](https://dev.nominal.io/api/rest/series-metadata-service.md#visualcrossinglocatortemplate)
        :   ​

            Fields of `VisualCrossingLocatorTemplate`

            `field` string required
            :   ​

            `endpoint` [`VisualCrossingEndpointUri`](https://dev.nominal.io/api/rest/series-metadata-service.md#visualcrossingendpointuri)
            :   Defaults to HISTORY.

                Values of `VisualCrossingEndpointUri`

                `HISTORY`
                :   ​

                `TIMELINE`
                :   ​

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

                Values of `VisualCrossingType`

                `DOUBLE`
                :   ​

                `STRING`
                :   ​

        **bigQuery**

        Set `type` to `"bigQuery"`.

        `bigQuery` [`BigQueryLocatorTemplate`](https://dev.nominal.io/api/rest/series-metadata-service.md#bigquerylocatortemplate)
        :   ​

            Fields of `BigQueryLocatorTemplate`

            `valueColumn` string required
            :   ​

            `timeColumn` string required
            :   ​

            `type` [`BigQueryType`](https://dev.nominal.io/api/rest/series-metadata-service.md#bigquerytype) required
            :   ​

                Values of `BigQueryType`

                `DOUBLE`
                :   ​

                `STRING`
                :   ​

        **video**

        Set `type` to `"video"`.

        `video` [`VideoLocatorTemplate`](https://dev.nominal.io/api/rest/series-metadata-service.md#videolocatortemplate)
        :   ​

            Fields of `VideoLocatorTemplate`

            `channel` string required
            :   ​

        **spatial**

        Set `type` to `"spatial"`.

        `spatial` [`SpatialLocatorTemplate`](https://dev.nominal.io/api/rest/series-metadata-service.md#spatiallocatortemplate)
        :   ​

            Fields of `SpatialLocatorTemplate`

            `channel` string required
            :   ​

    `unit` string
    :   ​

    `description` string
    :   ​

    `channelKind` [`ChannelKind`](https://dev.nominal.io/api/rest/series-metadata-service.md#channelkind)
    :   Classifies how the channel is used. Omitted values default to STANDARD.

        Values of `ChannelKind`

        `STANDARD`
        :   ​

        `COMMAND`
        :   ​

    `tags` map of `TagName` to string deprecated
    :   Tags 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**

```shell
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"
        }
      }
    }
  ]
}'
```

**requests**

```python
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()
```

**httpx**

```python
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()
```

**aiohttp**

```python
import asyncio

import aiohttp

async def main() -> None:
    async with aiohttp.ClientSession() as session:
        async with session.post(
            "https://api.gov.nominal.io/api/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

`channel` string required
:   This name should be unique amongst SeriesMetadata within the data source. All series created from this metadata will share this name.

`dataSourceRid` string (RID) required
:   ​

`locator` [`LocatorTemplate`](https://dev.nominal.io/api/rest/series-metadata-service.md#locatortemplate) required
:   ​

    **timescaleDb**

    Set `type` to `"timescaleDb"`.

    `timescaleDb` [`TimescaleDbLocatorTemplate`](https://dev.nominal.io/api/rest/series-metadata-service.md#timescaledblocatortemplate)
    :   ​

        Fields of `TimescaleDbLocatorTemplate`

        `table` string required
        :   ​

        `schema` string required
        :   ​

        `column` string required
        :   ​

        `timeColumn` string required
        :   ​

        `type` [`TimescaleType`](https://dev.nominal.io/api/rest/series-metadata-service.md#timescaletype) required
        :   ​

            Values of `TimescaleType`

            `BOOLEAN`
            :   ​

            `DOUBLE`
            :   ​

            `STRING`
            :   ​

    **influx**

    Set `type` to `"influx"`.

    `influx` [`Influx2LocatorTemplate`](https://dev.nominal.io/api/rest/series-metadata-service.md#influx2locatortemplate)
    :   ​

        Fields of `Influx2LocatorTemplate`

        `bucket` string required
        :   ​

        `measurement` string required
        :   ​

        `valueColumn` string
        :   If omitted, defaults to `_value`. Can be used to extract tag values.

        `field` string required
        :   ​

        `type` [`InfluxType`](https://dev.nominal.io/api/rest/series-metadata-service.md#influxtype) required
        :   ​

            Values of `InfluxType`

            `BOOLEAN`
            :   ​

            `NUMERIC`
            :   ​

            `STRING`
            :   ​

    **influx1**

    Set `type` to `"influx1"`.

    `influx1` [`Influx1LocatorTemplate`](https://dev.nominal.io/api/rest/series-metadata-service.md#influx1locatortemplate)
    :   ​

        Fields of `Influx1LocatorTemplate`

        `database` string required
        :   ​

        `measurement` string required
        :   ​

        `field` string required
        :   ​

        `type` [`InfluxType`](https://dev.nominal.io/api/rest/series-metadata-service.md#influxtype) required
        :   ​

    **nominal**

    Set `type` to `"nominal"`.

    `nominal` [`NominalLocatorTemplate`](https://dev.nominal.io/api/rest/series-metadata-service.md#nominallocatortemplate)
    :   ​

        Fields of `NominalLocatorTemplate`

        `channel` string required
        :   ​

        `type` [`NominalDataType`](https://dev.nominal.io/api/rest/series-metadata-service.md#nominaldatatype) required
        :   ​

            Values of `NominalDataType`

            `DOUBLE`
            :   ​

            `STRING`
            :   ​

            `LOG`
            :   ​

            `INT64`
            :   ​

            `UINT64`
            :   ​

            `DOUBLE_ARRAY`
            :   ​

            `STRING_ARRAY`
            :   ​

            `STRUCT`
            :   ​

            `VIDEO`
            :   ​

            `SPATIAL`
            :   ​

    **timestream**

    Set `type` to `"timestream"`.

    `timestream` [`TimestreamLocatorTemplate`](https://dev.nominal.io/api/rest/series-metadata-service.md#timestreamlocatortemplate)
    :   ​

        Fields of `TimestreamLocatorTemplate`

        `table` string required
        :   ​

        `measure` string required
        :   ​

        `attribute` string
        :   ​

        `type` [`TimestreamType`](https://dev.nominal.io/api/rest/series-metadata-service.md#timestreamtype) required
        :   ​

            Values of `TimestreamType`

            `DOUBLE`
            :   ​

            `STRING`
            :   ​

    **visualCrossing**

    Set `type` to `"visualCrossing"`.

    `visualCrossing` [`VisualCrossingLocatorTemplate`](https://dev.nominal.io/api/rest/series-metadata-service.md#visualcrossinglocatortemplate)
    :   ​

        Fields of `VisualCrossingLocatorTemplate`

        `field` string required
        :   ​

        `endpoint` [`VisualCrossingEndpointUri`](https://dev.nominal.io/api/rest/series-metadata-service.md#visualcrossingendpointuri)
        :   Defaults to HISTORY.

            Values of `VisualCrossingEndpointUri`

            `HISTORY`
            :   ​

            `TIMELINE`
            :   ​

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

            Values of `VisualCrossingType`

            `DOUBLE`
            :   ​

            `STRING`
            :   ​

    **bigQuery**

    Set `type` to `"bigQuery"`.

    `bigQuery` [`BigQueryLocatorTemplate`](https://dev.nominal.io/api/rest/series-metadata-service.md#bigquerylocatortemplate)
    :   ​

        Fields of `BigQueryLocatorTemplate`

        `valueColumn` string required
        :   ​

        `timeColumn` string required
        :   ​

        `type` [`BigQueryType`](https://dev.nominal.io/api/rest/series-metadata-service.md#bigquerytype) required
        :   ​

            Values of `BigQueryType`

            `DOUBLE`
            :   ​

            `STRING`
            :   ​

    **video**

    Set `type` to `"video"`.

    `video` [`VideoLocatorTemplate`](https://dev.nominal.io/api/rest/series-metadata-service.md#videolocatortemplate)
    :   ​

        Fields of `VideoLocatorTemplate`

        `channel` string required
        :   ​

    **spatial**

    Set `type` to `"spatial"`.

    `spatial` [`SpatialLocatorTemplate`](https://dev.nominal.io/api/rest/series-metadata-service.md#spatiallocatortemplate)
    :   ​

        Fields of `SpatialLocatorTemplate`

        `channel` string required
        :   ​

`unit` string
:   ​

`description` string
:   ​

`channelKind` [`ChannelKind`](https://dev.nominal.io/api/rest/series-metadata-service.md#channelkind)
:   Classifies how the channel is used. Omitted values default to STANDARD.

    Values of `ChannelKind`

    `STANDARD`
    :   ​

    `COMMAND`
    :   ​

`tags` map of `TagName` to string deprecated
:   Tags 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**

```shell
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"
    }
  }
}'
```

**requests**

```python
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()
```

**httpx**

```python
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()
```

**aiohttp**

```python
import asyncio

import aiohttp

async def main() -> None:
    async with aiohttp.ClientSession() as session:
        async with session.post(
            "https://api.gov.nominal.io/api/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

`requests` array of [`CreateSeriesMetadataRequest`](https://dev.nominal.io/api/rest/series-metadata-service.md#createseriesmetadatarequest)
:   ​

    Fields of `CreateSeriesMetadataRequest`

    `channel` string required
    :   This name should be unique amongst SeriesMetadata within the data source. All series created from this metadata will share this name.

    `dataSourceRid` string (RID) required
    :   ​

    `locator` [`LocatorTemplate`](https://dev.nominal.io/api/rest/series-metadata-service.md#locatortemplate) required
    :   ​

        **timescaleDb**

        Set `type` to `"timescaleDb"`.

        `timescaleDb` [`TimescaleDbLocatorTemplate`](https://dev.nominal.io/api/rest/series-metadata-service.md#timescaledblocatortemplate)
        :   ​

            Fields of `TimescaleDbLocatorTemplate`

            `table` string required
            :   ​

            `schema` string required
            :   ​

            `column` string required
            :   ​

            `timeColumn` string required
            :   ​

            `type` [`TimescaleType`](https://dev.nominal.io/api/rest/series-metadata-service.md#timescaletype) required
            :   ​

                Values of `TimescaleType`

                `BOOLEAN`
                :   ​

                `DOUBLE`
                :   ​

                `STRING`
                :   ​

        **influx**

        Set `type` to `"influx"`.

        `influx` [`Influx2LocatorTemplate`](https://dev.nominal.io/api/rest/series-metadata-service.md#influx2locatortemplate)
        :   ​

            Fields of `Influx2LocatorTemplate`

            `bucket` string required
            :   ​

            `measurement` string required
            :   ​

            `valueColumn` string
            :   If omitted, defaults to `_value`. Can be used to extract tag values.

            `field` string required
            :   ​

            `type` [`InfluxType`](https://dev.nominal.io/api/rest/series-metadata-service.md#influxtype) required
            :   ​

                Values of `InfluxType`

                `BOOLEAN`
                :   ​

                `NUMERIC`
                :   ​

                `STRING`
                :   ​

        **influx1**

        Set `type` to `"influx1"`.

        `influx1` [`Influx1LocatorTemplate`](https://dev.nominal.io/api/rest/series-metadata-service.md#influx1locatortemplate)
        :   ​

            Fields of `Influx1LocatorTemplate`

            `database` string required
            :   ​

            `measurement` string required
            :   ​

            `field` string required
            :   ​

            `type` [`InfluxType`](https://dev.nominal.io/api/rest/series-metadata-service.md#influxtype) required
            :   ​

        **nominal**

        Set `type` to `"nominal"`.

        `nominal` [`NominalLocatorTemplate`](https://dev.nominal.io/api/rest/series-metadata-service.md#nominallocatortemplate)
        :   ​

            Fields of `NominalLocatorTemplate`

            `channel` string required
            :   ​

            `type` [`NominalDataType`](https://dev.nominal.io/api/rest/series-metadata-service.md#nominaldatatype) required
            :   ​

                Values of `NominalDataType`

                `DOUBLE`
                :   ​

                `STRING`
                :   ​

                `LOG`
                :   ​

                `INT64`
                :   ​

                `UINT64`
                :   ​

                `DOUBLE_ARRAY`
                :   ​

                `STRING_ARRAY`
                :   ​

                `STRUCT`
                :   ​

                `VIDEO`
                :   ​

                `SPATIAL`
                :   ​

        **timestream**

        Set `type` to `"timestream"`.

        `timestream` [`TimestreamLocatorTemplate`](https://dev.nominal.io/api/rest/series-metadata-service.md#timestreamlocatortemplate)
        :   ​

            Fields of `TimestreamLocatorTemplate`

            `table` string required
            :   ​

            `measure` string required
            :   ​

            `attribute` string
            :   ​

            `type` [`TimestreamType`](https://dev.nominal.io/api/rest/series-metadata-service.md#timestreamtype) required
            :   ​

                Values of `TimestreamType`

                `DOUBLE`
                :   ​

                `STRING`
                :   ​

        **visualCrossing**

        Set `type` to `"visualCrossing"`.

        `visualCrossing` [`VisualCrossingLocatorTemplate`](https://dev.nominal.io/api/rest/series-metadata-service.md#visualcrossinglocatortemplate)
        :   ​

            Fields of `VisualCrossingLocatorTemplate`

            `field` string required
            :   ​

            `endpoint` [`VisualCrossingEndpointUri`](https://dev.nominal.io/api/rest/series-metadata-service.md#visualcrossingendpointuri)
            :   Defaults to HISTORY.

                Values of `VisualCrossingEndpointUri`

                `HISTORY`
                :   ​

                `TIMELINE`
                :   ​

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

                Values of `VisualCrossingType`

                `DOUBLE`
                :   ​

                `STRING`
                :   ​

        **bigQuery**

        Set `type` to `"bigQuery"`.

        `bigQuery` [`BigQueryLocatorTemplate`](https://dev.nominal.io/api/rest/series-metadata-service.md#bigquerylocatortemplate)
        :   ​

            Fields of `BigQueryLocatorTemplate`

            `valueColumn` string required
            :   ​

            `timeColumn` string required
            :   ​

            `type` [`BigQueryType`](https://dev.nominal.io/api/rest/series-metadata-service.md#bigquerytype) required
            :   ​

                Values of `BigQueryType`

                `DOUBLE`
                :   ​

                `STRING`
                :   ​

        **video**

        Set `type` to `"video"`.

        `video` [`VideoLocatorTemplate`](https://dev.nominal.io/api/rest/series-metadata-service.md#videolocatortemplate)
        :   ​

            Fields of `VideoLocatorTemplate`

            `channel` string required
            :   ​

        **spatial**

        Set `type` to `"spatial"`.

        `spatial` [`SpatialLocatorTemplate`](https://dev.nominal.io/api/rest/series-metadata-service.md#spatiallocatortemplate)
        :   ​

            Fields of `SpatialLocatorTemplate`

            `channel` string required
            :   ​

    `unit` string
    :   ​

    `description` string
    :   ​

    `channelKind` [`ChannelKind`](https://dev.nominal.io/api/rest/series-metadata-service.md#channelkind)
    :   Classifies how the channel is used. Omitted values default to STANDARD.

        Values of `ChannelKind`

        `STANDARD`
        :   ​

        `COMMAND`
        :   ​

    `tags` map of `TagName` to string deprecated
    :   Tags 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**

```shell
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"
        }
      }
    }
  ]
}'
```

**requests**

```python
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()
```

**httpx**

```python
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()
```

**aiohttp**

```python
import asyncio

import aiohttp

async def main() -> None:
    async with aiohttp.ClientSession() as session:
        async with session.post(
            "https://api.gov.nominal.io/api/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

`rid` string (RID) required
:   ​

Response

`rid` string (RID)
:   ​

`channel` string
:   ​

`dataSourceRid` string (RID)
:   ​

`locator` [`LocatorTemplate`](https://dev.nominal.io/api/rest/series-metadata-service.md#locatortemplate)
:   ​

    **timescaleDb**

    Set `type` to `"timescaleDb"`.

    `timescaleDb` [`TimescaleDbLocatorTemplate`](https://dev.nominal.io/api/rest/series-metadata-service.md#timescaledblocatortemplate)
    :   ​

        Fields of `TimescaleDbLocatorTemplate`

        `table` string
        :   ​

        `schema` string
        :   ​

        `column` string
        :   ​

        `timeColumn` string
        :   ​

        `type` [`TimescaleType`](https://dev.nominal.io/api/rest/series-metadata-service.md#timescaletype)
        :   ​

            Values of `TimescaleType`

            `BOOLEAN`
            :   ​

            `DOUBLE`
            :   ​

            `STRING`
            :   ​

    **influx**

    Set `type` to `"influx"`.

    `influx` [`Influx2LocatorTemplate`](https://dev.nominal.io/api/rest/series-metadata-service.md#influx2locatortemplate)
    :   ​

        Fields of `Influx2LocatorTemplate`

        `bucket` string
        :   ​

        `measurement` string
        :   ​

        `valueColumn` string
        :   If omitted, defaults to `_value`. Can be used to extract tag values.

        `field` string
        :   ​

        `type` [`InfluxType`](https://dev.nominal.io/api/rest/series-metadata-service.md#influxtype)
        :   ​

            Values of `InfluxType`

            `BOOLEAN`
            :   ​

            `NUMERIC`
            :   ​

            `STRING`
            :   ​

    **influx1**

    Set `type` to `"influx1"`.

    `influx1` [`Influx1LocatorTemplate`](https://dev.nominal.io/api/rest/series-metadata-service.md#influx1locatortemplate)
    :   ​

        Fields of `Influx1LocatorTemplate`

        `database` string
        :   ​

        `measurement` string
        :   ​

        `field` string
        :   ​

        `type` [`InfluxType`](https://dev.nominal.io/api/rest/series-metadata-service.md#influxtype)
        :   ​

    **nominal**

    Set `type` to `"nominal"`.

    `nominal` [`NominalLocatorTemplate`](https://dev.nominal.io/api/rest/series-metadata-service.md#nominallocatortemplate)
    :   ​

        Fields of `NominalLocatorTemplate`

        `channel` string
        :   ​

        `type` [`NominalDataType`](https://dev.nominal.io/api/rest/series-metadata-service.md#nominaldatatype)
        :   ​

            Values of `NominalDataType`

            `DOUBLE`
            :   ​

            `STRING`
            :   ​

            `LOG`
            :   ​

            `INT64`
            :   ​

            `UINT64`
            :   ​

            `DOUBLE_ARRAY`
            :   ​

            `STRING_ARRAY`
            :   ​

            `STRUCT`
            :   ​

            `VIDEO`
            :   ​

            `SPATIAL`
            :   ​

    **timestream**

    Set `type` to `"timestream"`.

    `timestream` [`TimestreamLocatorTemplate`](https://dev.nominal.io/api/rest/series-metadata-service.md#timestreamlocatortemplate)
    :   ​

        Fields of `TimestreamLocatorTemplate`

        `table` string
        :   ​

        `measure` string
        :   ​

        `attribute` string
        :   ​

        `type` [`TimestreamType`](https://dev.nominal.io/api/rest/series-metadata-service.md#timestreamtype)
        :   ​

            Values of `TimestreamType`

            `DOUBLE`
            :   ​

            `STRING`
            :   ​

    **visualCrossing**

    Set `type` to `"visualCrossing"`.

    `visualCrossing` [`VisualCrossingLocatorTemplate`](https://dev.nominal.io/api/rest/series-metadata-service.md#visualcrossinglocatortemplate)
    :   ​

        Fields of `VisualCrossingLocatorTemplate`

        `field` string
        :   ​

        `endpoint` [`VisualCrossingEndpointUri`](https://dev.nominal.io/api/rest/series-metadata-service.md#visualcrossingendpointuri)
        :   Defaults to HISTORY.

            Values of `VisualCrossingEndpointUri`

            `HISTORY`
            :   ​

            `TIMELINE`
            :   ​

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

            Values of `VisualCrossingType`

            `DOUBLE`
            :   ​

            `STRING`
            :   ​

    **bigQuery**

    Set `type` to `"bigQuery"`.

    `bigQuery` [`BigQueryLocatorTemplate`](https://dev.nominal.io/api/rest/series-metadata-service.md#bigquerylocatortemplate)
    :   ​

        Fields of `BigQueryLocatorTemplate`

        `valueColumn` string
        :   ​

        `timeColumn` string
        :   ​

        `type` [`BigQueryType`](https://dev.nominal.io/api/rest/series-metadata-service.md#bigquerytype)
        :   ​

            Values of `BigQueryType`

            `DOUBLE`
            :   ​

            `STRING`
            :   ​

    **video**

    Set `type` to `"video"`.

    `video` [`VideoLocatorTemplate`](https://dev.nominal.io/api/rest/series-metadata-service.md#videolocatortemplate)
    :   ​

        Fields of `VideoLocatorTemplate`

        `channel` string
        :   ​

    **spatial**

    Set `type` to `"spatial"`.

    `spatial` [`SpatialLocatorTemplate`](https://dev.nominal.io/api/rest/series-metadata-service.md#spatiallocatortemplate)
    :   ​

        Fields of `SpatialLocatorTemplate`

        `channel` string
        :   ​

`unit` string
:   ​

`description` string
:   ​

`tags` map of `TagName` to string deprecated
:   Tags 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.

`seriesDataType` [`SeriesDataType`](https://dev.nominal.io/api/rest/series-metadata-service.md#seriesdatatype)
:   ​

    Values of `SeriesDataType`

    `DOUBLE`
    :   ​

    `STRING`
    :   ​

    `LOG`
    :   ​

    `INT`
    :   ​

    `UINT`
    :   ​

    `DOUBLE_ARRAY`
    :   ​

    `STRING_ARRAY`
    :   ​

    `STRUCT`
    :   ​

    `VIDEO`
    :   ​

    `SPATIAL`
    :   ​

`channelKind` [`ChannelKind`](https://dev.nominal.io/api/rest/series-metadata-service.md#channelkind)
:   Classifies how the channel is used. Omitted values should be treated as STANDARD.

    Values of `ChannelKind`

    `STANDARD`
    :   ​

    `COMMAND`
    :   ​

Request

**curl**

```shell
curl "https://api.gov.nominal.io/api/timeseries/archetype/v1/series-archetype/<rid>" \
  -H "Authorization: Bearer <api key>"
```

**requests**

```python
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())
```

**httpx**

```python
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())
```

**aiohttp**

```python
import asyncio

import aiohttp

async def main() -> None:
    async with aiohttp.ClientSession() as session:
        async with session.get(
            "https://api.gov.nominal.io/api/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`

```json
{
  "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

`rid` string (RID) required
:   ​

Body

`unit` string deprecated
:   **Deprecated:** Deprecated. Use unitUpdate instead.

`unitUpdate` [`UnitUpdate`](https://dev.nominal.io/api/rest/series-metadata-service.md#unitupdate)
:   ​

    **unit**

    Set `type` to `"unit"`.

    `unit` string
    :   ​

    **clearUnit**

    Set `type` to `"clearUnit"`.

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

`description` string
:   ​

`channelKind` [`ChannelKind`](https://dev.nominal.io/api/rest/series-metadata-service.md#channelkind)
:   Updates the channel kind. Omitted values preserve the current setting.

    Values of `ChannelKind`

    `STANDARD`
    :   ​

    `COMMAND`
    :   ​

Response

`rid` string (RID)
:   ​

`channel` string
:   ​

`dataSourceRid` string (RID)
:   ​

`locator` [`LocatorTemplate`](https://dev.nominal.io/api/rest/series-metadata-service.md#locatortemplate)
:   ​

    **timescaleDb**

    Set `type` to `"timescaleDb"`.

    `timescaleDb` [`TimescaleDbLocatorTemplate`](https://dev.nominal.io/api/rest/series-metadata-service.md#timescaledblocatortemplate)
    :   ​

        Fields of `TimescaleDbLocatorTemplate`

        `table` string
        :   ​

        `schema` string
        :   ​

        `column` string
        :   ​

        `timeColumn` string
        :   ​

        `type` [`TimescaleType`](https://dev.nominal.io/api/rest/series-metadata-service.md#timescaletype)
        :   ​

            Values of `TimescaleType`

            `BOOLEAN`
            :   ​

            `DOUBLE`
            :   ​

            `STRING`
            :   ​

    **influx**

    Set `type` to `"influx"`.

    `influx` [`Influx2LocatorTemplate`](https://dev.nominal.io/api/rest/series-metadata-service.md#influx2locatortemplate)
    :   ​

        Fields of `Influx2LocatorTemplate`

        `bucket` string
        :   ​

        `measurement` string
        :   ​

        `valueColumn` string
        :   If omitted, defaults to `_value`. Can be used to extract tag values.

        `field` string
        :   ​

        `type` [`InfluxType`](https://dev.nominal.io/api/rest/series-metadata-service.md#influxtype)
        :   ​

            Values of `InfluxType`

            `BOOLEAN`
            :   ​

            `NUMERIC`
            :   ​

            `STRING`
            :   ​

    **influx1**

    Set `type` to `"influx1"`.

    `influx1` [`Influx1LocatorTemplate`](https://dev.nominal.io/api/rest/series-metadata-service.md#influx1locatortemplate)
    :   ​

        Fields of `Influx1LocatorTemplate`

        `database` string
        :   ​

        `measurement` string
        :   ​

        `field` string
        :   ​

        `type` [`InfluxType`](https://dev.nominal.io/api/rest/series-metadata-service.md#influxtype)
        :   ​

    **nominal**

    Set `type` to `"nominal"`.

    `nominal` [`NominalLocatorTemplate`](https://dev.nominal.io/api/rest/series-metadata-service.md#nominallocatortemplate)
    :   ​

        Fields of `NominalLocatorTemplate`

        `channel` string
        :   ​

        `type` [`NominalDataType`](https://dev.nominal.io/api/rest/series-metadata-service.md#nominaldatatype)
        :   ​

            Values of `NominalDataType`

            `DOUBLE`
            :   ​

            `STRING`
            :   ​

            `LOG`
            :   ​

            `INT64`
            :   ​

            `UINT64`
            :   ​

            `DOUBLE_ARRAY`
            :   ​

            `STRING_ARRAY`
            :   ​

            `STRUCT`
            :   ​

            `VIDEO`
            :   ​

            `SPATIAL`
            :   ​

    **timestream**

    Set `type` to `"timestream"`.

    `timestream` [`TimestreamLocatorTemplate`](https://dev.nominal.io/api/rest/series-metadata-service.md#timestreamlocatortemplate)
    :   ​

        Fields of `TimestreamLocatorTemplate`

        `table` string
        :   ​

        `measure` string
        :   ​

        `attribute` string
        :   ​

        `type` [`TimestreamType`](https://dev.nominal.io/api/rest/series-metadata-service.md#timestreamtype)
        :   ​

            Values of `TimestreamType`

            `DOUBLE`
            :   ​

            `STRING`
            :   ​

    **visualCrossing**

    Set `type` to `"visualCrossing"`.

    `visualCrossing` [`VisualCrossingLocatorTemplate`](https://dev.nominal.io/api/rest/series-metadata-service.md#visualcrossinglocatortemplate)
    :   ​

        Fields of `VisualCrossingLocatorTemplate`

        `field` string
        :   ​

        `endpoint` [`VisualCrossingEndpointUri`](https://dev.nominal.io/api/rest/series-metadata-service.md#visualcrossingendpointuri)
        :   Defaults to HISTORY.

            Values of `VisualCrossingEndpointUri`

            `HISTORY`
            :   ​

            `TIMELINE`
            :   ​

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

            Values of `VisualCrossingType`

            `DOUBLE`
            :   ​

            `STRING`
            :   ​

    **bigQuery**

    Set `type` to `"bigQuery"`.

    `bigQuery` [`BigQueryLocatorTemplate`](https://dev.nominal.io/api/rest/series-metadata-service.md#bigquerylocatortemplate)
    :   ​

        Fields of `BigQueryLocatorTemplate`

        `valueColumn` string
        :   ​

        `timeColumn` string
        :   ​

        `type` [`BigQueryType`](https://dev.nominal.io/api/rest/series-metadata-service.md#bigquerytype)
        :   ​

            Values of `BigQueryType`

            `DOUBLE`
            :   ​

            `STRING`
            :   ​

    **video**

    Set `type` to `"video"`.

    `video` [`VideoLocatorTemplate`](https://dev.nominal.io/api/rest/series-metadata-service.md#videolocatortemplate)
    :   ​

        Fields of `VideoLocatorTemplate`

        `channel` string
        :   ​

    **spatial**

    Set `type` to `"spatial"`.

    `spatial` [`SpatialLocatorTemplate`](https://dev.nominal.io/api/rest/series-metadata-service.md#spatiallocatortemplate)
    :   ​

        Fields of `SpatialLocatorTemplate`

        `channel` string
        :   ​

`unit` string
:   ​

`description` string
:   ​

`tags` map of `TagName` to string deprecated
:   Tags 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.

`seriesDataType` [`SeriesDataType`](https://dev.nominal.io/api/rest/series-metadata-service.md#seriesdatatype)
:   ​

    Values of `SeriesDataType`

    `DOUBLE`
    :   ​

    `STRING`
    :   ​

    `LOG`
    :   ​

    `INT`
    :   ​

    `UINT`
    :   ​

    `DOUBLE_ARRAY`
    :   ​

    `STRING_ARRAY`
    :   ​

    `STRUCT`
    :   ​

    `VIDEO`
    :   ​

    `SPATIAL`
    :   ​

`channelKind` [`ChannelKind`](https://dev.nominal.io/api/rest/series-metadata-service.md#channelkind)
:   Classifies how the channel is used. Omitted values should be treated as STANDARD.

    Values of `ChannelKind`

    `STANDARD`
    :   ​

    `COMMAND`
    :   ​

Request

**curl**

```shell
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"
}'
```

**requests**

```python
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())
```

**httpx**

```python
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())
```

**aiohttp**

```python
import asyncio

import aiohttp

async def main() -> None:
    async with aiohttp.ClientSession() as session:
        async with session.post(
            "https://api.gov.nominal.io/api/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`

```json
{
  "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

`dataSourceRid` string (RID) required
:   Identifies the data source whose channel metadata should be changed.

`channel` string required
:   Identifies the channel name within the data source.

`expectedCurrentType` [`NominalDataType`](https://dev.nominal.io/api/rest/series-metadata-service.md#nominaldatatype) required
:   Provides the exact nominal type the caller expects to be stored in the locator before the change.

    Values of `NominalDataType`

    `DOUBLE`
    :   ​

    `STRING`
    :   ​

    `LOG`
    :   ​

    `INT64`
    :   ​

    `UINT64`
    :   ​

    `DOUBLE_ARRAY`
    :   ​

    `STRING_ARRAY`
    :   ​

    `STRUCT`
    :   ​

    `VIDEO`
    :   ​

    `SPATIAL`
    :   ​

`newType` [`NominalDataType`](https://dev.nominal.io/api/rest/series-metadata-service.md#nominaldatatype) required
:   Provides the exact nominal type future series resolution should use.

Response

`seriesMetadataRid` string (RID)
:   Identifies the series metadata row being changed.

`oldType` [`NominalDataType`](https://dev.nominal.io/api/rest/series-metadata-service.md#nominaldatatype)
:   Reports the exact nominal type read from the existing locator.

    Values of `NominalDataType`

    `DOUBLE`
    :   ​

    `STRING`
    :   ​

    `LOG`
    :   ​

    `INT64`
    :   ​

    `UINT64`
    :   ​

    `DOUBLE_ARRAY`
    :   ​

    `STRING_ARRAY`
    :   ​

    `STRUCT`
    :   ​

    `VIDEO`
    :   ​

    `SPATIAL`
    :   ​

`newType` [`NominalDataType`](https://dev.nominal.io/api/rest/series-metadata-service.md#nominaldatatype)
:   Reports the exact nominal type requested by the caller.

Request

**curl**

```shell
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"
}'
```

**requests**

```python
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())
```

**httpx**

```python
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())
```

**aiohttp**

```python
import asyncio

import aiohttp

async def main() -> None:
    async with aiohttp.ClientSession() as session:
        async with session.post(
            "https://api.gov.nominal.io/api/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`

```json
{
  "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

`requests` array of [`CreateVideoSeriesRequest`](https://dev.nominal.io/api/rest/series-metadata-service.md#createvideoseriesrequest)
:   ​

    Fields of `CreateVideoSeriesRequest`

    `datasetRid` string (RID) required
    :   ​

    `channel` string required
    :   ​

    `tags` map of `TagName` to string
    :   ​

    `timeBounds` [`TimeBounds`](https://dev.nominal.io/api/rest/series-metadata-service.md#timebounds) required
    :   ​

        Fields of `TimeBounds`

        `start` [`Timestamp`](https://dev.nominal.io/api/rest/series-metadata-service.md#timestamp) required
        :   ​

            Fields of `Timestamp`

            `seconds` integer (int64) required
            :   ​

            `nanos` integer (int64) required
            :   ​

        `end` [`Timestamp`](https://dev.nominal.io/api/rest/series-metadata-service.md#timestamp) required
        :   ​

Response

`responses` array of [`CreateVideoSeriesResponse`](https://dev.nominal.io/api/rest/series-metadata-service.md#createvideoseriesresponse)
:   ​

    Fields of `CreateVideoSeriesResponse`

    `seriesMetadataRid` string (RID)
    :   ​

    `seriesUuid` string (UUID)
    :   ​

Request

**curl**

```shell
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
        }
      }
    }
  ]
}'
```

**requests**

```python
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())
```

**httpx**

```python
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())
```

**aiohttp**

```python
import asyncio

import aiohttp

async def main() -> None:
    async with aiohttp.ClientSession() as session:
        async with session.post(
            "https://api.gov.nominal.io/api/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`

```json
{
  "responses": [
    {
      "seriesMetadataRid": "<series metadata rid>",
      "seriesUuid": "<series uuid>"
    }
  ]
}
```

## Errors

[Errors](https://dev.nominal.io/api/legacy.md#errors) shows how these errors are sent.

Each error’s `errorName` is `SeriesMetadata:` followed by its name below.

| Status | Name | Notes |
| --- | --- | --- |
| 400 | `DataSourcesNotFound` |  |
| 400 | `IncompatibleSeriesMetadataUpdate` |  |
| 400 | `InvalidDataSource` |  |
| 404 | `SeriesMetadataNotFound` | The error supports both series metadata lookup shapes. RID-based lookups populate `rid`; channel lookups populate `dataSourceRid` and `channel`. |

## Types

### BigQueryLocatorTemplate

`valueColumn` string required
:   ​

`timeColumn` string required
:   ​

`type` [`BigQueryType`](https://dev.nominal.io/api/rest/series-metadata-service.md#bigquerytype) required
:   ​

### BigQueryType

`DOUBLE`
:   ​

`STRING`
:   ​

### ChannelKind

Classifies how a channel is used. COMMAND channels accept commands through the Command Service.

`STANDARD`
:   ​

`COMMAND`
:   ​

### CreateSeriesMetadataRequest

`channel` string required
:   This name should be unique amongst SeriesMetadata within the data source. All series created from this metadata will share this name.

`dataSourceRid` string (RID) required
:   ​

`locator` [`LocatorTemplate`](https://dev.nominal.io/api/rest/series-metadata-service.md#locatortemplate) required
:   ​

`unit` string
:   ​

`description` string
:   ​

`channelKind` [`ChannelKind`](https://dev.nominal.io/api/rest/series-metadata-service.md#channelkind)
:   Classifies how the channel is used. Omitted values default to STANDARD.

`tags` map of `TagName` to string deprecated
:   Tags 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.

`datasetRid` string (RID) required
:   ​

`channel` string required
:   ​

`tags` map of `TagName` to string
:   ​

`timeBounds` [`TimeBounds`](https://dev.nominal.io/api/rest/series-metadata-service.md#timebounds) required
:   ​

### CreateVideoSeriesResponse

`seriesMetadataRid` string (RID) required
:   ​

`seriesUuid` string (UUID) required
:   ​

### Empty

An empty JSON object, `{}`.

### Influx1LocatorTemplate

`database` string required
:   ​

`measurement` string required
:   ​

`field` string required
:   ​

`type` [`InfluxType`](https://dev.nominal.io/api/rest/series-metadata-service.md#influxtype) required
:   ​

### Influx2LocatorTemplate

`bucket` string required
:   ​

`measurement` string required
:   ​

`valueColumn` string
:   If omitted, defaults to `_value`. Can be used to extract tag values.

`field` string required
:   ​

`type` [`InfluxType`](https://dev.nominal.io/api/rest/series-metadata-service.md#influxtype) required
:   ​

### InfluxType

`BOOLEAN`
:   ​

`NUMERIC`
:   ​

`STRING`
:   ​

### LocatorTemplate

Set `type` to the name of one of the other fields, and set only that field.

`timescaleDb` [`TimescaleDbLocatorTemplate`](https://dev.nominal.io/api/rest/series-metadata-service.md#timescaledblocatortemplate)
:   ​

`influx` [`Influx2LocatorTemplate`](https://dev.nominal.io/api/rest/series-metadata-service.md#influx2locatortemplate)
:   ​

`influx1` [`Influx1LocatorTemplate`](https://dev.nominal.io/api/rest/series-metadata-service.md#influx1locatortemplate)
:   ​

`nominal` [`NominalLocatorTemplate`](https://dev.nominal.io/api/rest/series-metadata-service.md#nominallocatortemplate)
:   ​

`timestream` [`TimestreamLocatorTemplate`](https://dev.nominal.io/api/rest/series-metadata-service.md#timestreamlocatortemplate)
:   ​

`visualCrossing` [`VisualCrossingLocatorTemplate`](https://dev.nominal.io/api/rest/series-metadata-service.md#visualcrossinglocatortemplate)
:   ​

`bigQuery` [`BigQueryLocatorTemplate`](https://dev.nominal.io/api/rest/series-metadata-service.md#bigquerylocatortemplate)
:   ​

`video` [`VideoLocatorTemplate`](https://dev.nominal.io/api/rest/series-metadata-service.md#videolocatortemplate)
:   ​

`spatial` [`SpatialLocatorTemplate`](https://dev.nominal.io/api/rest/series-metadata-service.md#spatiallocatortemplate)
:   ​

### NominalDataType

The data types supported by Nominal’s database.

`DOUBLE`
:   ​

`STRING`
:   ​

`LOG`
:   ​

`INT64`
:   ​

`UINT64`
:   ​

`DOUBLE_ARRAY`
:   ​

`STRING_ARRAY`
:   ​

`STRUCT`
:   ​

`VIDEO`
:   ​

`SPATIAL`
:   ​

### NominalLocatorTemplate

`channel` string required
:   ​

`type` [`NominalDataType`](https://dev.nominal.io/api/rest/series-metadata-service.md#nominaldatatype) required
:   ​

### SeriesDataType

The data types that are available for querying.

`DOUBLE`
:   ​

`STRING`
:   ​

`LOG`
:   ​

`INT`
:   ​

`UINT`
:   ​

`DOUBLE_ARRAY`
:   ​

`STRING_ARRAY`
:   ​

`STRUCT`
:   ​

`VIDEO`
:   ​

`SPATIAL`
:   ​

### SeriesMetadata

`rid` string (RID) required
:   ​

`channel` string required
:   ​

`dataSourceRid` string (RID) required
:   ​

`locator` [`LocatorTemplate`](https://dev.nominal.io/api/rest/series-metadata-service.md#locatortemplate) required
:   ​

`unit` string
:   ​

`description` string
:   ​

`tags` map of `TagName` to string deprecated
:   Tags 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.

`seriesDataType` [`SeriesDataType`](https://dev.nominal.io/api/rest/series-metadata-service.md#seriesdatatype)
:   ​

`channelKind` [`ChannelKind`](https://dev.nominal.io/api/rest/series-metadata-service.md#channelkind)
:   Classifies how the channel is used. Omitted values should be treated as STANDARD.

### SpatialLocatorTemplate

`channel` string required
:   ​

### TimeBounds

Time bounds for the video file. Used to update the series time bounds

`start` [`Timestamp`](https://dev.nominal.io/api/rest/series-metadata-service.md#timestamp) required
:   ​

`end` [`Timestamp`](https://dev.nominal.io/api/rest/series-metadata-service.md#timestamp) required
:   ​

### TimescaleDbLocatorTemplate

`table` string required
:   ​

`schema` string required
:   ​

`column` string required
:   ​

`timeColumn` string required
:   ​

`type` [`TimescaleType`](https://dev.nominal.io/api/rest/series-metadata-service.md#timescaletype) required
:   ​

### 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.

`seconds` integer (int64) required
:   ​

`nanos` integer (int64) required
:   ​

### TimestreamLocatorTemplate

`table` string required
:   ​

`measure` string required
:   ​

`attribute` string
:   ​

`type` [`TimestreamType`](https://dev.nominal.io/api/rest/series-metadata-service.md#timestreamtype) required
:   ​

### 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.

`unit` string
:   ​

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

### VideoLocatorTemplate

`channel` string required
:   ​

### VisualCrossingEndpointUri

`HISTORY`
:   ​

`TIMELINE`
:   ​

### VisualCrossingLocatorTemplate

`field` string required
:   ​

`endpoint` [`VisualCrossingEndpointUri`](https://dev.nominal.io/api/rest/series-metadata-service.md#visualcrossingendpointuri)
:   Defaults to HISTORY.

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

### VisualCrossingType

`DOUBLE`
:   ​

`STRING`
:   ​

Page design based on [Scalar](https://scalar.com), MIT License.
