Skip to content

Latest commit

 

History

History
1140 lines (759 loc) · 38.3 KB

File metadata and controls

1140 lines (759 loc) · 38.3 KB

cyperf.ConfigurationsApi

All URIs are relative to http://localhost

Method HTTP request Description
create_configs POST /api/v2/configs
delete_config DELETE /api/v2/configs/{configId}
get_config_by_id GET /api/v2/configs/{configId}
get_config_categorie_by_id GET /api/v2/config-categories/{configCategorieId}
get_config_categorie_subcategories GET /api/v2/config-categories/{configCategorieId}/subcategories
get_config_categories GET /api/v2/config-categories
get_configs GET /api/v2/configs
get_resources_custom_import_operations GET /api/v2/resources/custom-import-operations
patch_config PATCH /api/v2/configs/{configId}
start_configs_batch_delete POST /api/v2/configs/operations/batch-delete
start_configs_export_all POST /api/v2/configs/operations/exportAll
start_configs_import POST /api/v2/configs/operations/import
start_configs_import_all POST /api/v2/configs/operations/importAll
update_config PUT /api/v2/configs/{configId}

create_configs

List[ConfigMetadata] create_configs(configs=configs)

Save or import a new configuration. If the ConfigData field is not provided, this is implemented as a Save operation, only recording the metadata.

Example

  • OAuth Authentication (OAuth2):
  • OAuth Authentication (OAuth2):
import cyperf
from cyperf.models.config_metadata import ConfigMetadata
from cyperf.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to http://localhost
# See configuration.py for a list of all supported configuration parameters.
configuration = cyperf.Configuration(
    host = "http://localhost"
)

# 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.

configuration.refresh_token = os.environ["OFFLINE_TOKEN_FROM_CYPERF_UI"]

configuration.refresh_token = os.environ["OFFLINE_TOKEN_FROM_CYPERF_UI"]

# Enter a context with an instance of the API client
with cyperf.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = cyperf.ConfigurationsApi(api_client)
    configs = [cyperf.ConfigMetadata()] # List[ConfigMetadata] |  (optional)

    try:
        api_response = api_instance.create_configs(configs=configs)
        print("The response of ConfigurationsApi->create_configs:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling ConfigurationsApi->create_configs: %s\n" % e)

Parameters

Name Type Description Notes
configs List[ConfigMetadata] [optional]

Return type

List[ConfigMetadata]

Authorization

OAuth2, OAuth2

HTTP request headers

  • Content-Type: application/json, application/x-zip, application/zip, multipart/form-data
  • Accept: application/json

HTTP response details

Status code Description Response headers
201 The configuration that was saved or imported -
400 Bad request -
500 Unexpected error -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

delete_config

delete_config(config_id)

Delete a particular configuration.

Example

  • OAuth Authentication (OAuth2):
  • OAuth Authentication (OAuth2):
import cyperf
from cyperf.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to http://localhost
# See configuration.py for a list of all supported configuration parameters.
configuration = cyperf.Configuration(
    host = "http://localhost"
)

# 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.

configuration.refresh_token = os.environ["OFFLINE_TOKEN_FROM_CYPERF_UI"]

configuration.refresh_token = os.environ["OFFLINE_TOKEN_FROM_CYPERF_UI"]

# Enter a context with an instance of the API client
with cyperf.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = cyperf.ConfigurationsApi(api_client)
    config_id = 'config_id_example' # str | The ID of the config.

    try:
        api_instance.delete_config(config_id)
    except Exception as e:
        print("Exception when calling ConfigurationsApi->delete_config: %s\n" % e)

Parameters

Name Type Description Notes
config_id str The ID of the config.

Return type

void (empty response body)

Authorization

OAuth2, OAuth2

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

HTTP response details

Status code Description Response headers
204 The configuration was successfully deleted. -
403 The initiator of the request does not have enough privileges to perform the action. -
404 A configuration with the specified ID was not found. -
500 Unexpected error -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

get_config_by_id

ConfigMetadata get_config_by_id(config_id, include=include, resolve_dependencies=resolve_dependencies)

Get a particular configuration.

Example

  • OAuth Authentication (OAuth2):
  • OAuth Authentication (OAuth2):
import cyperf
from cyperf.models.config_metadata import ConfigMetadata
from cyperf.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to http://localhost
# See configuration.py for a list of all supported configuration parameters.
configuration = cyperf.Configuration(
    host = "http://localhost"
)

# 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.

configuration.refresh_token = os.environ["OFFLINE_TOKEN_FROM_CYPERF_UI"]

configuration.refresh_token = os.environ["OFFLINE_TOKEN_FROM_CYPERF_UI"]

# Enter a context with an instance of the API client
with cyperf.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = cyperf.ConfigurationsApi(api_client)
    config_id = 'config_id_example' # str | The ID of the config.
    include = 'include_example' # str | Specifies if the sub-fields that are objects should be included (eg. 'configData'). (optional)
    resolve_dependencies = 'resolve_dependencies_example' # str | Specifies if the content of the referenced files (action payloads and TLS files) should be included. (optional)

    try:
        api_response = api_instance.get_config_by_id(config_id, include=include, resolve_dependencies=resolve_dependencies)
        print("The response of ConfigurationsApi->get_config_by_id:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling ConfigurationsApi->get_config_by_id: %s\n" % e)

Parameters

Name Type Description Notes
config_id str The ID of the config.
include str Specifies if the sub-fields that are objects should be included (eg. 'configData'). [optional]
resolve_dependencies str Specifies if the content of the referenced files (action payloads and TLS files) should be included. [optional]

Return type

ConfigMetadata

Authorization

OAuth2, OAuth2

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json, application/x-zip, application/zip, multipart/form-data

HTTP response details

Status code Description Response headers
200 The requested configuration -
404 A configuration with the specified ID was not found. -
500 Unexpected error -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

get_config_categorie_by_id

ConfigCategory get_config_categorie_by_id(config_categorie_id)

returns a single configuration category with its subcategories.

Example

  • OAuth Authentication (OAuth2):
  • OAuth Authentication (OAuth2):
import cyperf
from cyperf.models.config_category import ConfigCategory
from cyperf.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to http://localhost
# See configuration.py for a list of all supported configuration parameters.
configuration = cyperf.Configuration(
    host = "http://localhost"
)

# 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.

configuration.refresh_token = os.environ["OFFLINE_TOKEN_FROM_CYPERF_UI"]

configuration.refresh_token = os.environ["OFFLINE_TOKEN_FROM_CYPERF_UI"]

# Enter a context with an instance of the API client
with cyperf.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = cyperf.ConfigurationsApi(api_client)
    config_categorie_id = 'config_categorie_id_example' # str | The ID of the config categorie.

    try:
        api_response = api_instance.get_config_categorie_by_id(config_categorie_id)
        print("The response of ConfigurationsApi->get_config_categorie_by_id:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling ConfigurationsApi->get_config_categorie_by_id: %s\n" % e)

Parameters

Name Type Description Notes
config_categorie_id str The ID of the config categorie.

Return type

ConfigCategory

Authorization

OAuth2, OAuth2

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 The filtered configuration category with subcategories -
500 Internal server error -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

get_config_categorie_subcategories

GetConfigCategorieSubcategories200Response get_config_categorie_subcategories(config_categorie_id, take=take, skip=skip)

Example

  • OAuth Authentication (OAuth2):
  • OAuth Authentication (OAuth2):
import cyperf
from cyperf.models.get_config_categorie_subcategories200_response import GetConfigCategorieSubcategories200Response
from cyperf.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to http://localhost
# See configuration.py for a list of all supported configuration parameters.
configuration = cyperf.Configuration(
    host = "http://localhost"
)

# 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.

configuration.refresh_token = os.environ["OFFLINE_TOKEN_FROM_CYPERF_UI"]

configuration.refresh_token = os.environ["OFFLINE_TOKEN_FROM_CYPERF_UI"]

# Enter a context with an instance of the API client
with cyperf.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = cyperf.ConfigurationsApi(api_client)
    config_categorie_id = 'config_categorie_id_example' # str | The ID of the config categorie.
    take = 56 # int | The number of search results to return (optional)
    skip = 56 # int | The number of search results to skip (optional)

    try:
        api_response = api_instance.get_config_categorie_subcategories(config_categorie_id, take=take, skip=skip)
        print("The response of ConfigurationsApi->get_config_categorie_subcategories:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling ConfigurationsApi->get_config_categorie_subcategories: %s\n" % e)

Parameters

Name Type Description Notes
config_categorie_id str The ID of the config categorie.
take int The number of search results to return [optional]
skip int The number of search results to skip [optional]

Return type

GetConfigCategorieSubcategories200Response

Authorization

OAuth2, OAuth2

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 The list of subcategories for the specified category -
400 Missing or invalid category parameter -
500 Internal server error -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

get_config_categories

GetConfigCategories200Response get_config_categories(take=take, skip=skip)

Get the list of available configuration categories.

Example

  • OAuth Authentication (OAuth2):
  • OAuth Authentication (OAuth2):
import cyperf
from cyperf.models.get_config_categories200_response import GetConfigCategories200Response
from cyperf.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to http://localhost
# See configuration.py for a list of all supported configuration parameters.
configuration = cyperf.Configuration(
    host = "http://localhost"
)

# 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.

configuration.refresh_token = os.environ["OFFLINE_TOKEN_FROM_CYPERF_UI"]

configuration.refresh_token = os.environ["OFFLINE_TOKEN_FROM_CYPERF_UI"]

# Enter a context with an instance of the API client
with cyperf.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = cyperf.ConfigurationsApi(api_client)
    take = 56 # int | The number of search results to return (optional)
    skip = 56 # int | The number of search results to skip (optional)

    try:
        api_response = api_instance.get_config_categories(take=take, skip=skip)
        print("The response of ConfigurationsApi->get_config_categories:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling ConfigurationsApi->get_config_categories: %s\n" % e)

Parameters

Name Type Description Notes
take int The number of search results to return [optional]
skip int The number of search results to skip [optional]

Return type

GetConfigCategories200Response

Authorization

OAuth2, OAuth2

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 The list of configuration categories -
500 Unexpected error -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

get_configs

GetConfigs200Response get_configs(take=take, skip=skip, search_col=search_col, search_val=search_val, filter_mode=filter_mode, sort=sort)

Get all the configurations available to the current user.

Example

  • OAuth Authentication (OAuth2):
  • OAuth Authentication (OAuth2):
import cyperf
from cyperf.models.get_configs200_response import GetConfigs200Response
from cyperf.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to http://localhost
# See configuration.py for a list of all supported configuration parameters.
configuration = cyperf.Configuration(
    host = "http://localhost"
)

# 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.

configuration.refresh_token = os.environ["OFFLINE_TOKEN_FROM_CYPERF_UI"]

configuration.refresh_token = os.environ["OFFLINE_TOKEN_FROM_CYPERF_UI"]

# Enter a context with an instance of the API client
with cyperf.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = cyperf.ConfigurationsApi(api_client)
    take = 56 # int | The number of search results to return (optional)
    skip = 56 # int | The number of search results to skip (optional)
    search_col = 'search_col_example' # str | A list of comma-separated columns used to search for the supplied values (optional)
    search_val = 'search_val_example' # str | The keywords used to filter the items (optional)
    filter_mode = 'filter_mode_example' # str | The operator applied to the supplied values (optional)
    sort = 'sort_example' # str | A list of comma-separated field:direction pairs used to sort the items where direction must be asc or dsc (optional)

    try:
        api_response = api_instance.get_configs(take=take, skip=skip, search_col=search_col, search_val=search_val, filter_mode=filter_mode, sort=sort)
        print("The response of ConfigurationsApi->get_configs:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling ConfigurationsApi->get_configs: %s\n" % e)

Parameters

Name Type Description Notes
take int The number of search results to return [optional]
skip int The number of search results to skip [optional]
search_col str A list of comma-separated columns used to search for the supplied values [optional]
search_val str The keywords used to filter the items [optional]
filter_mode str The operator applied to the supplied values [optional]
sort str A list of comma-separated field:direction pairs used to sort the items where direction must be asc or dsc [optional]

Return type

GetConfigs200Response

Authorization

OAuth2, OAuth2

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 The list of configurations -
500 Unexpected error -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

get_resources_custom_import_operations

GetResourcesCustomImportOperations200Response get_resources_custom_import_operations(take=take, skip=skip)

Get all the custom import config operations.

Example

  • OAuth Authentication (OAuth2):
  • OAuth Authentication (OAuth2):
import cyperf
from cyperf.models.get_resources_custom_import_operations200_response import GetResourcesCustomImportOperations200Response
from cyperf.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to http://localhost
# See configuration.py for a list of all supported configuration parameters.
configuration = cyperf.Configuration(
    host = "http://localhost"
)

# 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.

configuration.refresh_token = os.environ["OFFLINE_TOKEN_FROM_CYPERF_UI"]

configuration.refresh_token = os.environ["OFFLINE_TOKEN_FROM_CYPERF_UI"]

# Enter a context with an instance of the API client
with cyperf.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = cyperf.ConfigurationsApi(api_client)
    take = 56 # int | The number of search results to return (optional)
    skip = 56 # int | The number of search results to skip (optional)

    try:
        api_response = api_instance.get_resources_custom_import_operations(take=take, skip=skip)
        print("The response of ConfigurationsApi->get_resources_custom_import_operations:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling ConfigurationsApi->get_resources_custom_import_operations: %s\n" % e)

Parameters

Name Type Description Notes
take int The number of search results to return [optional]
skip int The number of search results to skip [optional]

Return type

GetResourcesCustomImportOperations200Response

Authorization

OAuth2, OAuth2

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 The list of custom import config operations -
500 Unexpected error -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

patch_config

patch_config(config_id, config_metadata=config_metadata)

Update a particular configuration. Only non-null fields are updated.

Example

  • OAuth Authentication (OAuth2):
  • OAuth Authentication (OAuth2):
import cyperf
from cyperf.models.config_metadata import ConfigMetadata
from cyperf.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to http://localhost
# See configuration.py for a list of all supported configuration parameters.
configuration = cyperf.Configuration(
    host = "http://localhost"
)

# 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.

configuration.refresh_token = os.environ["OFFLINE_TOKEN_FROM_CYPERF_UI"]

configuration.refresh_token = os.environ["OFFLINE_TOKEN_FROM_CYPERF_UI"]

# Enter a context with an instance of the API client
with cyperf.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = cyperf.ConfigurationsApi(api_client)
    config_id = 'config_id_example' # str | The ID of the config.
    config_metadata = cyperf.ConfigMetadata() # ConfigMetadata |  (optional)

    try:
        api_instance.patch_config(config_id, config_metadata=config_metadata)
    except Exception as e:
        print("Exception when calling ConfigurationsApi->patch_config: %s\n" % e)

Parameters

Name Type Description Notes
config_id str The ID of the config.
config_metadata ConfigMetadata [optional]

Return type

void (empty response body)

Authorization

OAuth2, OAuth2

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

HTTP response details

Status code Description Response headers
204 The configuration was successfully updated. -
404 A configuration with the specified ID was not found. -
500 Unexpected error -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

start_configs_batch_delete

AsyncContext start_configs_batch_delete(start_agents_batch_delete_request_inner=start_agents_batch_delete_request_inner)

Remove multiple configurations.

Example

  • OAuth Authentication (OAuth2):
  • OAuth Authentication (OAuth2):
import cyperf
from cyperf.models.async_context import AsyncContext
from cyperf.models.start_agents_batch_delete_request_inner import StartAgentsBatchDeleteRequestInner
from cyperf.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to http://localhost
# See configuration.py for a list of all supported configuration parameters.
configuration = cyperf.Configuration(
    host = "http://localhost"
)

# 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.

configuration.refresh_token = os.environ["OFFLINE_TOKEN_FROM_CYPERF_UI"]

configuration.refresh_token = os.environ["OFFLINE_TOKEN_FROM_CYPERF_UI"]

# Enter a context with an instance of the API client
with cyperf.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = cyperf.ConfigurationsApi(api_client)
    start_agents_batch_delete_request_inner = [cyperf.StartAgentsBatchDeleteRequestInner()] # List[StartAgentsBatchDeleteRequestInner] |  (optional)

    try:
        api_response = api_instance.start_configs_batch_delete(start_agents_batch_delete_request_inner=start_agents_batch_delete_request_inner)
        print("The response of ConfigurationsApi->start_configs_batch_delete:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling ConfigurationsApi->start_configs_batch_delete: %s\n" % e)

Parameters

Name Type Description Notes
start_agents_batch_delete_request_inner List[StartAgentsBatchDeleteRequestInner] [optional]

Return type

AsyncContext

Authorization

OAuth2, OAuth2

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

HTTP response details

Status code Description Response headers
202 Details about the operation that just started -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

start_configs_export_all

AsyncContext start_configs_export_all(export_all_operation=export_all_operation)

Export all configurations owned by the current user. Optionally, provide a list of config IDs to export.

Example

  • OAuth Authentication (OAuth2):
  • OAuth Authentication (OAuth2):
import cyperf
from cyperf.models.async_context import AsyncContext
from cyperf.models.export_all_operation import ExportAllOperation
from cyperf.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to http://localhost
# See configuration.py for a list of all supported configuration parameters.
configuration = cyperf.Configuration(
    host = "http://localhost"
)

# 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.

configuration.refresh_token = os.environ["OFFLINE_TOKEN_FROM_CYPERF_UI"]

configuration.refresh_token = os.environ["OFFLINE_TOKEN_FROM_CYPERF_UI"]

# Enter a context with an instance of the API client
with cyperf.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = cyperf.ConfigurationsApi(api_client)
    export_all_operation = cyperf.ExportAllOperation() # ExportAllOperation |  (optional)

    try:
        api_response = api_instance.start_configs_export_all(export_all_operation=export_all_operation)
        print("The response of ConfigurationsApi->start_configs_export_all:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling ConfigurationsApi->start_configs_export_all: %s\n" % e)

Parameters

Name Type Description Notes
export_all_operation ExportAllOperation [optional]

Return type

AsyncContext

Authorization

OAuth2, OAuth2

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

HTTP response details

Status code Description Response headers
202 Details about the operation that just started -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

start_configs_import

AsyncContext start_configs_import(body=body)

Import a single configuration from the specified file.

Example

  • OAuth Authentication (OAuth2):
  • OAuth Authentication (OAuth2):
import cyperf
from cyperf.models.async_context import AsyncContext
from cyperf.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to http://localhost
# See configuration.py for a list of all supported configuration parameters.
configuration = cyperf.Configuration(
    host = "http://localhost"
)

# 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.

configuration.refresh_token = os.environ["OFFLINE_TOKEN_FROM_CYPERF_UI"]

configuration.refresh_token = os.environ["OFFLINE_TOKEN_FROM_CYPERF_UI"]

# Enter a context with an instance of the API client
with cyperf.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = cyperf.ConfigurationsApi(api_client)
    body = None # bytearray |  (optional)

    try:
        api_response = api_instance.start_configs_import(body=body)
        print("The response of ConfigurationsApi->start_configs_import:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling ConfigurationsApi->start_configs_import: %s\n" % e)

Parameters

Name Type Description Notes
body bytearray [optional]

Return type

AsyncContext

Authorization

OAuth2, OAuth2

HTTP request headers

  • Content-Type: application/x-zip, application/zip, multipart/form-data
  • Accept: application/json

HTTP response details

Status code Description Response headers
202 Details about the operation that just started -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

start_configs_import_all

AsyncContext start_configs_import_all(import_all_operation=import_all_operation)

Import all configurations from the specified file.

Example

  • OAuth Authentication (OAuth2):
  • OAuth Authentication (OAuth2):
import cyperf
from cyperf.models.async_context import AsyncContext
from cyperf.models.import_all_operation import ImportAllOperation
from cyperf.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to http://localhost
# See configuration.py for a list of all supported configuration parameters.
configuration = cyperf.Configuration(
    host = "http://localhost"
)

# 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.

configuration.refresh_token = os.environ["OFFLINE_TOKEN_FROM_CYPERF_UI"]

configuration.refresh_token = os.environ["OFFLINE_TOKEN_FROM_CYPERF_UI"]

# Enter a context with an instance of the API client
with cyperf.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = cyperf.ConfigurationsApi(api_client)
    import_all_operation = cyperf.ImportAllOperation() # ImportAllOperation |  (optional)

    try:
        api_response = api_instance.start_configs_import_all(import_all_operation=import_all_operation)
        print("The response of ConfigurationsApi->start_configs_import_all:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling ConfigurationsApi->start_configs_import_all: %s\n" % e)

Parameters

Name Type Description Notes
import_all_operation ImportAllOperation [optional]

Return type

AsyncContext

Authorization

OAuth2, OAuth2

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

HTTP response details

Status code Description Response headers
202 Details about the operation that just started -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

update_config

ConfigMetadata update_config(config_id, config_metadata=config_metadata)

Update a particular configuration.

Example

  • OAuth Authentication (OAuth2):
  • OAuth Authentication (OAuth2):
import cyperf
from cyperf.models.config_metadata import ConfigMetadata
from cyperf.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to http://localhost
# See configuration.py for a list of all supported configuration parameters.
configuration = cyperf.Configuration(
    host = "http://localhost"
)

# 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.

configuration.refresh_token = os.environ["OFFLINE_TOKEN_FROM_CYPERF_UI"]

configuration.refresh_token = os.environ["OFFLINE_TOKEN_FROM_CYPERF_UI"]

# Enter a context with an instance of the API client
with cyperf.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = cyperf.ConfigurationsApi(api_client)
    config_id = 'config_id_example' # str | The ID of the config.
    config_metadata = cyperf.ConfigMetadata() # ConfigMetadata |  (optional)

    try:
        api_response = api_instance.update_config(config_id, config_metadata=config_metadata)
        print("The response of ConfigurationsApi->update_config:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling ConfigurationsApi->update_config: %s\n" % e)

Parameters

Name Type Description Notes
config_id str The ID of the config.
config_metadata ConfigMetadata [optional]

Return type

ConfigMetadata

Authorization

OAuth2, OAuth2

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 The updated configuration -
400 Bad request -
404 A configuration with the specified ID was not found. -
500 Unexpected error -

[Back to top] [Back to API list] [Back to Model list] [Back to README]