hub
hub copied to clipboard
API: support search by repo URL
I see that /repositories/search
takes a name
but not a url
. Is it possible to search by URL to locate a repository and its metadata?
For example:
- I have
https://charts.bitnami.com/bitnami
as URL - I want to be able to
/repositories/search
withurl=https://charts.bitnami.com/bitnami
and see in result that the repo isbitnami
- and then execute
/packages/helm/bitnami/keycloak
Hi @brsolomon-deloitte 👋
This could be a nice addition, we'll look into it 👍
Thanks!
@tegioz is there any multi-step workaround you can think of, even it is a little messy? (Perhaps even with helm
or something else?)
I am having a surprisingly tough time just doing a map-lookup of the repo name from its url.
For some background, we are looking to create a "Helm Dependabot" that will periodically scan for possible Helm chart version updates. It currently has the repo URL and current version (and can easily grab it via yq
) but not the repo name itself in Chart.yaml
.
Maybe the endpoint below can be of help 🙂
https://artifacthub.io/docs/api/#/Integrations/getHelmExporterDump
It was created for a tool with a similar purpose actually. It'll give you a short summary of all repositories, that includes the url for a fast local lookup.
Hope it helps.
Nice, here's what I put together (could also just pipe curl to jq):
$ curl -fsSL \
-o helm-export.json \
'https://artifacthub.io/api/v1/helm-exporter' \
-H 'accept: application/json'
$ jq -M '.[] | select(.repository.url == "https://charts.bitnami.com/bitnami" and .name == "keycloak")' helm-export.json
{
"name": "keycloak",
"version": "6.1.4",
"repository": {
"name": "bitnami",
"url": "https://charts.bitnami.com/bitnami"
}
}