Stephen -
Just following up on our conversation at AnsibleFest regarding access to
the Galaxy API.
You can access the API today at
https://galaxy.ansible.com/api/v1. The API
is browsable, so start by pointing a browser at that URL and clicking
through the role related endpoints to see the various response objects.
No authentication is required to query role data, but triggering imports to
create and update roles or sending delete requests to remove roles does
require authentication.
When you're ready to create, update, delete roles you will need to use a
GitHub account to authenticate. You can either use the ansible-galaxy
client to authenticate and interact with the API (
http://docs.ansible.com/
ansible/galaxy.html#the-ansible-galaxy-command-line-tool), or you can send
requests directly to the API.
An example of authenticating and initiating a role import exists in this
role:
https://galaxy.ansible.com/chouseknecht/galaxy-import-role/ Note
that the integration tests are failing only because I have not fully
figured out how to write the integration tests for it, however the role
actually works. It uses the Ansible uri module to send requests directly to
the API.
Let me know what questions you have. I'll get to work on some specs for the
new endpoint(s) related to 'signing' role versions.
--Chris
--
Chris Houseknecht
Principal Engineer
Ansible by Red Hat
919.803.9159 | <919.803.9159>
ansible.com <
https://www.ansible.com/>
*GitHub: *chouseknecht
<
https://www.github.com/chouseknecht>*Twitter: *@chouseknecht
<
https://www.twitter.com/@chouseknecht>