Skip to content

Latest commit

 

History

History
702 lines (491 loc) · 29 KB

NetConnectApi.md

File metadata and controls

702 lines (491 loc) · 29 KB

corellium.NetConnectApi

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
v3_create_network_connection POST /v3/network/connections Create a new Network Connection
v3_delete_network_connection DELETE /v3/network/connections/{id} Delete an existing Network Connection
v3_get_network_connection GET /v3/network/connections/{id} Fetch an existing Network Connection
v3_list_network_connections GET /v3/network/connections List available network connections
v3_list_network_interfaces GET /v3/network/interfaces List available physical network interfaces
v3_list_network_providers GET /v3/network/providers List available network providers
v3_partial_update_network_connection PATCH /v3/network/connections/{id} Update Network Connection (patch)
v3_update_network_connection PUT /v3/network/connections/{id} Update Network Connection

v3_create_network_connection

List[ProviderNetworkConnection] v3_create_network_connection(create_network_connection_body)

Create a new Network Connection

Creates a network connection that projects can route their outbound device traffic through. Pick a provider type from v3ListNetworkProviders and supply its settings; for a VLAN, pick a physical interface from v3ListNetworkInterfaces. VLAN networks are only supported in bridged networking mode. Afterwards, attach it to a project by setting the project's settings.connection. You must have the domain administrator role to create a network connection.

Example

  • Bearer (JWT) Authentication (BearerAuth):
import corellium
from corellium.models.create_network_connection_body import CreateNetworkConnectionBody
from corellium.models.provider_network_connection import ProviderNetworkConnection
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.NetConnectApi(api_client)
    create_network_connection_body = corellium.CreateNetworkConnectionBody() # CreateNetworkConnectionBody | 

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

Parameters

Name Type Description Notes
create_network_connection_body CreateNetworkConnectionBody

Return type

List[ProviderNetworkConnection]

Authorization

BearerAuth

HTTP request headers

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

HTTP response details

Status code Description Response headers
200 Success -
400 The request was invalid, for example a missing or malformed field. The body says which field; fix it before retrying. -
403 Signed in, but not allowed to do this: you lack the required role, have no access to the project, or your license does not include the feature. -

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

v3_delete_network_connection

v3_delete_network_connection(id, v3_delete_network_connection_request=v3_delete_network_connection_request)

Delete an existing Network Connection

Delete an existing Network Connection. You must have the domain administrator role to delete a network connection.

Deletes are idempotent: an unknown id, or a connection that was already deleted, is a successful no-op that still returns 204, and repeated calls return 204 as well. A 404 means the request path did not match a delete route, not that the target was missing. A connection still attached to projects returns 400 unless force is set.

Example

  • Bearer (JWT) Authentication (BearerAuth):
import corellium
from corellium.models.v3_delete_network_connection_request import V3DeleteNetworkConnectionRequest
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.NetConnectApi(api_client)
    id = '0eb5d1e7-2c10-42b1-95fc-30e4e4885cd7' # str | Network Connection Identifier.
    v3_delete_network_connection_request = corellium.V3DeleteNetworkConnectionRequest() # V3DeleteNetworkConnectionRequest |  (optional)

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

Parameters

Name Type Description Notes
id str Network Connection Identifier.
v3_delete_network_connection_request V3DeleteNetworkConnectionRequest [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 No content -
400 The network connection is still in use by one or more projects. -
403 Signed in, but not allowed to do this: you lack the required role, have no access to the project, or your license does not include the feature. -

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

v3_get_network_connection

ProviderNetworkConnection v3_get_network_connection(id)

Fetch an existing Network Connection

Returns one network connection: its settings and, for each project using it, the connection's current state there. A network connection routes a project's outbound device traffic through a network you control, such as a VPN or a VLAN. 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.provider_network_connection import ProviderNetworkConnection
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.NetConnectApi(api_client)
    id = '0eb5d1e7-2c10-42b1-95fc-30e4e4885cd7' # str | Network Connection Identifier.

    try:
        # Fetch an existing Network Connection
        api_response = api_instance.v3_get_network_connection(id)
        print("The response of NetConnectApi->v3_get_network_connection:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling NetConnectApi->v3_get_network_connection: %s\n" % e)

Parameters

Name Type Description Notes
id str Network Connection Identifier.

Return type

ProviderNetworkConnection

Authorization

BearerAuth

HTTP request headers

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

HTTP response details

Status code Description Response headers
200 Success -
403 Signed in, but not allowed to do this: you lack the required role, have no access to the project, or your license does not include the feature. -
404 The resource does not exist, or you cannot see it. -

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

v3_list_network_connections

NetworkConnections v3_list_network_connections(limit=limit, offset=offset)

List available network connections

Lists the network connections set up in your domain. A network connection routes a project's outbound device traffic through a network you control, such as a VPN or a VLAN; a project uses one when its settings.connection is set to the connection's ID (see PATCH /v3/projects/{projectId}). 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_connections import NetworkConnections
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.NetConnectApi(api_client)
    limit = 100 # float | Most results to return in one page. Whole number from 1 to 1000; defaults to 100. A value outside that range is rejected with 400. (optional) (default to 100)
    offset = 0 # float | How many results to skip before this page starts; defaults to 0. To get the next page, add `limit` to the previous `offset`. (optional) (default to 0)

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

Parameters

Name Type Description Notes
limit float Most results to return in one page. Whole number from 1 to 1000; defaults to 100. A value outside that range is rejected with 400. [optional] [default to 100]
offset float How many results to skip before this page starts; defaults to 0. To get the next page, add `limit` to the previous `offset`. [optional] [default to 0]

Return type

NetworkConnections

Authorization

BearerAuth

HTTP request headers

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

HTTP response details

Status code Description Response headers
200 Success -
403 Signed in, but not allowed to do this: you lack the required role, have no access to the project, or your license does not include the feature. -

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

v3_list_network_interfaces

NetworkInterfaces v3_list_network_interfaces(limit=limit, offset=offset)

List available physical network interfaces

Lists the physical network ports on the server that can carry a VLAN network connection. Use one of these names when creating a VLAN connection. You must have the domain administrator role to list network interfaces.

Example

  • Bearer (JWT) Authentication (BearerAuth):
import corellium
from corellium.models.network_interfaces import NetworkInterfaces
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.NetConnectApi(api_client)
    limit = 100 # float | Most results to return in one page. Whole number from 1 to 1000; defaults to 100. A value outside that range is rejected with 400. (optional) (default to 100)
    offset = 0 # float | How many results to skip before this page starts; defaults to 0. To get the next page, add `limit` to the previous `offset`. (optional) (default to 0)

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

Parameters

Name Type Description Notes
limit float Most results to return in one page. Whole number from 1 to 1000; defaults to 100. A value outside that range is rejected with 400. [optional] [default to 100]
offset float How many results to skip before this page starts; defaults to 0. To get the next page, add `limit` to the previous `offset`. [optional] [default to 0]

Return type

NetworkInterfaces

Authorization

BearerAuth

HTTP request headers

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

HTTP response details

Status code Description Response headers
200 Success -
403 Signed in, but not allowed to do this: you lack the required role, have no access to the project, or your license does not include the feature. -

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

v3_list_network_providers

NetworkConnectionProviders v3_list_network_providers(limit=limit, offset=offset)

List available network providers

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

Example

  • Bearer (JWT) Authentication (BearerAuth):
import corellium
from corellium.models.network_connection_providers import NetworkConnectionProviders
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.NetConnectApi(api_client)
    limit = 100 # float | Most results to return in one page. Whole number from 1 to 1000; defaults to 100. A value outside that range is rejected with 400. (optional) (default to 100)
    offset = 0 # float | How many results to skip before this page starts; defaults to 0. To get the next page, add `limit` to the previous `offset`. (optional) (default to 0)

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

Parameters

Name Type Description Notes
limit float Most results to return in one page. Whole number from 1 to 1000; defaults to 100. A value outside that range is rejected with 400. [optional] [default to 100]
offset float How many results to skip before this page starts; defaults to 0. To get the next page, add `limit` to the previous `offset`. [optional] [default to 0]

Return type

NetworkConnectionProviders

Authorization

BearerAuth

HTTP request headers

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

HTTP response details

Status code Description Response headers
200 Success -
403 Signed in, but not allowed to do this: you lack the required role, have no access to the project, or your license does not include the feature. -

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

v3_partial_update_network_connection

ProviderNetworkConnection v3_partial_update_network_connection(id, partial_update_network_connection_body=partial_update_network_connection_body)

Update Network Connection (patch)

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.partial_update_network_connection_body import PartialUpdateNetworkConnectionBody
from corellium.models.provider_network_connection import ProviderNetworkConnection
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.NetConnectApi(api_client)
    id = '0eb5d1e7-2c10-42b1-95fc-30e4e4885cd7' # str | Network Connection Identifier.
    partial_update_network_connection_body = corellium.PartialUpdateNetworkConnectionBody() # PartialUpdateNetworkConnectionBody |  (optional)

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

Parameters

Name Type Description Notes
id str Network Connection Identifier.
partial_update_network_connection_body PartialUpdateNetworkConnectionBody [optional]

Return type

ProviderNetworkConnection

Authorization

BearerAuth

HTTP request headers

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

HTTP response details

Status code Description Response headers
200 Success -
400 The request was invalid, for example a missing or malformed field. The body says which field; fix it before retrying. -
403 Signed in, but not allowed to do this: you lack the required role, have no access to the project, or your license does not include the feature. -

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

v3_update_network_connection

ProviderNetworkConnection v3_update_network_connection(id, update_network_connection_body)

Update Network Connection

Replaces all of a network connection's settings. To change only some of them, use v3PartialUpdateNetworkConnection. You must have the domain administrator role to update a network connection.

Example

  • Bearer (JWT) Authentication (BearerAuth):
import corellium
from corellium.models.provider_network_connection import ProviderNetworkConnection
from corellium.models.update_network_connection_body import UpdateNetworkConnectionBody
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.NetConnectApi(api_client)
    id = '0eb5d1e7-2c10-42b1-95fc-30e4e4885cd7' # str | Network Connection Identifier.
    update_network_connection_body = corellium.UpdateNetworkConnectionBody() # UpdateNetworkConnectionBody | 

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

Parameters

Name Type Description Notes
id str Network Connection Identifier.
update_network_connection_body UpdateNetworkConnectionBody

Return type

ProviderNetworkConnection

Authorization

BearerAuth

HTTP request headers

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

HTTP response details

Status code Description Response headers
200 Success -
400 The request was invalid, for example a missing or malformed field. The body says which field; fix it before retrying. -
403 Signed in, but not allowed to do this: you lack the required role, have no access to the project, or your license does not include the feature. -

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