Sign in to follow this  
mrcarl79

Pausing The Sync Of A Folder When An Application Is Running

Recommended Posts

Ok so I have a fairly basic problem I want to solve, I want to pause a specific folder when I'm running a specific application on my Mac.

 

I was hoping to create a simple lightweight shell script that I could schedule every 15-30 minutes (the pause / resume does not have to be instant), which checks for the running application, if it see's it and the folder is set to sync then it hits the API and pauses it. Simple, and then does the reverse if it doesn't see the application running and the folder is paused.

 

It's only for personal use, I'm a developer myself so can normally knock together things like this. But I did have a couple of quick questions:

 

1. First is this API suitable for this and can pause/unpause a folder on my mac?

2. Does the above basic idea sound feasible

3. Will I have to pay to use this API even though it's such a basic requirement and non commercial?

 

Thanks!

Share this post


Link to post
Share on other sites

@mrcarl79

Yes, you can do it with API. Please see this API doc, you are especially interested in "/folders/{fid}" PATCH method. You need to alter "stopped" param to stop sync completely, or "paused" to stop delivering of files and keep syncing service data (i.e. keep files being monitored).

 

Not sure about #3 - we have only one API usage plan, and it is subscription based. I'll check it and get back to you.


@mrcarl79

As you are not using any PRO functionality, you can request and use dev key.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this