All URIs are relative to https://infrahub-api.nexgencloud.com/v1
| Method | HTTP request | Description |
|---|---|---|
| createRBACRole | POST /auth/roles | Create RBAC Role |
| deleteRBACRole | DELETE /auth/roles/{id} | Delete RBAC Role |
| listRBACRoles | GET /auth/roles | List RBAC Roles |
| retrieveRBACRoleDetails | GET /auth/roles/{id} | Retrieve RBAC Role Details |
| updateRBACRole | PUT /auth/roles/{id} | Update RBAC Role |
RbacRoleDetailResponseModel createRBACRole(payload)
Create RBAC Role
Creates an RBAC role that can be assigned to users, granting them access to specific resource actions. Provide the configuration of the RBAC role, including its name, description, and list of permissions and policy IDs in the request body. For additional information on creating RBAC roles, click here.
import HyperstackApi from '@nexgencloud/hyperstack-sdk-javascript';
let defaultClient = HyperstackApi.ApiClient.instance;
// Configure API key authorization: apiKey
let apiKey = defaultClient.authentications['apiKey'];
apiKey.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//apiKey.apiKeyPrefix = 'Token';
let apiInstance = new HyperstackApi.RbacRoleApi();
let payload = new HyperstackApi.CreateUpdateRbacRolePayload(); // CreateUpdateRbacRolePayload |
apiInstance.createRBACRole(payload).then((data) => {
console.log('API called successfully. Returned data: ' + data);
}, (error) => {
console.error(error);
});| Name | Type | Description | Notes |
|---|---|---|---|
| payload | CreateUpdateRbacRolePayload |
- Content-Type: application/json
- Accept: application/json
CommonResponseModel deleteRBACRole(id)
Delete RBAC Role
Deletes an RBAC role by providing its ID in the path. For additional information, click here.
import HyperstackApi from '@nexgencloud/hyperstack-sdk-javascript';
let defaultClient = HyperstackApi.ApiClient.instance;
// Configure API key authorization: apiKey
let apiKey = defaultClient.authentications['apiKey'];
apiKey.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//apiKey.apiKeyPrefix = 'Token';
let apiInstance = new HyperstackApi.RbacRoleApi();
let id = 56; // Number |
apiInstance.deleteRBACRole(id).then((data) => {
console.log('API called successfully. Returned data: ' + data);
}, (error) => {
console.error(error);
});| Name | Type | Description | Notes |
|---|---|---|---|
| id | Number |
- Content-Type: Not defined
- Accept: application/json
GetRbacRolesResponseModel listRBACRoles()
List RBAC Roles
Retrieves a list of RBAC roles that can be assigned to the users within an organization. For additional information on RBAC roles, click here.
import HyperstackApi from '@nexgencloud/hyperstack-sdk-javascript';
let defaultClient = HyperstackApi.ApiClient.instance;
// Configure API key authorization: apiKey
let apiKey = defaultClient.authentications['apiKey'];
apiKey.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//apiKey.apiKeyPrefix = 'Token';
let apiInstance = new HyperstackApi.RbacRoleApi();
apiInstance.listRBACRoles().then((data) => {
console.log('API called successfully. Returned data: ' + data);
}, (error) => {
console.error(error);
});This endpoint does not need any parameter.
- Content-Type: Not defined
- Accept: application/json
RbacRoleDetailResponseModelFixed retrieveRBACRoleDetails(id)
Retrieve RBAC Role Details
Retrieves the details of a specified RBAC role by providing the RBAC role ID in the path. For additional information, click here.
import HyperstackApi from '@nexgencloud/hyperstack-sdk-javascript';
let defaultClient = HyperstackApi.ApiClient.instance;
// Configure API key authorization: apiKey
let apiKey = defaultClient.authentications['apiKey'];
apiKey.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//apiKey.apiKeyPrefix = 'Token';
let apiInstance = new HyperstackApi.RbacRoleApi();
let id = 56; // Number |
apiInstance.retrieveRBACRoleDetails(id).then((data) => {
console.log('API called successfully. Returned data: ' + data);
}, (error) => {
console.error(error);
});| Name | Type | Description | Notes |
|---|---|---|---|
| id | Number |
RbacRoleDetailResponseModelFixed
- Content-Type: Not defined
- Accept: application/json
RbacRoleDetailResponseModel updateRBACRole(id, payload)
Update RBAC Role
Updates an RBAC role by providing the role ID in the path and the modified role configuration in the request body, including its name, description, and list of permissions and policy IDs. For additional information, click here.
import HyperstackApi from '@nexgencloud/hyperstack-sdk-javascript';
let defaultClient = HyperstackApi.ApiClient.instance;
// Configure API key authorization: apiKey
let apiKey = defaultClient.authentications['apiKey'];
apiKey.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//apiKey.apiKeyPrefix = 'Token';
let apiInstance = new HyperstackApi.RbacRoleApi();
let id = 56; // Number |
let payload = new HyperstackApi.CreateUpdateRbacRolePayload(); // CreateUpdateRbacRolePayload |
apiInstance.updateRBACRole(id, payload).then((data) => {
console.log('API called successfully. Returned data: ' + data);
}, (error) => {
console.error(error);
});| Name | Type | Description | Notes |
|---|---|---|---|
| id | Number | ||
| payload | CreateUpdateRbacRolePayload |
- Content-Type: application/json
- Accept: application/json