Skip to content

Latest commit

 

History

History
161 lines (104 loc) · 5.11 KB

File metadata and controls

161 lines (104 loc) · 5.11 KB

cyperf.DataMigrationApi

All URIs are relative to http://localhost

Method HTTP request Description
start_controller_migration_export POST /api/v2/controller-migration/operations/export
start_controller_migration_import POST /api/v2/controller-migration/operations/import

start_controller_migration_export

AsyncContext start_controller_migration_export(export_package_operation=export_package_operation)

Export the data from the controller as a package.

Example

  • OAuth Authentication (OAuth2):
  • OAuth Authentication (OAuth2):
import cyperf
from cyperf.models.async_context import AsyncContext
from cyperf.models.export_package_operation import ExportPackageOperation
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.DataMigrationApi(api_client)
    export_package_operation = cyperf.ExportPackageOperation() # ExportPackageOperation |  (optional)

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

Parameters

Name Type Description Notes
export_package_operation ExportPackageOperation [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_controller_migration_import

AsyncContext start_controller_migration_import()

Import the data from the supplied package into the controller.

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.DataMigrationApi(api_client)

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

Parameters

This endpoint does not need any parameter.

Return type

AsyncContext

Authorization

OAuth2, OAuth2

HTTP request headers

  • Content-Type: Not defined
  • 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]