Skip to main content

Retrieve Organization Details

GET https://infrahub-api.nexgencloud.com/v1/auth/organizations

Retrieves information about your organization and its members. This includes the organization's name, date of creation, and details about each member, such as their name, email, roles, and more.


Parameters


No parameters.


Attributes


status boolean

Indicates the success status of the request to retrieve information about your organization.


message string

A message describing the success or failure of the operation.


organization object

An object containing details about the organization and its members.

Show child attributes
name string

The name of the organization.


id integer

The unique identifier for the organization.


created_at date-time

The timestamp when the organization was created.


users array of objects

An array containing information about the organization's members.

Show child attributes
name string

The name of the user.


sub string

The unique identifier for the user for authentication and authorization purposes.


email string

The email address associated with the user.


username string

The username associated with the user.


id integer

The unique identifier for the user.


role string

The role of the user within the organization.


created_at date-time

Timestamp indicating when the owner was added to the organization. For non-owner members, the API will return the joined_at field, which contains the timestamp indicating when the user was added to the organization.


rbac_roles array of integers

An array containing the IDs of any RBAC (Role-Based Access Control) roles granted to the user.

Example request
curl -X GET "https://infrahub-api.nexgencloud.com/v1/auth/organizations" \
-H "accept: application/json"\
-H "api_key: YOUR API KEY"
Response
{
"status": true,
"message": "Successfully retrieved organizations info",
"organization": {
"name": "Johns's Organization",
"id": 29,
"created_at": "2023-08-02T16:44:58",
"users": [
{
"name": "John Smith",
"sub": "b4eadb8285d4ad494da7959ef1357bea3ef2afb729ef6ba30d0f31557ff4bc23",
"email": "[email protected]",
"username": "johnsmith1",
"id": 30,
"role": "Owner",
"created_at": "2023-08-02T16:44:58",
"rbac_roles": []
}
]
}
}

Returns


A successful response returns a status value of true and the organization object, which contains information about your organization and its members. This includes the organization's name, timestamp of creation, ID, and the users object containing details about each member. Within the users object, you'll find information such as the member's name, ID, sub (for authentication/authorization), email, username, account role, timestamp of creation, and any RBAC roles granted to them.


Back to top