Skip to content

corellium/go-corellium-api-client

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

43 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Go API client for corellium

REST API to manage your virtual devices.

Overview

This API client was generated by the OpenAPI Generator project. By using the OpenAPI-spec from a remote server, you can easily generate an API client.

  • API version: 7.3.0-27831
  • Package version: 1.0.0
  • Build package: org.openapitools.codegen.languages.GoClientCodegen

Installation

Install the following dependencies:

go get github.com/stretchr/testify/assert
go get golang.org/x/net/context

Put the package under your project folder and add the following in import:

import corellium "github.com/corellium/go-corellium-api-client"

To use a proxy, set the environment variable HTTP_PROXY:

os.Setenv("HTTP_PROXY", "http://proxy_name:proxy_port")

Configuration of Server URL

Default configuration comes with Servers field that contains server objects as defined in the OpenAPI specification.

Select Server Configuration

For using other server than the one defined on index 0 set context value sw.ContextServerIndex of type int.

ctx := context.WithValue(context.Background(), corellium.ContextServerIndex, 1)

Templated Server URL

Templated server URL is formatted using default variables from configuration or from context value sw.ContextServerVariables of type map[string]string.

ctx := context.WithValue(context.Background(), corellium.ContextServerVariables, map[string]string{
	"basePath": "v2",
})

Note, enum values are always validated and all unused variables are silently ignored.

URLs Configuration per Operation

Each operation can use different server URL defined using OperationServers map in the Configuration. An operation is uniquely identified by "{classname}Service.{nickname}" string. Similar rules for overriding default operation server index and variables applies by using sw.ContextOperationServerIndices and sw.ContextOperationServerVariables context maps.

ctx := context.WithValue(context.Background(), corellium.ContextOperationServerIndices, map[string]int{
	"{classname}Service.{nickname}": 2,
})
ctx = context.WithValue(context.Background(), corellium.ContextOperationServerVariables, map[string]map[string]string{
	"{classname}Service.{nickname}": {
		"port": "8443",
	},
})

Documentation for API Endpoints

All URIs are relative to https://app.corellium.com/api

Class Method HTTP request Description
CorelliumApi CreateAssessment Post /v1/services/matrix/{instanceId}/assessments Create assessment
CorelliumApi DeleteAssessment Delete /v1/services/matrix/{instanceId}/assessments/{assessmentId} Delete assessment
CorelliumApi DownloadReport Get /v1/services/matrix/{instanceId}/assessments/{assessmentId}/download Download report
CorelliumApi GetAssessmentById Get /v1/services/matrix/{instanceId}/assessments/{assessmentId} Get assessment by ID
CorelliumApi GetAssessmentsByInstanceId Get /v1/services/matrix/{instanceId}/instances/{instanceId}/assessments Get assessments by instanceId
CorelliumApi RunTests Post /v1/services/matrix/{instanceId}/assessments/{assessmentId}/test Update assessment state and execute MATRIX tests
CorelliumApi StartMonitoring Post /v1/services/matrix/{instanceId}/assessments/{assessmentId}/start Update assessment state and begin device monitoring
CorelliumApi StopMonitoring Post /v1/services/matrix/{instanceId}/assessments/{assessmentId}/stop Update assessment state and stop device monitoring
CorelliumApi V1AcceptSharedSnapshot Post /v1/snapshots/accept Accept a snapshot shared with you
CorelliumApi V1ActivityExport Post /v1/activity/export Start activity export
CorelliumApi V1ActivityList Get /v1/activity Get resource activities
CorelliumApi V1AddProjectKey Post /v1/projects/{projectId}/keys Add Project Authorized Key
CorelliumApi V1AddTeamRoleToProject Put /v1/roles/projects/{projectId}/teams/{teamId}/roles/{roleId} Add team role to project
CorelliumApi V1AddUserRoleToProject Put /v1/roles/projects/{projectId}/users/{userId}/roles/{roleId} Add user role to project
CorelliumApi V1AddUserToTeam Put /v1/teams/{teamId}/users/{userId} Add user to team
CorelliumApi V1AgentAppReady Get /v1/instances/{instanceId}/agent/v1/app/ready Check if App subsystem is ready
CorelliumApi V1AgentDeleteFile Delete /v1/instances/{instanceId}/agent/v1/file/device/{filePath} Delete a File on VM
CorelliumApi V1AgentGetFile Get /v1/instances/{instanceId}/agent/v1/file/device/{filePath} Download a File from VM
CorelliumApi V1AgentGetTempFilename Post /v1/instances/{instanceId}/agent/v1/file/temp Get the path for a new temp file
CorelliumApi V1AgentInstallApp Post /v1/instances/{instanceId}/agent/v1/app/install Install App at path
CorelliumApi V1AgentInstallProfile Post /v1/instances/{instanceId}/agent/v1/profile/install Install a Profile to VM
CorelliumApi V1AgentKillApp Post /v1/instances/{instanceId}/agent/v1/app/apps/{bundleId}/kill Kill an App
CorelliumApi V1AgentListAppIcons Get /v1/instances/{instanceId}/agent/v1/app/icons List App Icons
CorelliumApi V1AgentListApps Get /v1/instances/{instanceId}/agent/v1/app/apps List Apps
CorelliumApi V1AgentListAppsStatus Get /v1/instances/{instanceId}/agent/v1/app/apps/update List Apps Status
CorelliumApi V1AgentListProfiles Get /v1/instances/{instanceId}/agent/v1/profile/profiles List Profiles
CorelliumApi V1AgentRunApp Post /v1/instances/{instanceId}/agent/v1/app/apps/{bundleId}/run Run an App
CorelliumApi V1AgentSetFileAttributes Patch /v1/instances/{instanceId}/agent/v1/file/device/{filePath} Change Attrs of a File on VM
CorelliumApi V1AgentSystemGetAdbAuth Get /v1/instances/{instanceId}/agent/v1/system/adbauth Get ADB Auth Setting (AOSP only)
CorelliumApi V1AgentSystemGetNetwork Get /v1/instances/{instanceId}/agent/v1/system/network Get IP of eth0 (AOSP only)
CorelliumApi V1AgentSystemGetProp Post /v1/instances/{instanceId}/agent/v1/system/getprop Get System Property (AOSP only)
CorelliumApi V1AgentSystemInstallOpenGApps Post /v1/instances/{instanceId}/agent/v1/system/install-opengapps Install OpenGApps (AOSP only)
CorelliumApi V1AgentSystemLock Post /v1/instances/{instanceId}/agent/v1/system/lock Lock Device (iOS Only)
CorelliumApi V1AgentSystemSetAdbAuth Put /v1/instances/{instanceId}/agent/v1/system/adbauth Set ADB Auth Setting (AOSP only)
CorelliumApi V1AgentSystemSetHostname Post /v1/instances/{instanceId}/agent/v1/system/setHostname Set Hostname of instance
CorelliumApi V1AgentSystemShutdown Post /v1/instances/{instanceId}/agent/v1/system/shutdown Instruct VM to halt
CorelliumApi V1AgentSystemUnlock Post /v1/instances/{instanceId}/agent/v1/system/unlock Unlock Device (iOS Only)
CorelliumApi V1AgentUninstallApp Post /v1/instances/{instanceId}/agent/v1/app/apps/{bundleId}/uninstall Uninstall an App
CorelliumApi V1AgentUninstallProfile Delete /v1/instances/{instanceId}/agent/v1/profile/profiles/{profileId} Uninstall a Profile from VM
CorelliumApi V1AgentUploadFile Put /v1/instances/{instanceId}/agent/v1/file/device/{filePath} Upload a file to VM
CorelliumApi V1AuthLogin Post /v1/auth/login Log In
CorelliumApi V1BtracePreauthorize Get /v1/instances/{instanceId}/btrace-authorize Pre-authorize an btrace download
CorelliumApi V1CheckSubdomainExistence Post /v1/domain/check Check the existence of a subdomain
CorelliumApi V1ClearCoreTrace Delete /v1/instances/{instanceId}/strace Clear CoreTrace logs
CorelliumApi V1ClearHyperTrace Delete /v1/instances/{instanceId}/btrace Clear HyperTrace logs
CorelliumApi V1ClearHyperTraceHooks Post /v1/instances/{instanceId}/hooks/clear Clear Hooks on an instance
CorelliumApi V1ClearInstancePanics Delete /v1/instances/{instanceId}/panics Clear Panics
CorelliumApi V1CreateDomainAuthProvider Post /v1/domain/{domainId}/auth Create a new auth provider for a domain
CorelliumApi V1CreateHook Post /v1/instances/{instanceId}/hooks Create hypervisor hook for Instance
CorelliumApi V1CreateImage Post /v1/images Create a new Image
CorelliumApi V1CreateInstance Post /v1/instances Create Instance
CorelliumApi V1CreateNetworkConnection Post /v1/network/connections Create a new Network Connection
CorelliumApi V1CreateProject Post /v1/projects Create a Project
CorelliumApi V1CreateSnapshot Post /v1/instances/{instanceId}/snapshots Create Instance Snapshot
CorelliumApi V1CreateUser Post /v1/users Create User
CorelliumApi V1DeleteDomainAuthProvider Delete /v1/domain/{domainId}/auth/{providerId} Delete an auth provider from a domain
CorelliumApi V1DeleteExtension Delete /v1/extensions/{extensionId} Delete an existing extension
CorelliumApi V1DeleteHook Delete /v1/hooks/{hookId} Delete an existing hypervisor hook
CorelliumApi V1DeleteImage Delete /v2/images/{imageId} Delete Image
CorelliumApi V1DeleteInstance Delete /v1/instances/{instanceId} Remove Instance
CorelliumApi V1DeleteInstanceSnapshot Delete /v1/instances/{instanceId}/snapshots/{snapshotId} Delete an Instance Snapshot
CorelliumApi V1DeleteNetworkConnection Delete /v1/network/connections/{id} Delete an existing Network Connection
CorelliumApi V1DeleteProject Delete /v1/projects/{projectId} Delete a Project
CorelliumApi V1DeleteSnapshot Delete /v1/snapshots/{snapshotId} Delete a Snapshot
CorelliumApi V1DeleteSnapshotPermissions Delete /v1/snapshots/{snapshotId}/permissions Delete member(s)
CorelliumApi V1DeleteUser Delete /v1/users/{userId} Delete User
CorelliumApi V1DisableExposePort Post /v1/instances/{instanceId}/exposeport/disable Disable an exposed port on an instance for device access.
CorelliumApi V1DownloadActivity Get /v1/activity/export/{taskId}/download Download activity
CorelliumApi V1EnableExposePort Post /v1/instances/{instanceId}/exposeport/enable Enable an exposed port on an instance for device access.
CorelliumApi V1ExecuteHyperTraceHooks Post /v1/instances/{instanceId}/hooks/execute Execute Hooks on an instance
CorelliumApi V1GetActivityExportStatus Get /v1/activity/export/{taskId} Get export task status
CorelliumApi V1GetActivityExportTasks Get /v1/activity/export Get all export tasks for user
CorelliumApi V1GetConfig Get /v1/config Get all configs
CorelliumApi V1GetDomainAuthProviders Get /v1/domain/{domainId}/auth Return all configured auth providers for a domain (including globally configured providers)
CorelliumApi V1GetExtensionById Get /v1/extensions/{extensionId} Get extension by id
CorelliumApi V1GetExtensions Get /v1/extensions Get all extensions
CorelliumApi V1GetHookById Get /v1/hooks/{hookId} Get hypervisor hook by id
CorelliumApi V1GetHooks Get /v1/instances/{instanceId}/hooks Get all hypervisor hooks for Instance
CorelliumApi V1GetImage Get /v1/images/{imageId} Get Image Metadata
CorelliumApi V1GetImages Get /v1/images Get all Images Metadata
CorelliumApi V1GetInstance Get /v1/instances/{instanceId} Get Instance
CorelliumApi V1GetInstanceConsole Get /v1/instances/{instanceId}/console Get console websocket URL
CorelliumApi V1GetInstanceConsoleLog Get /v1/instances/{instanceId}/consoleLog Get Console Log
CorelliumApi V1GetInstanceGpios Get /v1/instances/{instanceId}/gpios Get Instance GPIOs
CorelliumApi V1GetInstancePanics Get /v1/instances/{instanceId}/panics Get Panics
CorelliumApi V1GetInstancePeripherals Get /v1/instances/{instanceId}/peripherals Get Instance Peripherals
CorelliumApi V1GetInstanceScreenshot Get /v1/instances/{instanceId}/screenshot.{format} Get Instance Screenshot
CorelliumApi V1GetInstanceSnapshot Get /v1/instances/{instanceId}/snapshots/{snapshotId} Get Instance Snapshot
CorelliumApi V1GetInstanceSnapshots Get /v1/instances/{instanceId}/snapshots Get Instance Snapshots
CorelliumApi V1GetInstances Get /v1/instances Get Instances
CorelliumApi V1GetModelSoftware Get /v1/models/{model}/software Get Software for Model
CorelliumApi V1GetModels Get /v1/models Get Supported Models
CorelliumApi V1GetNetworkConnection Get /v1/network/connections/{id} Return the configuration and per project statuses for a single network provider.
CorelliumApi V1GetProject Get /v1/projects/{projectId} Get a Project
CorelliumApi V1GetProjectInstances Get /v1/projects/{projectId}/instances Get Instances in Project
CorelliumApi V1GetProjectKeys Get /v1/projects/{projectId}/keys Get Project Authorized Keys
CorelliumApi V1GetProjectNetworkLog Get /v1/projects/{projectId}/network/log Retrieve the network connection log for a project
CorelliumApi V1GetProjectNetworkStatus Get /v1/projects/{projectId}/network/status Retrieve the network connection status for a project
CorelliumApi V1GetProjectVpnConfig Get /v1/projects/{projectId}/vpnconfig/{format} Get Project VPN Configuration
CorelliumApi V1GetProjects Get /v1/projects Get Projects
CorelliumApi V1GetResetLinkInfo Get /v1/users/reset-link-info Send Password Reset Link Info
CorelliumApi V1GetSharedSnapshots Get /v1/snapshots/shared Fetch shared snapshots
CorelliumApi V1GetSnapshot Get /v1/snapshots/{snapshotId} Get Snapshot
CorelliumApi V1InstancesInstanceIdMessagePost Post /v1/instances/{instanceId}/message Inject a message into an iOS VM
CorelliumApi V1InstancesInstanceIdNetdumpPcapGet Get /v1/instances/{instanceId}/netdump.pcap Download a netdump pcap file
CorelliumApi V1InstancesInstanceIdNetworkMonitorPcapGet Get /v1/instances/{instanceId}/networkMonitor.pcap Download a Network Monitor pcap file
CorelliumApi V1Kcrange Get /v1/instances/{instanceId}/btrace-kcrange Get Kernel extension ranges
CorelliumApi V1ListNetworkConnections Get /v1/network/connections List available network connections
CorelliumApi V1ListNetworkInterfaces Get /v1/network/interfaces List available physical network interfaces
CorelliumApi V1ListNetworkProviders Get /v1/network/providers List available network providers
CorelliumApi V1ListThreads Get /v1/instances/{instanceId}/strace/thread-list Get Running Threads (CoreTrace)
CorelliumApi V1LoadExtension Post /v1/extensions Load an extension
CorelliumApi V1MediaPlay Post /v1/instances/{instanceId}/media/play Start playing media
CorelliumApi V1MediaStop Post /v1/instances/{instanceId}/media/stop Stop playing media
CorelliumApi V1ParseExtensionJson Post /v1/extensions/parse/extension.json Validates extension.json
CorelliumApi V1PartialUpdateNetworkConnection Patch /v1/network/connections/{id} Update Network Connection (partial)
CorelliumApi V1PatchInstance Patch /v1/instances/{instanceId} Update Instance
CorelliumApi V1PatchInstanceReadOnly Patch /v1/instances/{instanceId}/read-only Update Instance Read Only
CorelliumApi V1PauseInstance Post /v1/instances/{instanceId}/pause Pause an Instance
CorelliumApi V1PostInstanceInput Post /v1/instances/{instanceId}/input Provide Instance Input
CorelliumApi V1Ready Get /v1/ready API Status
CorelliumApi V1RebootInstance Post /v1/instances/{instanceId}/reboot Reboot an Instance
CorelliumApi V1RemoveProjectKey Delete /v1/projects/{projectId}/keys/{keyId} Delete Project Authorized Key
CorelliumApi V1RemoveTeamRoleFromProject Delete /v1/roles/projects/{projectId}/teams/{teamId}/roles/{roleId} Remove team role from project
CorelliumApi V1RemoveUserFromTeam Delete /v1/teams/{teamId}/users/{userId} Remove user from team
CorelliumApi V1RemoveUserRoleFromProject Delete /v1/roles/projects/{projectId}/users/{userId}/roles/{roleId} Remove user role from project
CorelliumApi V1RenameInstanceSnapshot Patch /v1/instances/{instanceId}/snapshots/{snapshotId} Rename an Instance Snapshot
CorelliumApi V1ResetUserPassword Post /v1/users/reset-password Reset User Password
CorelliumApi V1RestoreBackup Post /v1/instances/{instanceId}/restoreBackup Restore backup
CorelliumApi V1RestoreInstanceSnapshot Post /v1/instances/{instanceId}/snapshots/{snapshotId}/restore Restore an Instance Snapshot
CorelliumApi V1Roles Get /v1/roles Get all roles
CorelliumApi V1RotateInstance Post /v1/instances/{instanceId}/rotate Rotate device to specified orientation
CorelliumApi V1SendUserResetLink Post /v1/users/send-reset-link Send Password Reset Link
CorelliumApi V1SetInstanceGpios Put /v1/instances/{instanceId}/gpios Set Instance GPIOs
CorelliumApi V1SetInstancePeripherals Put /v1/instances/{instanceId}/peripherals Set Instance Peripherals
CorelliumApi V1SetInstanceState Put /v1/instances/{instanceId}/state Set state of Instance
CorelliumApi V1SetSnapshotPermissions Post /v1/snapshots/{snapshotId}/permissions Set member list
CorelliumApi V1ShareSnapshot Post /v1/snapshots/{snapshotId}/share Share snapshot
CorelliumApi V1SnapshotRename Patch /v1/snapshots/{snapshotId} Rename a Snapshot
CorelliumApi V1StartCoreTrace Post /v1/instances/{instanceId}/strace/enable Start CoreTrace on an instance
CorelliumApi V1StartHyperTrace Post /v1/instances/{instanceId}/btrace/enable Start HyperTrace on an instance
CorelliumApi V1StartInstance Post /v1/instances/{instanceId}/start Start an Instance
CorelliumApi V1StartNetdump Post /v1/instances/{instanceId}/netdump/enable Start Enhanced Network Monitor on an instance.
CorelliumApi V1StartNetworkMonitor Post /v1/instances/{instanceId}/sslsplit/enable Start Network Monitor on an instance.
CorelliumApi V1StopCoreTrace Post /v1/instances/{instanceId}/strace/disable Stop CoreTrace on an instance.
CorelliumApi V1StopHyperTrace Post /v1/instances/{instanceId}/btrace/disable Stop HyperTrace on an instance.
CorelliumApi V1StopInstance Post /v1/instances/{instanceId}/stop Stop an Instance
CorelliumApi V1StopNetdump Post /v1/instances/{instanceId}/netdump/disable Stop Enhanced Network Monitor on an instance.
CorelliumApi V1StopNetworkMonitor Post /v1/instances/{instanceId}/sslsplit/disable Stop Network Monitor on an instance.
CorelliumApi V1TeamChange Patch /v1/teams/{teamId} Update team
CorelliumApi V1TeamCreate Post /v1/teams Create team
CorelliumApi V1TeamDelete Delete /v1/teams/{teamId} Delete team
CorelliumApi V1Teams Get /v1/teams Get teams
CorelliumApi V1UnpauseInstance Post /v1/instances/{instanceId}/unpause Unpause an Instance
CorelliumApi V1UpdateDomainAuthProvider Put /v1/domain/{domainId}/auth/{providerId} Update an auth provider for a domain
CorelliumApi V1UpdateExtension Put /v1/extensions/{extensionId} Update an existing extension
CorelliumApi V1UpdateHook Put /v1/hooks/{hookId} Update an existing hypervisor hook
CorelliumApi V1UpdateNetworkConnection Put /v1/network/connections/{id} Update Network Connection
CorelliumApi V1UpdateProject Patch /v1/projects/{projectId} Update a Project
CorelliumApi V1UpdateProjectSettings Patch /v1/projects/{projectId}/settings Change Project Settings
CorelliumApi V1UpdateUser Patch /v1/users/{userId} Update User
CorelliumApi V1UpgradeInstance Post /v1/instances/{instanceId}/upgrade Upgrade iOS version
CorelliumApi V1UploadImageData Post /v1/images/{imageId} Upload Image Data
CorelliumApi V1UserAgreeTerms Post /v1/users/agree Consent to the current terms and conditions
CorelliumApi V1UsersChangePasswordPost Post /v1/users/change-password Change User Password
CorelliumApi V1UsersLogin Post /v1/users/login Log In
CorelliumApi V1WebPlayerAllowedDomains Get /v1/webplayer/allowedDomains Retrieve the list of allowed domains for all Webplayer sessions
CorelliumApi V1WebPlayerCreateSession Post /v1/webplayer Create a new Webplayer Session
CorelliumApi V1WebPlayerDestroySession Delete /v1/webplayer/{sessionId} Tear down a Webplayer Session
CorelliumApi V1WebPlayerListSessions Get /v1/webplayer List all Webplayer sessions
CorelliumApi V1WebPlayerSessionInfo Get /v1/webplayer/{sessionId} Retrieve Webplayer Session Information
CorelliumApi V2GetInstanceQuickConnectCommand Get /v2/instances/{instanceId}/quickConnectCommand Recommended SSH Command for Quick Connect
CorelliumApi V2GetInstanceState Get /v2/instances/{instanceId}/state Get state of Instance

Documentation For Models

Documentation For Authorization

BearerAuth

  • Type: HTTP Bearer token authentication

Example

auth := context.WithValue(context.Background(), sw.ContextAccessToken, "BEARER_TOKEN_STRING")
r, err := client.Service.Operation(auth, args)

Documentation for Utility Methods

Due to the fact that model structure members are all pointers, this package contains a number of utility functions to easily obtain pointers to values of basic types. Each of these functions takes a value of the given basic type and returns a pointer to it:

  • PtrBool
  • PtrInt
  • PtrInt32
  • PtrInt64
  • PtrFloat
  • PtrFloat32
  • PtrFloat64
  • PtrString
  • PtrTime

Author

About

REST API to manage your virtual devices.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •  

Languages