I meant to follow up with this last week but lost track. In addition to
the raw API for getting charm content, you can also just do `charm pull
$CHARM_ID` to get the archive zip, in case that's easier.
For charm stats, the API docs that Rick linked to includes the "stats"
endpoint. You can see some example usage of that in
https://github.com/juju-solutions/k8s-kpi-scripts/blob/master/src/files/thirdparty/k8s-charm-cs-stats
For layer and interfaces, you can use the GitHub API to query how many
layers and interfaces are available (ex.
https://github.com/juju-solutions/charmbuild-kpi-import/blob/master/scripts/github)
but unfortunately there's no easy way at this time to tell how many charms
a given layer is used in.
On Fri, Jan 26, 2018 at 3:25 AM, Merlijn Sebrechts <
Post by Merlijn SebrechtsAwesome! Thanks guys!
Post by Rick Hardinghttps://github.com/juju/charmstore/blob/v5-unstable/docs/API.md is the
docs for the API to the charmstore itself. As Adam notes, you can pull down
any file and there's manifest call that lists out the files in the charm.
From there you could probably check if the charm has a layers.yaml and if
so fetch that file, parse it, etc.
https://github.com/juju/charmstore/blob/v5-unstable/docs/
API.md#get-idmetamanifest
Post by Adam CollardHi Merlijn,
On Thu, 25 Jan 2018 at 16:17 Merlijn Sebrechts <
Post by Merlijn SebrechtsHi all
I'm writing a Juju-related paper and I'd like to get statistics
on Charm, layer and interface usage. Are these publicly available?
Related: is there a documented API to get the code of the charms that
are available in the charm store?
GET https://api.jujucharms.com/charmstore/v5/$MY_CHARM_NAME/archive/
will give you a .zip
and
GET https://api.jujucharms.com/charmstore/v5/$MY_CHARM_NAME/arch
ive/$PATH/$TO/$FILE
will give you the 'raw' contents.
e.g. curl https://api.jujucharms.com/charmstore/v5/postgresql/archive/
hooks/install
YMMV,
Adam
--
Juju-dev mailing list
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailm
an/listinfo/juju-dev
--
Juju-dev mailing list
Modify settings or unsubscribe at: https://lists.ubuntu.com/
mailman/listinfo/juju-dev