All URIs are relative to https://infrahub-api.nexgencloud.com/v1
| Method | HTTP request | Description |
|---|---|---|
| create_environment | POST /core/environments | Create Environment |
| delete_an_environment | DELETE /core/environments/{id} | Delete an environment |
| get_an_environment_details | GET /core/environments/{id} | Get an environment detail |
| list_environments | GET /core/environments | List Environments |
| update_an_environment | PUT /core/environments/{id} | Update Environment |
Environment create_environment(payload)
Create Environment
- Api Key Authentication (apiKey):
- Api Key Authentication (accessToken):
import hyperstack
from hyperstack.models.create_environment import CreateEnvironment
from hyperstack.models.environment import Environment
from hyperstack.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://infrahub-api.nexgencloud.com/v1
# See configuration.py for a list of all supported configuration parameters.
configuration = hyperstack.Configuration(
host = "https://infrahub-api.nexgencloud.com/v1"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure API key authorization: apiKey
configuration.api_key['apiKey'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['apiKey'] = 'Bearer'
# Configure API key authorization: accessToken
configuration.api_key['accessToken'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['accessToken'] = 'Bearer'
# Enter a context with an instance of the API client
with hyperstack.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = hyperstack.EnvironmentApi(api_client)
payload = hyperstack.CreateEnvironment() # CreateEnvironment |
try:
# Create Environment
api_response = api_instance.create_environment(payload)
print("The response of EnvironmentApi->create_environment:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling EnvironmentApi->create_environment: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| payload | CreateEnvironment |
- Content-Type: application/json
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | Environment is created successfully | - |
| 400 | Bad Request | - |
| 401 | Unauthorized | - |
| 404 | Not Found | - |
| 409 | Conflict | - |
| 500 | Internal Server Error | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
ResponseModel delete_an_environment(id)
Delete an environment
- Api Key Authentication (apiKey):
- Api Key Authentication (accessToken):
import hyperstack
from hyperstack.models.response_model import ResponseModel
from hyperstack.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://infrahub-api.nexgencloud.com/v1
# See configuration.py for a list of all supported configuration parameters.
configuration = hyperstack.Configuration(
host = "https://infrahub-api.nexgencloud.com/v1"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure API key authorization: apiKey
configuration.api_key['apiKey'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['apiKey'] = 'Bearer'
# Configure API key authorization: accessToken
configuration.api_key['accessToken'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['accessToken'] = 'Bearer'
# Enter a context with an instance of the API client
with hyperstack.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = hyperstack.EnvironmentApi(api_client)
id = 56 # int |
try:
# Delete an environment
api_response = api_instance.delete_an_environment(id)
print("The response of EnvironmentApi->delete_an_environment:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling EnvironmentApi->delete_an_environment: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| id | int |
- Content-Type: Not defined
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | Success | - |
| 400 | Bad Request | - |
| 401 | Unauthorized | - |
| 404 | Not Found | - |
| 500 | Internal Server Error | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
Environment get_an_environment_details(id)
Get an environment detail
- Api Key Authentication (apiKey):
- Api Key Authentication (accessToken):
import hyperstack
from hyperstack.models.environment import Environment
from hyperstack.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://infrahub-api.nexgencloud.com/v1
# See configuration.py for a list of all supported configuration parameters.
configuration = hyperstack.Configuration(
host = "https://infrahub-api.nexgencloud.com/v1"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure API key authorization: apiKey
configuration.api_key['apiKey'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['apiKey'] = 'Bearer'
# Configure API key authorization: accessToken
configuration.api_key['accessToken'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['accessToken'] = 'Bearer'
# Enter a context with an instance of the API client
with hyperstack.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = hyperstack.EnvironmentApi(api_client)
id = 56 # int |
try:
# Get an environment detail
api_response = api_instance.get_an_environment_details(id)
print("The response of EnvironmentApi->get_an_environment_details:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling EnvironmentApi->get_an_environment_details: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| id | int |
- Content-Type: Not defined
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | Getting detail successful | - |
| 400 | Bad Request | - |
| 401 | Unauthorized | - |
| 404 | Not Found | - |
| 500 | Internal Server Error | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
Environments list_environments()
List Environments
- Api Key Authentication (apiKey):
- Api Key Authentication (accessToken):
import hyperstack
from hyperstack.models.environments import Environments
from hyperstack.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://infrahub-api.nexgencloud.com/v1
# See configuration.py for a list of all supported configuration parameters.
configuration = hyperstack.Configuration(
host = "https://infrahub-api.nexgencloud.com/v1"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure API key authorization: apiKey
configuration.api_key['apiKey'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['apiKey'] = 'Bearer'
# Configure API key authorization: accessToken
configuration.api_key['accessToken'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['accessToken'] = 'Bearer'
# Enter a context with an instance of the API client
with hyperstack.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = hyperstack.EnvironmentApi(api_client)
try:
# List Environments
api_response = api_instance.list_environments()
print("The response of EnvironmentApi->list_environments:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling EnvironmentApi->list_environments: %s\n" % e)This endpoint does not need any parameter.
- Content-Type: Not defined
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | Getting environments successful | - |
| 400 | Bad Request | - |
| 401 | Unauthorized | - |
| 500 | Internal Server Error | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
Environment update_an_environment(id, payload)
Update Environment
- Api Key Authentication (apiKey):
- Api Key Authentication (accessToken):
import hyperstack
from hyperstack.models.environment import Environment
from hyperstack.models.update_environment import UpdateEnvironment
from hyperstack.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://infrahub-api.nexgencloud.com/v1
# See configuration.py for a list of all supported configuration parameters.
configuration = hyperstack.Configuration(
host = "https://infrahub-api.nexgencloud.com/v1"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure API key authorization: apiKey
configuration.api_key['apiKey'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['apiKey'] = 'Bearer'
# Configure API key authorization: accessToken
configuration.api_key['accessToken'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['accessToken'] = 'Bearer'
# Enter a context with an instance of the API client
with hyperstack.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = hyperstack.EnvironmentApi(api_client)
id = 56 # int |
payload = hyperstack.UpdateEnvironment() # UpdateEnvironment |
try:
# Update Environment
api_response = api_instance.update_an_environment(id, payload)
print("The response of EnvironmentApi->update_an_environment:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling EnvironmentApi->update_an_environment: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| id | int | ||
| payload | UpdateEnvironment |
- Content-Type: application/json
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | Update an environment success | - |
| 400 | Bad Request | - |
| 401 | Unauthorized | - |
| 404 | Not Found | - |
| 500 | Internal Server Error | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]