ingest
integrate
robocrops

Ingest external sensor data.Supports multiple events (100 max) except for manual input event creation.

Authentication required for this operation.<br />A maximum of 100 events are allowed per call.<br /><br /><strong>Event failure codes:</strong> <p><strong>1</strong>: <em>Import check does not exist.</em></p> <p><strong>2</strong>: <em>Import check is currently disabled. The import check must be enabled in order to receive data.</em></p> <p><strong>3</strong>: <em>Sensor type for import check does not exist.</em></p> <p><strong>4</strong>: <em>Status field should contain one of the values: "ok" or "fail" .</em></p> <p><strong>5</strong>: <em>Timestamp field should contain a valid ISO 8601 DateTime format value with an explicitly set timezone value (e.g. 2017-01-17T19:23:02+06:45, 2017-01-17T19:23:02Z).</em></p> <p><strong>6</strong>: <em>Timestamp must be after 2015-01-01.</em></p> <p><strong>8</strong>: <em>The import check does not belong to the organization.</em></p> <p><strong>9</strong>: <em>Sensor type is not external.</em></p> <p><strong>10</strong>: <em>Sensor fields or the data types of the event are invalid (not matching the ones defined in sensor type table).</em></p> <p><strong>11</strong>: <em>Event could not be added to database.</em></p> <p><strong>12</strong>: <em>Event could not be added to notification system (notifications will not run for this event).</em></p> <p><strong>14</strong>: <em>Imported string value is too long.</em></p> <p><strong>15</strong>: <em>Sensor field defined in unit override is invalid.</em></p> <p><strong>16</strong>: <em>Unit defined for a sensor field is invalid.</em></p> <p><strong>17</strong>: <em>Collection not found</em></p> <p><strong>18</strong>: <em>Failed to create new manual input event.</em></p>

post/ingest/organization/{organizationId}

Request

  • Base URL: https://api.30mhz.com/api
  • URL: https://api.30mhz.com/api/ingest/organization/{organizationId}
  • Auth: API key in header Authorization

Path parameters

organizationIdstring required

Request body

checkIdstring

Id of the check to import an event for.

collectionIdstring

Optional collection id of the event.

dataobject required

Data as a map of sensor fields to their corresponding value, e.g. {'temperature': 21.5}.

errorstring

Optional error for when status is 'fail'.

statusstring

Optional 'ok' or 'fail' values representing the event success status.

timestampstring required

ISO 8601 DateTime format value with an explicitly set timezone value * (e.g. 2017-01-17T19:23:02+06:45, 2017-01-17T19:23:02Z)

unitsOverrideobject

A map that defines unitId used in data values for each sensor field, e.g. { 'radiation': 'umol_m2_s1' }. If not defined, value is assumed to be in the metric's default unit.

updateDataboolean

Whether to update an existing event at the given timestamp for the given checkId or to create a new one. Default is false, so if not set, a new event will be created. Multiple events for the same checkId at the same timestamp are aggregated when they are retrieved.

Response

Import checks events processed.

failedEventsNointeger

Number of failed ingests in the batch.

ingestedDocIdstring

Id of the created manual input event if any. It is always one single id since multiple events creation is not supported.

okEventsNointeger

Number of successful ingests in the batch.

Changes

No recorded changes to this operation across all 1 revision of this API.