Solved

Set Project Role through API V3

  • 5 June 2020
  • 4 replies
  • 3829 views

Hello,

I’m working with Rest API, to “automate” some operations with Ansible, trought URI Module and Jinja2.

I need to create a Project, and set permission to a specific user.

How can i do this with API V3? I can add user to a Project, but i can’t set the Role.. When i check trought the Web Interface, i see the user without role.

Thanks!

icon

Best answer by AnishWalia20 8 June 2020, 12:11

View original

This topic has been closed for comments

4 replies

Userlevel 6
Badge +5

Hi @DanielePesciallo Can you try doing the below:

1) List the roles using this API:

API: 

https://<PCVM_IP>:9440/api/nutanix/v3/roles/list

2) And then update the project using this API:

https://<PCVM_IP>:9440/api/nutanix/v3/projects_internal/<Project_UUID>

For assigning roles to users in the project, this should work, given you know which user to add and that is already configured through directory services.

You can find more details in Rest API explorer about the above.  Let me know if this works. :relaxed:

Hello @AnishWalia20

Thanks!

Unfortunately, I can’t find any reference about “project_internal”.. I can’t find it on my Rest API Explorer (i’ve Prism Central 5.17.0.3).

Can you help me? Do you have any "documentation" about this?

Thanks

Daniele

Userlevel 6
Badge +5

Really sorry but, this API is actually internal @DanielePesciallo . We don’t have this listed in any public documentation.

Userlevel 6
Badge +5

Hi @DanielePesciallo , any update. Did it work? Do you need anything else related to this?