How Cloneable models jobs, configurations, EAV data objects, base64 query parameters, photos, and soft archives.
Jobs, configurations, and templates
Configuration (configuration_id): Shared setup defining which templates, picklists, measurement units, and export modules a set of jobs uses.
Job (id): One field work package referencing a configuration_id.
Template (object_id): Schema for one record type (for example Pole, Span, Midspan, Guy Anchor). Always reference templates by their object_id UUID, not legacy row IDs.
Data Object (id): An individual pole, span, midspan, or point record. Objects belong to a job via their job_id field (a Cloneable job UUID).
Configuration safety: When updating a configuration via PUT /pole-inspection/configurations/{id}, always read-modify-write the full config_data object and preserve unknown keys verbatim. Collection keys are read by the iOS field app and must remain strictly additive.
Data objects (EAV model)
Data objects store custom attributes as entity-attribute-value (EAV) fields:
Field values are stored as strings (stored_value). JSON-typed fields (such as measurement_data) can occasionally be double-encoded — parse JSON tolerantly and never schema-strip unknown keys when writing back.
All stored lengths, heights, and clearances are in meters.
Pole heights live under measurement_data.pole_information.height / manualHeight / calculatedHeight (not camera imageHeight).
On query endpoints such as GET /data-object-sync/filtered-data-objects, object and array query parameters (filters, sorting) must be encoded as base64 JSON, not raw JSON text:
file.url is an R2 storage key, never a usable download URL. Always call GET /file/{id}/download-url to obtain a signed one-hour URL.
saved_to_cloud: false means the field device created the photo record offline and has not finished uploading the image bytes yet.
Overview photos on a pole are referenced as bare file UUIDs in measurement_data.images[].image.
Soft archiving & history
Cloneable does not hard-delete field work:
Jobs & templates set archived_at.
Data objects set meta_data.archived_at and clear their live field rows — data is not lost. Every field write remains in GET /data-object/{id}/history, and photos are always retained. Reconstruct an archived object’s last values from the newest history row per field key.