Rothamsted-Ecoinformatics / farm_rothamsted

Custom farmOS features for Rothamsted Research.
GNU General Public License v2.0
6 stars 1 forks source link

FarmOS API: Update API Client for upgrade to FarmOS Core version 3.0 #608

Closed aislinnpearson closed 8 months ago

aislinnpearson commented 9 months ago

We agreed that we would create a new issue for updating the API following the deployment of FarmOS Core 3.0. The reality is that this issue might be addressed as part of the deployment, but we wanted to give ourselves the flexibility to address it after deployment if needed.

Specifically we need to update the API to accept the custom roles. @aislinnpearson will need to inform @hadewy when this is complete so she can change her client ID. Other than this change to the client ID, there will be no changes to Had's existing API code base.

paul121 commented 9 months ago

Okay, I've just done some light testing with the demo site API to make sure things are working as expected. This should be a simple change for @hadewy and Leo. With this next release we will have a new rothamsted client ID and two additional scopes available: rothamsted_data_admin and rothamsted_farm_manager.

farm = farmOS(
    hostname=FARMOS_HOSTNAME,
    client_id="rothamsted",
    scope="rothamsted_data_admin",
)
aislinnpearson commented 8 months ago

Great. Will e-mail this to the core users. Thanks both.