Direct Nominal channel writer#
Writes data points directly to Nominal’s managed database offering.
OpenAPI file: DirectNominalChannelWriterService.json
Endpoints#
Write batches#
POST /storage/direct-writer/v1
Synchronously writes batches of records to a Nominal data source. This endpoint bypasses the Channel Writer service entirely, and should only be used if the implications are well understood.
If you call this endpoint, writes will go directly into Nominal DB and will not be placed in Nominal’s durable queue. This results in lower latency, but also consequently lower durability.
Body
batchesarray ofRecordsBatch
Fields of
RecordsBatchchannelstring required
tagsmap ofTagNameto string
pointsPointsrequired
Set
typeto"string".stringarray ofStringPoint
Fields of
StringPointtimestampTimestamprequired
Fields of
Timestampsecondsinteger (int64) required
nanosinteger (int64) required
valuestring required
Set
typeto"double".doublearray ofDoublePoint
Fields of
DoublePointtimestampTimestamprequired
valuenumber required
Set
typeto"log".logarray ofLogPoint
Set
typeto"int".Set
typeto"uint64".uint64array ofUint64Point
Fields of
Uint64PointtimestampTimestamprequired
valueinteger (int64) required
Set
typeto"array".arrayArrayPoints
Set
typeto"double".doublearray ofDoubleArrayPoint
Fields of
DoubleArrayPointtimestampTimestamprequired
valuearray of number
Set
typeto"string".stringarray ofStringArrayPoint
Fields of
StringArrayPointtimestampTimestamprequired
valuearray of string
Set
typeto"struct".structarray ofStructPoint
Fields of
StructPointtimestampTimestamprequired
jsonStringstring required
dataSourceRidstring (RID) required
asynchronousInsertboolean deprecatedIs always true - setting this to false will do nothing. Deprecated: Should not be used.
Response
No content (HTTP 204).
Request
curl -X POST "https://api.gov.nominal.io/api/storage/direct-writer/v1" \
-H "Authorization: Bearer <api key>" \
-H "Content-Type: application/json" \
--data '{
"dataSourceRid": "<nominal data source or dataset rid>"
}'
import requests
response = requests.post(
"https://api.gov.nominal.io/api/storage/direct-writer/v1",
headers={"Authorization": "Bearer <api key>"},
json={"dataSourceRid": "<nominal data source or dataset rid>"},
)
response.raise_for_status()
import httpx
response = httpx.post(
"https://api.gov.nominal.io/api/storage/direct-writer/v1",
headers={"Authorization": "Bearer <api key>"},
json={"dataSourceRid": "<nominal data source or dataset rid>"},
)
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/storage/direct-writer/v1",
headers={"Authorization": "Bearer <api key>"},
json={"dataSourceRid": "<nominal data source or dataset rid>"},
) as response:
response.raise_for_status()
asyncio.run(main())
Response: 204
No content.
Errors#
Errors shows how these errors are sent.
Each error’s errorName is NominalChannelWriter: followed by its name below.
Status |
Name |
Notes |
|---|---|---|
400 |
|
Array size exceeds maximum allowed length. |
400 |
|
Found two different data types for the same series in the request. |
400 |
|
Found two different units for the same channel in the request. |
400 |
|
Multiple ingested columns resolve to the same channel name after applying channelPrefix and channelNameOverrides. Resolved channel names must be unique within a single ingest. |
400 |
|
The channel name is invalid. |
400 |
|
The nominal data source or dataset provided is invalid. |
400 |
|
Ingested Struct is not a valid JSON struct |
400 |
|
|
400 |
|
|
400 |
|
Columnar streaming request contains different numbers of timestamps and values |
400 |
|
The request uses a tag name that is reserved for internal use. Remove the tag from the request. |
400 |
|
Unsupported dataset for streaming. |
400 |
|
The request sets a streaming session rid, which is assigned by Nominal and cannot be provided by the client. |
400 |
|
Struct value exceeds maximum allowed UTF-8 byte size. |
400 |
|
The request specifies more channel name overrides than the maximum allowed. |
400 |
|
The dataset has exceeded the maximum number of distinct active session sources allowed per hour. This is a best-effort limit enforced per channel-writer instance. |
413 |
|
The size of the points being written exceeds the maximum allowed size. |
Types#
ArrayPoints#
Array points for the internal API for directly writing points which supports all points types.
Set type to the name of one of the other fields, and set only that field.
doublearray ofDoubleArrayPoint
stringarray ofStringArrayPoint
DoubleArrayPoint#
timestampTimestamprequired
valuearray of number
DoublePoint#
timestampTimestamprequired
valuenumber required
IntPoint#
timestampTimestamprequired
valueinteger required
LogPoint#
LogValue#
messagestring required
argsmap of string to string
Points#
Points for internal API for directly writing points which supports all points types. Logs specifically are supported externally via a separate endpoint.
Set type to the name of one of the other fields, and set only that field.
stringarray ofStringPoint
doublearray ofDoublePoint
logarray ofLogPoint
intarray ofIntPoint
uint64array ofUint64Point
arrayArrayPoints
structarray ofStructPoint
RecordsBatch#
channelstring required
tagsmap ofTagNameto string
pointsPointsrequired
StringArrayPoint#
timestampTimestamprequired
valuearray of string
StringPoint#
timestampTimestamprequired
valuestring required
StructPoint#
timestampTimestamprequired
jsonStringstring required
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
Uint64Point#
timestampTimestamprequired
valueinteger (int64) required
Page design based on Scalar, MIT License.