Skip to content

Latest commit

 

History

History
594 lines (416 loc) · 19.1 KB

HypervisorHooksV1Api.md

File metadata and controls

594 lines (416 loc) · 19.1 KB

corellium.HypervisorHooksV1Api

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_clear_hyper_trace_hooks POST /v1/instances/{instanceId}/hooks/clear Clear Hooks on an instance
v1_create_hook POST /v1/instances/{instanceId}/hooks Create hypervisor hook for Instance
v1_delete_hook DELETE /v1/hooks/{hookId} Delete an existing hypervisor hook
v1_execute_hyper_trace_hooks POST /v1/instances/{instanceId}/hooks/execute Execute Hooks on an instance
v1_get_hook_by_id GET /v1/hooks/{hookId} Get hypervisor hook by id
v1_get_hooks GET /v1/instances/{instanceId}/hooks Get all hypervisor hooks for Instance
v1_update_hook PUT /v1/hooks/{hookId} Update an existing hypervisor hook

v1_clear_hyper_trace_hooks

v1_clear_hyper_trace_hooks(instance_id)

Clear Hooks on an instance

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.HypervisorHooksV1Api(api_client)
    instance_id = 'instance_id_example' # str | Instance ID - uuid

    try:
        # Clear Hooks on an instance
        api_instance.v1_clear_hyper_trace_hooks(instance_id)
    except Exception as e:
        print("Exception when calling HypervisorHooksV1Api->v1_clear_hyper_trace_hooks: %s\n" % e)

Parameters

Name Type Description Notes
instance_id str Instance ID - uuid

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 Accepted -
400 Bad Request -
403 Forbidden -

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

v1_create_hook

HookV1 v1_create_hook(instance_id, v1_create_hook_parameters)

Create hypervisor hook for Instance

Example

  • Bearer (JWT) Authentication (BearerAuth):
import corellium
from corellium.models.hook_v1 import HookV1
from corellium.models.v1_create_hook_parameters import V1CreateHookParameters
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.HypervisorHooksV1Api(api_client)
    instance_id = 'instance_id_example' # str | Instance ID - uuid
    v1_create_hook_parameters = corellium.V1CreateHookParameters() # V1CreateHookParameters | application/json

    try:
        # Create hypervisor hook for Instance
        api_response = api_instance.v1_create_hook(instance_id, v1_create_hook_parameters)
        print("The response of HypervisorHooksV1Api->v1_create_hook:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling HypervisorHooksV1Api->v1_create_hook: %s\n" % e)

Parameters

Name Type Description Notes
instance_id str Instance ID - uuid
v1_create_hook_parameters V1CreateHookParameters application/json

Return type

HookV1

Authorization

BearerAuth

HTTP request headers

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

HTTP response details

Status code Description Response headers
201 Hook -
400 Bad Request -
403 Forbidden -

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

v1_delete_hook

v1_delete_hook(hook_id)

Delete an existing hypervisor hook

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.HypervisorHooksV1Api(api_client)
    hook_id = 'hook_id_example' # str | Hook ID

    try:
        # Delete an existing hypervisor hook
        api_instance.v1_delete_hook(hook_id)
    except Exception as e:
        print("Exception when calling HypervisorHooksV1Api->v1_delete_hook: %s\n" % e)

Parameters

Name Type Description Notes
hook_id str Hook ID

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
200 Accepted -
400 Bad Request -
403 Forbidden -

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

v1_execute_hyper_trace_hooks

v1_execute_hyper_trace_hooks(instance_id)

Execute Hooks on an instance

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.HypervisorHooksV1Api(api_client)
    instance_id = 'instance_id_example' # str | Instance ID - uuid

    try:
        # Execute Hooks on an instance
        api_instance.v1_execute_hyper_trace_hooks(instance_id)
    except Exception as e:
        print("Exception when calling HypervisorHooksV1Api->v1_execute_hyper_trace_hooks: %s\n" % e)

Parameters

Name Type Description Notes
instance_id str Instance ID - uuid

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 Accepted -
400 Bad Request -
403 Forbidden -

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

v1_get_hook_by_id

HookV1 v1_get_hook_by_id(hook_id)

Get hypervisor hook by id

Example

  • Bearer (JWT) Authentication (BearerAuth):
import corellium
from corellium.models.hook_v1 import HookV1
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.HypervisorHooksV1Api(api_client)
    hook_id = 'hook_id_example' # str | Hook Id

    try:
        # Get hypervisor hook by id
        api_response = api_instance.v1_get_hook_by_id(hook_id)
        print("The response of HypervisorHooksV1Api->v1_get_hook_by_id:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling HypervisorHooksV1Api->v1_get_hook_by_id: %s\n" % e)

Parameters

Name Type Description Notes
hook_id str Hook Id

Return type

HookV1

Authorization

BearerAuth

HTTP request headers

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

HTTP response details

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

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

v1_get_hooks

List[HookV1] v1_get_hooks(instance_id, limit=limit, offset=offset, sort=sort)

Get all hypervisor hooks for Instance

Example

  • Bearer (JWT) Authentication (BearerAuth):
import corellium
from corellium.models.hook_v1 import HookV1
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.HypervisorHooksV1Api(api_client)
    instance_id = 'instance_id_example' # str | Instance ID - uuid
    limit = 3.4 # float | limit for pagination results, defaults to 20 (optional)
    offset = 3.4 # float | offset for pagination results, defaults to 0 (optional)
    sort = 'sort_example' # str | sort ASC or DESC, defaults to DESC (optional)

    try:
        # Get all hypervisor hooks for Instance
        api_response = api_instance.v1_get_hooks(instance_id, limit=limit, offset=offset, sort=sort)
        print("The response of HypervisorHooksV1Api->v1_get_hooks:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling HypervisorHooksV1Api->v1_get_hooks: %s\n" % e)

Parameters

Name Type Description Notes
instance_id str Instance ID - uuid
limit float limit for pagination results, defaults to 20 [optional]
offset float offset for pagination results, defaults to 0 [optional]
sort str sort ASC or DESC, defaults to DESC [optional]

Return type

List[HookV1]

Authorization

BearerAuth

HTTP request headers

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

HTTP response details

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

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

v1_update_hook

HookV1 v1_update_hook(hook_id, v1_update_hook_parameters)

Update an existing hypervisor hook

Example

  • Bearer (JWT) Authentication (BearerAuth):
import corellium
from corellium.models.hook_v1 import HookV1
from corellium.models.v1_update_hook_parameters import V1UpdateHookParameters
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.HypervisorHooksV1Api(api_client)
    hook_id = 'hook_id_example' # str | Hook ID
    v1_update_hook_parameters = { "enabled": false} # V1UpdateHookParameters | application/json

    try:
        # Update an existing hypervisor hook
        api_response = api_instance.v1_update_hook(hook_id, v1_update_hook_parameters)
        print("The response of HypervisorHooksV1Api->v1_update_hook:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling HypervisorHooksV1Api->v1_update_hook: %s\n" % e)

Parameters

Name Type Description Notes
hook_id str Hook ID
v1_update_hook_parameters V1UpdateHookParameters application/json

Return type

HookV1

Authorization

BearerAuth

HTTP request headers

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

HTTP response details

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

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