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.

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"
}

Operation Events

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"
}

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"
}

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.

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'"
}

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 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'"
}

Satellite 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"
}

Machines (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",
}