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

2 Likes

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.

6 Likes

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).

2 Likes

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.

2 Likes

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?

1 Like

@lubos, just checking if there is any update on the &api_username= feature ?

1 Like

@lubos Please let me know if this has been implemented?

Hi MarV what is /api

It the url to access the api. for example if your manager cloud url is

www.example.com

then you can access your api on

www.example.com/api

Arrrrrrrrr, I see it is for the Cloud version.

Ok i will get the trial version and see where that leads me. I am getting help from a freelancer to help me integrate woocommerce and he was asking about the API details

I have no idea if this still works, but the API for the desktop used to be accessed from
http://127.0.0.1:55667/api
There is a post describing how one gets a password setup.

Perhaps have a search or see if anyone else can get you further.

This may help

Thanks mate but got advise from another user and downloaded the cloud version and did the /api and got the key.

Tell you what it so difficult to get anyone to help with my issue integrating Manager with woocommerce so have put it out the web

This is not possible. Guess you mean the Server version. Cloud is the hosted version.

lubos

Jan '19

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.

My Question
The use of the API Key will that limit the API access to a particular entity in Manager or all instances hosted on the Manager Server?

1 Like

Since the API is linked to a particular user, I would assume it’s based on that user’s permissions.

The example given is an administrator, which has access to everything.

The part that is unclear, is if non-administrators will have API keys as well.