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_clear_core_trace | DELETE /v3/instances/{instanceId}/strace | Clear CoreTrace output |
| v3_list_threads | GET /v3/instances/{instanceId}/strace/thread-list | List running processes (CoreTrace) |
| v3_start_core_trace | POST /v3/instances/{instanceId}/strace/enable | Start CoreTrace |
| v3_stop_core_trace | POST /v3/instances/{instanceId}/strace/disable | Stop CoreTrace |
| v3_strace_preauthorize | GET /v3/instances/{instanceId}/strace-authorize | Get a CoreTrace download token |
v3_clear_core_trace(instance_id)
Clear CoreTrace output
Deletes the CoreTrace (system call trace) output recorded so far on this device, so the next download contains only new activity. Tracing keeps running if it is on. Requires the CoreTrace license feature (403 otherwise). An unknown instanceId is a successful no-op that returns 204.
- 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.CoreTraceApi(api_client)
instance_id = 'f7f9832a-f824-416f-a5ea-4adfe34754b5' # str | Instance ID.
try:
# Clear CoreTrace output
api_instance.v3_clear_core_trace(instance_id)
except Exception as e:
print("Exception when calling CoreTraceApi->v3_clear_core_trace: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| instance_id | str | Instance ID. |
void (empty response body)
- Content-Type: Not defined
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 204 | No content | - |
| 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. | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
List[KernelTask] v3_list_threads(instance_id)
List running processes (CoreTrace)
Lists the processes running on the device with their threads, including each process's processId and name and each thread's taskId. Use it to pick which processes to trace with CoreTrace (set straceFilter on v3PatchInstance). The device must be running.
- Bearer (JWT) Authentication (BearerAuth):
import corellium
from corellium.models.kernel_task import KernelTask
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.CoreTraceApi(api_client)
instance_id = 'f7f9832a-f824-416f-a5ea-4adfe34754b5' # str | Instance ID.
try:
# List running processes (CoreTrace)
api_response = api_instance.v3_list_threads(instance_id)
print("The response of CoreTraceApi->v3_list_threads:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling CoreTraceApi->v3_list_threads: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| instance_id | str | Instance ID. |
- Content-Type: Not defined
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | Threads. | - |
| 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. | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
v3_start_core_trace(instance_id)
Start CoreTrace
Starts CoreTrace on a running device. CoreTrace records the system calls made by processes on the device, so you can see what an app does at the operating-system level (files opened, network connections, processes started).
Workflow:
v3StartCoreTrace(this call).- Use the device or app you want to observe. Optionally list running processes with
v3ListThreads, and limit tracing to some of them withstraceFilteronv3PatchInstance. v3StopCoreTrace.v3StracePreauthorizeto get a download token, then download the trace.v3ClearCoreTraceto discard it before the next run.
Returns 400 if this device does not support CoreTrace, and 403 if your license does not include it.
- 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.CoreTraceApi(api_client)
instance_id = 'f7f9832a-f824-416f-a5ea-4adfe34754b5' # str | Instance ID.
try:
# Start CoreTrace
api_instance.v3_start_core_trace(instance_id)
except Exception as e:
print("Exception when calling CoreTraceApi->v3_start_core_trace: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| instance_id | str | Instance ID. |
void (empty response body)
- Content-Type: Not defined
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 204 | No content | - |
| 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. | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
v3_stop_core_trace(instance_id)
Stop CoreTrace
Stops CoreTrace on this device. The trace recorded so far is kept, so you can download it with v3StracePreauthorize. Requires the CoreTrace license feature.
- 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.CoreTraceApi(api_client)
instance_id = 'f7f9832a-f824-416f-a5ea-4adfe34754b5' # str | Instance ID.
try:
# Stop CoreTrace
api_instance.v3_stop_core_trace(instance_id)
except Exception as e:
print("Exception when calling CoreTraceApi->v3_stop_core_trace: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| instance_id | str | Instance ID. |
void (empty response body)
- Content-Type: Not defined
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 204 | No content | - |
| 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. | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
Token v3_strace_preauthorize(instance_id)
Get a CoreTrace download token
Returns a short-lived token that authorizes downloading this device's CoreTrace output without an Authorization header. Download with GET /v1/preauthed/{token}/{filename}. The token works only for this device's trace and expires when your current session token expires.
- Bearer (JWT) Authentication (BearerAuth):
import corellium
from corellium.models.token import Token
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.CoreTraceApi(api_client)
instance_id = 'f7f9832a-f824-416f-a5ea-4adfe34754b5' # str | Instance ID.
try:
# Get a CoreTrace download token
api_response = api_instance.v3_strace_preauthorize(instance_id)
print("The response of CoreTraceApi->v3_strace_preauthorize:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling CoreTraceApi->v3_strace_preauthorize: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| instance_id | str | Instance ID. |
- Content-Type: Not defined
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | Token. | - |
| 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. | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]