List of Events

About

This section describes all types of events generated by Leaf and their respective formats. The types of events are grouped by the services that produce it. Below is a summary:

ServiceAvailable Events
Alert EventsWebhook registered
Credentials AlertsCredentials missing permission, credentials unauthenticated
Field EventsNew field, Field updated, New Merged Field, Merged field updated
Field Boundary EventsField boundary created, field boundary updated
Manual File Upload EventsBatch Upload Processing Finished, uploaded file processing finished, uploaded file processing failed
Machine File Conversion EventsProvider file processing finished, provider file processing failed
Operation EventsMerged file processing finished, merged file processing failed, automerged file processing finished, automerged file processing failed, operation created, operation updated, operation processing finished.
Crop Monitoring EventsNew satellite image, Satellite Subscription Failed
Irrigation EventsNew Irrigation activity, New Field Irrigation activity
Assets (Beta) EventsNew machine, deleted machine, updated machine, new implement, updated implement

Alert Events

Webhook registered

When a new webhook is registered you will receive a one time success message in the below format:

{
"message": "confirmation of webhook upon registration"
}

Credentials Alerts

Credentials Missing Permission

Event for when the provided credentials don't have enough permissions to do the actions you are trying to.

Alerts for this event are in the following format:

{
"credential": "the client identification",
"provider": "the provider from the credential",
"credentialId": "the credential id",
"message": "message from the alert",
"status": "the new status of the credential",
"type": "credentialsLimitedPermission",
"timestamp": "yyyy-MM-dd'T'HH:mm:ss.SSSSSS'Z'"
}

Credentials Unauthenticated

Event for when the credentials are no longer valid.

Alerts for this event are in the following format:

{
"credential": "the client identification",
"provider": "the provider from the credential",
"credentialId": "the credential id",
"message": "message from the alert",
"status": "the new status of the credential",
"type": "credentialsUnauthenticated",
"timestamp": "yyyy-MM-dd'T'HH:mm:ss.SSSSSS'Z'"
}

Field Events

New Field

Event for when a new field is created either in a connected provider account or directly within Leaf.

Alerts for this event are in the following format:

{
"source": "SYNC",
"leafUserId": "the id of the file owner",
"fieldId": "the id of the created field",
"timestamp": "yyyy-MM-dd'T'HH:mm:ss.SSSSSS'Z'",
"type": "fieldCreated"
}

Field Updated

Event triggered when a field is updated.

Alerts for this event are in the following format:

{
"source": "SYNC",
"leafUserId": "the id of the file owner",
"fieldId": "the id of the updated field",
"timestamp": "yyyy-MM-dd'T'HH:mm:ss.SSSSSS'Z'",
"type": "fieldUpdated"
}

New Merged Field

Event for when a new merged field is created. The creation of a merged field depends of the fieldsAutoSync and fieldsMergeIntersection configurations.

Alerts for this event are in the following format:

{
"source": "REST",
"leafUserId": "the id of the file owner",
"fieldId": "the id of the created field",
"timestamp": "yyyy-MM-dd'T'HH:mm:ss.SSSSSS'Z'",
"type": "mergedFieldCreated"
}

Merged Field updated

Event for when a merged field is updated due to the geometry update of one of the fields used to create the merged field.

Alerts for this event are in the following format:

{
"source": "REST",
"leafUserId": "the id of the file owner",
"fieldId": "the id of the created field",
"timestamp": "yyyy-MM-dd'T'HH:mm:ss.SSSSSS'Z'",
"type": "mergedFieldUpdated"
}

Field Boundary Events

Field Boundary Created

Event for when a fieldBoundary is created.

Alerts for this event are in the following format:

{
"boundaryId": "the id of the created field boundary",
"leafUserId": "the id of the file owner",
"fieldId": "the field related to the created field boundary",
"type": "fieldBoundaryCreated",
"timestamp": "yyyy-MM-dd'T'HH:mm:ss.SSSSSS'Z'"
}

Field Boundary Updated

Event for when a fieldBoundary is updated.

Alerts for this event are in the following format:

{
"boundaryId": "the id of the updated field boundary",
"leafUserId": "the id of the file owner",
"fieldId": "the field related to the updated field boundary",
"type": "fieldBoundaryUpdated",
"timestamp": "yyyy-MM-dd'T'HH:mm:ss.SSSSSS'Z'"
}

Manual File Upload Events

Batch Upload Processing Finished

Event triggered when all machine files identified in the batch file have been processed (converted or failed). The files generated by the conversion will be listed in the batch or batch status endpoints using the batchId from the alert.

Alerts for this event are in the following format:

{
"batchId": "the id of the batchId",
"leafUserId": "the id of the file owner",
"timestamp": "yyyy-MM-dd'T'HH:mm:ss.SSSSSS'Z'",
"type": "batchUploadProcessingFinished"
}

Uploaded File Processing Finished

Event for when all steps of the processing of a machine operations file that was uploaded to Leaf are finished. This event can be useful to trigger a procedure that fetches the file from the API. This event can be used to activate a procedure that fetches the file from the api, since processing the file may take some time.

Alerts for this event are in the following format:

{
"fileId": "the id of the uploaded file",
"leafUserId": "the id of the file owner",
"timestamp": "yyyy-MM-dd'T'HH:mm:ss.SSSSSS'Z'",
"type": "uploadedFileProcessingFinished"
}

Uploaded File Processing Failed

Event for when the processing of an operations file that was uploaded to Leaf is finished but failed in one or more of the processing steps. This event can be useful for identifying files that have failed and are no longer being processed.

Alerts for this event are in the following format:

{
"fileId": "the id of the uploaded file",
"leafUserId": "the id of the file owner",
"message": "details of what happened. May be empty",
"timestamp": "yyyy-MM-dd'T'HH:mm:ss.SSSSSS'Z'",
"type": "uploadedFileProcessingFailed"
}

Machine File Conversion Events

Provider File Processing Finished

Event for when the processing of an operations file from a provider (either uploaded to provider manually or via Wireless Data Transfer) has successfully finished processing. This event can be useful for identifying new files when they are available.

Alerts for this event are in the following format:

{
"fileId": "the id of the uploaded file",
"leafUserId": "the id of the file owner",
"timestamp": "yyyy-MM-dd'T'HH:mm:ss.SSSSSS'Z'",
"type": "providerFileProcessingFinished"
}

Provider File Processing Failed

Event for when the processing of an operations file from a provider (either uploaded to provider manually or via Wireless Data Transfer) is finished processing but failed in one or more of the processing steps. This event can be useful for identifying files that have failed and are no longer being processed.

Alerts for this event are in the following format:

{
"fileId": "the id of the uploaded file",
"leafUserId": "the id of the file owner",
"message": "details of what happened. May be empty",
"timestamp": "yyyy-MM-dd'T'HH:mm:ss.SSSSSS'Z'",
"type": "providerFileProcessingFailed"
}

Operation Events

Merged File Processing Finished

Event for when the processing of a merged operation file has successfully finished processing. This event can be useful for identifying new merged files when they are available.

Alerts for this event are in the following format:

{
"fileId": "the id of the uploaded file",
"leafUserId": "the id of the file owner",
"timestamp": "yyyy-MM-dd'T'HH:mm:ss.SSSSSS'Z'",
"type": "mergedFileProcessingFinished"
}

Merged File Processing Failed

Event for when the processing of a merged operation file is finished processing but failed in one or more of the processing steps. This event can be useful for identifying merged files that have failed and are no longer being processed.

Alerts for this event are in the following format:

{
"fileId": "the id of the uploaded file",
"leafUserId": "the id of the file owner",
"message": "details of what happened. May be empty",
"timestamp": "yyyy-MM-dd'T'HH:mm:ss.SSSSSS'Z'",
"type": "mergedFileProcessingFailed"
}

Automerged File Processing Finished

Event for when the processing of an automerged operation file has successfully finished processing. This event can be useful for identifying new automerged files when they are available.

Alerts for this event are in the following format:

{
"fileId": "the id of the uploaded file",
"leafUserId": "the id of the file owner",
"timestamp": "yyyy-MM-dd'T'HH:mm:ss.SSSSSS'Z'",
"type": "automergedFileProcessingFinished"
}

Automerged File Processing Failed

Event for when the processing of an automerged operation file is finished processing but failed in one or more of the processing steps. This event can be useful for identifying automerged files that have failed and are no longer being processed.

Alerts for this event are in the following format:

{
"fileId": "the id of the uploaded file",
"leafUserId": "the id of the file owner",
"message": "details of what happened. May be empty",
"timestamp": "yyyy-MM-dd'T'HH:mm:ss.SSSSSS'Z'",
"type": "automergedFileProcessingFailed"
}

Operation created

Event for when an operation is successfully created. This event can be useful for identifying new operations when they are available. When sending this event, operation resources such as summary, images and units will probably not be complete.

Alerts for this event are in the following format:

{
"operationId": "the id of the operation created",
"leafUserId": "the id of the file owner",
"timestamp": "yyyy-MM-dd'T'HH:mm:ss.SSSSSS'Z'",
"type": "operationCreated"
}

Operation updated

Event for when an operation has updated. This event can be useful for identifying changes to operations.

Alerts for this event are in the following format:

{
"operationId": "the id of the operation uploaded",
"leafUserId": "the id of the file owner",
"timestamp": "yyyy-MM-dd'T'HH:mm:ss.SSSSSS'Z'",
"type": "operationUpdated"
}

Operation Processing Finished

Event when a Field Operation has successfully finished. This event could be useful for fetching the resources of an operation such as images, summary and units.

Alerts for this event are in the following format:

{
"operationId": "the id of the operation uploaded",
"leafUserId": "the id of the file owner",
"type": "operationProcessingFinished",
"timestamp": "yyyy-MM-dd'T'HH:mm:ss.SSSSSS'Z'"
}

Crop Monitoring Events

New Satellite Image

This event happens when we finish processing a new satellite image for a monitored field. It can be useful for searching only the new and latest images available in our API.

Alerts for this event are in the following format:

{
"externalId": "the external id of the monitored field",
"processId": "the id of the process containing new images",
"timestamp": "yyyy-MM-dd'T'HH:mm:ss.SSS'Z'",
"type": "newSatelliteImage"
}

Satellite Subscription Failed

This event will be triggered whenever there is a failure in the field subscription on the provider side, usually unmapped failures.

Alerts for this event are in the following format:

{
"fieldId": "the external id of the monitored field",
"message": "error message",
"timestamp": "yyyy-MM-dd'T'HH:mm:ss.SSS'Z'",
"type": "satelliteSubscriptionFailed"
}

Irrigation Events

New Irrigation activity

This event happens when a new as-applied irrigation data is available from the supported providers.

Alerts for this event are in the following format:

{
"irrigationId": "The ID of the as-applied irrigation activity",
"leafUserId": "the leaf user id",
"timestamp": "yyyy-MM-dd'T'HH:mm:ss.SSS'Z'",
"type": "newIrrigationActivity"
}

New Field Irrigation activity

This event happens when a new irrigation data is available for a field.

Alerts for this event are in the following format:

{
"fieldIrrigationId": "The ID of the irrigation activity for the given field",
"fieldId": "the field boundary ID",
"leafUserId": "the leaf user id",
"timestamp": "yyyy-MM-dd'T'HH:mm:ss.SSS'Z'",
"type": "newFieldIrrigationActivity"
}

Assets (Beta) Events

New Machine

This event happens when a new machine is created, either from operations files, or from provider data sync, or created by the user.

Alerts for this event are in the following format:

{
"type": "machineCreated",
"timestamp": "yyyy-MM-dd'T'HH:mm:ss.SSS'Z'",
"machineId": "the id of the new machine",
"leafUserId": "the id of the file owner"
}

Updated Machine

This event happens when a machine is updated, either from operations files, or from provider data sync, or by the user.

Alerts for this event are in the following format:

{
"type": "machineUpdated",
"timestamp": "yyyy-MM-dd'T'HH:mm:ss.SSS'Z'",
"machineId": "the id of the machine uploaded",
"leafUserId": "the id of the file owner"
}

Deleted Machine

This event happens when a machine is deleted by the user.

Alerts for this event are in the following format:

{
"type": "machineDeleted",
"timestamp": "yyyy-MM-dd'T'HH:mm:ss.SSS'Z'",
"machineId": "the id of the machine deleted",
"leafUserId": "the id of the file owner"
}

New Implement

This event happens when a new implement is created from provider data sync.

Alerts for this event are in the following format:

{
"type": "implementCreated",
"timestamp": "yyyy-MM-dd'T'HH:mm:ss.SSS'Z'",
"implementId": "the id of the new implement",
"leafUserId": "the id of the leaf user owner"
}

Updated Implement

This event happens when a implement is updated from provider data sync.

Alerts for this event are in the following format:

{
"type": "implementUpdated",
"timestamp": "yyyy-MM-dd'T'HH:mm:ss.SSS'Z'",
"implementId": "the id of the implement uploaded",
"leafUserId": "the id of the leaf user owner"
}