Skip to content

Latest commit

 

History

History
559 lines (397 loc) · 24.1 KB

InterconnectsApi.md

File metadata and controls

559 lines (397 loc) · 24.1 KB

corellium.InterconnectsApi

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_interconnect POST /v3/interconnects Create I/O Interconnect
v3_delete_interconnect DELETE /v3/interconnects/{interconnectId} Delete I/O Interconnect
v3_get_interconnect GET /v3/interconnects/{interconnectId} Get Interconnect
v3_list_interconnects GET /v3/interconnects List I/O Interconnects
v3_patch_interconnect PATCH /v3/interconnects/{interconnectId} Patch I/O Interconnect
v3_update_interconnect PUT /v3/interconnects/{interconnectId} Update I/O Interconnect

v3_create_interconnect

Interconnect v3_create_interconnect(create_interconnect_v3_body)

Create I/O Interconnect

Creates an I/O interconnect: a virtual wire, hub or switch that links interfaces on your devices so they can talk to each other, as if you had cabled real hardware together (for example connecting the Ethernet ports of two boards). Give it a name, the projectId, a protocol and type, and the device interfaces to connect; every device must be in that project. Returns the new interconnect, which starts with status detached.

You can also connect or disconnect one device interface later with POST /v3/instances/{instanceId}/interfaces and DELETE /v3/instances/{instanceId}/interfaces/{interfaceId}; those device-level calls require the configurable I/O license feature.

Example

  • Bearer (JWT) Authentication (BearerAuth):
import corellium
from corellium.models.create_interconnect_v3_body import CreateInterconnectV3Body
from corellium.models.interconnect import Interconnect
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.InterconnectsApi(api_client)
    create_interconnect_v3_body = corellium.CreateInterconnectV3Body() # CreateInterconnectV3Body | 

    try:
        # Create I/O Interconnect
        api_response = api_instance.v3_create_interconnect(create_interconnect_v3_body)
        print("The response of InterconnectsApi->v3_create_interconnect:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling InterconnectsApi->v3_create_interconnect: %s\n" % e)

Parameters

Name Type Description Notes
create_interconnect_v3_body CreateInterconnectV3Body

Return type

Interconnect

Authorization

BearerAuth

HTTP request headers

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

HTTP response details

Status code Description Response headers
200 Created interconnect. -
400 The request was invalid, for example a missing or malformed field. The body says which field; fix it before retrying. -
401 Not signed in: the `Authorization: Bearer <token>` header is missing, or the token is invalid or expired. Get a new token and retry. -
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. -
500 Something went wrong on the platform side. Retrying may help; if it keeps failing, contact support with the response body. -

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

v3_delete_interconnect

v3_delete_interconnect(interconnect_id)

Delete I/O Interconnect

Deletes an I/O interconnect, disconnecting every device interface on it. The devices themselves are not affected.

Deletes are idempotent: an unknown interconnectId, or one that is not visible to the caller, 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.

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.InterconnectsApi(api_client)
    interconnect_id = '56494514-33f7-4fc2-9fdc-865e3957e6d3' # str | The interconnect identifier.

    try:
        # Delete I/O Interconnect
        api_instance.v3_delete_interconnect(interconnect_id)
    except Exception as e:
        print("Exception when calling InterconnectsApi->v3_delete_interconnect: %s\n" % e)

Parameters

Name Type Description Notes
interconnect_id str The interconnect identifier.

Return type

void (empty response body)

Authorization

BearerAuth

HTTP request headers

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

HTTP response details

Status code Description Response headers
204 Successfully deleted interconnect. -
401 Not signed in: the `Authorization: Bearer <token>` header is missing, or the token is invalid or expired. Get a new token and retry. -
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. -
500 Something went wrong on the platform side. Retrying may help; if it keeps failing, contact support with the response body. -

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

v3_get_interconnect

Interconnect v3_get_interconnect(interconnect_id)

Get Interconnect

Returns one I/O interconnect, including which device interfaces it connects and its current status.

Example

  • Bearer (JWT) Authentication (BearerAuth):
import corellium
from corellium.models.interconnect import Interconnect
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.InterconnectsApi(api_client)
    interconnect_id = '56494514-33f7-4fc2-9fdc-865e3957e6d3' # str | The interconnect identifier.

    try:
        # Get Interconnect
        api_response = api_instance.v3_get_interconnect(interconnect_id)
        print("The response of InterconnectsApi->v3_get_interconnect:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling InterconnectsApi->v3_get_interconnect: %s\n" % e)

Parameters

Name Type Description Notes
interconnect_id str The interconnect identifier.

Return type

Interconnect

Authorization

BearerAuth

HTTP request headers

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

HTTP response details

Status code Description Response headers
200 Successfully retrieved interconnect details. -
400 The request was invalid, for example a missing or malformed field. The body says which field; fix it before retrying. -
401 Not signed in: the `Authorization: Bearer <token>` header is missing, or the token is invalid or expired. Get a new token and retry. -
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. -
500 Something went wrong on the platform side. Retrying may help; if it keeps failing, contact support with the response body. -

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

v3_list_interconnects

InterconnectList v3_list_interconnects(limit=limit, offset=offset, name=name, protocol=protocol, type=type, status=status, sort=sort, project_id=project_id)

List I/O Interconnects

Lists the I/O interconnects in your projects, with their status and how many devices each connects. Filter by name, protocol, type, status or project, sort with sort, and page with limit and offset.

Example

  • Bearer (JWT) Authentication (BearerAuth):
import corellium
from corellium.models.interconnect_list import InterconnectList
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.InterconnectsApi(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)
    name = 'vpn-gateway' # str | Filter by interconnect name (case insensitive). (optional)
    protocol = 'eth' # str | Filter by protocol (comma separated). (optional)
    type = 'type_example' # str | Filter by type (comma separated). (optional)
    status = 'status_example' # str | Filter by status (comma separated). (optional)
    sort = '-name' # str | Sort order (e.g. \"name\" for ascending, \"-name\" for descending, comma separated). (optional)
    project_id = '1c41b1bc-4f53-48a8-b690-ad30611e1960' # str | Filter by project ID (comma separated). (optional)

    try:
        # List I/O Interconnects
        api_response = api_instance.v3_list_interconnects(limit=limit, offset=offset, name=name, protocol=protocol, type=type, status=status, sort=sort, project_id=project_id)
        print("The response of InterconnectsApi->v3_list_interconnects:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling InterconnectsApi->v3_list_interconnects: %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]
name str Filter by interconnect name (case insensitive). [optional]
protocol str Filter by protocol (comma separated). [optional]
type str Filter by type (comma separated). [optional]
status str Filter by status (comma separated). [optional]
sort str Sort order (e.g. &quot;name&quot; for ascending, &quot;-name&quot; for descending, comma separated). [optional]
project_id str Filter by project ID (comma separated). [optional]

Return type

InterconnectList

Authorization

BearerAuth

HTTP request headers

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

HTTP response details

Status code Description Response headers
200 Successfully retrieved interconnects. -
400 The request was invalid, for example a missing or malformed field. The body says which field; fix it before retrying. -
401 Not signed in: the `Authorization: Bearer <token>` header is missing, or the token is invalid or expired. Get a new token and retry. -
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. -
500 Something went wrong on the platform side. Retrying may help; if it keeps failing, contact support with the response body. -

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

v3_patch_interconnect

Interconnect v3_patch_interconnect(interconnect_id, patch_interconnect_body=patch_interconnect_body)

Patch I/O Interconnect

Changes only the fields you send: name and/or interfaces. When you send interfaces, it replaces the whole list of connected interfaces. Returns the updated interconnect.

Example

  • Bearer (JWT) Authentication (BearerAuth):
import corellium
from corellium.models.interconnect import Interconnect
from corellium.models.patch_interconnect_body import PatchInterconnectBody
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.InterconnectsApi(api_client)
    interconnect_id = '56494514-33f7-4fc2-9fdc-865e3957e6d3' # str | The interconnect identifier.
    patch_interconnect_body = corellium.PatchInterconnectBody() # PatchInterconnectBody |  (optional)

    try:
        # Patch I/O Interconnect
        api_response = api_instance.v3_patch_interconnect(interconnect_id, patch_interconnect_body=patch_interconnect_body)
        print("The response of InterconnectsApi->v3_patch_interconnect:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling InterconnectsApi->v3_patch_interconnect: %s\n" % e)

Parameters

Name Type Description Notes
interconnect_id str The interconnect identifier.
patch_interconnect_body PatchInterconnectBody [optional]

Return type

Interconnect

Authorization

BearerAuth

HTTP request headers

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

HTTP response details

Status code Description Response headers
200 Successfully updated interconnect. -
400 The request was invalid, for example a missing or malformed field. The body says which field; fix it before retrying. -
401 Not signed in: the `Authorization: Bearer <token>` header is missing, or the token is invalid or expired. Get a new token and retry. -
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. -
500 Something went wrong on the platform side. Retrying may help; if it keeps failing, contact support with the response body. -

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

v3_update_interconnect

Interconnect v3_update_interconnect(interconnect_id, update_interconnect_v3_body)

Update I/O Interconnect

Replaces an interconnect's name and full list of connected interfaces. Interfaces you leave out are disconnected. projectId, protocol and type cannot be changed; if you send them they must match the current values. To change only some fields, use v3PatchInterconnect.

Example

  • Bearer (JWT) Authentication (BearerAuth):
import corellium
from corellium.models.interconnect import Interconnect
from corellium.models.update_interconnect_v3_body import UpdateInterconnectV3Body
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.InterconnectsApi(api_client)
    interconnect_id = '56494514-33f7-4fc2-9fdc-865e3957e6d3' # str | The interconnect identifier.
    update_interconnect_v3_body = corellium.UpdateInterconnectV3Body() # UpdateInterconnectV3Body | 

    try:
        # Update I/O Interconnect
        api_response = api_instance.v3_update_interconnect(interconnect_id, update_interconnect_v3_body)
        print("The response of InterconnectsApi->v3_update_interconnect:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling InterconnectsApi->v3_update_interconnect: %s\n" % e)

Parameters

Name Type Description Notes
interconnect_id str The interconnect identifier.
update_interconnect_v3_body UpdateInterconnectV3Body

Return type

Interconnect

Authorization

BearerAuth

HTTP request headers

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

HTTP response details

Status code Description Response headers
200 Successfully updated interconnect. -
400 The request was invalid, for example a missing or malformed field. The body says which field; fix it before retrying. -
401 Not signed in: the `Authorization: Bearer <token>` header is missing, or the token is invalid or expired. Get a new token and retry. -
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. -
500 Something went wrong on the platform side. Retrying may help; if it keeps failing, contact support with the response body. -

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