Where to get AWX openapi spec file

Hi community,

on my current project we want to call AWX REST Api, however the requirement is to use Azure API Management as proxy. Is there somewhere AWX openapi yaml file that I can download and import into Azure APIM?

Currently, AWX REST Api has over 100 resources, I don’t want to write yaml if I don’t have to.
Why is it so difficult to find AWX openapi spec to download?

Thanks

You can grab a copy of our API in json format from

curl https://s3.amazonaws.com/awx-public-ci-files/devel/schema.json -o reference-schema.json

this was generated via make swagger

It should be compatible with openapi spec, let us know if you run into issues

We are going to update https://ansible.readthedocs.io/projects/awx/en/latest/ with a browsable version of our API

AWX Team

2 Likes

Fosterseth has pointed at the api in json format, But wanted to point to a few resources depending on what you are doing

If using in a playbook, use awx.awx/ansible.controller modules, as they interact with the API and you don’t have to write for it. If you are doing python or other coding to interact with the API, I’d check out the code as it is a good resource for how to interact efficiently.

If you are configuring many things in a playbook, I’d look at the infra.controller_configuration collection as well, as it wraps around the above modules.

Marvelous Seth,

thank you so much for this. I needed to do some cleanup, but I managed to import into Azure API Management.

2 Likes

Hi @ivansla ! It looks like the post @fosterseth submitted might have solved your issue.

If so, it would be super helpful if you could click the :heavy_check_mark: on their post to accept the solution - it recognises the input of others, helps our volunteers find new issues to answer, and keeps the forum nice and tidy.

Thanks!

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.