Accessing the API

Let’s say I wanted to access information about kopia repos, view snapshots and policies, basically everything that kopia-ui does currently, but from scripts and/or a GUI. Is the preferred way to do this via the HTTP API? How would I handle authentication? And kopia-ui would still need to run in the background as it supplies the API server, if I understood correctly…

A bit of context: I’m thinking about creating a PyQt GUI for Kopia to provide a bit more native feel. Is this something the community would be interested in?


When you start kopia server --server-username=x --server-password=y --no-ui it will expose the API on http://localhost:51515/api/v1/... which you can then call. That’s exactly the same API that KopiaUI is calling.

Just be mindful that it’s not currently meant to be public/stable and some (hopefully minor) breaking changes are expected.

I’m curious about this “native feel”, what’s the concern here?

That’s perfect, thanks. Also saw the new --json parameter in the latest beta, which would be a great alternative as well…

With “native feel” I meant something closer to the respective OS’s native UI elements, like Vorta - which is using Qt. This is purely a personal preference, most people will probably be happy with the HTML-based look of kopia-ui.