Ingest service#
Starts V2 ingest jobs and returns the RID used to track asynchronous progress.
OpenAPI file: nominal.ingest.v2.json
Endpoints#
Ingest#
POST /ingest/v2
Submit a V2 ingest job.
Body
datasetRidstring requiredExisting dataset that all items in this job will ingest into.
runsToExpandarray of string
itemsarray ofIngestItemUnits of ingest work to submit under one ingest job RID. At least 1 item.
Fields of
IngestItemtagsmap of string to stringTags applied only to this ingest item. These override request-level tags on conflict.
- one of 7 fields required
fileFileIngestItem
Fields of
FileIngestItemsourceIngestSourcerequired
Fields of
IngestSource- one of
s3,gcs,presignedFile,fileStorerequired
s3S3IngestSource
Fields of
S3IngestSourcepathstring required
gcsGcsIngestSource
Fields of
GcsIngestSourcepathstring required
presignedFilePresignedFileIngestSource
Fields of
PresignedFileIngestSourceurlstring required
fileStoreFileStoreIngestSourceInitially supported for direct file ingest only.
Fields of
FileStoreIngestSourcefileRevisionRidstringResolved File Store content target to ingest.
- one of
ingestFileIngestOptionsrequired
Fields of
FileIngestOptionstimestampMetadataingest.v2.TimestampMetadatarequired
Fields of
ingest.v2.TimestampMetadatacolumnstring required
typeTimestampTyperequired
Fields of
TimestampType- one of
relative,absoluterequired
relativeRelativeTimestamp
Fields of
RelativeTimestamptimeUnitstringUnit in which relative offsets are expressed. Aliases the classic REST TimeUnit alias.
offsetstring (date-time)Starting timestamp to use when indexing the file.
absoluteAbsoluteTimestamp
Fields of
AbsoluteTimestamp- one of
iso8601,epochOfTimeUnit,customFormatrequired
iso8601Iso8601Timestamp
Request
curl -X POST "https://api.gov.nominal.io/api/ingest/v2" \ -H "Authorization: Bearer <api key>" \ -H "Content-Type: application/json" \ --data '{ "datasetRid": "<dataset rid>" }'
import requests response = requests.post( "https://api.gov.nominal.io/api/ingest/v2", headers={"Authorization": "Bearer <api key>"}, json={"datasetRid": "<dataset rid>"}, ) response.raise_for_status() print(response.json())
import httpx response = httpx.post( "https://api.gov.nominal.io/api/ingest/v2", headers={"Authorization": "Bearer <api key>"}, json={"datasetRid": "<dataset 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/ingest/v2", headers={"Authorization": "Bearer <api key>"}, json={"datasetRid": "<dataset rid>"}, ) as response: response.raise_for_status() print(await response.json()) asyncio.run(main())
Response:
200{ "ingestJobRid": "<ingest job rid>" }
Types#
AbsoluteTimestamp#
Absolute timestamp parser variants.
Set exactly one of the fields below.
- one of
iso8601,epochOfTimeUnit,customFormatrequired
AvroIngestOptions#
Avro ingest options.
An empty JSON object,
{}.ContainerizedIngestItem#
One containerized extractor invocation. Input sources are bound to environment variables.
extractorRidstring required
sourcesmap of string toIngestSource
argumentsmap of string to string
timestampMetadataingest.v2.TimestampMetadata
CsvFormat#
Set exactly one of the fields below.
- one of
wide,longrequired
wideWideFormat
longLongFormat
CsvIngestOptions#
CSV ingest options.
data_row must be greater than header_row. units_row must not be header_row. units_row must be less than data_row, which defaults to header_row + 1.
formatCsvFormatrequired
headerRowintegerOne-based record number of the header, defaulting to 1; must be positive. Records are counted from 1, a multiline record counts as one, and blank lines are ignored. Greater than 0.
dataRowintegerOne-based record number of the first data record, defaulting to header_row + 1; must be greater than header_row. Records that fall between header_row and data_row are skipped. Greater than 0.
unitsRowintegerOne-based record number holding each column’s unit; must not be header_row and must precede data_row, so reading a units row requires setting data_row past it. Cells match columns by position, so the record needs a placeholder cell for the timestamp column, and a column whose cell is empty gets no unit. Absent means no units row. FileIngestOptions.units overrides a unit read here, per channel. Greater than 0.
CustomTimestamp#
Absolute timestamps parsed with a user-supplied format string.
formatstringThe format string should be in the format of the
DateTimeFormatterclass in Java.defaultYearintegerDefault year is accepted as an optional field for cases like IRIG time format. Will be overridden by year in time format.
defaultDayOfYearintegerDefault day of year is accepted as an optional field for cases like IRIG time format. Will be overridden by day of year in time format. From 1 to 366.
DataflashIngestItem#
One ArduPilot dataflash log conversion. Worker-mcap converts the log into an avro stream that is then ingested into the dataset.
sourceIngestSourcerequired
EpochTimestamp#
Absolute timestamps expressed as an integer count of some time unit since the Unix epoch.
timeUnitstringUnit in which epoch values are expressed (e.g. SECONDS, MILLISECONDS).
FileIngestItem#
Direct file ingest work.
sourceIngestSourcerequired
ingestFileIngestOptionsrequired
FileIngestOptions#
Direct file ingest mode.
Set exactly one of
csv,parquet,avro.timestampMetadataingest.v2.TimestampMetadatarequired
unitsmap of string to stringUnit per channel. Overrides the unit read from CsvIngestOptions.units_row for the channels named here; channels absent from this map keep their units-row unit.
channelPrefixstring
channelNameOverridesmap of string to stringRenames individual columns to explicit channel names. Composes with channel_prefix: final name = channel_prefix + channel_name_overrides.getOrDefault(column, column). At most 1000 entries may be provided. Resolved channel names must be unique across columns; renaming a column onto another column’s name fails the ingest.
- one of
csv,parquet,avrorequired
FileStoreIngestSource#
File Store source. The resolved file RID supplies provider-specific pinning and dereference metadata.
fileRevisionRidstringResolved File Store content target to ingest.
GcsIngestSource#
pathstring required
ingest.v2.TimestampMetadata#
Timestamp metadata for ingest items that derive timestamps from an input column or field.
columnstring required
typeTimestampTyperequired
IngestItem#
One unit of ingest work submitted under a single ingest job.
Set exactly one of
file,log,containerized,video,pointCloud,mcap,dataflash.tagsmap of string to stringTags applied only to this ingest item. These override request-level tags on conflict.
- one of 7 fields required
fileFileIngestItem
logLogIngestItem
containerizedContainerizedIngestItem
videoVideoIngestItem
pointCloudPointCloudIngestItem
mcapMcapIngestItem
dataflashDataflashIngestItem
IngestSource#
Source file location.
Set exactly one of the fields below.
- one of
s3,gcs,presignedFile,fileStorerequired
s3S3IngestSource
gcsGcsIngestSource
presignedFilePresignedFileIngestSource
fileStoreFileStoreIngestSourceInitially supported for direct file ingest only.
Iso8601Timestamp#
Absolute timestamps serialized in ISO-8601 form. No additional parser configuration is needed.
An empty JSON object,
{}.LogIngestItem#
Single-channel log or journal ingest work.
sourceIngestSourcerequired
channelstring
timestampMetadataingest.v2.TimestampMetadata
messageFieldstringJSON field whose value becomes the log message. Defaults to the journald MESSAGE field.
LongFormat#
Long format: each row or record contains one channel, timestamp, and value sample.
channelColumnstringDefaults to “channel”.
valueColumnstringDefaults to “value”.
tagsColumnstringDefaults to “tags”.
McapChannelLocator#
Locates the video’s channel within an mcap file. Topics are not guaranteed unique, so an mcap file with duplicate topics must be located by id.
Set exactly one of the fields below.
- one of
topic,idrequired
topicstring
idinteger
McapChannelSelection#
Selects mcap channels by topic name. All channels are ingested when neither list is set.
Set at most one of the fields below.
- one of
includeTopics,excludeTopics
includeTopicsMcapTopicNames
excludeTopicsMcapTopicNames
McapIngestItem#
One mcap file conversion. Worker-mcap converts the file’s protobuf channels into an avro stream that is then ingested into the dataset.
sourceIngestSourcerequired
channelsMcapChannelSelectionWhich mcap channels to ingest, selected by topic name. All channels when unset.
ignoreInvalidTopicsbooleanSkip topics whose schemas cannot be decoded instead of failing the conversion.
McapTimestampManifest#
Frame timestamps are embedded in the mcap file that carries the video frames, rather than supplied as a sidecar manifest.
channelLocatorMcapChannelLocatorrequired
McapTopicNames#
topicsarray of string
NoTimestampManifest#
startingTimestampstring (date-time) required
scaleParameterScaleParameter
ParquetFormat#
Set exactly one of the fields below.
- one of
wide,longrequired
wideWideFormat
longLongFormat
ParquetIngestOptions#
Parquet ingest options.
formatParquetFormatrequired
isArchiveboolean
PointCloudIngestItem#
Dataset-backed point cloud ingest work.
sourceIngestSourcerequired
ingestPointCloudIngestOptionsrequired
PointCloudIngestOptions#
sensorMetadataPointCloudSensorMetadata
channelstring required
PointCloudSensorMetadata#
Placeholder for point-cloud sensor metadata until the spatial metadata proto is promoted.
propertiesmap of string to string
PresignedFileIngestSource#
urlstring required
RelativeTimestamp#
Relative timestamp parser: interprets each row’s timestamp as an offset from a fixed origin.
timeUnitstringUnit in which relative offsets are expressed. Aliases the classic REST TimeUnit alias.
offsetstring (date-time)Starting timestamp to use when indexing the file.
S3IngestSource#
pathstring required
ScaleParameter#
Set exactly one of the fields below.
- one of
trueFrameRate,endingTimestamp,scaleFactorrequired
trueFrameRatenumber
endingTimestampstring (date-time)
scaleFactornumber
TimestampManifestFiles#
Sidecar manifest files whose per-frame timestamps are concatenated in list order. Used when a video’s frame timestamps are recorded across several files.
sourcesarray ofIngestSourceAt least 1 item.
TimestampType#
Selects between relative-offset and absolute-timestamp parsing strategies.
Set exactly one of the fields below.
- one of
relative,absoluterequired
relativeRelativeTimestamp
absoluteAbsoluteTimestamp
VideoIngestItem#
Dataset-file-backed video ingest work.
sourceIngestSourcerequired
ingestVideoIngestOptionsrequired
additionalSourcesarray ofIngestSourceVideos appended in order after
source, ingested as one continuous recording on the channel. Each becomes its own dataset file. The first file starts at the no-manifest starting timestamp and each later file starts where the previous one ends. Requires a no_manifest timestamp manifest and sources other than File Store; at most 99, so 100 files in all. At most 99 items.
VideoIngestOptions#
timestampManifestVideoTimestampManifestrequired
channelstring required
overwriteSegmentsboolean
VideoTimestampManifest#
Set exactly one of the fields below.
- one of
noManifest,timestampManifestFiles,mcaprequired
noManifestNoTimestampManifest
timestampManifestFilesTimestampManifestFiles
mcapMcapTimestampManifest
WideFormat#
Wide format: each row or record contains one timestamp and many channels as columns.
tagColumnsmap of string to string
excludeColumnsarray of string
Page design based on Scalar, MIT License.
- one of
- one of