# Need help with API for ansible roles (redirect, update, import...)

**URL:** <https://forum.ansible.com/t/need-help-with-api-for-ansible-roles-redirect-update-import/4803>\
**Category:** Get Help\
**Tags:** role, galaxy-ng\
**Created:** [April 7, 2024, 8:57pm UTC](https://forum.ansible.com/t/need-help-with-api-for-ansible-roles-redirect-update-import/4803 "2024-04-07T20:57:56Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![L3D](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/l3d/32/911_2.png) [@L3D](https://forum.ansible.com/u/L3D)\
**Post date:** [April 7, 2024, 8:57pm UTC](https://forum.ansible.com/t/need-help-with-api-for-ansible-roles-redirect-update-import/4803/1 "2024-04-07T20:57:56Z")

</div>

Hi there 👋

I need a bit help to find the right API Call to cleanup my ansible roles I published over time at [galaxy.ansible.com](http://galaxy.ansible.com).

**A Example…**

Lets take my gitea role. You can find it at github at :github:[github.com/roles-ansible/ansible\_role\_gitea](https://github.com/roles-ansible/ansible_role_gitea.git)

In :ansible_pool_mark: Galaxy there is a no longer updated version at [l3d.gitea](https://galaxy.ansible.com/ui/standalone/roles/l3d/gitea/versions/) and a updated version at [roles-ansible.gitea](https://galaxy.ansible.com/ui/standalone/roles/roles-ansible/gitea/versions/). And there is a Version where I managed to create a redirect notice at [do1jlr.gitea](https://galaxy.ansible.com/ui/standalone/roles/do1jlr/gitea/versions/). But I am not very happy about it.

Is there a way to publish the role only to one namespace and create a redirect from the other namespaces?  
And is it even possible to do that by myself? I tried to see something usefull in the [API](https://galaxy.ansible.com/api/v3/swagger-ui/), but I was not lucky enough.

**Desired Solution**  
I would apreciate if the solution is, that [this](https://github.com/marketplace/actions/action-ansible-galaxy-release) github action is able to publish a ansible role from the `roles-ansible` Organisation to the `l3d.gitea` ansible role. And I can delete the `roles-ansible.gitea` ansible role. _(Or the role has a redirect to `l3d.gitea`.)_ Right now the role gets only imported to the roles-ansible namespace. And writing “`author: l3d`” to the galaxy\_info has sadly no effekt.

Are there other people who struggle with multiple namespaces for their ansible roles? And what was your solution?

Thanks for your answer 😘
