Galleon has a built-in REST API: every web interface operation is available programmatically. It is used to create repositories and accounts during a deployment, to export the instance state into an inventory system, and to plug in configuration management tools.
The API reference is built into the server: Swagger UI opens at
https://<GALLEON_HOST>/docs, and the machine-readable OpenAPI specification
is available at https://<GALLEON_HOST>/openapi.yaml.
Both addresses require authentication — any account will do
(the browser asks for a username and password).
Authentication
Programmatic requests are authenticated the same way as format clients: with a username and password or with a user token (Credentials). For automation, create a dedicated account and work with its token — it is revoked without touching the password.
An example: the list of the instance repositories.
curl -u <USERNAME>:<PASSWORD> https://<GALLEON_HOST>/service/rest/v1/repositoriesHere <USERNAME> and <PASSWORD> are the account username and password,
or the “Name code” and “Pass code” of a token.
Rights
API operations are checked against the same privileges as the buttons in the web interface:
to create a repository programmatically an account needs the repository creation privilege,
and to create a user — a privilege of the users domain
(Privileges).
A 403 answer means a missing privilege rather than a malformed request.