Skip to content

Latest commit

 

History

History
1046 lines (739 loc) · 49.9 KB

AssessmentsApi.md

File metadata and controls

1046 lines (739 loc) · 49.9 KB

corellium.AssessmentsApi

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_assessment POST /v3/services/matrix/{instanceId}/assessments Create an assessment.
v3_create_report_modification POST /v3/services/matrix/{instanceId}/assessments/{assessmentId}/report-modification Create report modifications.
v3_delete_assessment DELETE /v3/services/matrix/{instanceId}/assessments/{assessmentId} Delete an assessment.
v3_delete_report_modification DELETE /v3/services/matrix/{instanceId}/assessments/{assessmentId}/report-modification Delete report modifications.
v3_download_report GET /v3/services/matrix/{instanceId}/assessments/{assessmentId}/download Download an assessment report.
v3_get_assessment_by_id GET /v3/services/matrix/{instanceId}/assessments/{assessmentId} Get an assessment by ID.
v3_get_assessments_by_instance_id GET /v3/services/matrix/{instanceId}/instances/{targetInstanceId}/assessments List assessments for an instance.
v3_patch_assessment PATCH /v3/services/matrix/{instanceId}/assessments/{assessmentId} Update an assessment status.
v3_run_tests POST /v3/services/matrix/{instanceId}/assessments/{assessmentId}/test Run assessment tests.
v3_start_monitoring POST /v3/services/matrix/{instanceId}/assessments/{assessmentId}/start Start assessment monitoring.
v3_stop_monitoring POST /v3/services/matrix/{instanceId}/assessments/{assessmentId}/stop Stop assessment monitoring.

v3_create_assessment

AssessmentIdStatus v3_create_assessment(instance_id, create_assessment_input)

Create an assessment.

Creates a new assessment for one app on the instance. This is always the first call. It does not start recording anything; it only checks the device and saves the assessment in status new.

Before you call it:

  • The instance must be powered on.
  • The device must be jailbroken (iOS) or rooted (Android), and its model must support MATRIX (mast: true in GET /v3/models). Otherwise the request is rejected; currently this can come back as a server error rather than a 400, so check these conditions before calling.
  • The app must already be installed. bundleId is the app's identifier (for example com.android.egg); the app's name and version are read from the device and stored on the assessment.
  • Every earlier assessment on this instance must be complete or failed. Only one assessment can be in progress per instance at a time.
  • Android: the web interface asks for at least 4 CPU cores and 4 GB of RAM before it offers MATRIX. This API does not check those values, but with too little memory monitoring can fail with an out-of-memory error.

Optional inputs. wordlistId and fridaScriptId point to files you upload beforehand with POST /v3/images; see those fields for details.

Response. The new assessment's id and status (new). Save the id; every later call needs it. Next call: v3StartMonitoring.

How a MATRIX assessment works. MATRIX tests one installed app for mobile security problems (for example insecure storage, weak crypto, or sensitive data sent over the network). It first records what the app does while you use it, then runs its checks against that recording and the device, and finally produces a report. Call these operations in order:

  1. v3CreateAssessment with the app's bundleId. Status: new.
  2. v3StartMonitoring. Status goes startingMonitoring, then monitoring.
  3. Use the app on the device through the normal display or an automation tool. Exercise the features you care about. Keep the app open.
  4. v3StopMonitoring. Status goes stoppingMonitoring, then readyForTesting.
  5. v3RunTests. Status goes testing, then complete or failed.
  6. Poll v3GetAssessmentById every few seconds until the status is complete or failed. Testing can take several minutes.
  7. v3DownloadReport to get the results as HTML or JSON.
  8. Optional: v3CreateReportModification to mark findings as not applicable or change their severity.

Steps 2, 4 and 5 return as soon as the work has started. The request succeeding does not mean the step has finished; always wait for the next status before making the next call. If any step ends in failed, the assessment cannot continue: delete it and start again.

Create, start monitoring, stop monitoring, run tests, and delete require the instance to be powered on. Get, list, update status, download, and the report-modification calls do not.

Example

  • Bearer (JWT) Authentication (BearerAuth):
import corellium
from corellium.models.assessment_id_status import AssessmentIdStatus
from corellium.models.create_assessment_input import CreateAssessmentInput
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.AssessmentsApi(api_client)
    instance_id = 'instance_id_example' # str | ID of the instance (virtual device) the assessment belongs to. The platform checks that you have access to this instance before the request reaches MATRIX, so use the ID of an instance in one of your projects.
    create_assessment_input = corellium.CreateAssessmentInput() # CreateAssessmentInput | 

    try:
        # Create an assessment.
        api_response = api_instance.v3_create_assessment(instance_id, create_assessment_input)
        print("The response of AssessmentsApi->v3_create_assessment:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling AssessmentsApi->v3_create_assessment: %s\n" % e)

Parameters

Name Type Description Notes
instance_id str ID of the instance (virtual device) the assessment belongs to. The platform checks that you have access to this instance before the request reaches MATRIX, so use the ID of an instance in one of your projects.
create_assessment_input CreateAssessmentInput

Return type

AssessmentIdStatus

Authorization

BearerAuth

HTTP request headers

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

HTTP response details

Status code Description Response headers
200 The created assessment identifier and status. -
400 Invalid request — for example the instance is powered off, an existing assessment is still in progress, or the assessment is not in the required state for this action. -

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

v3_create_report_modification

List[ReportModificationResult] v3_create_report_modification(instance_id, assessment_id, report_modification_input)

Create report modifications.

Adjusts findings in a finished report, for example to record that a failure does not apply to your app. The assessment must have status complete. Your changes are stored separately from the original report. Saving them immediately recalculates the assessment's results counts and score. The HTML download shows the adjusted findings; the JSON download contains the original report plus a modifications array.

Send an array. Each item names a check with checkId (as shown in the report) and one property to change:

  • outcome: set value to na to mark the check "not applicable", or fail to undo that.
  • severity: set value to a different severity level for the check.
  • evidence_<n> (for example evidence_0): set suppressed to true to hide the n-th piece of evidence for the check, or false to show it again. Do not send value.

The response has one entry per item, saying whether it was applied or why it was ignored. To undo a change, use v3DeleteReportModification.

Example

  • Bearer (JWT) Authentication (BearerAuth):
import corellium
from corellium.models.report_modification_input import ReportModificationInput
from corellium.models.report_modification_result import ReportModificationResult
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.AssessmentsApi(api_client)
    instance_id = 'instance_id_example' # str | ID of the instance (virtual device) the assessment belongs to. The platform checks that you have access to this instance before the request reaches MATRIX, so use the ID of an instance in one of your projects.
    assessment_id = 'assessment_id_example' # str | Identifier of the assessment.
    report_modification_input = [corellium.ReportModificationInput()] # List[ReportModificationInput] | 

    try:
        # Create report modifications.
        api_response = api_instance.v3_create_report_modification(instance_id, assessment_id, report_modification_input)
        print("The response of AssessmentsApi->v3_create_report_modification:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling AssessmentsApi->v3_create_report_modification: %s\n" % e)

Parameters

Name Type Description Notes
instance_id str ID of the instance (virtual device) the assessment belongs to. The platform checks that you have access to this instance before the request reaches MATRIX, so use the ID of an instance in one of your projects.
assessment_id str Identifier of the assessment.
report_modification_input List[ReportModificationInput]

Return type

List[ReportModificationResult]

Authorization

BearerAuth

HTTP request headers

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

HTTP response details

Status code Description Response headers
200 The result of each requested modification. -
400 The assessment is not complete, so its report cannot be modified. -
404 Assessment not found. -

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

v3_delete_assessment

v3_delete_assessment(instance_id, assessment_id)

Delete an assessment.

Permanently deletes an assessment and the data that belongs to it:

  • the assessment record,
  • the generated report,
  • the wordlist file it used (if any),
  • the monitoring data MATRIX recorded for this app,
  • temporary MATRIX files on the device.

The Frida script file, if one was used, is not deleted; remove it yourself with DELETE /v3/images/{imageId} if you no longer need it.

The instance must be powered on, because MATRIX removes its files from the device. Delete a failed assessment before creating a new one for the same instance. Unlike most v3 delete endpoints, an unknown assessmentId returns 404 rather than 204.

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.AssessmentsApi(api_client)
    instance_id = 'instance_id_example' # str | ID of the instance (virtual device) the assessment belongs to. The platform checks that you have access to this instance before the request reaches MATRIX, so use the ID of an instance in one of your projects.
    assessment_id = 'assessment_id_example' # str | Identifier of the assessment.

    try:
        # Delete an assessment.
        api_instance.v3_delete_assessment(instance_id, assessment_id)
    except Exception as e:
        print("Exception when calling AssessmentsApi->v3_delete_assessment: %s\n" % e)

Parameters

Name Type Description Notes
instance_id str ID of the instance (virtual device) the assessment belongs to. The platform checks that you have access to this instance before the request reaches MATRIX, so use the ID of an instance in one of your projects.
assessment_id str Identifier of the assessment.

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 The assessment was deleted. -
400 Invalid request — for example the instance is powered off, an existing assessment is still in progress, or the assessment is not in the required state for this action. -
404 Assessment not found. -

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

v3_delete_report_modification

List[ReportModificationResult] v3_delete_report_modification(instance_id, assessment_id, delete_modification_input)

Delete report modifications.

Undoes report changes made with v3CreateReportModification, so the affected findings return to their original values. The assessment must have status complete. Send an array of { checkId, property } items that identify the changes to remove. The response has one entry per item saying whether it was removed.

Example

  • Bearer (JWT) Authentication (BearerAuth):
import corellium
from corellium.models.delete_modification_input import DeleteModificationInput
from corellium.models.report_modification_result import ReportModificationResult
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.AssessmentsApi(api_client)
    instance_id = 'instance_id_example' # str | ID of the instance (virtual device) the assessment belongs to. The platform checks that you have access to this instance before the request reaches MATRIX, so use the ID of an instance in one of your projects.
    assessment_id = 'assessment_id_example' # str | Identifier of the assessment.
    delete_modification_input = [corellium.DeleteModificationInput()] # List[DeleteModificationInput] | 

    try:
        # Delete report modifications.
        api_response = api_instance.v3_delete_report_modification(instance_id, assessment_id, delete_modification_input)
        print("The response of AssessmentsApi->v3_delete_report_modification:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling AssessmentsApi->v3_delete_report_modification: %s\n" % e)

Parameters

Name Type Description Notes
instance_id str ID of the instance (virtual device) the assessment belongs to. The platform checks that you have access to this instance before the request reaches MATRIX, so use the ID of an instance in one of your projects.
assessment_id str Identifier of the assessment.
delete_modification_input List[DeleteModificationInput]

Return type

List[ReportModificationResult]

Authorization

BearerAuth

HTTP request headers

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

HTTP response details

Status code Description Response headers
200 The result of each requested modification removal. -
400 The assessment is not complete, so its report modifications cannot be removed. -
404 Assessment not found. -

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

v3_download_report

str v3_download_report(instance_id, assessment_id, format=format)

Download an assessment report.

Downloads the full report of a finished assessment. The assessment must have status complete; otherwise the request fails with 400.

Choose the format with format:

  • html (default): a single, self-contained HTML page for people to read. Save it with an .html extension and open it in a browser.
  • json: the report data for programs, plus an activity array (up to 100 recent events for the assessment) and a modifications array listing the changes made with v3CreateReportModification. The report data itself is the original, unmodified result; apply the entries in modifications yourself if your program needs the adjusted view.

The HTML report applies your modifications when it is generated, so download again after changing findings. The instance does not need to be powered on.

Example

  • Bearer (JWT) Authentication (BearerAuth):
import corellium
from corellium.models.assessment_format import AssessmentFormat
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.AssessmentsApi(api_client)
    instance_id = 'instance_id_example' # str | ID of the instance (virtual device) the assessment belongs to. The platform checks that you have access to this instance before the request reaches MATRIX, so use the ID of an instance in one of your projects.
    assessment_id = 'assessment_id_example' # str | Identifier of the assessment.
    format = html # AssessmentFormat | Report download format. Defaults to \"html\". (optional) (default to html)

    try:
        # Download an assessment report.
        api_response = api_instance.v3_download_report(instance_id, assessment_id, format=format)
        print("The response of AssessmentsApi->v3_download_report:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling AssessmentsApi->v3_download_report: %s\n" % e)

Parameters

Name Type Description Notes
instance_id str ID of the instance (virtual device) the assessment belongs to. The platform checks that you have access to this instance before the request reaches MATRIX, so use the ID of an instance in one of your projects.
assessment_id str Identifier of the assessment.
format AssessmentFormat Report download format. Defaults to &quot;html&quot;. [optional] [default to html]

Return type

str

Authorization

BearerAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: text/html, application/json

HTTP response details

Status code Description Response headers
200 The rendered report, as HTML or JSON per the requested format. -
400 The assessment is not complete, so its report cannot be downloaded. -
404 Assessment not found. -

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

v3_get_assessment_by_id

Assessment v3_get_assessment_by_id(instance_id, assessment_id)

Get an assessment by ID.

Returns everything known about one assessment. Use it to:

  • Wait for a step to finish. Poll after v3StartMonitoring, v3StopMonitoring and v3RunTests, and check status before making the next call.
  • Find out why it failed. When status is failed, error may contain a short reason.
  • Read a summary of the results. Once status is complete, results holds the pass/fail counts and the MATRIX score, and reportId is set. Use v3DownloadReport for the full findings.

Returns 404 if no assessment has this ID.

Example

  • Bearer (JWT) Authentication (BearerAuth):
import corellium
from corellium.models.assessment import Assessment
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.AssessmentsApi(api_client)
    instance_id = 'instance_id_example' # str | ID of the instance (virtual device) the assessment belongs to. The platform checks that you have access to this instance before the request reaches MATRIX, so use the ID of an instance in one of your projects.
    assessment_id = 'assessment_id_example' # str | Identifier of the assessment.

    try:
        # Get an assessment by ID.
        api_response = api_instance.v3_get_assessment_by_id(instance_id, assessment_id)
        print("The response of AssessmentsApi->v3_get_assessment_by_id:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling AssessmentsApi->v3_get_assessment_by_id: %s\n" % e)

Parameters

Name Type Description Notes
instance_id str ID of the instance (virtual device) the assessment belongs to. The platform checks that you have access to this instance before the request reaches MATRIX, so use the ID of an instance in one of your projects.
assessment_id str Identifier of the assessment.

Return type

Assessment

Authorization

BearerAuth

HTTP request headers

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

HTTP response details

Status code Description Response headers
200 The requested assessment. -
404 Assessment not found. -

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

v3_get_assessments_by_instance_id

PaginatedAssessments v3_get_assessments_by_instance_id(instance_id, target_instance_id, limit=limit, offset=offset, sort=sort, name=name, version=version, status=status, created_by=created_by, wordlist=wordlist, frida=frida, corellium_version=corellium_version, created_at=created_at)

List assessments for an instance.

Lists the assessments for an instance, one page at a time. Use it to find earlier assessments, check whether one is still running before creating a new one, or build a history view.

Paging. Returns at most limit assessments (default 100), skipping the first offset (default 0). total is the number of assessments that match your filters; keep increasing offset by limit until offset is at least total.

Sorting and filtering. Results are newest first unless you set sort. Filters such as status, name and createdAt can be combined; only assessments matching all of them are returned.

Example

  • Bearer (JWT) Authentication (BearerAuth):
import corellium
from corellium.models.paginated_assessments import PaginatedAssessments
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.AssessmentsApi(api_client)
    instance_id = 'instance_id_example' # str | ID of the instance (virtual device) the assessment belongs to. The platform checks that you have access to this instance before the request reaches MATRIX, so use the ID of an instance in one of your projects.
    target_instance_id = 'target_instance_id_example' # str | ID of the instance whose assessments you want to list. Set this to the same value as `instanceId`; the path contains the ID twice only because of how the MATRIX service is routed.
    limit = 100 # float | Maximum number of assessments to return. Defaults to 100. (optional) (default to 100)
    offset = 0 # float | Number of assessments to skip before returning results. Defaults to 0. (optional) (default to 0)
    sort = '-createdAt' # str | Comma-separated fields to order by; prefix a field with \"-\" for descending. Allowed fields: createdAt, status, name, version, score, wordlist, frida, corelliumVersion. Defaults to \"-createdAt\". (optional)
    name = 'name_example' # str | Filter by app name (exact match). (optional)
    version = 'version_example' # str | Filter by app version (exact match). (optional)
    status = 'status_example' # str | Filter by assessment status. (optional)
    created_by = 'created_by_example' # str | Filter by the user ID that created the assessment. (optional)
    wordlist = 'wordlist_example' # str | Filter by wordlist name. Use \"None\" to return assessments without a wordlist. (optional)
    frida = 'frida_example' # str | Filter by Frida script name. Use \"None\" to return assessments without a Frida script. (optional)
    corellium_version = 'corellium_version_example' # str | Filter by Corellium version (exact match). (optional)
    created_at = '9/1/2026-9/2/2026' # str | Filter by test date. Accepts a single date (MM/DD/YYYY), a range (MM/DD/YYYY-MM/DD/YYYY), or a comma-separated list of dates and ranges. Dates are matched inclusive of the full day in UTC. (optional)

    try:
        # List assessments for an instance.
        api_response = api_instance.v3_get_assessments_by_instance_id(instance_id, target_instance_id, limit=limit, offset=offset, sort=sort, name=name, version=version, status=status, created_by=created_by, wordlist=wordlist, frida=frida, corellium_version=corellium_version, created_at=created_at)
        print("The response of AssessmentsApi->v3_get_assessments_by_instance_id:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling AssessmentsApi->v3_get_assessments_by_instance_id: %s\n" % e)

Parameters

Name Type Description Notes
instance_id str ID of the instance (virtual device) the assessment belongs to. The platform checks that you have access to this instance before the request reaches MATRIX, so use the ID of an instance in one of your projects.
target_instance_id str ID of the instance whose assessments you want to list. Set this to the same value as `instanceId`; the path contains the ID twice only because of how the MATRIX service is routed.
limit float Maximum number of assessments to return. Defaults to 100. [optional] [default to 100]
offset float Number of assessments to skip before returning results. Defaults to 0. [optional] [default to 0]
sort str Comma-separated fields to order by; prefix a field with &quot;-&quot; for descending. Allowed fields: createdAt, status, name, version, score, wordlist, frida, corelliumVersion. Defaults to &quot;-createdAt&quot;. [optional]
name str Filter by app name (exact match). [optional]
version str Filter by app version (exact match). [optional]
status str Filter by assessment status. [optional]
created_by str Filter by the user ID that created the assessment. [optional]
wordlist str Filter by wordlist name. Use &quot;None&quot; to return assessments without a wordlist. [optional]
frida str Filter by Frida script name. Use &quot;None&quot; to return assessments without a Frida script. [optional]
corellium_version str Filter by Corellium version (exact match). [optional]
created_at str Filter by test date. Accepts a single date (MM/DD/YYYY), a range (MM/DD/YYYY-MM/DD/YYYY), or a comma-separated list of dates and ranges. Dates are matched inclusive of the full day in UTC. [optional]

Return type

PaginatedAssessments

Authorization

BearerAuth

HTTP request headers

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

HTTP response details

Status code Description Response headers
200 A page of assessments for the instance. -
400 Invalid query parameters. -

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

v3_patch_assessment

Assessment v3_patch_assessment(instance_id, assessment_id, update_assessment_input)

Update an assessment status.

Sets the assessment's status field directly. Most clients should never call this. v3StartMonitoring, v3StopMonitoring and v3RunTests change the status for you and also do the actual work; this call only changes the stored value.

The server does not check that the new status is a valid next step, and changing it does not start or stop any monitoring or testing. Setting a status by hand can leave an assessment claiming to be in a state it is not really in. Returns the updated assessment, or 404 if no assessment has this ID.

Example

  • Bearer (JWT) Authentication (BearerAuth):
import corellium
from corellium.models.assessment import Assessment
from corellium.models.update_assessment_input import UpdateAssessmentInput
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.AssessmentsApi(api_client)
    instance_id = 'instance_id_example' # str | ID of the instance (virtual device) the assessment belongs to. The platform checks that you have access to this instance before the request reaches MATRIX, so use the ID of an instance in one of your projects.
    assessment_id = 'assessment_id_example' # str | Identifier of the assessment.
    update_assessment_input = corellium.UpdateAssessmentInput() # UpdateAssessmentInput | 

    try:
        # Update an assessment status.
        api_response = api_instance.v3_patch_assessment(instance_id, assessment_id, update_assessment_input)
        print("The response of AssessmentsApi->v3_patch_assessment:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling AssessmentsApi->v3_patch_assessment: %s\n" % e)

Parameters

Name Type Description Notes
instance_id str ID of the instance (virtual device) the assessment belongs to. The platform checks that you have access to this instance before the request reaches MATRIX, so use the ID of an instance in one of your projects.
assessment_id str Identifier of the assessment.
update_assessment_input UpdateAssessmentInput

Return type

Assessment

Authorization

BearerAuth

HTTP request headers

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

HTTP response details

Status code Description Response headers
200 The updated assessment. -
404 Assessment not found. -

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

v3_run_tests

AssessmentIdStatus v3_run_tests(instance_id, assessment_id, test_assessment_input=test_assessment_input)

Run assessment tests.

Runs the MATRIX security checks (step 5). Call it once the status is readyForTesting. The instance must be powered on and must stay on until testing finishes.

The checks run in the background and can take several minutes. This call returns right away with the status testing. Poll v3GetAssessmentById until it is complete (then call v3DownloadReport) or failed.

Running only some checks. The request body is optional; with no body every applicable check runs. To narrow it down, set grep to text or a regular expression. A check runs if the pattern matches its check ID, its group ID or its category ID. For example masvs-storage runs every storage check and masvs-storage-2-android-8 runs one check. Set invert to true to run every check except the matching ones.

Example

  • Bearer (JWT) Authentication (BearerAuth):
import corellium
from corellium.models.assessment_id_status import AssessmentIdStatus
from corellium.models.test_assessment_input import TestAssessmentInput
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.AssessmentsApi(api_client)
    instance_id = 'instance_id_example' # str | ID of the instance (virtual device) the assessment belongs to. The platform checks that you have access to this instance before the request reaches MATRIX, so use the ID of an instance in one of your projects.
    assessment_id = 'assessment_id_example' # str | Identifier of the assessment.
    test_assessment_input = corellium.TestAssessmentInput() # TestAssessmentInput |  (optional)

    try:
        # Run assessment tests.
        api_response = api_instance.v3_run_tests(instance_id, assessment_id, test_assessment_input=test_assessment_input)
        print("The response of AssessmentsApi->v3_run_tests:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling AssessmentsApi->v3_run_tests: %s\n" % e)

Parameters

Name Type Description Notes
instance_id str ID of the instance (virtual device) the assessment belongs to. The platform checks that you have access to this instance before the request reaches MATRIX, so use the ID of an instance in one of your projects.
assessment_id str Identifier of the assessment.
test_assessment_input TestAssessmentInput [optional]

Return type

AssessmentIdStatus

Authorization

BearerAuth

HTTP request headers

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

HTTP response details

Status code Description Response headers
200 The assessment identifier and its new status. -
400 Invalid request — for example the instance is powered off, an existing assessment is still in progress, or the assessment is not in the required state for this action. -
404 Assessment not found. -

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

v3_start_monitoring

v3_start_monitoring(instance_id, assessment_id)

Start assessment monitoring.

Starts recording what the app does (step 2). Call it after v3CreateAssessment, when the assessment's status is new. The instance must be powered on.

MATRIX attaches to the app in the background, which can take a while. This call returns 204 as soon as that work has started, with the status set to startingMonitoring. Poll v3GetAssessmentById:

  • monitoring: recording has begun. Now use the app on the device. Go through the features you want tested: sign in, open screens, enter and save data, make network requests. MATRIX can only report on behavior it observed. Keep the app open until you stop monitoring.
  • failed: see error. Common causes are too little device RAM and the app failing to launch.

When you have finished using the app, call v3StopMonitoring.

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.AssessmentsApi(api_client)
    instance_id = 'instance_id_example' # str | ID of the instance (virtual device) the assessment belongs to. The platform checks that you have access to this instance before the request reaches MATRIX, so use the ID of an instance in one of your projects.
    assessment_id = 'assessment_id_example' # str | Identifier of the assessment.

    try:
        # Start assessment monitoring.
        api_instance.v3_start_monitoring(instance_id, assessment_id)
    except Exception as e:
        print("Exception when calling AssessmentsApi->v3_start_monitoring: %s\n" % e)

Parameters

Name Type Description Notes
instance_id str ID of the instance (virtual device) the assessment belongs to. The platform checks that you have access to this instance before the request reaches MATRIX, so use the ID of an instance in one of your projects.
assessment_id str Identifier of the assessment.

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 Monitoring was started. -
400 Invalid request — for example the instance is powered off, an existing assessment is still in progress, or the assessment is not in the required state for this action. -
404 Assessment not found. -

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

v3_stop_monitoring

v3_stop_monitoring(instance_id, assessment_id)

Stop assessment monitoring.

Stops recording (step 4). Call it once the status is monitoring and you have finished using the app. The instance must be powered on.

MATRIX detaches from the app and saves what it recorded in the background. This call returns 204 as soon as that has started, with the status set to stoppingMonitoring. Poll v3GetAssessmentById until the status is readyForTesting, then call v3RunTests. If it becomes failed, check error.

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.AssessmentsApi(api_client)
    instance_id = 'instance_id_example' # str | ID of the instance (virtual device) the assessment belongs to. The platform checks that you have access to this instance before the request reaches MATRIX, so use the ID of an instance in one of your projects.
    assessment_id = 'assessment_id_example' # str | Identifier of the assessment.

    try:
        # Stop assessment monitoring.
        api_instance.v3_stop_monitoring(instance_id, assessment_id)
    except Exception as e:
        print("Exception when calling AssessmentsApi->v3_stop_monitoring: %s\n" % e)

Parameters

Name Type Description Notes
instance_id str ID of the instance (virtual device) the assessment belongs to. The platform checks that you have access to this instance before the request reaches MATRIX, so use the ID of an instance in one of your projects.
assessment_id str Identifier of the assessment.

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 Monitoring was stopped. -
400 Invalid request — for example the instance is powered off, an existing assessment is still in progress, or the assessment is not in the required state for this action. -
404 Assessment not found. -

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