Is there a way to programmatically share current plan with a defined user?

42 views Asked by At

So far, I experimented with:

new DroneDeploy({version: 1}).then(function(dronedeploy){
    dronedeploy.Plans.getCurrentlyViewed().then(function(plan){
           plan.shared_users.push({username: "[email protected]"});
           return plan;
    ).then(function(plan){
        dronedeploy.Plans.update( plan.id,{shared_users: plan.shared_users});
    });
);

It gives error:

shared_users is not a whitelisted field to update on the plan.

But still makes the sharing. I guess it is not the best and reliable way, what what be the proper one?

1

There are 1 answers

1
ramblinjan On

Unfortunately, the ability to edit shared_users is actually a bug that will be fixed soon. There is no official way to share through the DroneDeploy API.

If you'd like to request that as a feature, you can do so by opening an issue here: https://github.com/dronedeploy/DroneDeploy-App-Market/issues

Disclosure: I am a developer on the DroneDeploy team