All URIs are relative to https://infrahub-api.nexgencloud.com/v1
| Method | HTTP request | Description |
|---|---|---|
| deleteAPIKey | DELETE /api-key/{api_key_id} | Delete API Key |
| generateAPIKey | POST /api-key/generate | Generate API Key |
| getAPIKey | GET /api-key | Retrieve API Keys |
| updateAPIKey | PUT /api-key/{api_key_id} | Update API Key |
CommonResponseModel deleteAPIKey(apiKeyId)
Delete API Key
Delete a specified API key by including the ID of the API key in the path.
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.ApiKeyApi();
let apiKeyId = 56; // Number |
apiInstance.deleteAPIKey(apiKeyId).then((data) => {
console.log('API called successfully. Returned data: ' + data);
}, (error) => {
console.error(error);
});| Name | Type | Description | Notes |
|---|---|---|---|
| apiKeyId | Number |
- Content-Type: Not defined
- Accept: application/json
GenerateUpdateApiKeyResponseModel generateAPIKey(payload)
Generate API Key
Generates your API key, providing access to the Infrahub APIs. For further details on API keys, 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.ApiKeyApi();
let payload = new HyperstackApi.GenerateUpdateApiKeyPayload(); // GenerateUpdateApiKeyPayload |
apiInstance.generateAPIKey(payload).then((data) => {
console.log('API called successfully. Returned data: ' + data);
}, (error) => {
console.error(error);
});| Name | Type | Description | Notes |
|---|---|---|---|
| payload | GenerateUpdateApiKeyPayload |
GenerateUpdateApiKeyResponseModel
- Content-Type: application/json
- Accept: application/json
GetApiKeysResponseModel getAPIKey()
Retrieve API Keys
Retrieves your API keys, granting access to the Infrahub APIs. For further details on API keys, 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.ApiKeyApi();
apiInstance.getAPIKey().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
GenerateUpdateApiKeyResponseModel updateAPIKey(apiKeyId, payload)
Update API Key
Updates the name and optionally the description of a specified API key. Include the ID of the API key in the path and the new name and optional description in the body of the request.
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.ApiKeyApi();
let apiKeyId = 56; // Number |
let payload = new HyperstackApi.GenerateUpdateApiKeyPayload(); // GenerateUpdateApiKeyPayload |
apiInstance.updateAPIKey(apiKeyId, payload).then((data) => {
console.log('API called successfully. Returned data: ' + data);
}, (error) => {
console.error(error);
});| Name | Type | Description | Notes |
|---|---|---|---|
| apiKeyId | Number | ||
| payload | GenerateUpdateApiKeyPayload |
GenerateUpdateApiKeyResponseModel
- Content-Type: application/json
- Accept: application/json