Skip to main content

List User Permissions

GET https://infrahub-api.nexgencloud.com/v1/auth/users/me/permissions

Retrieves a list of permissions granted to a specific user within your organization. Obtain the ID of the organization member using the Retrieve Organization Details endpoint, and include the ID in the path.


Path parameters


id integer   Required

The ID of the user for which to retrieve a list of permissions.


Attributes


status boolean

Indicates the status of the request to retrieve permissions for a specified user, true indicates success, while false indicates error.


message string

A message describing the status of the request.


permissions array of objects

An array of objects containing information about the permissions that are granted to the user.

Show child attributes

resource string

The resource to which the permission grants access (e.g., environment, virtual machine, volume).


permission string

The permission name, in this case, environment:list, indicates that when granted to the user, it permits the "list" action for the environment resource.


id integer

The unique identifier for the permission.


Example request
curl -X GET "https://infrahub-api.nexgencloud.com/v1/auth/users/{id}/permissions" \
-H "accept: application/json"\
-H "api_key: YOUR API KEY"
Response
{
"status": true,
"message": "Getting user permissions successfully",
"permissions": [
{
"resource": "Environment",
"permission": "environment:list",
"id": 1
},
{...}
]
}

Returns


The response will include the status of the request along with an array of permissions objects, each containing details about permissions granted to the user. Within the permissions objects, you'll find information such as the permission name, ID, and the resource action to which the permission grants access.



Back to top