All URIs are relative to https://infrahub-api.nexgencloud.com/v1
| Method | HTTP request | Description |
|---|---|---|
| changeOrganizationForToken | GET /auth/token/change-org/{org_id} | |
| disableMFA | GET /auth/me/mfa/disable | |
| getUserMFAStatus | GET /auth/me/mfa | Get MFA status for authenticated user |
| getUserOrganizations | GET /auth/me/organizations | Get User Organizations |
| retrieveAuthenticatedUserDetails | GET /auth/me | Retrieve Authenticated User Details |
AuthGetTokenResponseModel changeOrganizationForToken(orgId)
Change the organization associated with the current token. This is useful for users who have access to multiple organizations.
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.AuthApi();
let orgId = 56; // Number |
apiInstance.changeOrganizationForToken(orgId).then((data) => {
console.log('API called successfully. Returned data: ' + data);
}, (error) => {
console.error(error);
});| Name | Type | Description | Notes |
|---|---|---|---|
| orgId | Number |
- Content-Type: Not defined
- Accept: application/json
CommonResponseModel disableMFA()
Disable Multi-Factor Authentication (MFA) for the currently authenticated user. This endpoint is used to turn off MFA.
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.AuthApi();
apiInstance.disableMFA().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
MFAStatusResponse getUserMFAStatus()
Get MFA status for authenticated user
Retrieve the Multi-Factor Authentication (MFA) status for the currentlyauthenticated user. Includes whether MFA is enabled.
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.AuthApi();
apiInstance.getUserMFAStatus().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
UserOrganizationsResponse getUserOrganizations()
Get User Organizations
Retrieve the organizations associated with a user by their user ID. This endpoint is useful for understanding the user's organizational affiliations.
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.AuthApi();
apiInstance.getUserOrganizations().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
AuthUserInfoResponseModel retrieveAuthenticatedUserDetails()
Retrieve Authenticated User Details
Retrieves detailed information about the currently authenticated user. 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.AuthApi();
apiInstance.retrieveAuthenticatedUserDetails().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