Is there any rest api to setting access role to workflow job template?

Hello,

I want to know that Is there any rest api to setting access role to workflow job template.

I already know ading role using dashboard.

What I exactly want is that after create or creating workflow job template, add role to the template with team or user which I already created.

Please help me. :pray:t2:

Thanks for your reply.

Have a nice dayπŸ˜€

Yes this is possible

In general, the UI will make POST/GET requests to the REST API. Before you add a role in the UI, can you open browser dev tools and look at the network tab which will show you the exact requests being made. You can use that information to learn how to do it via curl or whatever http client you wish.

Another alternative is to use the awx collection which has modules for adding roles to AWX resources. https://galaxy.ansible.com/awx/awx

Let us know if that is helpful

AWX Team

thanks for your reply!

oh, I see. I will try to get API information to browser dev setting network tab.

if I have any question, I will send a mail (message) on this thread.

Have a nice day!

2023λ…„ 5μ›” 6일 (ν† ) 02:20, AWX Project <awx-project@googlegroups.com>λ‹˜μ΄ μž‘μ„±:

Hello!

I tried to find API for creating role and connect to workflow template.

And I found connect role to workflow template API, but cannot find creating role API.

Can you give me hint how to create role using API? (or something else except using collection)

I aslo cannot find creating role using dashboard.

Thank you for reply.

Have a nice day!

2023λ…„ 5μ›” 6일 ν† μš”μΌ μ˜€μ „ 2μ‹œ 20λΆ„ 30초 UTC+9에 AWX Projectλ‹˜μ΄ μž‘μ„±:

You cannot create roles through the UI, you only assign roles

when a workflow template is created, a set of roles (read, execute, etc) will be automatically created for it. You won’t see those roles created via the API calls, this happens server-side

To get the role IDs, you can just add a user to the role for that workflow template in the UI, and you should set the POST associated with that role. So look for POST/GET when doing the role assignments the UI

AWX Team