Accessing OpenBalena registry

I’m hoping someone can help me as I’m in a bit of a pickle.

I’m returning to my OpenBalena project after some time away and I’ve lost all my local docker build images and materials.

Is there a way for me to retrieve images from the OpenBalena registry to my local client? I’ve tried using Postman and curl to get tokens from the api service but this still results in an “unauthorized” when I try to get https://registry.mydomin.com/v2/_catalog.

I think I need to use the hashes stored in the registry container but I have no way to link these to a human readable app name, is that where redis comes in?

The API will never grant access to _catalog, and you don’t need it really. You can find what images are available and their names by querying the image resource on the API.

Why do you need the built artifacts back? Don’t you have the Dockerfiles around? You can retrieve those as well if you don’t, they’re too stored along with the image name on the image resource.

Ah, I see. Yes, I need the Docker files too so it will be great if I can recover them as well.

I’ll give it a crack later on today, thanks for the advice.

Is there an API document anywhere I can reference?

I’m looking through the source and I can get some resources to give me a response but not others, e.g.

https://api.mydomain.com/device-types/v1” gives me a list of all the supported device types, however,

“https:/api.mydomain.com/image” gives me a “Cannot GET /image” error.

I understand this is because /image as a resource doesn’t exist, I just don’t know how to find out how to build the correct URL.

Any help greatly appreciated.

Hi @bighair,

Yes, we have an API resource reference here: https://www.balena.io/docs/reference/api/resources/release/

This allows you to see the various resources that can be accessed by the API. Another source that might help you are the balena Node SDK and the balena Python SDK.

Hope this helps!