Skip to content

Latest commit

 

History

History
697 lines (489 loc) · 24.6 KB

NetConnectV1Api.md

File metadata and controls

697 lines (489 loc) · 24.6 KB

corellium.NetConnectV1Api

Request timeouts

Every API method accepts _request_timeout in seconds: a positive float for the urllib3 total timeout, or a pair of positive floats (connect, read). This controls HTTP transport waiting, not how long the server operation may run. It is not a wall-clock deadline for the operation or for all retries combined.

Transport timeouts raise urllib3.exceptions.TimeoutError subclasses such as ReadTimeoutError and ConnectTimeoutError. When retries are exhausted, urllib3 can instead raise urllib3.exceptions.MaxRetryError; inspect its reason to distinguish a timeout from other connection failures. Retry behavior depends on the HTTP method and Configuration.retries. These are client-side exceptions, not HTTP response statuses or SDK ApiException responses.

A timeout does not guarantee cancellation or rollback of an operation accepted by the server. For example, after a start request times out, the instance may still be starting or may already be running; the timeout alone does not establish its state or mean it was stopped or destroyed. The request might not have reached the server at all, leaving the instance off. Treat the outcome as unknown and fetch the instance's current state before deciding whether to retry. If it has since been destroyed, that lookup may return not found; the timeout itself does not prove destruction. Do not blindly repeat a state-changing request.

Catch urllib3.exceptions.TimeoutError and urllib3.exceptions.MaxRetryError separately from the SDK ApiException. MaxRetryError is not a subclass of TimeoutError. With _with_http_info the same rules apply. With _without_preload_content, a read timeout may also occur later when reading the returned response body.

All URIs are relative to https://app.corellium.com/api

Method HTTP request Description
v1_create_network_connection POST /v1/network/connections Create a new Network Connection
v1_delete_network_connection DELETE /v1/network/connections/{id} Delete an existing Network Connection
v1_get_network_connection GET /v1/network/connections/{id} Return the configuration and per project statuses for a single network provider.
v1_list_network_connections GET /v1/network/connections List available network connections
v1_list_network_interfaces GET /v1/network/interfaces List available physical network interfaces
v1_list_network_providers GET /v1/network/providers List available network providers
v1_partial_update_network_connection PATCH /v1/network/connections/{id} Update Network Connection (partial)
v1_update_network_connection PUT /v1/network/connections/{id} Update Network Connection

v1_create_network_connection

NetworkConnection v1_create_network_connection(create_network_connection_options)

Create a new Network Connection

You must have the domain administrator role to create a network connection. VLAN networks are only supported in bridged networking mode.

Example

  • Bearer (JWT) Authentication (BearerAuth):
import corellium
from corellium.models.create_network_connection_options import CreateNetworkConnectionOptions
from corellium.models.network_connection import NetworkConnection
from corellium.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to https://app.corellium.com/api
# See configuration.py for a list of all supported configuration parameters.
configuration = corellium.Configuration(
    host = "https://app.corellium.com/api"
)

# 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 Bearer authorization (JWT): BearerAuth
configuration = corellium.Configuration(
    access_token = os.environ["BEARER_TOKEN"]
)

# Enter a context with an instance of the API client
with corellium.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = corellium.NetConnectV1Api(api_client)
    create_network_connection_options = {
  "provider": "openvpn",
  "name": "My OpenVPN Connection",
  "config": {
    "config": "client\ndev tun\nproto tcp\nremote my-server-1 1194\nresolv-retry infinite\nnobind\npersist-key\npersist-tun\nremote-cert-tls server\ntls-auth ta.key 1\ncipher AES-256-CBC\nverb 3\n"
  }
} # CreateNetworkConnectionOptions | Network Connection Options

    try:
        # Create a new Network Connection
        api_response = api_instance.v1_create_network_connection(create_network_connection_options)
        print("The response of NetConnectV1Api->v1_create_network_connection:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling NetConnectV1Api->v1_create_network_connection: %s\n" % e)

Parameters

Name Type Description Notes
create_network_connection_options CreateNetworkConnectionOptions Network Connection Options

Return type

NetworkConnection

Authorization

BearerAuth

HTTP request headers

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

HTTP response details

Status code Description Response headers
200 Success -
403 Forbidden -

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

v1_delete_network_connection

v1_delete_network_connection(id, delete_network_connection_options=delete_network_connection_options)

Delete an existing Network Connection

You must have the domain administrator role to delete a network connection.

Example

  • Bearer (JWT) Authentication (BearerAuth):
import corellium
from corellium.models.delete_network_connection_options import DeleteNetworkConnectionOptions
from corellium.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to https://app.corellium.com/api
# See configuration.py for a list of all supported configuration parameters.
configuration = corellium.Configuration(
    host = "https://app.corellium.com/api"
)

# 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 Bearer authorization (JWT): BearerAuth
configuration = corellium.Configuration(
    access_token = os.environ["BEARER_TOKEN"]
)

# Enter a context with an instance of the API client
with corellium.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = corellium.NetConnectV1Api(api_client)
    id = 'id_example' # str | Network Connection Identifier - uuid
    delete_network_connection_options = corellium.DeleteNetworkConnectionOptions() # DeleteNetworkConnectionOptions | Delete options (optional)

    try:
        # Delete an existing Network Connection
        api_instance.v1_delete_network_connection(id, delete_network_connection_options=delete_network_connection_options)
    except Exception as e:
        print("Exception when calling NetConnectV1Api->v1_delete_network_connection: %s\n" % e)

Parameters

Name Type Description Notes
id str Network Connection Identifier - uuid
delete_network_connection_options DeleteNetworkConnectionOptions Delete options [optional]

Return type

void (empty response body)

Authorization

BearerAuth

HTTP request headers

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

HTTP response details

Status code Description Response headers
204 Success -
400 Bad Request -
403 Forbidden -

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

v1_get_network_connection

NetworkConnection v1_get_network_connection(id)

Return the configuration and per project statuses for a single network provider.

You must have the domain administrator or project administrator role to fetch a network connection.

Example

  • Bearer (JWT) Authentication (BearerAuth):
import corellium
from corellium.models.network_connection import NetworkConnection
from corellium.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to https://app.corellium.com/api
# See configuration.py for a list of all supported configuration parameters.
configuration = corellium.Configuration(
    host = "https://app.corellium.com/api"
)

# 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 Bearer authorization (JWT): BearerAuth
configuration = corellium.Configuration(
    access_token = os.environ["BEARER_TOKEN"]
)

# Enter a context with an instance of the API client
with corellium.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = corellium.NetConnectV1Api(api_client)
    id = 'id_example' # str | Network Connection Identifier - uuid

    try:
        # Return the configuration and per project statuses for a single network provider.
        api_response = api_instance.v1_get_network_connection(id)
        print("The response of NetConnectV1Api->v1_get_network_connection:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling NetConnectV1Api->v1_get_network_connection: %s\n" % e)

Parameters

Name Type Description Notes
id str Network Connection Identifier - uuid

Return type

NetworkConnection

Authorization

BearerAuth

HTTP request headers

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

HTTP response details

Status code Description Response headers
200 OK -
403 Forbidden -
404 Not Found -

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

v1_list_network_connections

NetworkConnectionPaginationResult v1_list_network_connections(limit=limit, offset=offset)

List available network connections

You must have the domain administrator or project administrator role to list network connections.

Example

  • Bearer (JWT) Authentication (BearerAuth):
import corellium
from corellium.models.network_connection_pagination_result import NetworkConnectionPaginationResult
from corellium.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to https://app.corellium.com/api
# See configuration.py for a list of all supported configuration parameters.
configuration = corellium.Configuration(
    host = "https://app.corellium.com/api"
)

# 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 Bearer authorization (JWT): BearerAuth
configuration = corellium.Configuration(
    access_token = os.environ["BEARER_TOKEN"]
)

# Enter a context with an instance of the API client
with corellium.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = corellium.NetConnectV1Api(api_client)
    limit = 3.4 # float | The maximum number of items to return. (optional)
    offset = 3.4 # float | The starting index of the items to return. (optional)

    try:
        # List available network connections
        api_response = api_instance.v1_list_network_connections(limit=limit, offset=offset)
        print("The response of NetConnectV1Api->v1_list_network_connections:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling NetConnectV1Api->v1_list_network_connections: %s\n" % e)

Parameters

Name Type Description Notes
limit float The maximum number of items to return. [optional]
offset float The starting index of the items to return. [optional]

Return type

NetworkConnectionPaginationResult

Authorization

BearerAuth

HTTP request headers

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

HTTP response details

Status code Description Response headers
200 Success -
403 Forbidden -

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

v1_list_network_interfaces

List[str] v1_list_network_interfaces()

List available physical network interfaces

Lists available physical network interfaces that can be used for VLAN configuration. You must have the domain administrator role to list network interfaces.

Example

  • Bearer (JWT) Authentication (BearerAuth):
import corellium
from corellium.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to https://app.corellium.com/api
# See configuration.py for a list of all supported configuration parameters.
configuration = corellium.Configuration(
    host = "https://app.corellium.com/api"
)

# 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 Bearer authorization (JWT): BearerAuth
configuration = corellium.Configuration(
    access_token = os.environ["BEARER_TOKEN"]
)

# Enter a context with an instance of the API client
with corellium.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = corellium.NetConnectV1Api(api_client)

    try:
        # List available physical network interfaces
        api_response = api_instance.v1_list_network_interfaces()
        print("The response of NetConnectV1Api->v1_list_network_interfaces:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling NetConnectV1Api->v1_list_network_interfaces: %s\n" % e)

Parameters

This endpoint does not need any parameter.

Return type

List[str]

Authorization

BearerAuth

HTTP request headers

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

HTTP response details

Status code Description Response headers
200 Success -
403 Forbidden -

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

v1_list_network_providers

NetworkConnectionProviderPaginationResult v1_list_network_providers()

List available network providers

Provides a list of registered network providers to be used when creating network connections. You must have the domain administrator role to list network providers.

Example

  • Bearer (JWT) Authentication (BearerAuth):
import corellium
from corellium.models.network_connection_provider_pagination_result import NetworkConnectionProviderPaginationResult
from corellium.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to https://app.corellium.com/api
# See configuration.py for a list of all supported configuration parameters.
configuration = corellium.Configuration(
    host = "https://app.corellium.com/api"
)

# 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 Bearer authorization (JWT): BearerAuth
configuration = corellium.Configuration(
    access_token = os.environ["BEARER_TOKEN"]
)

# Enter a context with an instance of the API client
with corellium.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = corellium.NetConnectV1Api(api_client)

    try:
        # List available network providers
        api_response = api_instance.v1_list_network_providers()
        print("The response of NetConnectV1Api->v1_list_network_providers:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling NetConnectV1Api->v1_list_network_providers: %s\n" % e)

Parameters

This endpoint does not need any parameter.

Return type

NetworkConnectionProviderPaginationResult

Authorization

BearerAuth

HTTP request headers

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

HTTP response details

Status code Description Response headers
200 Success -
403 Forbidden -

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

v1_partial_update_network_connection

NetworkConnection v1_partial_update_network_connection(id, partial_update_network_connection_options)

Update Network Connection (partial)

Only updates the specified attributes. You must have the domain administrator role to update a network connection.

Example

  • Bearer (JWT) Authentication (BearerAuth):
import corellium
from corellium.models.network_connection import NetworkConnection
from corellium.models.partial_update_network_connection_options import PartialUpdateNetworkConnectionOptions
from corellium.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to https://app.corellium.com/api
# See configuration.py for a list of all supported configuration parameters.
configuration = corellium.Configuration(
    host = "https://app.corellium.com/api"
)

# 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 Bearer authorization (JWT): BearerAuth
configuration = corellium.Configuration(
    access_token = os.environ["BEARER_TOKEN"]
)

# Enter a context with an instance of the API client
with corellium.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = corellium.NetConnectV1Api(api_client)
    id = 'id_example' # str | Network Connection Identifier - uuid
    partial_update_network_connection_options = {
  "name": "My Renamed OpenVPN Connection"
} # PartialUpdateNetworkConnectionOptions | Network Connection Options

    try:
        # Update Network Connection (partial)
        api_response = api_instance.v1_partial_update_network_connection(id, partial_update_network_connection_options)
        print("The response of NetConnectV1Api->v1_partial_update_network_connection:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling NetConnectV1Api->v1_partial_update_network_connection: %s\n" % e)

Parameters

Name Type Description Notes
id str Network Connection Identifier - uuid
partial_update_network_connection_options PartialUpdateNetworkConnectionOptions Network Connection Options

Return type

NetworkConnection

Authorization

BearerAuth

HTTP request headers

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

HTTP response details

Status code Description Response headers
200 Success -
400 Bad Request -

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

v1_update_network_connection

NetworkConnection v1_update_network_connection(id, update_network_connection_options)

Update Network Connection

You must have the domain administrator role to update a network connection.

Example

  • Bearer (JWT) Authentication (BearerAuth):
import corellium
from corellium.models.network_connection import NetworkConnection
from corellium.models.update_network_connection_options import UpdateNetworkConnectionOptions
from corellium.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to https://app.corellium.com/api
# See configuration.py for a list of all supported configuration parameters.
configuration = corellium.Configuration(
    host = "https://app.corellium.com/api"
)

# 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 Bearer authorization (JWT): BearerAuth
configuration = corellium.Configuration(
    access_token = os.environ["BEARER_TOKEN"]
)

# Enter a context with an instance of the API client
with corellium.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = corellium.NetConnectV1Api(api_client)
    id = 'id_example' # str | Network Connection Identifier - uuid
    update_network_connection_options = {
  "type": "openvpn",
  "name": "My Renamed OpenVPN Connection",
  "config": {
    "config": "client\ndev tun\nproto tcp\nremote my-server-1 1194\nresolv-retry infinite\nnobind\npersist-key\npersist-tun\nremote-cert-tls server\ntls-auth ta.key 1\ncipher AES-256-CBC\nverb 3\n"
  }
} # UpdateNetworkConnectionOptions | Network Connection Options

    try:
        # Update Network Connection
        api_response = api_instance.v1_update_network_connection(id, update_network_connection_options)
        print("The response of NetConnectV1Api->v1_update_network_connection:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling NetConnectV1Api->v1_update_network_connection: %s\n" % e)

Parameters

Name Type Description Notes
id str Network Connection Identifier - uuid
update_network_connection_options UpdateNetworkConnectionOptions Network Connection Options

Return type

NetworkConnection

Authorization

BearerAuth

HTTP request headers

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

HTTP response details

Status code Description Response headers
200 Success -
400 Bad Request -
403 Forbidden -

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