Skip to content

Latest commit

 

History

History
532 lines (378 loc) · 17.1 KB

ExtensionsV1Api.md

File metadata and controls

532 lines (378 loc) · 17.1 KB

corellium.ExtensionsV1Api

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_delete_extension DELETE /v1/extensions/{extensionId} Delete an existing extension
v1_get_extension_by_id GET /v1/extensions/{extensionId} Get extension by id
v1_get_extensions GET /v1/extensions Get all extensions
v1_load_extension POST /v1/extensions Load an extension
v1_parse_extension_json POST /v1/extensions/parse/extension.json Validates extension.json
v1_update_extension PUT /v1/extensions/{extensionId} Update an existing extension

v1_delete_extension

v1_delete_extension(extension_id)

Delete an existing extension

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.ExtensionsV1Api(api_client)
    extension_id = 'extension_id_example' # str | Extension ID

    try:
        # Delete an existing extension
        api_instance.v1_delete_extension(extension_id)
    except Exception as e:
        print("Exception when calling ExtensionsV1Api->v1_delete_extension: %s\n" % e)

Parameters

Name Type Description Notes
extension_id str Extension 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
204 Accepted -
400 Bad Request -
403 Forbidden -

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

v1_get_extension_by_id

ExtensionV1 v1_get_extension_by_id(extension_id)

Get extension by id

Example

  • Bearer (JWT) Authentication (BearerAuth):
import corellium
from corellium.models.extension_v1 import ExtensionV1
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.ExtensionsV1Api(api_client)
    extension_id = 'extension_id_example' # str | Extension Id

    try:
        # Get extension by id
        api_response = api_instance.v1_get_extension_by_id(extension_id)
        print("The response of ExtensionsV1Api->v1_get_extension_by_id:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling ExtensionsV1Api->v1_get_extension_by_id: %s\n" % e)

Parameters

Name Type Description Notes
extension_id str Extension Id

Return type

ExtensionV1

Authorization

BearerAuth

HTTP request headers

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

HTTP response details

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

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

v1_get_extensions

List[ExtensionV1] v1_get_extensions(limit=limit, offset=offset, if_none_match=if_none_match)

Get all extensions

Example

  • Bearer (JWT) Authentication (BearerAuth):
import corellium
from corellium.models.extension_v1 import ExtensionV1
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.ExtensionsV1Api(api_client)
    limit = 3.4 # float | limit for pagination results, defaults to 20 (optional)
    offset = 3.4 # float | offset for pagination results, defaults to 0 (optional)
    if_none_match = 'if_none_match_example' # str | sha256sum of the last response with the same parameters (optional) (optional)

    try:
        # Get all extensions
        api_response = api_instance.v1_get_extensions(limit=limit, offset=offset, if_none_match=if_none_match)
        print("The response of ExtensionsV1Api->v1_get_extensions:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling ExtensionsV1Api->v1_get_extensions: %s\n" % e)

Parameters

Name Type Description Notes
limit float limit for pagination results, defaults to 20 [optional]
offset float offset for pagination results, defaults to 0 [optional]
if_none_match str sha256sum of the last response with the same parameters (optional) [optional]

Return type

List[ExtensionV1]

Authorization

BearerAuth

HTTP request headers

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

HTTP response details

Status code Description Response headers
200 Extensions -
304 No changes -
400 Bad Request -
403 Forbidden -

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

v1_load_extension

ExtensionV1 v1_load_extension(v1_load_extension_parameters)

Load an extension

Example

  • Bearer (JWT) Authentication (BearerAuth):
import corellium
from corellium.models.extension_v1 import ExtensionV1
from corellium.models.v1_load_extension_parameters import V1LoadExtensionParameters
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.ExtensionsV1Api(api_client)
    v1_load_extension_parameters = corellium.V1LoadExtensionParameters() # V1LoadExtensionParameters | application/json

    try:
        # Load an extension
        api_response = api_instance.v1_load_extension(v1_load_extension_parameters)
        print("The response of ExtensionsV1Api->v1_load_extension:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling ExtensionsV1Api->v1_load_extension: %s\n" % e)

Parameters

Name Type Description Notes
v1_load_extension_parameters V1LoadExtensionParameters application/json

Return type

ExtensionV1

Authorization

BearerAuth

HTTP request headers

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

HTTP response details

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

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

v1_parse_extension_json

object v1_parse_extension_json(extension_v1)

Validates extension.json

Example

  • Bearer (JWT) Authentication (BearerAuth):
import corellium
from corellium.models.extension_v1 import ExtensionV1
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.ExtensionsV1Api(api_client)
    extension_v1 = {
    "parserVersion": 1,
    "version": "1.0.0",
    "identifier": "mach-rpi4b",
    "definitions": [{
      "type": "iot",
      "flavor": "Raspberry Pi 4",
      "flavorId": "rpi4b",
      "cores": 4,
      "bootargs": [],
      "volume": {
        "allocate": 1
      },
      "ram": 4096,
      "supportsGDB": true,
      "supportsSerialConsole": true,
      "supportsPresetBootOptions": true
    }]
} # ExtensionV1 | extension.json contents

    try:
        # Validates extension.json
        api_response = api_instance.v1_parse_extension_json(extension_v1)
        print("The response of ExtensionsV1Api->v1_parse_extension_json:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling ExtensionsV1Api->v1_parse_extension_json: %s\n" % e)

Parameters

Name Type Description Notes
extension_v1 ExtensionV1 extension.json contents

Return type

object

Authorization

BearerAuth

HTTP request headers

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

HTTP response details

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

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

v1_update_extension

v1_update_extension(extension_id, update_extension)

Update an existing extension

Example

  • Bearer (JWT) Authentication (BearerAuth):
import corellium
from corellium.models.update_extension import UpdateExtension
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.ExtensionsV1Api(api_client)
    extension_id = 'extension_id_example' # str | Extension ID
    update_extension = { "enabled": false} # UpdateExtension | application/json

    try:
        # Update an existing extension
        api_instance.v1_update_extension(extension_id, update_extension)
    except Exception as e:
        print("Exception when calling ExtensionsV1Api->v1_update_extension: %s\n" % e)

Parameters

Name Type Description Notes
extension_id str Extension ID
update_extension UpdateExtension application/json

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

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