Generate backup using API

Feature request: Can we please have an endpoint for generating business backups using the API?

At the moment, we need to manually click the button, but I’d like to set up an automatic daily backup.

Thanks

Going to do a once-only ping/bump to @lubos here, in the hope of receiving a response. Wondering about the likelihood for something like this.

If not available via the API, I might need to look into faking the login and button click instead, in order to achieve this, but that’s more of a messy alternative that I was hoping to avoid.

Thanks

In a few days, there is going to be support for API keys. So for example, if you have API key for administrator, you will simply attach to any URL:

?api_key=714552c6148e1617aeab526d0606184b94a80ec048fc09894ff1a72b740c5f19&api_username=administrator

And this will allow you to retrieve any resource (e.g. backup) without going through (or simulating) login sequence.

1 Like

Great, announce it please.
And can we have some kind of API Wiki or Documentation somewhere, so not to dig through forum topics and guess we find what we need.

@lubos - sounds good, thanks!

@MarV - The API is self-documenting, in that you can access it using a web browser and see the JSON structure of each object (and which object types are available).

1 Like

JSON structure is OK, but getting to endpoint urls is not documented. Even if we speak about url/api as self documenting, my opinion is that API need official documentation.

@MarV

Just visit /api in your web browser and authenticate as an administrator.

You’ll be given a HTML page with links to each business. Click on a business, and you will be given a HTML page with links to each object type. Click on those, and you get links to each record. Click on that, and you get the JSON representation of the record.

At any time, you can copy the URL from the browser window and use that as your API endpoint in your client application.

The only exception is that for lists, you’ll notice there is an index.json file. You’ll need to click on that first, and then use that URL.

Note: We are now moving into more generic API territory … and not talking specifically about generating backups, so it may be worthwhile continuing this discussion in a new thread if you’d like any further assistance on this. I can help with some detailed examples.

I totally understand you. And already now all of this, although I am not that much at API programming. But this doesn’t change the beauty of good documentation of API’s exposed, URIs (not to have to dig around, etc. So API docs if already APIs are exposed in my opinion is good. For example imagine I don’t know to program a lot of REST clients,but some samples of using APIs for basic tasks that could be called from browser, or even command line batch file (for ex. your need for backup) would be nice, and almost everyone can use it. That was my whole thing of documenting.
And, yes, we may continue in another thread, I really want to see Examples in action. Good thing to learn more, in any case.

any update?