Leaf's Configurations Service

02 Feb, 2022

Leaf's Configurations Service

Leaf's Configurations Service

Configuration Service Matters

Every AgTech company has a unique product and use case. In order to serve all of these different use cases, we’ve exposed a series of individual services that can be configured to each company’s exact needs.

Leaf services can now be configured at the API Owner level (for all users) or individually for specific users using the configurations service.

For instance:

  • Field Operations can be configured to only merge new files within a custom time range
  • Field Operation maps can be configured to render with a color ramp and resolution of your choice
  • Fields can be configured to only match with data given a custom percent overlap

With services that are easy to customize, we help companies tune Leaf to their exact needs so they can better serve their customers across many use cases.

How It Works

Step 0: API Owners start with a default configuration set that can be customized. Each Leaf user inherits the default configuration set from the API Owner.

Step 1: Configurations can be customized for the API Owner or individual users within the API Owner’s account using the configurations service.

Notes

  • Changes to configurations are not applied retroactively to data that has already been processed by Leaf.
  • If you would like to apply configuration changes to already processed data please contact us or re-run the data after setting your configurations.

Benefits

  • Customize API behavior for all data or for individual users.
  • Thoughtful default configurations allow users who do not need customization to ignore configurations.
  • Flexibility to update configurations as needed via a single and intuitive service.

New Configurations

Leaf continues to build new configuration options to meet the ever changing needs of our customers. Three new configurations include:

  • operationsAutoSync
    • If set to true, Leaf will automatically synchronize provider's operations. The default value is true.
  • cleanupStandardGeojson
    • If set to true, Leaf will automatically remove invalid points from the standardGeoJSON file for operations. The default value is true.
  • splitOperationsByField
    • If set to true, Leaf will split your Field Operations based on the intersection of each Leaf Field Boundary. The default value is false.

Example Guide To Update Configurations For API Owner

Suppose the API Owner does not need to fetch field data from providers. Simply disable that in the configurations.

To do this, first get the current configurations.

The result is the following JSON:

Those are the default configurations that every user has.

Note that the flag fieldsAutoSync is true. Let’s update it to false. We will use the patch method instead of the put because it is easier to use by not having to repeat all properties we don’t want to change:

We get a 200 status in the response indicating it succeeded and also we got the current config in the returning payload:

Note that the only difference with the first one is that now the field sync property is false.

That's it! The API Owner is now set up, he/she will not fetch any field data from any provider, for any of its leaf users.

Example Guide To Update Configurations For Leaf User

Let’s imagine we have the following use case. The user offers as an add-on for its customers the generation of images from operations. So he/she wants to update configs per Leaf User.

This is the request to update configs for a specific Leaf User:

This is the response:

It returned the configs for this Leaf User. Note that all properties are null but operationsImageCreation. All null properties inherit its values from the API Owner.

All is set and now this specific Leaf User gets images generated from its operations.

Learn More

Visit: Leaf's Docs to learn more about how to get started with Leaf Configurations Service.

Ready to begin?

Get API Keys and Start Building Today!

Sign up for free account

Questions? Get in touch