Skip to content

Latest commit

 

History

History
430 lines (302 loc) · 14.1 KB

WebPlayerV1Api.md

File metadata and controls

430 lines (302 loc) · 14.1 KB

corellium.WebPlayerV1Api

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_web_player_allowed_domains GET /v1/webplayer/allowedDomains Retrieve the list of allowed domains for all Webplayer sessions
v1_web_player_create_session POST /v1/webplayer Create a new Webplayer Session
v1_web_player_destroy_session DELETE /v1/webplayer/{sessionId} Tear down a Webplayer Session
v1_web_player_list_sessions GET /v1/webplayer List all Webplayer sessions
v1_web_player_session_info GET /v1/webplayer/{sessionId} Retrieve Webplayer Session Information

v1_web_player_allowed_domains

v1_web_player_allowed_domains()

Retrieve the list of allowed domains for all Webplayer sessions

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.WebPlayerV1Api(api_client)

    try:
        # Retrieve the list of allowed domains for all Webplayer sessions
        api_instance.v1_web_player_allowed_domains()
    except Exception as e:
        print("Exception when calling WebPlayerV1Api->v1_web_player_allowed_domains: %s\n" % e)

Parameters

This endpoint does not need any parameter.

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

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

v1_web_player_create_session

WebPlayerSessionV1 v1_web_player_create_session(web_player_create_session_request)

Create a new Webplayer Session

Example

  • Bearer (JWT) Authentication (BearerAuth):
import corellium
from corellium.models.web_player_create_session_request import WebPlayerCreateSessionRequest
from corellium.models.web_player_session_v1 import WebPlayerSessionV1
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.WebPlayerV1Api(api_client)
    web_player_create_session_request = {
  "projectId": "0fc719fc-335d-458c-a424-51a550a73d12",
  "instanceId": "fbd94550-3f74-4d46-a6ed-c26cbfb23340",
  "expiresIn": 18000,
  "features": {
    "apps": true,
    "files": true
  }
} # WebPlayerCreateSessionRequest | Request Data

    try:
        # Create a new Webplayer Session
        api_response = api_instance.v1_web_player_create_session(web_player_create_session_request)
        print("The response of WebPlayerV1Api->v1_web_player_create_session:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling WebPlayerV1Api->v1_web_player_create_session: %s\n" % e)

Parameters

Name Type Description Notes
web_player_create_session_request WebPlayerCreateSessionRequest Request Data

Return type

WebPlayerSessionV1

Authorization

BearerAuth

HTTP request headers

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

HTTP response details

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

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

v1_web_player_destroy_session

List[str] v1_web_player_destroy_session(session_id)

Tear down a Webplayer Session

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.WebPlayerV1Api(api_client)
    session_id = 'session_id_example' # str | Webplayer Session identifier

    try:
        # Tear down a Webplayer Session
        api_response = api_instance.v1_web_player_destroy_session(session_id)
        print("The response of WebPlayerV1Api->v1_web_player_destroy_session:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling WebPlayerV1Api->v1_web_player_destroy_session: %s\n" % e)

Parameters

Name Type Description Notes
session_id str Webplayer Session identifier

Return type

List[str]

Authorization

BearerAuth

HTTP request headers

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

HTTP response details

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

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

v1_web_player_list_sessions

List[WebPlayerSessionV1] v1_web_player_list_sessions()

List all Webplayer sessions

Example

  • Bearer (JWT) Authentication (BearerAuth):
import corellium
from corellium.models.web_player_session_v1 import WebPlayerSessionV1
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.WebPlayerV1Api(api_client)

    try:
        # List all Webplayer sessions
        api_response = api_instance.v1_web_player_list_sessions()
        print("The response of WebPlayerV1Api->v1_web_player_list_sessions:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling WebPlayerV1Api->v1_web_player_list_sessions: %s\n" % e)

Parameters

This endpoint does not need any parameter.

Return type

List[WebPlayerSessionV1]

Authorization

BearerAuth

HTTP request headers

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

HTTP response details

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

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

v1_web_player_session_info

WebPlayerSessionV1 v1_web_player_session_info(session_id)

Retrieve Webplayer Session Information

Example

  • Bearer (JWT) Authentication (BearerAuth):
import corellium
from corellium.models.web_player_session_v1 import WebPlayerSessionV1
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.WebPlayerV1Api(api_client)
    session_id = 'session_id_example' # str | Webplayer Session identifier

    try:
        # Retrieve Webplayer Session Information
        api_response = api_instance.v1_web_player_session_info(session_id)
        print("The response of WebPlayerV1Api->v1_web_player_session_info:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling WebPlayerV1Api->v1_web_player_session_info: %s\n" % e)

Parameters

Name Type Description Notes
session_id str Webplayer Session identifier

Return type

WebPlayerSessionV1

Authorization

BearerAuth

HTTP request headers

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

HTTP response details

Status code Description Response headers
200 Success -
400 Bad Request -
403 Forbidden -
404 Not Found -

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