Create sensor deployments in the telemetry API
telem_create_sensor_deployments.RdCreate sensor deployments in the telemetry API
Arguments
- data
A tibble with columns:
sensor_id,individual_id. Optional columns:device_id,deployment_id,start_at,end_at,expected_end_at,analysis_unit_id,management_unit_id,latitude,longitude,device_key,deployment_key,metadata.- dry_run
Logical. If
TRUE, prints the request without sending it.- verbosity
Integer. How much information to print (0 = silent, 1 = headers, 2 = headers + body, 3 = full).
Details
A sensor is a device, not a separate kind of record:
SensorDeployment::sensor() is belongsTo(Device::class, 'sensor_id').
So a drop-off unit, a mortality beacon or an ear tag is created through
telem_create_devices() with its own serial number, and this endpoint
records where it was fitted.
The three ids answer different questions and only the first two are required:
sensor_id— the unit itself.individual_id— the animal carrying it.device_id— the collar it is attached to, when it is attached to one rather than fitted directly to the animal.deployment_id— the collar deployment it belongs to, which is what ties a drop-off to the period it ended.
A drop-off date is not recorded here. That is was_dropped_off_at on the
deployment (telem_create_deployments()), because it describes when the
deployment ended rather than anything about the unit.