Announcing 2.0 Api


RomanZ

Recommended Posts

Thank you for your interest in the Sync API and being part of our developer community. The varied ways you’ve leveraged Sync’s technology are inspiring and we’re excited to continue to enable them.

 

We want to let you know that in June we’re planning an update to our API. This update will bring significant new functionality to the API, including  access to 2.0 folders for all the existing calls.

 

We’ll provide you with updated documentation and much more information around these features when the new API launches, but wanted to keep our current API users informed

 

  • All calls using the existing API will continue to work at minimum through the end of 2015 to provide you with time to transition to the new API. We will continue to stay in touch before any changes to the existing API are made.
  • The new API will require a new Sync build, which will be released at the same time
  • We’re aware of interest in the API for mobile use, but this functionality will not be in the planned update.
  • The API will continue to be free to use for non-commercial use.

 

We sent all of you an email with this information, but wanted to post here as well to make sure everyone was kept aware.

Link to comment
Share on other sites

  • 1 month later...
  • 2 weeks later...
  • 1 month later...

What is it that after I add my API key to the configuration file sync won't start.

 

Here's the output of my terminal session

pi@raspberrypi:~$ sudo service btsync start[21:28:02.400] API: loaded v2 key - id: <ID>, expiration_date: 07/31/16 17:00:00, features: a1By using this application, you agree to our Privacy Policy, Terms of Use and End User License Agreement.https://www.getsync.com/legal/privacyhttps://www.getsync.com/legal/terms-of-usehttps://www.getsync.com/legal/eulaBitTorrent Sync forked to background. pid = 1003. default port = 8888

And here is my configuration file

{  "device_name": "[Moe] Raspberry Pi",  "listening_port" : 64855,  "use_upnp" : false,  "profiler_enabled" : false,  "send_statistics" : false,  "lan_encrypt_data" : false,  "webui" :  {    "listen" : "0.0.0.0:8888",    "login" : "admin",    "password" : "supersecretpassword",    "allow_empty_password" : false,    "directory_root" : "/mnt/btsync/",    "directory_root_policy" : "all",    "dir_whitelist" : [ ".*" ],    "api_key" : "170charapikey"  }}

And yes, my init script is working just fine.

If I get rid of the api_key line sync starts and everything is good.

 

Anyone any idea?

Link to comment
Share on other sites

pi@raspberrypi:~$ sudo ~/.btsync/btsync --config ~/.btsync/config --nodaemon[17:11:02.530] API: loaded v2 key - id: ID, expiration_date: 07/31/16 17:00:00, features: a1By using this application, you agree to our Privacy Policy, Terms of Use and End User License Agreement.https://www.getsync.com/legal/privacyhttps://www.getsync.com/legal/terms-of-usehttps://www.getsync.com/legal/eula[20150819 17:11:02.588] total physical memory -1 max disk cache 2097152[20150819 17:11:02.594] In order to proceed, you must agree to the terms of the Sync EULA; see https://www.getsync.com/legal/eula. By setting the parameter "agree_to_EULA" to "yes", you are agreeing to the EULA.

Thanks for that hint!

 

So you also have to put the in the global portion of your config file and not the webgui portion where you have to put the API key. That's weird, I would've assumed that those two go together ¯\_(ツ)_/¯.

 

So I edited the config file and for completion sake here is what it looks like:

{  "device_name": "[Moe] Raspberry Pi",  "listening_port" : 64855,  "use_upnp" : false,  "profiler_enabled" : false,  "send_statistics" : false,  "lan_encrypt_data" : false,  "agree_to_EULA" : "yes",  "webui" :  {    "listen" : "0.0.0.0:8888",    "login" : "admin",    "password" : "superrandompassword",    "allow_empty_password" : false,    "directory_root" : "/mnt/btsync/",    "directory_root_policy" : "all",    "dir_whitelist" : [ ".*" ],    "api_key" : "KEY"  }}

And the fact that you have to agree to the EULA with a yes instead of having it a BOOLEAN is also weird.

 

But I am glad it works now.

Thanks Roman!

Link to comment
Share on other sites

@Moe

You are welcome. Yeah, I understand that agree_to_EULA would be more logical if it is boolean, but we want to make it as explicit as possible. What is really wrong here, is that once you don't put it in the config - Sync gives no hint what happens. This looks to be an issue.

Link to comment
Share on other sites

Yes, ok that makes sense to me.

Also this kind of happens to any error while reading the config file. If btsync cannot read it or is expecting a different value than what is set in the file it just silently quits. Would be nice to see some log on the STDOUT.

Link to comment
Share on other sites

That's half the truth :> On the Drobo with the pre-packaged binary there is a line in the service file that starts BitTorrent Sync that puts the errors in a log file. But I was not able to get any logs put in that config file so...

 

If you unpack the archive you will see the service.sh and on line 51 the following

start() {  _mount_tmp  _create_config  "${daemon}" --config "${conffile}" >> "${logfile}" 2>&1  _avahi_update}

That's where the service gets started and all the output should land in the log file but it doesn't.

I will try to reproduce and report back!

Link to comment
Share on other sites

  • 2 years later...
On 5/11/2015 at 11:24 AM, RomanZ said:
  • The API will continue to be free to use for non-commercial use.

According to your licensing department, the lastest version of your API will only be available for Sync for Business and not for the non-commercial Sync Home/Family. Is this post incorrect or is is the information that I received from your licensing department incorrect?

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.