Make your first API call
Everything in the Waldur UI goes through the REST API, so anything you can do there you can script.
1. Get a token
Copy your API token from HomePort, as described in Authentication. It is sent as Authorization: Token <token>.
For automation, prefer a personal access token: it can be limited to specific scopes and given an expiry date. It is sent as Authorization: Bearer <token>.
A token carries your permissions, so keep it out of shared scripts and repositories.
2. List the marketplace offerings
1 2 3 4 5 6 | |
1 | |
1 2 3 4 5 6 7 8 9 10 11 | |
1 2 3 4 5 6 7 8 9 10 | |
The response is a JSON list of the offerings you can see. 401 Unauthorized means the token is wrong or expired.
3. Order a resource
An order names the offering, the project to create the resource in, and a plan, each by its API URL:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | |
The order then moves through its states: one of the pending-* states while it waits for approval or a start date, executing while the resource is provisioned, and done. The new resource appears in the project.
Where to go next
- Python SDK and SDK examples
- waldur-cli, Terraform and Ansible
- Service provider onboarding, to publish your own offerings through the API
- API lifecycle: what stays stable between releases
- REST API reference, every endpoint