Does box have single API call to delete user and to transfer folder as well for deleted box user?

Highlighted
Occasional Contributor

Does box have single API call to delete user and to transfer folder as well for deleted box user?

Before deleting a user from box system we can transfer the root folder from one user account to
another.
Once the root folder is transferred only then delete API must be triggered.
So in all, the delete operation will have to call two API one to transfer and another to delete.

But as the transfer API call will return synchronously. 
For users with a large number of files and folders, this means the call could take minutes or hours to return.

So the delete operation will be in pending state until we receive the transfer API response. 

 

Does box now have single API call to delete box user and also transfer the folder?

5 REPLIES 5
Highlighted
Box Employee

Re: Does box have single API call to delete user and to transfer folder as well for deleted box use

Hi @sailpointdev  we currently do not have this as one option in the API. The way forward is indeed to monitor the completion of the change and then delete the user.


---
Developer Advocate @ Box
Highlighted
Occasional Contributor

Re: Does box have single API call to delete user and to transfer folder as well for deleted box use

Thanks for quick update, existing file or folder transfer API is synchronous in nature.

 

If the size of the file is huge transfer will take good amount of time and delete box user API will not be triggered

as the earlier transfer API result are not returned.

 

As the Delete box user API is dependent on transfer API it will be difficult for our client to wait for the result of transfer API.

 

Do you suggest any workaround that?

Highlighted
Box Employee

Re: Does box have single API call to delete user and to transfer folder as well for deleted box use

@sailpointdev I think the current standard approach is to check if a user's root folder is empty before deleting the user.


---
Developer Advocate @ Box
Highlighted
Occasional Contributor

Re: Does box have single API call to delete user and to transfer folder as well for deleted box use

@cbetta 

Lets consider the use-case below;

1. We are deleting box user - User1.

2. We have to trigger API call to transfer files for User1.

3. If the size of the files is too big we have to wait until the files are transferred or root folder gets empty for that user.

4. We have to wait till the time all files gets transferred or root folder gets empty.

5. Trigger API call to delete user once root folder is empty.

 

Here we have to wait till the root folder gets empty which might hamper the performance if the file size is large.

Can you suggest workaround for this?

Highlighted
Box Employee

Re: Does box have single API call to delete user and to transfer folder as well for deleted box use

Hi @sailpointdev, there currently is no elegant solution for this process in place. The steps you described are indeed the preferred way. We recommend using an async process on your side to check in on the completion.

 

There are a few requests for a solution to this problem in our product feedback forum. This is the most direct way for customers to provide feedback to our product team, who actively use this list to implement changes to Box.

 

https://pulse.box.com/forums/909778-help-shape-the-future-of-box/suggestions/36108355-receive-notifi...


---
Developer Advocate @ Box