The API documentation is a work in progress.
Built-in API browser interface¶
ARA ships with a helpful interface to navigate the API directly from your favorite web browser.
For example, if you run
ara-manage runserver, this interface would be
You can navigate the interface and drill down to list views, for example:
You can also see what a detailed view looks like by querying a specific object id:
Alternatively, you may also find an up-to-date live demonstration of the API at
Relationship between objects¶
The relationship between objects in the API should be straightforward with an understanding of how Ansible playbooks are executed.
Generally speaking, the data is organized in the following fashion:
labels | Playbook -> Play -> Task -> Result <- Host | | | | file file content facts
- Every object is associated to a playbook (except labels which are applied to playbooks)
- In a playbook you have plays
- In plays you have tasks
- In tasks you have results
- Results have a relationship to their parent task and the host the task ran on
- Files are only associated to a playbook but tasks have a reference to the file they were executed from
- Records (provided by
ara_record) are only associated to a playbook
These relationships are also represented in the database model:
Open the image above in a new tab to see it in full resolution.
Additional fields may only be available in the detailed views. For example:
- Playbooks arguments with
- Hosts facts with
- Results content with
- Files content with
ARA ships with two built-in API clients to help you get started. You can learn more about those clients in Using ARA API clients.