Skip to content

Instantly share code, notes, and snippets.

@Manouchehri
Created January 24, 2024 18:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Manouchehri/43c280586d3ddbabac0a2e1792813f5f to your computer and use it in GitHub Desktop.
Save Manouchehri/43c280586d3ddbabac0a2e1792813f5f to your computer and use it in GitHub Desktop.
Corellium Webinar Files (20240124)
{
"openapi": "3.0.0",
"info": {
"title": "Corellium API",
"description": "REST API to manage your virtual devices.",
"termsOfService": "https://www.corellium.com/legal/terms",
"version": "5.7.1-19700"
},
"servers": [
{
"url": "https://moda.enterprise.corellium.com/api",
"description": "",
"variables": {
"serverName": {
"default": "moda.enterprise.corellium.com"
}
}
}
],
"security": [
{
"BearerAuth": []
}
],
"components": {
"securitySchemes": {
"BearerAuth": {
"type": "http",
"scheme": "bearer",
"bearerFormat": "ApiToken or JWT",
"description": "Token to authorize API access"
}
},
"schemas": {
"Credentials": {
"description": "",
"required": [
"username",
"password"
],
"type": "object",
"properties": {
"username": {
"description": "Authentication Username",
"type": "string"
},
"password": {
"description": "Authentication Password",
"type": "string",
"format": "password"
}
}
},
"Token": {
"description": "",
"required": [
"token"
],
"type": "object",
"properties": {
"token": {
"description": "",
"type": "string"
},
"expiration": {
"description": "Token expiration",
"type": "string",
"format": "date-time",
"nullable": true
}
}
},
"ApiToken": {
"description": "",
"required": [
"apiToken"
],
"type": "object",
"properties": {
"apiToken": {
"description": "",
"type": "string"
}
}
},
"coupon_options": {
"description": "Coupon options",
"required": [
"type",
"amount",
"used"
],
"type": "object",
"properties": {
"type": {
"description": "",
"type": "string",
"enum": [
"percent",
"discount",
"absolute"
]
},
"amount": {
"description": "Amount",
"type": "number"
},
"used": {
"description": "Is Used. If true, this coupon has been used and cannot be used again",
"type": "boolean"
}
}
},
"plan": {
"description": "Plan options",
"required": [
"licenseType",
"cores"
],
"type": "object",
"properties": {
"licenseType": {
"description": "",
"type": "string",
"enum": [
"premium",
"individual",
"standard",
"enterprise",
"individual-usage",
"enterprise-usage",
"unrestricted"
]
},
"cores": {
"description": "Number of CPU cores",
"type": "integer"
}
}
},
"trial": {
"description": "Trial options",
"required": [
"duration"
],
"type": "object",
"properties": {
"duration": {
"description": "Duration in days",
"type": "number"
}
}
},
"SubscriberInvite": {
"description": "Subscriber Invite",
"required": [
"coupon_code",
"aggregate",
"active",
"reusable",
"createdAt",
"updatedAt"
],
"type": "object",
"properties": {
"coupon_options": {
"description": "Coupon Options",
"$ref": "#/components/schemas/coupon_options",
"nullable": true
},
"plan": {
"description": "Plan Options",
"$ref": "#/components/schemas/plan",
"nullable": true
},
"trial": {
"description": "Trial Options",
"$ref": "#/components/schemas/trial",
"nullable": true
},
"name": {
"description": "Name",
"type": "string",
"nullable": true
},
"email": {
"description": "Email",
"type": "string",
"nullable": true
},
"coupon_code": {
"description": "Coupon code",
"type": "string"
},
"domain": {
"description": "Domain",
"type": "string",
"nullable": true
},
"aggregate": {
"description": "Aggregate",
"type": "string"
},
"use_by": {
"description": "Used By",
"type": "string",
"nullable": true
},
"active": {
"description": "Is Active flag",
"type": "boolean"
},
"reusable": {
"description": "Is reusable flag",
"type": "boolean"
},
"createdAt": {
"description": "Created Date in ISO-8601 format e.g. 2022-05-06T02:39:23.000Z",
"type": "string"
},
"updatedAt": {
"description": "Updated Date in ISO-8601 format e.g. 2022-05-06T02:39:23.000Z",
"type": "string"
}
}
},
"EmptyResponse": {
"description": "",
"type": "object",
"properties": {}
},
"TrialRequestMetadata": {
"description": "",
"type": "object",
"properties": {
"name": {
"description": "",
"type": "string",
"nullable": true
},
"company": {
"description": "provided company name",
"type": "string",
"nullable": true
},
"malware": {
"description": "option from sign up form, interesting using for malware",
"type": "boolean",
"nullable": true
},
"research": {
"description": "option from sign up form, interesting using for research",
"type": "boolean",
"nullable": true
},
"pentest": {
"description": "option from sign up form, interesting using for pentesting",
"type": "boolean",
"nullable": true
},
"other": {
"description": "option from sign up form, interesting using for other area added here",
"type": "string",
"nullable": true
}
}
},
"Address": {
"description": "The user's address",
"type": "object",
"properties": {
"address1": {
"description": "Address line 1 (e.g., street, PO Box, or company name).",
"type": "string",
"nullable": true
},
"address2": {
"description": "Address line 2 (e.g., apartment, suite, unit, or building).",
"type": "string",
"nullable": true
},
"city": {
"description": "City, district, suburb, town, or village.",
"type": "string",
"nullable": true
},
"country": {
"description": "Two-letter country code (ISO 3166-1 alpha-2).",
"type": "string",
"nullable": true
},
"postal_code": {
"description": "ZIP or postal code.",
"type": "string",
"nullable": true
},
"state": {
"description": "State, county, province, or region.",
"type": "string",
"nullable": true
}
}
},
"TrialRequestOptions": {
"description": "",
"type": "object",
"properties": {
"address": {
"description": "The user's address.",
"$ref": "#/components/schemas/Address",
"nullable": true
},
"email": {
"description": "The user's email address.",
"type": "string",
"nullable": true
},
"name": {
"description": "The user's full name.",
"type": "string",
"nullable": true
},
"metadata": {
"description": "Metadata passed in from the sign up flow",
"$ref": "#/components/schemas/TrialRequestMetadata",
"nullable": true
},
"enterprise": {
"description": "If true, create an enterprise domain.",
"type": "boolean",
"nullable": true
},
"token": {
"description": "Stripe payment token.",
"type": "string",
"nullable": true
}
}
},
"GrantTrialRequestResponse": {
"description": "",
"type": "object",
"properties": {
"code": {
"description": "Trial request code",
"type": "string",
"nullable": true
}
}
},
"Plan": {
"description": "",
"type": "object",
"properties": {
"planId": {
"description": "Plan ID",
"type": "string",
"nullable": true
},
"name": {
"description": "Plan Name",
"type": "string",
"nullable": true
}
}
},
"Maintenance": {
"description": "",
"type": "object",
"properties": {
"message": {
"description": "Maintenance message",
"type": "string",
"nullable": true
},
"header": {
"description": "Maintenance header",
"type": "string",
"nullable": true
}
}
},
"Trial": {
"description": "",
"type": "object",
"properties": {
"defaultDuration": {
"description": "Maintenance message",
"type": "number",
"nullable": true
},
"defaultHours": {
"description": "Maintenance header",
"type": "number",
"nullable": true
},
"defaultDevices": {
"description": "Maintenance header",
"type": "number",
"nullable": true
},
"defaultCores": {
"description": "Maintenance header",
"type": "number",
"nullable": true
}
}
},
"Logging": {
"description": "",
"type": "object",
"properties": {
"development": {
"description": "Denotes whether it's in development",
"type": "boolean",
"nullable": true
},
"throwWarnings": {
"description": "Denotes whether to throw warnings",
"type": "boolean",
"nullable": true
}
}
},
"AuthProvider": {
"description": "",
"type": "object",
"properties": {
"name": {
"description": "Provider name for a given provider type",
"type": "string",
"nullable": true
},
"identifier": {
"description": "The identifier for the provider",
"type": "string",
"nullable": true
},
"providerType": {
"description": "Provider type",
"type": "string",
"nullable": true
},
"default": {
"description": "Denotes whether it's the default",
"type": "boolean",
"nullable": true
},
"label": {
"description": "Provider label",
"type": "string",
"nullable": true
},
"enabled": {
"description": "Denotes whether they're enabled or not",
"type": "boolean",
"nullable": true
},
"authorizationUrl": {
"description": "URL for provider auth",
"type": "string",
"nullable": true
},
"id": {
"description": "The identifier for the provider",
"type": "string",
"nullable": true
},
"provider": {
"description": "Auth provider",
"type": "string",
"nullable": true
}
}
},
"ConfigResponse": {
"description": "",
"type": "object",
"properties": {
"onSite": {
"description": "Denotes whether it's an on-site install",
"type": "boolean",
"nullable": true
},
"showDomainSettings": {
"description": "Denotes whether to show domain settings",
"type": "boolean",
"nullable": true
},
"version": {
"description": "Denotes the version",
"type": "string",
"nullable": true
},
"invalidBuild": {
"description": "Denotes whether the build is invalid",
"type": "boolean",
"nullable": true
},
"sepSim": {
"description": "Denotes whether sepSim is enabled",
"type": "boolean",
"nullable": true
},
"installerAvailable": {
"description": "Denotes whether installer is available",
"type": "boolean",
"nullable": true
},
"invoicedPublishableKey": {
"description": "API publishable key to use for Invoiced",
"type": "string",
"nullable": true
},
"stripePublicKey": {
"description": "Stripe public key",
"type": "string",
"nullable": true
},
"intercomId": {
"description": "Intercom app ID, also known as workspace ID",
"type": "string",
"nullable": true
},
"auxWebhook": {
"description": "Webhook URL for aux",
"type": "string",
"nullable": true
},
"gtmId": {
"description": "Google Tag Manager",
"type": "string",
"nullable": true
},
"zapierFeedbackWebhook": {
"description": "Webhook URL to send feedback into Productboard automatically",
"type": "string",
"nullable": true
},
"zapierBugsWebhook": {
"description": "Webhook URL to send frontend errors to Jira automatically",
"type": "string",
"nullable": true
},
"billingBackend": {
"description": "Default backend billing api name for new subscriptions (e.g. \"stripe\")",
"type": "string",
"nullable": true
},
"maintenance": {
"description": "Denotes whether the server is undergoing maintenance",
"oneOf": [
{
"type": "boolean"
},
{
"$ref": "#/components/schemas/Maintenance"
}
],
"nullable": true
},
"logging": {
"description": "Info for logging",
"$ref": "#/components/schemas/Logging",
"nullable": true
},
"cloudAdmin": {
"description": "URL for cloud admin login",
"type": "string",
"nullable": true
},
"filesAdmin": {
"description": "URL for files admin login",
"type": "string",
"nullable": true
},
"cloudDomain": {
"description": "Cloud domain name (usually corellium.com or staging.corellium.com)",
"type": "string",
"nullable": true
},
"billingDomain": {
"description": "Billing domain name",
"type": "string",
"nullable": true
},
"appDomain": {
"description": "App domain name (usually app.corellium.com or app.staging.corellium.com)",
"type": "string",
"nullable": true
},
"maxNetworkMonitorFileSize": {
"description": "Maximum network monitor file size",
"type": "string",
"nullable": true
},
"enableFirmwareImageUpload": {
"description": "Denotes whether users can upload firmware images",
"type": "boolean",
"nullable": true
},
"authProviders": {
"description": "Auth providers",
"type": "array",
"items": {
"$ref": "#/components/schemas/AuthProvider"
},
"nullable": true
},
"snapshotLimit": {
"description": "Maximum number of snapshots to allow",
"type": "number",
"nullable": true
},
"maxKernelSize": {
"description": "The maximum size, in bytes, (default: 100 MB) that an uploaded kernel should be",
"type": "number",
"nullable": true
},
"maxRamdiskSize": {
"description": "The maximum size, in bytes, (default: 500 MB) that an uploaded ramdisk should be",
"type": "number",
"nullable": true
},
"charmSDK": {
"description": "Denotes whether charmSDK is enabled",
"type": "string",
"nullable": true
},
"trial": {
"description": "Info about trial",
"$ref": "#/components/schemas/Trial",
"nullable": true
},
"sentryUrl": {
"description": "Sentry URL",
"type": "string",
"nullable": true
},
"domainAuthenticationProviders": {
"description": "If enabled, adds the default providers in their current configuration",
"type": "boolean",
"nullable": true
}
}
},
"DomainOptions": {
"description": "",
"type": "object",
"properties": {
"totpRequired": {
"description": "if true, totp is required",
"type": "boolean",
"nullable": true
},
"trialExtension": {
"description": "",
"$ref": "#/components/schemas/TrialExtension",
"nullable": true
}
}
},
"TrialExtension": {
"description": "",
"type": "object",
"properties": {
"duration": {
"description": "how many additional days?",
"type": "number",
"nullable": true
},
"reason": {
"description": "why does the user want more time?",
"type": "string",
"nullable": true
},
"denied": {
"description": "",
"type": "boolean",
"nullable": true
},
"deniedReason": {
"description": "explanation for why the request was denied",
"type": "string",
"nullable": true
}
}
},
"OpenIDConfig": {
"description": "",
"type": "object",
"properties": {
"discoveryUrl": {
"description": "Service Discovery URL",
"type": "string",
"nullable": true
},
"clientId": {
"description": "Service Client ID",
"type": "string",
"nullable": true
},
"clientSecret": {
"description": "Service Client Secret",
"type": "string",
"nullable": true
},
"invitedOnly": {
"description": "Only accept individuals with invitations",
"type": "boolean",
"nullable": true
}
}
},
"DomainAuthProviderRequest": {
"description": "",
"required": [
"providerType",
"enabled"
],
"type": "object",
"properties": {
"providerType": {
"description": "Provider Type",
"type": "string"
},
"enabled": {
"description": "Enabled/Disabled",
"type": "boolean"
},
"label": {
"description": "Login Button Text",
"type": "string",
"nullable": true
},
"config": {
"description": "Optional configuration",
"$ref": "#/components/schemas/OpenIDConfig",
"nullable": true
}
}
},
"DomainAuthProviderResponse": {
"description": "",
"required": [
"identifier",
"providerType",
"label",
"default",
"enabled",
"createdAt",
"updatedAt"
],
"type": "object",
"properties": {
"identifier": {
"description": "Provider ID",
"type": "string"
},
"id": {
"description": "Provider ID for backward compatibility with frontend",
"type": "string",
"nullable": true
},
"providerType": {
"description": "Provider Type",
"type": "string"
},
"provider": {
"description": "Provider Type for backward compatibility with frontend",
"type": "string",
"nullable": true
},
"label": {
"description": "Login Button Text",
"type": "string"
},
"name": {
"description": "Title Text for the Frontend's Provider Configuration Form",
"type": "string",
"nullable": true
},
"authorizationUrl": {
"description": "Coordinator endpoint for Authorizing with this provider",
"type": "string",
"nullable": true
},
"default": {
"description": "True: Configured in coordinator.json, False: Custom Domain Provider",
"type": "boolean"
},
"enabled": {
"description": "Enabled/Disabled",
"type": "boolean"
},
"config": {
"description": "Optional configuration",
"nullable": true,
"$ref": "#/components/schemas/OpenIDConfig"
},
"createdBy": {
"description": "Optional User ID of creator",
"nullable": true,
"type": "string"
},
"createdAt": {
"description": "Created Date in ISO-8601 format e.g. 2022-05-06T02:39:23.000Z",
"type": "string"
},
"updatedAt": {
"description": "Updated Date in ISO-8601 format e.g. 2022-05-06T02:39:23.000Z",
"type": "string"
}
}
},
"Extension": {
"description": "",
"type": "object",
"properties": {
"identifier": {
"description": "Identifier",
"type": "string",
"nullable": true
},
"enabled": {
"description": "If true, instances requiring this extension can be created or started",
"type": "boolean",
"nullable": true
},
"createdAt": {
"description": "Created Date in ISO-8601 format e.g. 2022-05-06T02:39:23.000Z",
"type": "string",
"nullable": true
},
"updatedAt": {
"description": "Updated Date in ISO-8601 format e.g. 2022-05-06T02:39:23.000Z",
"type": "string",
"nullable": true
},
"imageId": {
"description": "Image Id",
"type": "string",
"format": "uuid",
"nullable": true
},
"state": {
"description": "State",
"type": "string",
"nullable": true
},
"flavors": {
"description": "Array of Flavor definitions",
"type": "array",
"items": {
"type": "object"
},
"nullable": true
}
}
},
"UpdateExtension": {
"description": "",
"type": "object",
"properties": {
"enabled": {
"description": "If true, instances requiring this extension can be created or started",
"type": "boolean",
"nullable": true
}
}
},
"V1LoadExtensionParameters": {
"description": "",
"required": [
"imageId"
],
"type": "object",
"properties": {
"imageId": {
"description": "The uuid of the image to load",
"type": "string",
"format": "uuid"
}
}
},
"Hook": {
"description": "",
"type": "object",
"properties": {
"identifier": {
"description": "Identifier",
"type": "string",
"format": "uuid",
"nullable": true
},
"label": {
"description": "Label",
"type": "string",
"nullable": true
},
"address": {
"description": "Address",
"type": "string",
"nullable": true
},
"patch": {
"description": "Patch",
"type": "string",
"nullable": true
},
"patchType": {
"description": "Patch Type",
"type": "string",
"enum": [
"csmfcc",
"csmfvm"
],
"nullable": true
},
"enabled": {
"description": "If true, instances can call required hooks",
"type": "boolean",
"nullable": true
},
"createdAt": {
"description": "Created Date in ISO-8601 format e.g. 2022-05-06T02:39:23.000Z",
"type": "string",
"nullable": true
},
"updatedAt": {
"description": "Updated Date in ISO-8601 format e.g. 2022-05-06T02:39:23.000Z",
"type": "string",
"nullable": true
},
"instanceId": {
"description": "Instance Id",
"type": "string",
"format": "uuid",
"nullable": true
}
}
},
"V1CreateHookParameters": {
"description": "",
"required": [
"label",
"address",
"patch",
"patchType"
],
"type": "object",
"properties": {
"label": {
"description": "Label",
"type": "string"
},
"address": {
"description": "Address",
"type": "string"
},
"patch": {
"description": "Patch",
"type": "string"
},
"patchType": {
"description": "Patch Type",
"type": "string",
"enum": [
"csmfcc",
"csmfvm"
]
}
}
},
"Image": {
"description": "",
"required": [
"status"
],
"type": "object",
"properties": {
"status": {
"description": "",
"type": "string"
},
"id": {
"description": "Image ID",
"type": "string",
"format": "uuid",
"nullable": true
},
"name": {
"description": "",
"type": "string",
"nullable": true
},
"type": {
"description": "Type of image",
"type": "string",
"enum": [
"fwbinary",
"kernel",
"devicetree",
"ramdisk",
"loaderfile",
"sepfw",
"seprom",
"bootrom",
"llb",
"iboot",
"ibootdata",
"fwpackage",
"partition",
"backup"
],
"nullable": true
},
"filename": {
"description": "",
"type": "string",
"nullable": true
},
"uniqueid": {
"description": "",
"type": "string",
"nullable": true
},
"size": {
"description": "",
"type": "number",
"nullable": true
},
"project": {
"description": "project ID",
"type": "string",
"format": "uuid",
"nullable": true
},
"created_at": {
"description": "When Image was created",
"type": "string",
"format": "date-time",
"nullable": true
},
"updated_at": {
"description": "When Image was last updated",
"type": "string",
"format": "date-time",
"nullable": true
}
}
},
"ImageCreationOptions": {
"description": "",
"required": [
"type",
"encoding"
],
"type": "object",
"properties": {
"type": {
"description": "Image type",
"type": "string"
},
"encoding": {
"description": "How the file is stored",
"type": "string",
"enum": [
"plain"
]
},
"encapsulated": {
"description": "set to false if the uploaded file is not encapsulated inside an outer zipfile",
"type": "boolean",
"nullable": true
},
"name": {
"description": "Image name",
"type": "string",
"nullable": true
},
"project": {
"description": "Project ID",
"type": "string",
"format": "uuid",
"nullable": true
},
"instance": {
"description": "Instance ID",
"type": "string",
"format": "uuid",
"nullable": true
},
"file": {
"description": "Optionally the actual file",
"type": "string",
"format": "binary",
"nullable": true
}
}
},
"UserError": {
"description": "",
"required": [
"error",
"errorID"
],
"type": "object",
"properties": {
"error": {
"description": "Error text",
"type": "string"
},
"errorID": {
"description": "Error ID",
"type": "string",
"enum": [
"UserError"
]
},
"field": {
"description": "Field associated with error",
"type": "string",
"nullable": true
}
}
},
"ValidationError": {
"description": "",
"required": [
"error",
"errorID"
],
"type": "object",
"properties": {
"error": {
"description": "Error text",
"type": "string"
},
"errorID": {
"description": "Error ID",
"type": "string",
"enum": [
"ValidationError"
]
},
"field": {
"description": "Field associated with error",
"type": "string",
"nullable": true
}
}
},
"ApiInternalConsistencyError": {
"description": "",
"required": [
"error",
"errorID"
],
"type": "object",
"properties": {
"error": {
"description": "Error text",
"type": "string"
},
"errorID": {
"description": "Error ID",
"type": "string"
},
"originalError": {
"description": "Upstream error description",
"type": "string",
"nullable": true
}
}
},
"ApiError": {
"description": "",
"required": [
"error",
"errorID"
],
"type": "object",
"properties": {
"error": {
"description": "Error text",
"type": "string"
},
"errorID": {
"description": "Error ID",
"type": "string"
},
"originalError": {
"description": "Upstream error description",
"type": "string",
"nullable": true
}
}
},
"ApiConflictError": {
"description": "",
"required": [
"error",
"errorID"
],
"type": "object",
"properties": {
"error": {
"description": "Error text",
"type": "string"
},
"errorID": {
"description": "Error ID",
"type": "string",
"enum": [
"Conflict"
]
},
"object": {
"description": "Object that is conflicted with",
"type": "object",
"nullable": true
}
}
},
"ApiNotFoundError": {
"description": "",
"required": [
"error",
"errorID"
],
"type": "object",
"properties": {
"error": {
"description": "Error text",
"type": "string"
},
"errorID": {
"description": "Error ID",
"type": "string"
},
"name": {
"description": "Name of the object requested",
"type": "string",
"nullable": true
},
"params": {
"description": "params provided by user",
"type": "object",
"nullable": true
}
}
},
"File": {
"description": "A File",
"type": "string",
"format": "binary"
},
"PasswordChangeBody": {
"description": "",
"required": [
"user",
"old-password",
"new-password"
],
"type": "object",
"properties": {
"user": {
"description": "userId",
"type": "string",
"format": "uuid"
},
"old-password": {
"description": "old password",
"type": "string"
},
"new-password": {
"description": "new password",
"type": "string"
}
}
},
"InstanceBootOptionsAdditionalTag": {
"description": "### Instance Boot Option\n* kalloc: Enable kalloc/kfree trace access via GDB (Enterprise only)\n* gpu: Enable cloud GPU acceleration (Extra costs incurred, cloud only)\n* no-keyboard: Enable keyboard passthrough from web interface\n* nodevmode: Disable developer mode on iOS16 and greater\n* sep-cons-ext: Patch SEPOS to print debug messages to console\n* iboot-jailbreak: Patch iBoot to disable signature checks\n* llb-jailbreak: Patch LLB to disable signature checks\n* rom-jailbreak: Patch BootROM to disable signature checks",
"type": "string",
"enum": [
"kalloc",
"gpu",
"no-keyboard",
"nodevmode",
"sep-cons-ext",
"iboot-jailbreak",
"llb-jailbreak",
"rom-jailbreak"
]
},
"InstanceBootOptions": {
"description": "",
"type": "object",
"properties": {
"bootArgs": {
"description": "",
"type": "string",
"nullable": true
},
"restoreBootArgs": {
"description": "",
"type": "string",
"nullable": true
},
"udid": {
"description": "Boot udid",
"type": "string",
"format": "uuid",
"nullable": true
},
"ecid": {
"description": "Assigned ECID",
"type": "string",
"format": "hex",
"nullable": true
},
"randomSeed": {
"description": "Random seed to provide to boot if any",
"type": "string",
"nullable": true
},
"pac": {
"description": "Enable PAC",
"type": "boolean",
"nullable": true
},
"aprr": {
"description": "Enable APRR",
"type": "boolean",
"nullable": true
},
"additionalTags": {
"description": "",
"type": "array",
"items": {
"$ref": "#/components/schemas/InstanceBootOptionsAdditionalTag"
},
"nullable": true
}
}
},
"InstanceState": {
"description": "Current Instance State",
"type": "string",
"enum": [
"on",
"off",
"booting",
"deleting",
"creating",
"restoring",
"paused",
"rebooting",
"error"
]
},
"VpnDefinition": {
"description": "",
"type": "object",
"properties": {
"proxy": {
"description": "",
"type": "array",
"items": {
"type": "object"
},
"nullable": true
},
"listeners": {
"description": "",
"type": "array",
"items": {
"type": "object"
},
"nullable": true
}
}
},
"InstanceServices": {
"description": "",
"type": "object",
"properties": {
"vpn": {
"description": "",
"$ref": "#/components/schemas/VpnDefinition",
"nullable": true
}
}
},
"InstanceAgentState": {
"nullable": true,
"type": "object",
"description": "",
"properties": {
"hash": {
"description": "",
"type": "string",
"nullable": true
},
"info": {
"description": "",
"type": "string",
"nullable": true
}
}
},
"InstanceNetmonState": {
"description": "",
"type": "object",
"properties": {
"hash": {
"description": "",
"type": "string",
"nullable": true
},
"info": {
"description": "",
"type": "string",
"nullable": true
},
"enabled": {
"description": "",
"type": "boolean",
"nullable": true
}
}
},
"InstanceNetdumpState": {
"description": "",
"type": "object",
"properties": {
"hash": {
"description": "",
"type": "string",
"nullable": true
},
"info": {
"description": "",
"type": "string",
"nullable": true
},
"enabled": {
"description": "",
"type": "boolean",
"nullable": true
}
}
},
"Instance": {
"description": "",
"type": "object",
"properties": {
"id": {
"description": "Instance Identifier",
"type": "string",
"format": "uuid",
"nullable": true
},
"name": {
"description": "Instance Name",
"type": "string",
"nullable": true
},
"key": {
"description": "Key used to encrypt the Instance",
"type": "string",
"format": "hex",
"nullable": true
},
"flavor": {
"description": "The type of virtual machine this is",
"type": "string",
"nullable": true
},
"type": {
"description": "",
"type": "string",
"nullable": true
},
"project": {
"description": "The projectId of the project this instance belongs to",
"type": "string",
"format": "uuid",
"nullable": true
},
"state": {
"description": "Current state of the instance",
"$ref": "#/components/schemas/InstanceState",
"nullable": true
},
"stateChanged": {
"description": "Time the state of the instance last changed",
"type": "string",
"format": "date-time",
"nullable": true
},
"startedAt": {
"description": "Time the instance was started",
"nullable": true,
"type": "string",
"format": "date-time, NULL if currently SHUTOFF"
},
"userTask": {
"description": "Currently executing User Task",
"type": "string",
"nullable": true
},
"taskState": {
"description": "Current task state if any",
"type": "string",
"nullable": true
},
"error": {
"description": "Current error state if any",
"type": "string",
"nullable": true
},
"bootOptions": {
"description": "Instance boot options",
"$ref": "#/components/schemas/InstanceBootOptions",
"nullable": true
},
"serviceIp": {
"description": "Services IP Address",
"type": "string",
"format": "ipv4",
"nullable": true
},
"wifiIp": {
"description": "LAN IP Address",
"type": "string",
"format": "ipv4",
"nullable": true
},
"secondaryIp": {
"description": "Secondary Inteface LAN IP Address (if supported)",
"type": "string",
"format": "ipv4",
"nullable": true
},
"services": {
"description": "",
"$ref": "#/components/schemas/InstanceServices",
"nullable": true
},
"panicked": {
"description": "",
"type": "boolean",
"nullable": true
},
"created": {
"description": "Time instance was created",
"type": "string",
"format": "date-time",
"nullable": true
},
"model": {
"description": "Model of virtual machine device",
"type": "string",
"nullable": true
},
"fwpackage": {
"description": "URL that package used to create this instance is available at",
"type": "string",
"format": "url",
"nullable": true
},
"os": {
"description": "",
"type": "string",
"nullable": true
},
"agent": {
"description": "",
"$ref": "#/components/schemas/InstanceAgentState",
"nullable": true
},
"netmon": {
"description": "",
"$ref": "#/components/schemas/InstanceNetmonState",
"nullable": true
},
"netdump": {
"description": "",
"$ref": "#/components/schemas/InstanceNetdumpState",
"nullable": true
},
"exposePort": {
"description": "",
"type": "string",
"nullable": true
},
"fault": {
"description": "",
"type": "boolean",
"nullable": true
},
"patches": {
"description": "",
"type": "array",
"items": {
"type": "string"
},
"nullable": true
},
"createdBy": {
"description": "",
"nullable": true,
"$ref": "#/components/schemas/createdBy"
}
}
},
"createdBy": {
"description": "",
"type": "object",
"properties": {
"id": {
"description": "User Identifier",
"type": "string",
"format": "uuid",
"nullable": true
},
"username": {
"description": "Username",
"type": "string",
"nullable": true
},
"label": {
"description": "User Label",
"type": "string",
"nullable": true
},
"deleted": {
"description": "Indicates if user was deleted",
"type": "boolean",
"nullable": true
}
}
},
"VolumeOptions": {
"description": "",
"type": "object",
"properties": {
"allocate": {
"description": "GB",
"type": "number",
"nullable": true
},
"partitions": {
"description": "",
"type": "array",
"items": {
"type": "object"
},
"nullable": true
},
"computeNode": {
"description": "",
"type": "string",
"nullable": true
}
}
},
"InstanceCreateOptions": {
"description": "",
"required": [
"flavor",
"project",
"os"
],
"type": "object",
"properties": {
"name": {
"description": "the name of the device",
"type": "string",
"nullable": true
},
"key": {
"description": "Key used to encrypt the Instance",
"type": "string",
"format": "hex",
"nullable": true
},
"flavor": {
"description": "the flavor id",
"type": "string"
},
"project": {
"description": "project UUID",
"type": "string"
},
"os": {
"description": "OS Version",
"type": "string"
},
"osbuild": {
"description": "OS Build",
"type": "string",
"nullable": true
},
"patches": {
"description": "list of patches to apply",
"type": "array",
"items": {
"type": "string"
},
"nullable": true
},
"fwpackage": {
"description": "URL or image id",
"type": "string",
"nullable": true
},
"origFwPackageUrl": {
"description": "URL that firmware package used to create this instance is available at",
"type": "string",
"format": "url",
"nullable": true
},
"encrypt": {
"description": "",
"type": "boolean",
"nullable": true
},
"overrideWifiMAC": {
"description": "",
"type": "string",
"nullable": true
},
"volume": {
"description": "",
"$ref": "#/components/schemas/VolumeOptions",
"nullable": true
},
"snapshot": {
"description": "Snapshot ID for this instance to be cloned from if defined",
"type": "string",
"format": "uuid",
"nullable": true
},
"bootOptions": {
"description": "Instance boot options",
"$ref": "#/components/schemas/InstanceBootOptions",
"nullable": true
},
"device": {
"description": "",
"$ref": "#/components/schemas/Model",
"nullable": true
}
}
},
"InstanceReturn": {
"description": "",
"required": [
"id",
"state"
],
"type": "object",
"properties": {
"id": {
"description": "Instance ID",
"type": "string",
"format": "uuid"
},
"state": {
"description": "Instance state (creating)",
"$ref": "#/components/schemas/InstanceState"
}
}
},
"PatchInstanceOptions": {
"description": "",
"type": "object",
"properties": {
"name": {
"description": "the name of the device",
"type": "string",
"nullable": true
},
"state": {
"description": "the desired state of the device",
"type": "string",
"enum": [
"on",
"off",
"paused",
"deleting"
],
"nullable": true
},
"bootOptions": {
"description": "the desired Boot Options",
"$ref": "#/components/schemas/InstanceBootOptions",
"nullable": true
},
"proxy": {
"description": "",
"type": "Array",
"items": {
"$ref": "#/components/schemas/ProxyConfig"
},
"nullable": true
}
}
},
"ProxyConfig": {
"description": "Represents a Proxy configuration object.",
"type": "object",
"properties": {
"devicePort": {
"description": "The device port to use for proxying.",
"type": "number",
"nullable": true
},
"firstAvailable": {
"description": "If `true`, the first available port will be used if `devicePort` is not available.",
"type": "boolean",
"nullable": true
},
"expose": {
"description": "If `true`, the proxy will be exposed to the external interface.",
"type": "boolean",
"nullable": true
},
"routerPort": {
"description": "The router port to use for proxying.",
"type": "number",
"nullable": true
}
}
},
"AgentError": {
"description": "",
"required": [
"error",
"errorID"
],
"type": "object",
"properties": {
"error": {
"description": "The error encountered by the agent",
"type": "string"
},
"errorID": {
"description": "AgentError",
"type": "string",
"enum": [
"AgentError"
]
},
"originalError": {
"description": "The full error encountered by the agent",
"type": "object",
"nullable": true
}
}
},
"AgentAppReadyResponse": {
"description": "",
"required": [
"ready"
],
"type": "object",
"properties": {
"ready": {
"description": "",
"type": "boolean"
}
}
},
"AgentInstallBody": {
"description": "",
"type": "object",
"properties": {
"path": {
"description": "path to app to install",
"type": "string",
"nullable": true
}
}
},
"AgentApp": {
"description": "",
"type": "object",
"properties": {
"tags": {
"description": "",
"type": "array",
"items": {
"type": "string"
},
"nullable": true
},
"running": {
"description": "",
"type": "boolean",
"nullable": true
},
"diskUsage": {
"description": "",
"type": "integer",
"nullable": true
},
"Date": {
"description": "",
"type": "integer",
"nullable": true
},
"applicationType": {
"description": "",
"type": "string",
"nullable": true
},
"name": {
"description": "",
"type": "string",
"nullable": true
},
"bundleID": {
"description": "",
"type": "string",
"nullable": true
}
}
},
"AgentAppsList": {
"description": "",
"type": "object",
"properties": {
"apps": {
"description": "",
"type": "array",
"items": {
"$ref": "#/components/schemas/AgentApp"
},
"nullable": true
},
"frontmost": {
"description": "bundleID of frontmost app or empty string if none are frontmost",
"type": "string",
"nullable": true
}
}
},
"AgentAppStatus": {
"description": "",
"type": "object",
"properties": {
"running": {
"description": "",
"type": "boolean",
"nullable": true
},
"bundleID": {
"description": "",
"type": "string",
"nullable": true
}
}
},
"AgentAppsStatusList": {
"description": "",
"type": "object",
"properties": {
"apps": {
"description": "",
"type": "array",
"items": {
"$ref": "#/components/schemas/AgentAppStatus"
},
"nullable": true
},
"frontmost": {
"description": "bundleID of frontmost app or empty string if none are frontmost",
"type": "string",
"nullable": true
}
}
},
"AgentIcons": {
"description": "",
"type": "object",
"properties": {
"icon": {
"description": "The data for an icon",
"type": "string",
"format": "byte",
"nullable": true
}
}
},
"FileChanges": {
"description": "",
"type": "object",
"properties": {
"path": {
"description": "Optional New path",
"type": "string",
"nullable": true
},
"mode": {
"description": "Optional New Mode",
"type": "number",
"nullable": true
},
"uid": {
"description": "Optional New Owner UID",
"type": "number",
"nullable": true
},
"gid": {
"description": "Optional New Group GID",
"type": "number",
"nullable": true
}
}
},
"AgentProfilesReturn": {
"description": "",
"required": [
"profiles"
],
"type": "object",
"properties": {
"profiles": {
"description": "",
"type": "array",
"items": {
"type": "string"
}
}
}
},
"AgentSystemSetHostnameBody": {
"description": "",
"required": [
"hostname"
],
"type": "object",
"properties": {
"hostname": {
"description": "",
"type": "string"
}
}
},
"AgentValueReturn": {
"description": "",
"type": "object",
"properties": {
"value": {
"description": "The requested value",
"type": "string",
"nullable": true
}
}
},
"AgentSystemGetPropBody": {
"description": "",
"required": [
"property"
],
"type": "object",
"properties": {
"property": {
"description": "",
"type": "string"
}
}
},
"AgentSystemAdbAuth": {
"description": "",
"type": "object",
"properties": {
"enabled": {
"description": "",
"type": "boolean",
"nullable": true
}
}
},
"InstanceConsoleEndpoint": {
"description": "",
"type": "object",
"properties": {
"url": {
"description": "Console Websocket URL",
"type": "string",
"format": "url",
"nullable": true
}
}
},
"InstanceStartOptions": {
"description": "",
"type": "object",
"properties": {
"paused": {
"description": "Start device paused",
"type": "boolean",
"nullable": true
},
"sockcap": {
"description": "Start device with Process Network Monitoring enabled",
"type": "boolean",
"nullable": true
}
}
},
"InstanceStopOptions": {
"description": "",
"type": "object",
"properties": {
"soft": {
"description": "Request VM OS power down",
"type": "boolean",
"nullable": true
}
}
},
"V1SetStateBody": {
"description": "",
"required": [
"state"
],
"type": "object",
"properties": {
"state": {
"description": "",
"$ref": "#/components/schemas/InstanceState"
}
}
},
"RateInfo": {
"description": "",
"type": "object",
"properties": {
"onRateMicrocents": {
"description": "The amount per second, in microcents (USD), that this instance charges to be running.",
"type": "integer",
"nullable": true
},
"offRateMicrocents": {
"description": "The amount per second, in microcents (USD), that this instance charges to be stored.",
"type": "integer",
"nullable": true
}
}
},
"Bit": {
"description": "Bit value",
"type": "number",
"enum": [
"0",
"1"
]
},
"GpioStateDefinition": {
"description": "",
"required": [
"bitCount",
"banks"
],
"type": "object",
"properties": {
"bitCount": {
"description": "count of bits in members of this bank",
"type": "number"
},
"banks": {
"description": "bits for each bank of this name as an array of arrays",
"type": "array",
"items": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Bit"
}
}
}
}
},
"GpiosState": {
"description": "Current state of GPIOs",
"type": "object",
"properties": {
"led": {
"description": "",
"$ref": "#/components/schemas/GpioStateDefinition",
"nullable": true
},
"button": {
"description": "",
"$ref": "#/components/schemas/GpioStateDefinition",
"nullable": true
},
"switch": {
"description": "",
"$ref": "#/components/schemas/GpioStateDefinition",
"nullable": true
}
}
},
"PeripheralsData": {
"description": "",
"type": "object",
"properties": {
"acceleration": {
"description": "",
"type": "array",
"items": {
"type": "number"
},
"nullable": true
},
"gyroscope": {
"description": "",
"type": "array",
"items": {
"type": "number"
},
"nullable": true
},
"magnetic": {
"description": "",
"type": "array",
"items": {
"type": "number"
},
"nullable": true
},
"orientation": {
"description": "",
"type": "array",
"items": {
"type": "number"
},
"nullable": true
},
"temperature": {
"description": "",
"type": "number",
"nullable": true
},
"proximity": {
"description": "",
"type": "number",
"nullable": true
},
"light": {
"description": "",
"type": "number",
"nullable": true
},
"pressure": {
"description": "",
"type": "number",
"nullable": true
},
"humidity": {
"description": "",
"type": "number",
"nullable": true
}
}
},
"RestoreBackupData": {
"description": "",
"type": "object",
"properties": {}
},
"Screenshot": {
"description": "Screenshot Data",
"type": "string",
"format": "binary"
},
"RotateBody": {
"description": "",
"required": [
"orientation"
],
"type": "object",
"properties": {
"orientation": {
"description": "Desired orientation",
"type": "number",
"enum": [
"1",
"2",
"3",
"4"
]
}
}
},
"Button": {
"description": "Button definition",
"type": "string",
"enum": [
"finger",
"homeButton",
"holdButton",
"volumeUp",
"volumeDown",
"ringerSwitch",
"backButton",
"overviewButton"
]
},
"TouchInput": {
"description": "",
"type": "object",
"properties": {
"position": {
"description": "array of per-finger [x,y] touch positions, up to 10 depending on model",
"$ref": "#/components/schemas/FingerPositions",
"nullable": true
}
}
},
"TouchCurveInput": {
"description": "",
"type": "object",
"properties": {
"start": {
"description": "array of per-finger [x,y] start touch positions, up to 10 depending on model",
"$ref": "#/components/schemas/FingerPositions",
"nullable": true
},
"end": {
"description": "array of per-finger [x,y] end touch positions, up to 10 depending on model",
"$ref": "#/components/schemas/FingerPositions",
"nullable": true
}
}
},
"TextInput": {
"description": "",
"type": "object",
"properties": {
"text": {
"description": "text to type",
"type": "string",
"nullable": true
}
}
},
"InstanceInput": {
"oneOf": [
{
"$ref": "#/components/schemas/TouchInput"
},
{
"$ref": "#/components/schemas/TouchCurveInput"
},
{
"$ref": "#/components/schemas/TextInput"
}
],
"description": "",
"type": "object",
"properties": {}
},
"MediaPlayBody": {
"description": "",
"type": "object",
"properties": {
"imageId": {
"description": "Image ID",
"type": "string",
"format": "uuid",
"nullable": true
},
"url": {
"description": "URL to a media file",
"type": "string",
"format": "string",
"nullable": true
}
}
},
"KernelThread": {
"description": "",
"type": "object",
"properties": {
"kernelId": {
"description": "Kernel Thread ID",
"type": "string",
"format": "uint64_t",
"nullable": true
},
"tid": {
"description": "Task ID",
"type": "integer",
"nullable": true
},
"stack": {
"description": "Array of stack addresses",
"type": "array",
"items": {
"type": "string"
},
"nullable": true
}
}
},
"KernelTask": {
"description": "",
"type": "object",
"properties": {
"kernelId": {
"description": "Kernel Task ID",
"type": "string",
"format": "uint64_t",
"nullable": true
},
"name": {
"description": "Thread name",
"type": "string",
"nullable": true
},
"pid": {
"description": "Process ID of task",
"type": "integer",
"nullable": true
},
"threads": {
"description": "",
"type": "array",
"items": {
"$ref": "#/components/schemas/KernelThread"
},
"nullable": true
}
}
},
"Kcrange": {
"description": "",
"type": "object",
"properties": {
"kext": {
"description": "Kernel Extension",
"type": "string",
"nullable": true
},
"range": {
"description": "Range",
"type": "array",
"items": {
"type": "string"
},
"nullable": true
}
}
},
"BtraceEnableOptions": {
"description": "",
"type": "object",
"properties": {
"ranges": {
"description": "",
"type": "array",
"items": {
"type": "array",
"items": {
"type": "string"
}
},
"nullable": true
}
}
},
"NetdumpFilter": {
"description": "",
"type": "object",
"properties": {
"portRanges": {
"description": "",
"type": "array",
"items": {
"type": "string"
},
"nullable": true
},
"srcPorts": {
"description": "",
"type": "array",
"items": {
"type": "string"
},
"nullable": true
},
"dstPorts": {
"description": "",
"type": "array",
"items": {
"type": "string"
},
"nullable": true
},
"ports": {
"description": "",
"type": "array",
"items": {
"type": "string"
},
"nullable": true
},
"protocols": {
"description": "",
"type": "array",
"items": {
"type": "string"
},
"nullable": true
},
"processes": {
"description": "",
"type": "array",
"items": {
"type": "string"
},
"nullable": true
}
}
},
"InstanceUpgradeBody": {
"description": "",
"required": [
"os"
],
"type": "object",
"properties": {
"os": {
"description": "iOS version",
"type": "string"
},
"osbuild": {
"description": "(optional) iOS build ID",
"type": "string",
"nullable": true
}
}
},
"Invitation": {
"description": "",
"type": "object",
"properties": {
"identifier": {
"description": "Invite ID",
"type": "string",
"format": "uuid",
"nullable": true
},
"email": {
"description": "Invited email",
"type": "string",
"nullable": true
},
"settings": {
"description": "",
"type": "object",
"nullable": true
}
}
},
"InviteRevokeParams": {
"description": "",
"type": "object",
"properties": {
"ids": {
"description": "id or array of ids to revoke",
"oneOf": [
{
"type": "string"
},
{
"type": "array",
"items": {
"type": "string"
}
}
],
"nullable": true
}
}
},
"Model": {
"description": "",
"required": [
"type",
"name",
"flavor",
"model"
],
"type": "object",
"properties": {
"type": {
"description": "",
"type": "string"
},
"name": {
"description": "",
"type": "string"
},
"flavor": {
"description": "",
"type": "string"
},
"description": {
"description": "",
"type": "string",
"nullable": true
},
"model": {
"description": "",
"type": "string"
},
"boardConfig": {
"description": "",
"type": "string",
"nullable": true
},
"platform": {
"description": "",
"type": "string",
"nullable": true
},
"cpid": {
"description": "",
"type": "number",
"nullable": true
},
"bdid": {
"description": "",
"type": "number",
"nullable": true
},
"peripherals": {
"description": "",
"type": "boolean",
"nullable": true
}
}
},
"Firmware": {
"description": "",
"type": "object",
"properties": {
"version": {
"description": "",
"type": "string",
"nullable": true
},
"buildid": {
"description": "",
"type": "string",
"nullable": true
},
"AndroidFlavor": {
"description": "Android only flavor",
"type": "string",
"nullable": true
},
"APIVersion": {
"description": "Android only API version",
"type": "string",
"nullable": true
},
"sha256sum": {
"description": "",
"type": "string",
"nullable": true
},
"sha1sum": {
"description": "",
"type": "string",
"nullable": true
},
"md5sum": {
"description": "",
"type": "string",
"nullable": true
},
"size": {
"description": "",
"type": "integer",
"nullable": true
},
"uniqueId": {
"description": "",
"type": "string",
"nullable": true
},
"metadata": {
"description": "Firmware metadata",
"type": "object",
"nullable": true
},
"releasedate": {
"description": "Release Date",
"type": "string",
"format": "date-time",
"nullable": true
},
"uploaddate": {
"description": "Date uploaded",
"type": "string",
"format": "date-time",
"nullable": true
},
"url": {
"description": "URL firmware is available at",
"type": "string",
"format": "url",
"nullable": true
},
"orig_url": {
"description": "URL firmware is available at from vendor",
"type": "string",
"format": "url",
"nullable": true
},
"filename": {
"description": "",
"type": "string",
"nullable": true
}
}
},
"ModelSoftware": {
"description": "",
"type": "object",
"properties": {
"name": {
"description": "",
"type": "string",
"nullable": true
},
"boardConfig": {
"description": "",
"type": "string",
"nullable": true
},
"platform": {
"description": "",
"type": "string",
"nullable": true
},
"cpid": {
"description": "",
"type": "number",
"nullable": true
},
"bdid": {
"description": "",
"type": "number",
"nullable": true
},
"firmwares": {
"description": "",
"type": "array",
"items": {
"$ref": "#/components/schemas/Firmware"
},
"nullable": true
}
}
},
"ProjectSettings": {
"description": "",
"type": "object",
"properties": {
"internet-access": {
"description": "",
"type": "boolean",
"nullable": true
},
"dhcp": {
"description": "",
"type": "boolean",
"nullable": true
}
}
},
"ProjectQuota": {
"description": "",
"type": "object",
"properties": {
"cores": {
"description": "",
"type": "number",
"nullable": true
},
"instances": {
"description": "",
"type": "number",
"nullable": true
},
"ram": {
"description": "",
"type": "number",
"nullable": true
}
}
},
"ProjectUsage": {
"description": "",
"type": "object",
"properties": {
"cores": {
"description": "",
"type": "number",
"nullable": true
},
"instances": {
"description": "",
"type": "number",
"nullable": true
},
"ram": {
"description": "",
"type": "number",
"nullable": true
},
"gpu": {
"description": "",
"type": "number",
"nullable": true
}
}
},
"Project": {
"description": "",
"required": [
"id"
],
"type": "object",
"properties": {
"id": {
"description": "Project Identifier",
"type": "string",
"format": "uuid"
},
"name": {
"description": "Project Name",
"type": "string",
"nullable": true
},
"settings": {
"description": "",
"$ref": "#/components/schemas/ProjectSettings",
"nullable": true
},
"quotas": {
"description": "",
"$ref": "#/components/schemas/ProjectQuota",
"nullable": true
},
"quotasUsed": {
"description": "",
"$ref": "#/components/schemas/ProjectUsage",
"nullable": true
}
}
},
"ProjectKey": {
"description": "",
"required": [
"kind",
"key"
],
"type": "object",
"properties": {
"identifier": {
"description": "keyId",
"type": "string",
"format": "uuid",
"nullable": true
},
"kind": {
"description": "kind of key",
"type": "string",
"enum": [
"ssh",
"adb"
]
},
"project": {
"description": "projectId",
"type": "string",
"format": "uuid",
"nullable": true
},
"key": {
"description": "The public key",
"type": "string"
},
"fingerprint": {
"description": "Key fingerprint",
"type": "string",
"nullable": true
},
"updatedAt": {
"description": "Time of last update",
"type": "string",
"format": "date-time",
"nullable": true
},
"createdAt": {
"description": "Time of creation",
"type": "string",
"format": "date-time",
"nullable": true
}
}
},
"Role": {
"description": "",
"required": [
"role",
"project",
"user"
],
"type": "object",
"properties": {
"role": {
"description": "",
"type": "string",
"enum": [
"admin",
"_member_"
]
},
"project": {
"description": "Project ID",
"type": "string",
"format": "uuid"
},
"user": {
"description": "User ID",
"type": "string",
"format": "uuid"
}
}
},
"SnapshotStatus": {
"description": "",
"type": "object",
"properties": {
"task": {
"description": "",
"type": "string",
"nullable": true
},
"created": {
"description": "",
"type": "boolean",
"nullable": true
}
}
},
"Snapshot": {
"description": "",
"type": "object",
"properties": {
"id": {
"description": "Snapshot ID",
"type": "string",
"format": "uuid",
"nullable": true
},
"name": {
"description": "Snapshot name",
"type": "string",
"nullable": true
},
"instance": {
"description": "Instance that this snapshot is of",
"type": "string",
"format": "uuid",
"nullable": true
},
"status": {
"description": "",
"$ref": "#/components/schemas/SnapshotStatus",
"nullable": true
},
"date": {
"description": "UNIX Date that the snapshot was created",
"type": "number",
"nullable": true
},
"fresh": {
"description": "",
"type": "boolean",
"nullable": true
},
"live": {
"description": "Live snapshot (included state and memory)",
"type": "boolean",
"nullable": true
},
"local": {
"description": "",
"type": "boolean",
"nullable": true
}
}
},
"SnapshotCreationOptions": {
"description": "",
"required": [
"name"
],
"type": "object",
"properties": {
"name": {
"description": "Snapshot name",
"type": "string"
}
}
},
"Team": {
"description": "",
"required": [
"id",
"label"
],
"type": "object",
"properties": {
"id": {
"description": "Team ID",
"type": "string",
"format": "uuid"
},
"label": {
"description": "Team Label",
"type": "string"
},
"users": {
"description": "Users",
"type": "array",
"items": {
"$ref": "#/components/schemas/User"
},
"nullable": true
}
}
},
"User": {
"description": "/**",
"required": [
"id",
"label",
"name",
"email"
],
"type": "object",
"properties": {
"id": {
"description": "User ID",
"type": "string",
"format": "uuid"
},
"label": {
"description": "User Label",
"type": "string"
},
"name": {
"description": "User Name",
"type": "string"
},
"email": {
"description": "User Email",
"type": "string"
},
"administrator": {
"description": "the flag that specifies whether user is Administrator or not",
"type": "boolean",
"nullable": true
}
}
},
"CreateTeam": {
"description": "",
"required": [
"name"
],
"type": "object",
"properties": {
"name": {
"description": "Team name",
"type": "string"
}
}
},
"TeamCreate": {
"description": "",
"type": "object",
"properties": {
"id": {
"description": "ID of newly created team",
"type": "string",
"format": "uuid",
"nullable": true
}
}
},
"AgreedAck": {
"description": "",
"type": "object",
"properties": {
"agreedToTerms": {
"description": "Date agreed",
"type": "string",
"format": "date-time",
"nullable": true
}
}
},
"PasswordResetBody": {
"description": "",
"required": [
"token",
"totpToken",
"new-password"
],
"type": "object",
"properties": {
"token": {
"description": "Password reset token",
"type": "string"
},
"totpToken": {
"description": "Password reset totpToken",
"type": "string"
},
"new-password": {
"description": "new password",
"type": "string"
}
}
},
"ResetLinkBody": {
"description": "",
"required": [
"email"
],
"type": "object",
"properties": {
"email": {
"description": "Email address to request password reset link for",
"type": "string"
}
}
},
"TouchPoint": {
"description": "Touch point defined as x,y",
"type": "object",
"properties": {}
},
"FingerPositions": {
"description": "Finger Positions",
"type": "object",
"properties": {},
"format": "up to 10"
},
"Features": {
"description": "",
"type": "object",
"properties": {
"apps": {
"description": "",
"type": "boolean",
"nullable": true
},
"connect": {
"description": "",
"type": "boolean",
"nullable": true
},
"console": {
"description": "",
"type": "boolean",
"nullable": true
},
"coretrace": {
"description": "",
"type": "boolean",
"nullable": true
},
"deviceControl": {
"description": "",
"type": "boolean",
"nullable": true
},
"deviceDelete": {
"description": "",
"type": "boolean",
"nullable": true
},
"files": {
"description": "",
"type": "boolean",
"nullable": true
},
"frida": {
"description": "",
"type": "boolean",
"nullable": true
},
"images": {
"description": "",
"type": "boolean",
"nullable": true
},
"messaging": {
"description": "",
"type": "boolean",
"nullable": true
},
"netmon": {
"description": "",
"type": "boolean",
"nullable": true
},
"network": {
"description": "",
"type": "boolean",
"nullable": true
},
"portForwarding": {
"description": "",
"type": "boolean",
"nullable": true
},
"powerManagement": {
"description": "",
"type": "boolean",
"nullable": true
},
"profile": {
"description": "",
"type": "boolean",
"nullable": true
},
"sensors": {
"description": "",
"type": "boolean",
"nullable": true
},
"settings": {
"description": "",
"type": "boolean",
"nullable": true
},
"snapshots": {
"description": "",
"type": "boolean",
"nullable": true
},
"strace": {
"description": "",
"type": "boolean",
"nullable": true
},
"system": {
"description": "",
"type": "boolean",
"nullable": true
}
}
},
"WebPlayerCreateSessionRequest": {
"description": "",
"required": [
"projectId",
"instanceId",
"expiresIn",
"features"
],
"type": "object",
"properties": {
"projectId": {
"description": "Project Identifier",
"type": "string"
},
"instanceId": {
"description": "VM Instance Identifier",
"type": "string"
},
"expiresIn": {
"description": "Number of seconds token remains valid",
"type": "number"
},
"features": {
"description": "The enabled UI features for this session",
"$ref": "#/components/schemas/Features"
},
"clientId": {
"description": "Optional string value supplied by client for tracking purposes",
"type": "string",
"nullable": true
}
}
},
"WebPlayerSession": {
"description": "",
"required": [
"identifier",
"token",
"expiration"
],
"type": "object",
"properties": {
"identifier": {
"description": "New Session Identifier",
"type": "string"
},
"token": {
"description": "Session Token",
"type": "string"
},
"expiration": {
"description": "Expiration in ISO-8601 format e.g. 2022-05-06T02:39:23.000Z",
"type": "number"
}
}
}
}
},
"paths": {
"/v1/auth/login": {
"post": {
"deprecated": false,
"summary": "Log In",
"security": [],
"responses": {
"200": {
"description": "User Authorization",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Token"
},
"examples": {
"example1": {
"summary": "Success",
"value": {
"token": "eyJhbGciOiJSUzM4NCIsInR5cCI6IkpXVCJ9.eyJ1c2VyIjoiZjU0MmY3NTktNGQ3OC00MTE5LWE4MWQtNDVmM2YxNTdhYmZkIiwiZG9tYWluIjoiNjQzMjM3ZWYtMzQ3My00ZTc3LTg3NTEtMWI1YTY4ZWU4ZTY5Iiwibm9JT1MiOmZhbHNlLCJhZG1pbmlzdHJhdG9yIjp0cnVlLCJwcm9qZWN0LWFkbWluaXN0cmF0b3IiOnRydWUsInRvdHAiOm51bGwsImVwb2NoIjpudWxsLCJpYXQiOjE2NDc3MTk0MTAsImV4cCI6MTY0Nzc0MTAxMH0.f9qD88Zaj-ux6Sc2NTGMDp0Q0WQlLQtDwOJsaajvaG_B0B8DABNU3lyCqU1eYmHOUH7cdTIfxg6PommhVh6TeIr7NNW8r1da4YYVg8Dltpv5WjIHTrHTPK-hpfvvArnhY6IszEy9o4fd4YYIYxEn4wxqNJoFG9ZygX3iN4aL5pU0ZtPyjj6Rhb8wTXikwIlqf2-mE1hwUlJt6b_HEf9B5gle_zMeLsDssDQ34SrBgIzD8Hqqnb2pfu9w7VCc2xGyBfa5hy1eIdwgc_A9S44G4jzf7OKAkm1BP239dMlIfv6YUrDOVSqip1j2UleTRRRT2dQiPdeKAzOltPhMQ_qB9o6plXUvQh4GKyavDWiM1Kvcj-HN6NdvPDG24CyZIqV3Hr_KgC5laCG6xaJY6G4whVyY-tFfWuG5Kw8oX_Ao5BXBl6MbrDTLgDauNoua_zVeeWOiAA1tT6lcno3ppHcb-9ikozVhLX5z7jegmzuVYyYBwqlpI_m0A-bQE_MAoMpt5GNRwz0tkQqHL4-lIL9M5vy04BrkNsxLlY0lrfGj9VFIIv8ojxMUERfGP5FnS3CsEqTgZogOjk96EMEeHCUv1JciOSOcnVFB5NqM84ueeViNkRpDasD0lJY0arJMG4DegORmWT6pLrK76M-M-Eoize343uSPgIGikbhfVTS9njQ",
"expiration": "2022-03-20T01:50:10.000Z"
}
}
}
}
}
},
"403": {
"description": "Forbidden",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ApiError"
},
"examples": {
"example2": {
"summary": "Forbidden",
"value": {
"error": "Invalid username or password.",
"errorID": "InvalidUsernameorPassword",
"originalError": "Access denied"
}
}
}
}
}
}
},
"parameters": [],
"tags": [
"Authentication"
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"type": "object"
},
"examples": {
"example1": {
"summary": "Credential Login",
"value": "{\n \"username\": \"admin\",\n \"password\": \"password\"\n}"
},
"example2": {
"summary": "API Token Login",
"value": "{\n \"apiToken\": \"<token>\"\n}"
}
}
}
},
"description": "Authorization data ( Credentials|ApiToken )",
"required": true
},
"operationId": "v1AuthLogin"
}
},
"/v1/billing/invites": {
"post": {
"deprecated": false,
"summary": "Create Subscriber Invite",
"description": "Create Subscriber Invite",
"security": [
{
"BearerAuth": []
}
],
"responses": {
"200": {
"description": "Success",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/SubscriberInvite"
}
}
}
}
},
"parameters": [],
"tags": [
"TrialRequests"
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/SubscriberInvite"
},
"examples": {
"example1": {
"summary": "payload example",
"value": " {\n \"coupon_options\": {\n \"type\": \"percent\",\n \"amount\": 100,\n \"used\": false\n },\n \"plan\": {\n \"licenseType\": \"individual-usage\",\n \"cores\": 6\n },\n \"trial\": {\n \"duration\": 100\n },\n \"name\": \"John\",\n \"email\": \"john.doe@example.com\",\n \"coupon_code\": \"1I454WY14V4QV9\",\n \"domain\": null,\n \"aggregate\": \"app.example.com\",\n \"use_by\": null,\n \"active\": true,\n \"reusable\": false,\n \"createdAt\": \"2022-05-06T02:39:23.000Z\",\n \"updatedAt\": \"2022-05-06T02:39:23.000Z\"\n}"
}
}
}
},
"description": "Payload of Subscriber Invite",
"required": true
},
"operationId": "v1CreateSubscriberInvite"
}
},
"/v1/config": {
"get": {
"deprecated": false,
"summary": "Get all configs",
"security": [],
"responses": {
"200": {
"description": "application/json",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ConfigResponse"
}
}
}
}
},
"parameters": [],
"tags": [
"Config"
],
"operationId": "v1GetConfig"
}
},
"/v1/domain/{domainId}/auth/{providerId}": {
"put": {
"deprecated": false,
"summary": "Update an auth provider for a domain",
"security": [
{
"BearerAuth": []
}
],
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/DomainAuthProviderResponse"
},
"examples": {
"example1": {
"summary": "OK",
"value": {
"providerType": "open-id-connect",
"enabled": false,
"default": false,
"label": "Spiffy Label",
"config": {
"discoveryUrl": "http://localhost:8080/realms/Corellium/.well-known/openid-configuration",
"clientId": "B5GhRzrVn19adO1a1vJ6aZRYdNY9jSP4",
"clientSecret": "itsasecret",
"invitedOnly": false
},
"identifier": "48f0871a-4d47-4343-ac66-12873f29dd3e",
"createdBy": "66cfc2b7-ccba-48c1-b2f7-3ef2d0f5dcdc",
"createdAt": "2023-06-26T23:27:25.000Z",
"updatedAt": "2023-06-26T23:27:25.000Z"
}
}
}
}
}
},
"403": {
"description": "Forbidden",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ApiError"
},
"examples": {
"example2": {
"summary": "Forbidden",
"value": {
"error": "Invalid or missing authorization token",
"errorID": "PermissionDenied",
"originalError": "Invalid or missing authorization token"
}
}
}
}
}
}
},
"parameters": [
{
"name": "domainId",
"in": "path",
"description": "Domain ID - uuid",
"required": true,
"deprecated": false,
"schema": {
"type": "string"
}
},
{
"name": "providerId",
"in": "path",
"description": "Provider ID - uuid",
"required": true,
"deprecated": false,
"schema": {
"type": "string"
}
}
],
"tags": [
"DomainAuthProvider"
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/DomainAuthProviderRequest"
},
"examples": {
"example1": {
"summary": "Auth Provider",
"value": "{\n \"enabled\": false,\n \"providerType\": \"open-id-connect\",\n \"label\": \"Login with Custom Auth0\",\n \"config\": {\n \"discoveryUrl\": \"http://localhost:8080/realms/Corellium/.well-known/openid-configuration\",\n \"clientId\": \"B5GhRzrVn19adO1a1vJ6aZRYdNY9jSP4\",\n \"clientSecret\": \"itsasecret\",\n \"invitedOnly\": true\n }\n}"
}
}
}
},
"description": "Request Data",
"required": true
},
"operationId": "v1UpdateDomainAuthProvider"
},
"delete": {
"deprecated": false,
"summary": "Delete an auth provider from a domain",
"security": [
{
"BearerAuth": []
}
],
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"type": "object"
}
}
}
},
"403": {
"description": "Forbidden",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ApiError"
},
"examples": {
"example1": {
"summary": "Forbidden",
"value": {
"error": "Invalid or missing authorization token",
"errorID": "PermissionDenied",
"originalError": "Invalid or missing authorization token"
}
}
}
}
}
}
},
"parameters": [
{
"name": "domainId",
"in": "path",
"description": "Domain ID - uuid",
"required": true,
"deprecated": false,
"schema": {
"type": "string"
}
},
{
"name": "providerId",
"in": "path",
"description": "Provider ID - uuid",
"required": true,
"deprecated": false,
"schema": {
"type": "string"
}
}
],
"tags": [
"DomainAuthProvider"
],
"operationId": "v1DeleteDomainAuthProvider"
}
},
"/v1/domain/{domainId}/auth": {
"post": {
"deprecated": false,
"summary": "Create a new auth provider for a domain",
"security": [
{
"BearerAuth": []
}
],
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/DomainAuthProviderResponse"
},
"examples": {
"example1": {
"summary": "OK",
"value": "{\n \"identifier\": \"c64ad2a9-5be8-4c87-98af-0572adbe1085\",\n \"providerType\": \"open-id-connect\",\n \"default\": false,\n \"label\": \"Login with Custom Domain Auth0 Provider\",\n \"config\": {\n \"discoveryUrl\": \"http://localhost:8080/realms/Corellium/.well-known/openid-configuration\",\n \"clientId\": \"B5GhRzrVn19adO1a1vJ6aZRYdNY9jSP4\",\n \"clientSecret\": \"itsasecret\",\n \"invitedOnly\": false\n },\n \"createdBy\": \"525b6183-7265-4f87-b6cb-1f6ec1b996dd\",\n \"updatedAt\": \"2023-06-26T23:24:14.339Z\",\n \"createdAt\": \"2023-06-26T23:24:14.339Z\",\n \"enabled\": true\n \"default\": false\n}"
}
}
}
}
},
"403": {
"description": "Forbidden",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ApiError"
},
"examples": {
"example2": {
"summary": "Forbidden",
"value": {
"error": "Invalid or missing authorization token",
"errorID": "PermissionDenied",
"originalError": "Invalid or missing authorization token"
}
}
}
}
}
}
},
"parameters": [
{
"name": "domainId",
"in": "path",
"description": "Domain ID - uuid",
"required": true,
"deprecated": false,
"schema": {
"type": "string"
}
}
],
"tags": [
"DomainAuthProvider"
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/DomainAuthProviderRequest"
},
"examples": {
"example1": {
"summary": "Auth Provider",
"value": "{\n \"enabled\": true,\n \"providerType\": \"open-id-connect\",\n \"label\": \"Login with Custom Auth0\",\n \"config\": {\n \"discoveryUrl\": \"http://localhost:8080/realms/Corellium/.well-known/openid-configuration\",\n \"clientId\": \"B5GhRzrVn19adO1a1vJ6aZRYdNY9jSP4\",\n \"clientSecret\": \"itsasecret\",\n \"invitedOnly\": false\n }\n}"
}
}
}
},
"description": "Request Data",
"required": true
},
"operationId": "v1CreateDomainAuthProvider"
},
"get": {
"deprecated": false,
"summary": "Return all configured auth providers for a domain (including globally configured providers)",
"security": [
{
"BearerAuth": []
}
],
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"type": "Array",
"items": {
"$ref": "#/components/schemas/DomainAuthProviderResponse"
}
}
}
}
},
"403": {
"description": "Forbidden",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ApiError"
},
"examples": {
"example1": {
"summary": "Forbidden",
"value": {
"error": "Invalid or missing authorization token",
"errorID": "PermissionDenied",
"originalError": "Invalid or missing authorization token"
}
}
}
}
}
}
},
"parameters": [
{
"name": "domainId",
"in": "path",
"description": "Domain ID - uuid",
"required": true,
"deprecated": false,
"schema": {
"type": "string"
}
}
],
"tags": [
"DomainAuthProvider"
],
"operationId": "v1GetDomainAuthProviders"
}
},
"/v1/instances/{instanceId}/hooks": {
"get": {
"deprecated": false,
"summary": "Get all hypervisor hooks for Instance",
"security": [
{
"BearerAuth": []
}
],
"responses": {
"200": {
"description": "Hooks",
"content": {
"application/json": {
"schema": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Hook"
}
},
"examples": {
"example1": {
"summary": "Hooks",
"value": [
{
"identifier": "c92edeb3-2add-4949-a297-ca3a37a1f752",
"label": "TEST HOOK",
"address": "0xfffffff006ae8864",
"patch": "print(\"Hello, world\\n\");",
"patchType": "csmfcc",
"enabled": true,
"createdAt": "2022-10-11T22:28:04.000Z",
"updatedAt": "2022-10-11T22:28:04.000Z",
"instanceId": "79e56136-1258-4eed-8734-c14c6eff990b"
}
]
}
}
}
}
},
"304": {
"description": "No changes"
},
"400": {
"description": "Bad Request",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/UserError"
}
}
}
},
"403": {
"description": "Forbidden",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ApiError"
},
"examples": {
"example2": {
"summary": "Forbidden",
"value": {
"error": "Invalid or missing authorization token",
"errorID": "PermissionDenied",
"originalError": "Invalid or missing authorization token"
}
}
}
}
}
}
},
"parameters": [
{
"name": "limit",
"in": "query",
"description": "limit for pagination results, defaults to 20",
"required": false,
"deprecated": false,
"schema": {
"type": "number"
}
},
{
"name": "offset",
"in": "query",
"description": "offset for pagination results, defaults to 0",
"required": false,
"deprecated": false,
"schema": {
"type": "number"
}
},
{
"name": "sort",
"in": "query",
"description": "sort ASC or DESC, defaults to DESC",
"required": false,
"deprecated": false,
"schema": {
"type": "string",
"enum": [
"ASC",
"DESC"
]
}
},
{
"name": "instanceId",
"in": "path",
"description": "Instance ID - uuid",
"required": true,
"deprecated": false,
"schema": {
"type": "string"
}
}
],
"tags": [
"Hypervisor Hooks"
],
"operationId": "v1GetHooks"
},
"post": {
"deprecated": false,
"summary": "Create hypervisor hook for Instance",
"security": [
{
"BearerAuth": []
}
],
"responses": {
"201": {
"description": "Hook",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Hook"
},
"examples": {
"example1": {
"summary": "Hook",
"value": {
"identifier": "c92edeb3-2add-4949-a297-ca3a37a1f752",
"label": "TEST HOOK",
"address": "0xfffffff006ae8864",
"patch": "print(\"Hello, world\\n\");",
"patchType": "csmfcc",
"enabled": true,
"createdAt": "2022-10-11T22:28:04.000Z",
"updatedAt": "2022-10-11T22:28:04.000Z",
"instanceId": "79e56136-1258-4eed-8734-c14c6eff990b"
}
}
}
}
}
},
"400": {
"description": "Bad Request",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/UserError"
}
}
}
},
"403": {
"description": "Forbidden",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ApiError"
},
"examples": {
"example2": {
"summary": "Forbidden",
"value": {
"error": "Invalid or missing authorization token",
"errorID": "PermissionDenied",
"originalError": "Invalid or missing authorization token"
}
}
}
}
}
}
},
"parameters": [
{
"name": "instanceId",
"in": "path",
"description": "Instance ID - uuid",
"required": true,
"deprecated": false,
"schema": {
"type": "string"
}
}
],
"tags": [
"Hypervisor Hooks"
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/V1CreateHookParameters"
}
}
},
"description": "application/json",
"required": true
},
"operationId": "v1CreateHook"
}
},
"/v1/hooks/{hookId}": {
"get": {
"deprecated": false,
"summary": "Get hypervisor hook by id",
"security": [
{
"BearerAuth": []
}
],
"responses": {
"200": {
"description": "Hook",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Hook"
},
"examples": {
"example1": {
"summary": "Hook",
"value": {
"identifier": "c92edeb3-2add-4949-a297-ca3a37a1f752",
"label": "TEST HOOK",
"address": "0xfffffff006ae8864",
"patch": "print(\"Hello, world\\n\");",
"patchType": "csmfcc",
"enabled": true,
"createdAt": "2022-10-11T22:28:04.000Z",
"updatedAt": "2022-10-11T22:28:04.000Z",
"instanceId": "79e56136-1258-4eed-8734-c14c6eff990b"
}
}
}
}
}
},
"400": {
"description": "Bad Request",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/UserError"
}
}
}
},
"403": {
"description": "Forbidden",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ApiError"
},
"examples": {
"example2": {
"summary": "Forbidden",
"value": {
"error": "Invalid or missing authorization token",
"errorID": "PermissionDenied",
"originalError": "Invalid or missing authorization token"
}
}
}
}
}
}
},
"parameters": [
{
"name": "hookId",
"in": "path",
"description": "Hook Id",
"required": true,
"deprecated": false,
"schema": {
"type": "string"
}
}
],
"tags": [
"Hypervisor Hooks"
],
"operationId": "v1GetHookById"
},
"put": {
"deprecated": false,
"summary": "Update an existing hypervisor hook",
"security": [
{
"BearerAuth": []
}
],
"responses": {
"200": {
"description": "Hook",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Hook"
},
"examples": {
"example1": {
"summary": "Hook",
"value": {
"identifier": "c92edeb3-2add-4949-a297-ca3a37a1f752",
"label": "TEST HOOK",
"address": "0xfffffff006ae8864",
"patch": "print(\"Hello, world\\n\");",
"patchType": "csmfcc",
"enabled": true,
"createdAt": "2022-10-11T22:28:04.000Z",
"updatedAt": "2022-10-11T22:28:04.000Z",
"instanceId": "79e56136-1258-4eed-8734-c14c6eff990b"
}
}
}
}
}
},
"400": {
"description": "Bad Request",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/UserError"
}
}
}
},
"403": {
"description": "Forbidden",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ApiError"
},
"examples": {
"example2": {
"summary": "Forbidden",
"value": {
"error": "Invalid or missing authorization token",
"errorID": "PermissionDenied",
"originalError": "Invalid or missing authorization token"
}
}
}
}
}
}
},
"parameters": [
{
"name": "hookId",
"in": "path",
"description": "Hook ID",
"required": true,
"deprecated": false,
"schema": {
"type": "string"
}
}
],
"tags": [
"Hypervisor Hooks"
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/V1CreateHookParameters"
},
"examples": {
"example1": {
"summary": "Update hypervisor hook",
"value": "{ \"enabled\": false}"
}
}
}
},
"description": "application/json",
"required": true
},
"operationId": "v1UpdateHook"
},
"delete": {
"deprecated": false,
"summary": "Delete an existing hypervisor hook",
"security": [
{
"BearerAuth": []
}
],
"responses": {
"200": {
"description": "Accepted"
},
"400": {
"description": "Bad Request",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/UserError"
}
}
}
},
"403": {
"description": "Forbidden",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ApiError"
},
"examples": {
"example1": {
"summary": "Forbidden",
"value": {
"error": "Invalid or missing authorization token",
"errorID": "PermissionDenied",
"originalError": "Invalid or missing authorization token"
}
}
}
}
}
}
},
"parameters": [
{
"name": "hookId",
"in": "path",
"description": "Hook ID",
"required": true,
"deprecated": false,
"schema": {
"type": "string"
}
}
],
"tags": [
"Hypervisor Hooks"
],
"operationId": "v1DeleteHook"
}
},
"/v1/images": {
"get": {
"deprecated": false,
"summary": "Get all Images Metadata",
"security": [
{
"BearerAuth": []
}
],
"responses": {
"200": {
"description": "application/json",
"content": {
"application/json": {
"schema": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Image"
}
}
}
}
}
},
"parameters": [
{
"name": "project",
"in": "query",
"description": "Optionally filter by project - uuid",
"required": false,
"deprecated": false,
"schema": {
"type": "string"
}
}
],
"tags": [
"Images"
],
"operationId": "v1GetImages"
},
"post": {
"deprecated": false,
"summary": "Create a new Image",
"security": [
{
"BearerAuth": []
}
],
"responses": {
"200": {
"description": "application/json",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Image"
},
"examples": {
"example1": {
"summary": "Image Created",
"value": {
"status": "active",
"id": "18af26fe-8a5a-479a-80ec-013c54176d6f",
"name": "test",
"type": "kernel",
"encapsulated": false,
"size": null,
"project": "d59db33d-27bd-4b22-878d-49e4758a648e",
"created_at": "2022-03-26T01:54:25.670Z",
"updated_at": "2022-03-26T01:54:25.670Z"
}
}
}
}
}
},
"404": {
"description": "application/json",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ApiNotFoundError"
},
"examples": {
"example2": {
"summary": "Not Found",
"value": {
"error": "Instance with instanceId=17fc3e9b-5970-4000-8e51-8279588b7701 not found",
"errorID": "NotFound",
"name": "Instance",
"params": {
"instanceId": "17fc3e9b-5970-4000-8e51-8279588b7701"
}
}
}
}
}
}
}
},
"parameters": [],
"tags": [
"Images"
],
"requestBody": {
"content": {
"multipart/form-data": {
"schema": {
"$ref": "#/components/schemas/ImageCreationOptions"
},
"examples": {
"example1": {
"summary": "Create image in Project",
"value": "{\n \"name\": \"test\",\n \"type\": \"kernel\",\n \"project\": \"d59db33d-27bd-4b22-878d-49e4758a648e\"\n}"
},
"example2": {
"summary": "Create image in Instance",
"value": "{\n \"name\": \"test\",\n \"type\": \"kernel\",\n \"project\": \"d59db33d-27bd-4b22-878d-49e4758a648e\",\n \"instance\": \"17fc3e9b-5970-4000-8e51-8279588b7701\"\n}"
}
}
}
},
"description": "Image data",
"required": true
},
"operationId": "v1CreateImage"
}
},
"/v1/images/{imageId}": {
"get": {
"deprecated": false,
"summary": "Get Image Metadata",
"security": [
{
"BearerAuth": []
}
],
"responses": {
"200": {
"description": "application/json",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Image"
},
"examples": {
"example1": {
"summary": "application/json",
"value": {
"status": "active",
"id": "e85f2792-d9de-480e-80ca-a6b992e43619",
"name": "IOT_HTTP_WebServer.elf",
"type": "kernel",
"size": null,
"encoding": "plain",
"project": "d59db33d-27bd-4b22-878d-49e4758a648e",
"created_at": "2022-03-16T17:56:37.000Z",
"updated_at": "2022-03-16T17:56:38.000Z"
}
}
}
}
}
},
"404": {
"description": "application/json",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ApiNotFoundError"
},
"examples": {
"example2": {
"summary": "Not Found",
"value": {
"error": "Instance with instanceId=17fc3e9b-5970-4000-8e51-8279588b7701 not found",
"errorID": "NotFound",
"name": "Instance",
"params": {
"instanceId": "17fc3e9b-5970-4000-8e51-8279588b7701"
}
}
}
}
}
}
}
},
"parameters": [
{
"name": "imageId",
"in": "path",
"description": "Image ID - uuid",
"required": true,
"deprecated": false,
"schema": {
"type": "string"
}
}
],
"tags": [
"Images"
],
"operationId": "v1GetImage"
},
"post": {
"deprecated": false,
"summary": "Upload Image Data",
"description": "If the active project has enough remaining quota, updates an Image with the contents of the request body.",
"security": [
{
"BearerAuth": []
}
],
"responses": {
"200": {
"description": "application/json",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Image"
},
"examples": {
"example1": {
"summary": "application/json",
"value": {
"status": "active",
"id": "e85f2792-d9de-480e-80ca-a6b992e43619",
"name": "IOT_HTTP_WebServer.elf",
"type": "fwbinary",
"size": null,
"encoding": "plain",
"project": "d59db33d-27bd-4b22-878d-49e4758a648e",
"created_at": "2022-03-16T17:56:37.000Z",
"updated_at": "2022-03-16T17:56:38.000Z"
}
}
}
}
}
},
"404": {
"description": "application/json",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ApiNotFoundError"
},
"examples": {
"example2": {
"summary": "Not Found",
"value": {
"error": "Instance with instanceId=17fc3e9b-5970-4000-8e51-8279588b7701 not found",
"errorID": "NotFound",
"name": "Instance",
"params": {
"instanceId": "17fc3e9b-5970-4000-8e51-8279588b7701"
}
}
}
}
}
}
},
"409": {
"description": "Conflict",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ApiConflictError"
},
"examples": {
"example3": {
"summary": "Conflict",
"value": {
"error": "Conflict with existing Image",
"errorID": "Conflict",
"object": {
"status": "active",
"id": "8e90e4ba-ef34-4a35-af60-beca88166e79",
"name": "IOT_HTTP_WebServer.elf",
"type": "fwbinary",
"size": null,
"encoding": "plain",
"project": "163c7e1b-4f26-4744-8423-dfa3d327f21a",
"created_at": "2022-04-01T07:41:39.000Z",
"updated_at": "2022-04-01T07:41:39.000Z"
}
}
}
}
}
}
}
},
"parameters": [
{
"name": "imageId",
"in": "path",
"description": "Image ID - uuid",
"required": true,
"deprecated": false,
"schema": {
"type": "string"
}
}
],
"tags": [
"Images"
],
"requestBody": {
"content": {
"binary": {
"schema": {
"type": "string"
}
}
},
"description": "Uploaded Image",
"required": true
},
"operationId": "v1UploadImageData"
}
},
"/v2/images/{imageId}": {
"delete": {
"deprecated": false,
"summary": "Delete Image",
"security": [
{
"BearerAuth": []
}
],
"responses": {
"204": {
"description": "Success"
},
"404": {
"description": "Not Found",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ApiNotFoundError"
},
"examples": {
"example1": {
"summary": "Not Found",
"value": {
"error": "Image with imageId=d59db33d-27bd-4b22-878d-49e4758a648e not found",
"errorID": "NotFound",
"name": "Image",
"params": {
"imageId": "d59db33d-27bd-4b22-878d-49e4758a648e"
}
}
}
}
}
}
}
},
"parameters": [
{
"name": "imageId",
"in": "path",
"description": "Image ID - uuid",
"required": true,
"deprecated": false,
"schema": {
"type": "string"
}
}
],
"tags": [
"Images"
],
"operationId": "v1DeleteImage"
}
},
"/v1/ready": {
"get": {
"deprecated": false,
"summary": "API Status",
"description": "Check if API is ready for queries",
"security": [],
"responses": {
"204": {
"description": "API is ready for queries"
},
"503": {
"description": "API is not ready",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ApiError"
},
"examples": {
"example1": {
"summary": "Error response example",
"value": {
"error": "shut down"
}
}
}
}
}
}
},
"parameters": [],
"tags": [
"Status"
],
"operationId": "v1Ready"
}
},
"/v1/instances": {
"get": {
"deprecated": false,
"summary": "Get Instances",
"security": [
{
"BearerAuth": []
}
],
"responses": {
"200": {
"description": "Success",
"content": {
"application/json": {
"schema": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Instance"
}
}
}
}
},
"403": {
"description": "Forbidden",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ApiError"
},
"examples": {
"example1": {
"summary": "Forbidden",
"value": {
"error": "Invalid or missing authorization token",
"errorID": "PermissionDenied",
"originalError": "Invalid or missing authorization token"
}
}
}
}
}
}
},
"parameters": [
{
"name": "name",
"in": "query",
"description": "Optionally filter by instance name",
"required": false,
"deprecated": false,
"schema": {
"type": "string"
}
},
{
"name": "returnAttr",
"in": "query",
"description": "Attributes to include in instance return",
"required": false,
"deprecated": false,
"explode": false,
"schema": {
"type": "array",
"items": {
"type": "string"
}
}
}
],
"tags": [
"Instances"
],
"operationId": "v1GetInstances"
},
"post": {
"deprecated": false,
"summary": "Create Instance",
"security": [
{
"BearerAuth": []
}
],
"responses": {
"200": {
"description": "Accepted",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/InstanceReturn"
},
"examples": {
"example1": {
"summary": "Accepted",
"value": {
"id": "7f4f241c-821f-4219-905f-c3b50b0db5dd"
}
}
}
}
}
},
"400": {
"description": "Bad Request",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/UserError"
},
"examples": {
"example2": {
"summary": "Unsupported Model",
"value": {
"error": "Unsupported device model",
"errorID": "UserError",
"field": "flavor"
}
},
"example3": {
"summary": "Unsupported Firmware",
"value": {
"error": "Cannot find firmware package for given firmware version",
"errorID": "UserError",
"field": "fwpackage"
}
}
}
}
}
},
"403": {
"description": "Forbidden",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ApiError"
},
"examples": {
"example4": {
"summary": "Forbidden",
"value": {
"error": "Invalid or missing authorization token",
"errorID": "PermissionDenied",
"originalError": "Invalid or missing authorization token"
}
}
}
}
}
}
},
"parameters": [],
"tags": [
"Instances"
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/InstanceCreateOptions"
},
"examples": {
"example1": {
"summary": "Minimal",
"value": "{\n \"project\": \"<your_project_id>\",\n \"name\": \"rpi4b Created via API\",\n \"flavor\": \"rpi4b\",\n \"os\": \"11.2.0\"\n}"
}
}
}
},
"description": "The vm definition to create",
"required": true
},
"operationId": "v1CreateInstance"
}
},
"/v1/instances/{instanceId}": {
"get": {
"deprecated": false,
"summary": "Get Instance",
"security": [
{
"BearerAuth": []
}
],
"responses": {
"200": {
"description": "Success",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Instance"
}
}
}
},
"403": {
"description": "Forbidden",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ApiError"
},
"examples": {
"example1": {
"summary": "Forbidden",
"value": {
"error": "Invalid or missing authorization token",
"errorID": "PermissionDenied",
"originalError": "Invalid or missing authorization token"
}
}
}
}
}
},
"404": {
"description": "Not Found",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ApiNotFoundError"
},
"examples": {
"example2": {
"summary": "Not Found",
"value": {
"error": "Instance with instanceId=7f4f241c-821f-4219-905f-c3b50b0db5dd not found",
"errorID": "InstanceNotFound",
"name": "Instance",
"params": {
"instanceId": "7f4f241c-821f-4219-905f-c3b50b0db5dd"
}
}
}
}
}
}
}
},
"parameters": [
{
"name": "instanceId",
"in": "path",
"description": "Instance ID",
"required": true,
"deprecated": false,
"schema": {
"type": "string"
}
},
{
"name": "returnAttr",
"in": "query",
"description": "Attributes to include in instance return",
"required": false,
"deprecated": false,
"explode": false,
"schema": {
"type": "array",
"items": {
"type": "string"
}
}
}
],
"tags": [
"Instances"
],
"operationId": "v1GetInstance"
},
"patch": {
"deprecated": false,
"summary": "Update Instance",
"security": [
{
"BearerAuth": []
}
],
"responses": {
"200": {
"description": "application/json",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Instance"
}
}
}
},
"403": {
"description": "Forbidden",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ApiError"
},
"examples": {
"example1": {
"summary": "Forbidden",
"value": {
"error": "Invalid or missing authorization token",
"errorID": "PermissionDenied",
"originalError": "Invalid or missing authorization token"
}
}
}
}
}
},
"404": {
"description": "Not Found",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ApiNotFoundError"
},
"examples": {
"example2": {
"summary": "Not Found",
"value": {
"error": "Instance with instanceId=7f4f241c-821f-4219-905f-c3b50b0db5dd not found",
"errorID": "InstanceNotFound",
"name": "Instance",
"params": {
"instanceId": "7f4f241c-821f-4219-905f-c3b50b0db5dd"
}
}
}
}
}
}
}
},
"parameters": [
{
"name": "instanceId",
"in": "path",
"description": "Instance ID",
"required": true,
"deprecated": false,
"schema": {
"type": "string"
}
}
],
"tags": [
"Instances"
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/PatchInstanceOptions"
},
"examples": {
"example1": {
"summary": "Patch",
"value": "{\n \"name\": \"New Name\"\n}"
}
}
}
},
"description": "",
"required": true
},
"operationId": "v1PatchInstance"
},
"delete": {
"deprecated": false,
"summary": "Remove Instance",
"security": [
{
"BearerAuth": []
}
],
"responses": {
"204": {
"description": "Accepted"
},
"403": {
"description": "Forbidden",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ApiError"
},
"examples": {
"example1": {
"summary": "Forbidden",
"value": {
"error": "Invalid or missing authorization token",
"errorID": "PermissionDenied",
"originalError": "Invalid or missing authorization token"
}
}
}
}
}
},
"404": {
"description": "Not Found",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ApiNotFoundError"
},
"examples": {
"example2": {
"summary": "Not Found",
"value": {
"error": "Instance with instanceId=7f4f241c-821f-4219-905f-c3b50b0db5dd not found",
"errorID": "InstanceNotFound",
"name": "Instance",
"params": {
"instanceId": "7f4f241c-821f-4219-905f-c3b50b0db5dd"
}
}
}
}
}
}
}
},
"parameters": [
{
"name": "instanceId",
"in": "path",
"description": "Instance ID",
"required": true,
"deprecated": false,
"schema": {
"type": "string"
}
}
],
"tags": [
"Instances"
],
"operationId": "v1DeleteInstance"
}
},
"/v1/instances/{instanceId}/agent/v1/app/ready": {
"get": {
"deprecated": false,
"summary": "Check if App subsystem is ready",
"security": [
{
"BearerAuth": []
}
],
"responses": {
"200": {
"description": "App Agent State",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/AgentAppReadyResponse"
}
}
}
},
"400": {
"description": "Agent Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/AgentError"
}
}
}
}
},
"parameters": [
{
"name": "instanceId",
"in": "path",
"description": "Instance ID - uuid",
"required": true,
"deprecated": false,
"schema": {
"type": "string"
}
}
],
"tags": [
"Agent"
],
"operationId": "v1AgentAppReady"
}
},
"/v1/instances/{instanceId}/agent/v1/app/install": {
"post": {
"deprecated": false,
"summary": "Install App at path",
"description": "Installs the app located at path which must be present on the VM filesystem",
"security": [
{
"BearerAuth": []
}
],
"responses": {
"204": {
"description": "Success"
},
"400": {
"description": "Agent Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/AgentError"
}
}
}
}
},
"parameters": [
{
"name": "instanceId",
"in": "path",
"description": "Instance ID - uuid",
"required": true,
"deprecated": false,
"schema": {
"type": "string"
}
}
],
"tags": [
"Agent"
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/AgentInstallBody"
},
"examples": {
"example1": {
"summary": "App parameters",
"value": "{\n \"path\": \"/tmp/test.ipa\"\n}"
}
}
}
},
"description": "App parameters",
"required": true
},
"operationId": "v1AgentInstallApp"
}
},
"/v1/instances/{instanceId}/agent/v1/app/apps": {
"get": {
"deprecated": false,
"summary": "List Apps",
"security": [
{
"BearerAuth": []
}
],
"responses": {
"200": {
"description": "Installed Apps Info",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/AgentAppsList"
}
}
}
},
"400": {
"description": "Agent Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/AgentError"
}
}
}
}
},
"parameters": [
{
"name": "instanceId",
"in": "path",
"description": "Instance ID - uuid",
"required": true,
"deprecated": false,
"schema": {
"type": "string"
}
}
],
"tags": [
"Agent"
],
"operationId": "v1AgentListApps"
}
},
"/v1/instances/{instanceId}/agent/v1/app/apps/update": {
"get": {
"deprecated": false,
"summary": "List Apps Status",
"security": [
{
"BearerAuth": []
}
],
"responses": {
"200": {
"description": "Installed Apps Status Info",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/AgentAppsList"
},
"examples": {
"example1": {
"summary": "Installed Apps Status Info",
"value": {
"apps": [
{
"running": false,
"bundleID": "bundle.id.one"
},
{
"running": true,
"bundleID": "bundle.id.two"
}
],
"frontmost": "bundle.id.two"
}
}
}
}
}
},
"400": {
"description": "Agent Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/AgentError"
}
}
}
}
},
"parameters": [
{
"name": "instanceId",
"in": "path",
"description": "Instance ID - uuid",
"required": true,
"deprecated": false,
"schema": {
"type": "string"
}
}
],
"tags": [
"Agent"
],
"operationId": "v1AgentListAppsStatus"
}
},
"/v1/instances/{instanceId}/agent/v1/app/icons": {
"get": {
"deprecated": false,
"summary": "List App Icons",
"security": [
{
"BearerAuth": []
}
],
"responses": {
"200": {
"description": "Installed Apps Icons",
"content": {
"application/json": {
"schema": {
"type": "array",
"items": {
"$ref": "#/components/schemas/AgentIcons"
}
},
"examples": {
"example1": {
"summary": "Icons",
"value": {
"icons": {
"bundle.id": "<base64Data>"
}
}
}
}
}
}
},
"400": {
"description": "Agent Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/AgentError"
}
}
}
}
},
"parameters": [
{
"name": "instanceId",
"in": "path",
"description": "Instance ID - uuid",
"required": true,
"deprecated": false,
"schema": {
"type": "string"
}
},
{
"name": "bundleID",
"in": "query",
"description": "App Bundle ID",
"required": true,
"deprecated": false,
"schema": {
"type": "array",
"items": {
"type": "string"
}
}
}
],
"tags": [
"Agent"
],
"operationId": "v1AgentListAppIcons"
}
},
"/v1/instances/{instanceId}/agent/v1/app/apps/{bundleId}/run": {
"post": {
"deprecated": false,
"summary": "Run an App",
"security": [
{
"BearerAuth": []
}
],
"responses": {
"204": {
"description": "Success",
"content": {
"application/json": {
"schema": {
"type": "object"
}
}
}
},
"400": {
"description": "Agent Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/AgentError"
}
}
}
}
},
"parameters": [
{
"name": "instanceId",
"in": "path",
"description": "Instance ID - uuid",
"required": true,
"deprecated": false,
"schema": {
"type": "string"
}
},
{
"name": "bundleId",
"in": "path",
"description": "App Bundle ID",
"required": true,
"deprecated": false,
"schema": {
"type": "string"
}
}
],
"tags": [
"Agent"
],
"operationId": "v1AgentRunApp"
}
},
"/v1/instances/{instanceId}/agent/v1/app/apps/{bundleId}/kill": {
"post": {
"deprecated": false,
"summary": "Kill an App",
"security": [
{
"BearerAuth": []
}
],
"responses": {
"204": {
"description": "Success",
"content": {
"application/json": {
"schema": {
"type": "object"
}
}
}
},
"400": {
"description": "Agent Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/AgentError"
}
}
}
}
},
"parameters": [
{
"name": "instanceId",
"in": "path",
"description": "Instance ID - uuid",
"required": true,
"deprecated": false,
"schema": {
"type": "string"
}
},
{
"name": "bundleId",
"in": "path",
"description": "App Bundle ID",
"required": true,
"deprecated": false,
"schema": {
"type": "string"
}
}
],
"tags": [
"Agent"
],
"operationId": "v1AgentKillApp"
}
},
"/v1/instances/{instanceId}/agent/v1/app/apps/{bundleId}/uninstall": {
"post": {
"deprecated": false,
"summary": "Uninstall an App",
"security": [
{
"BearerAuth": []
}
],
"responses": {
"204": {
"description": "Success",
"content": {
"application/json": {
"schema": {
"type": "object"
}
}
}
},
"400": {
"description": "Agent Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/AgentError"
}
}
}
}
},
"parameters": [
{
"name": "instanceId",
"in": "path",
"description": "Instance ID - uuid",
"required": true,
"deprecated": false,
"schema": {
"type": "string"
}
},
{
"name": "bundleId",
"in": "path",
"description": "App Bundle ID",
"required": true,
"deprecated": false,
"schema": {
"type": "string"
}
}
],
"tags": [
"Agent"
],
"operationId": "v1AgentUninstallApp"
}
},
"/v1/instances/{instanceId}/agent/v1/file/device/{filePath}": {
"get": {
"deprecated": false,
"summary": "Download a File from VM",
"security": [
{
"BearerAuth": []
}
],
"responses": {
"200": {
"description": "File Contents",
"content": {
"application/octet-stream": {
"schema": {
"$ref": "#/components/schemas/File"
}
}
}
},
"400": {
"description": "Agent Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/AgentError"
}
}
}
}
},
"parameters": [
{
"name": "instanceId",
"in": "path",
"description": "Instance ID - uuid",
"required": true,
"deprecated": false,
"schema": {
"type": "string"
}
},
{
"name": "filePath",
"in": "path",
"description": "File Path on VM",
"required": true,
"deprecated": false,
"schema": {
"type": "string"
}
}
],
"tags": [
"Agent"
],
"operationId": "v1AgentGetFile"
},
"put": {
"deprecated": false,
"summary": "Upload a file to VM",
"security": [
{
"BearerAuth": []
}
],
"responses": {
"204": {
"description": "No content"
},
"400": {
"description": "Agent Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/AgentError"
}
}
}
}
},
"parameters": [
{
"name": "instanceId",
"in": "path",
"description": "Instance ID - uuid",
"required": true,
"deprecated": false,
"schema": {
"type": "string"
}
},
{
"name": "filePath",
"in": "path",
"description": "File Path on VM to write to",
"required": true,
"deprecated": false,
"schema": {
"type": "string"
}
}
],
"tags": [
"Agent"
],
"requestBody": {
"content": {
"application/octet-stream": {
"schema": {
"$ref": "#/components/schemas/File"
}
}
},
"description": "Uploaded File Contents",
"required": true
},
"operationId": "v1AgentUploadFile"
},
"patch": {
"deprecated": false,
"summary": "Change Attrs of a File on VM",
"security": [
{
"BearerAuth": []
}
],
"responses": {
"204": {
"description": "Success"
}
},
"parameters": [
{
"name": "instanceId",
"in": "path",
"description": "Instance ID - uuid",
"required": true,
"deprecated": false,
"schema": {
"type": "string"
}
},
{
"name": "filePath",
"in": "path",
"description": "File Path on VM",
"required": true,
"deprecated": false,
"schema": {
"type": "string"
}
}
],
"tags": [
"Agent"
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/FileChanges"
}
}
},
"description": "New attrs",
"required": true
},
"operationId": "v1AgentSetFileAttributes"
},
"delete": {
"deprecated": false,
"summary": "Delete a File on VM",
"security": [
{
"BearerAuth": []
}
],
"responses": {
"204": {
"description": "Success"
},
"400": {
"description": "Agent Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/AgentError"
},
"examples": {
"example1": {
"summary": "No such file",
"value": {
"error": "Could not delete '/tmp/file.bin': No such file or directory",
"errorID": "AgentError",
"originalError": {
"name": "OperationFailed",
"message": "Could not delete '/tmp/file.bin': No such file or directory"
}
}
}
}
}
}
}
},
"parameters": [
{
"name": "instanceId",
"in": "path",
"description": "Instance ID - uuid",
"required": true,
"deprecated": false,
"schema": {
"type": "string"
}
},
{
"name": "filePath",
"in": "path",
"description": "File Path on VM",
"required": true,
"deprecated": false,
"schema": {
"type": "string"
}
}
],
"tags": [
"Agent"
],
"operationId": "v1AgentDeleteFile"
}
},
"/v1/instances/{instanceId}/agent/v1/file/temp": {
"post": {
"deprecated": false,
"summary": "Get the path for a new temp file",
"description": "Returns a temporary random filename that is guranteed to be unique on the VMs\nfilesystem at the time of invocation of this method.",
"security": [
{
"BearerAuth": []
}
],
"responses": {
"200": {
"description": "The temp file path",
"content": {
"application/json": {
"schema": {
"type": "string"
},
"examples": {
"example1": {
"summary": "Filename",
"value": "/var/tmp/temp.VcJh6k"
}
}
}
}
},
"400": {
"description": "Agent Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/AgentError"
}
}
}
}
},
"parameters": [
{
"name": "instanceId",
"in": "path",
"description": "Instance ID - uuid",
"required": true,
"deprecated": false,
"schema": {
"type": "string"
}
}
],
"tags": [
"Agent"
],
"operationId": "v1AgentGetTempFilename"
}
},
"/v1/instances/{instanceId}/agent/v1/profile/profiles": {
"get": {
"deprecated": false,
"summary": "List Profiles",
"security": [
{
"BearerAuth": []
}
],
"responses": {
"200": {
"description": "Installed Profiles",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/AgentProfilesReturn"
},
"examples": {
"example1": {
"summary": "Installed Profiles",
"value": {
"profiles": [
"<profileId>"
]
}
}
}
}
}
},
"400": {
"description": "Agent Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/AgentError"
}
}
}
}
},
"parameters": [
{
"name": "instanceId",
"in": "path",
"description": "Instance ID - uuid",
"required": true,
"deprecated": false,
"schema": {
"type": "string"
}
}
],
"tags": [
"Agent"
],
"operationId": "v1AgentListProfiles"
}
},
"/v1/instances/{instanceId}/agent/v1/profile/install": {
"post": {
"deprecated": false,
"summary": "Install a Profile to VM",
"security": [
{
"BearerAuth": []
}
],
"responses": {
"204": {
"description": "Success"
},
"400": {
"description": "Agent Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/AgentError"
}
}
}
}
},
"parameters": [
{
"name": "instanceId",
"in": "path",
"description": "Instance ID - uuid",
"required": true,
"deprecated": false,
"schema": {
"type": "string"
}
}
],
"tags": [
"Agent"
],
"requestBody": {
"content": {
"application/octet-stream": {
"schema": {
"$ref": "#/components/schemas/File"
}
}
},
"description": "Profile to Install",
"required": true
},
"operationId": "v1AgentInstallProfile"
}
},
"/v1/instances/{instanceId}/agent/v1/profile/profiles/{profileId}": {
"delete": {
"deprecated": false,
"summary": "Uninstall a Profile from VM",
"security": [
{
"BearerAuth": []
}
],
"responses": {
"204": {
"description": "Success"
},
"400": {
"description": "Agent Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/AgentError"
}
}
}
}
},
"parameters": [
{
"name": "instanceId",
"in": "path",
"description": "Instance ID - uuid",
"required": true,
"deprecated": false,
"schema": {
"type": "string"
}
},
{
"name": "profileId",
"in": "path",
"description": "Instance ID - uuid",
"required": true,
"deprecated": false,
"schema": {
"type": "string"
}
}
],
"tags": [
"Agent"
],
"operationId": "v1AgentUninstallProfile"
}
},
"/v1/instances/{instanceId}/agent/v1/system/setHostname": {
"post": {
"deprecated": false,
"summary": "Set Hostname of instance",
"security": [
{
"BearerAuth": []
}
],
"responses": {
"204": {
"description": "Accepted"
},
"400": {
"description": "Agent Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/AgentError"
}
}
}
}
},
"parameters": [
{
"name": "instanceId",
"in": "path",
"description": "Instance ID - uuid",
"required": true,
"deprecated": false,
"schema": {
"type": "string"
}
}
],
"tags": [
"Agent"
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/AgentSystemSetHostnameBody"
}
}
},
"description": "New hostname",
"required": true
},
"operationId": "v1AgentSystemSetHostname"
}
},
"/v1/instances/{instanceId}/agent/v1/system/shutdown": {
"post": {
"deprecated": false,
"summary": "Instruct VM to halt",
"security": [
{
"BearerAuth": []
}
],
"responses": {
"204": {
"description": "Accepted"
},
"400": {
"description": "Agent Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/AgentError"
}
}
}
}
},
"parameters": [
{
"name": "instanceId",
"in": "path",
"description": "Instance ID - uuid",
"required": true,
"deprecated": false,
"schema": {
"type": "string"
}
}
],
"tags": [
"Agent"
],
"operationId": "v1AgentSystemShutdown"
}
},
"/v1/instances/{instanceId}/agent/v1/system/network": {
"get": {
"deprecated": false,
"summary": "Get IP of eth0 (AOSP only)",
"security": [
{
"BearerAuth": []
}
],
"responses": {
"200": {
"description": "IP Address of eth0",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/AgentValueReturn"
},
"examples": {
"example1": {
"summary": "application/json",
"value": {
"value": "10.11.100.1"
}
}
}
}
}
},
"400": {
"description": "Agent Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/AgentError"
}
}
}
}
},
"parameters": [
{
"name": "instanceId",
"in": "path",
"description": "Instance ID - uuid",
"required": true,
"deprecated": false,
"schema": {
"type": "string"
}
}
],
"tags": [
"Agent"
],
"operationId": "v1AgentSystemGetNetwork"
}
},
"/v1/instances/{instanceId}/agent/v1/system/getprop": {
"post": {
"deprecated": false,
"summary": "Get System Property (AOSP only)",
"security": [
{
"BearerAuth": []
}
],
"responses": {
"200": {
"description": "Value of requested property",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/AgentValueReturn"
},
"examples": {
"example1": {
"summary": "application/json",
"value": {
"value": "1"
}
}
}
}
}
},
"400": {
"description": "Agent Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/AgentError"
}
}
}
}
},
"parameters": [
{
"name": "instanceId",
"in": "path",
"description": "Instance ID - uuid",
"required": true,
"deprecated": false,
"schema": {
"type": "string"
}
}
],
"tags": [
"Agent"
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/AgentSystemGetPropBody"
},
"examples": {
"example1": {
"summary": "application/json",
"value": "{\n \"property\": \"corellium.opengapps\"\n}"
}
}
}
},
"description": "Parameters",
"required": true
},
"operationId": "v1AgentSystemGetProp"
}
},
"/v1/instances/{instanceId}/agent/v1/system/install-opengapps": {
"post": {
"deprecated": false,
"summary": "Install OpenGApps (AOSP only)",
"security": [
{
"BearerAuth": []
}
],
"responses": {
"204": {
"description": "Accepted"
},
"400": {
"description": "Agent Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/AgentError"
}
}
}
}
},
"parameters": [
{
"name": "instanceId",
"in": "path",
"description": "Instance ID - uuid",
"required": true,
"deprecated": false,
"schema": {
"type": "string"
}
}
],
"tags": [
"Agent"
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"type": "object"
},
"examples": {
"example1": {
"summary": "application/json",
"value": "{\n \"url\": \"http://downloads.sourceforge.net/project/opengapps/arm64/20220119/open_gapps-arm64-11.0-pico-20220119.zip?r=&ts=1653516572&use_mirror=gigenet\",\n \"hash\": \"58398bf7628f38ef07eaeb3abe26f3ebf0474f4d5ecdac0852bd5de3c15cc828\",\n \"fingerprint\": \"google/flame/flame:11/RP1A.200720.009/6720564:user/release-keys__2020-09-05\"\n}"
}
}
}
},
"description": "Installation parameters",
"required": true
},
"operationId": "v1AgentSystemInstallOpenGApps"
}
},
"/v1/instances/{instanceId}/agent/v1/system/adbauth": {
"get": {
"deprecated": false,
"summary": "Get ADB Auth Setting (AOSP only)",
"security": [
{
"BearerAuth": []
}
],
"responses": {
"200": {
"description": "Current ADB Auth setting",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/AgentSystemAdbAuth"
}
}
}
},
"400": {
"description": "Agent Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/AgentError"
}
}
}
}
},
"parameters": [
{
"name": "instanceId",
"in": "path",
"description": "Instance ID - uuid",
"required": true,
"deprecated": false,
"schema": {
"type": "string"
}
}
],
"tags": [
"Agent"
],
"operationId": "v1AgentSystemGetAdbAuth"
},
"put": {
"deprecated": false,
"summary": "Set ADB Auth Setting (AOSP only)",
"security": [
{
"BearerAuth": []
}
],
"responses": {
"204": {
"description": "Accepted"
},
"400": {
"description": "Agent Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/AgentError"
}
}
}
}
},
"parameters": [
{
"name": "instanceId",
"in": "path",
"description": "Instance ID - uuid",
"required": true,
"deprecated": false,
"schema": {
"type": "string"
}
}
],
"tags": [
"Agent"
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/AgentSystemAdbAuth"
},
"examples": {
"example1": {
"summary": "application/json",
"value": "{\n \"enabled\": true\n}"
}
}
}
},
"description": "Desired ADB Auth Setting",
"required": true
},
"operationId": "v1AgentSystemSetAdbAuth"
}
},
"/v1/instances/{instanceId}/agent/v1/system/lock": {
"post": {
"deprecated": false,
"summary": "Lock Device (iOS Only)",
"security": [
{
"BearerAuth": []
}
],
"responses": {
"204": {
"description": "Accepted"
},
"400": {
"description": "Agent Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/AgentError"
}
}
}
}
},
"parameters": [
{
"name": "instanceId",
"in": "path",
"description": "Instance ID - uuid",
"required": true,
"deprecated": false,
"schema": {
"type": "string"
}
}
],
"tags": [
"Agent"
],
"operationId": "v1AgentSystemLock"
}
},
"/v1/instances/{instanceId}/agent/v1/system/unlock": {
"post": {
"deprecated": false,
"summary": "Unlock Device (iOS Only)",
"security": [
{
"BearerAuth": []
}
],
"responses": {
"204": {
"description": "Accepted"
},
"400": {
"description": "Agent Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/AgentError"
}
}
}
}
},
"parameters": [
{
"name": "instanceId",
"in": "path",
"description": "Instance ID - uuid",
"required": true,
"deprecated": false,
"schema": {
"type": "string"
}
}
],
"tags": [
"Agent"
],
"operationId": "v1AgentSystemUnlock"
}
},
"/v1/instances/{instanceId}/console": {
"get": {
"deprecated": false,
"summary": "Get console websocket URL",
"security": [
{
"BearerAuth": []
}
],
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/InstanceConsoleEndpoint"
},
"examples": {
"example1": {
"summary": "OK",
"value": {
"url": "wss://host.domain.com/console/N5IKFgwlQVzkqxak4wGQ78vhPU3JbF0W0xJl_eXz5q9sQlRy2DILxZ0i8DH_pC7jf6MoqUqVcp7fctgNHAAOx_xfCAiKXc4J9r7YavPe7KQhEciHTXfPp1fFMz40ACh3kdPC38M3URNMSWWaCmfg45qd3S0CqMW0r2_Bp9CNo2k%3D"
}
}
}
}
}
},
"403": {
"description": "Forbidden",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ApiError"
},
"examples": {
"example2": {
"summary": "Forbidden",
"value": {
"error": "Invalid or missing authorization token",
"errorID": "PermissionDenied",
"originalError": "Invalid or missing authorization token"
}
}
}
}
}
},
"404": {
"description": "Not Found",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ApiNotFoundError"
},
"examples": {
"example3": {
"summary": "Not Found",
"value": {
"error": "Instance with instanceId=7f4f241c-821f-4219-905f-c3b50b0db5dd not found",
"errorID": "InstanceNotFound",
"name": "Instance",
"params": {
"instanceId": "7f4f241c-821f-4219-905f-c3b50b0db5dd"
}
}
}
}
}
}
}
},
"parameters": [
{
"name": "instanceId",
"in": "path",
"description": "Instance ID - uuid",
"required": true,
"deprecated": false,
"schema": {
"type": "string"
}
}
],
"tags": [
"Instances"
],
"operationId": "v1GetInstanceConsole"
}
},
"/v1/instances/{instanceId}/networkMonitor.pcap": {
"get": {
"deprecated": false,
"summary": "Download a Network Monitor pcap file",
"security": [
{
"BearerAuth": []
}
],
"responses": {
"200": {
"description": "pcap file",
"content": {
"application/vnd.tcpdump.pcap": {
"schema": {
"$ref": "#/components/schemas/File"
}
}
}
},
"400": {
"description": "Bad Request",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/UserError"
}
}
}
},
"403": {
"description": "Forbidden",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ApiError"
}
}
}
}
},
"parameters": [
{
"name": "instanceId",
"in": "path",
"description": "Instance ID - uuid",
"required": true,
"deprecated": false,
"schema": {
"type": "string"
}
}
],
"tags": [
"Instances"
]
}
},
"/v1/instances/{instanceId}/netdump.pcap": {
"get": {
"deprecated": false,
"summary": "Download a netdump pcap file",
"security": [
{
"BearerAuth": []
}
],
"responses": {
"200": {
"description": "pcapng file",
"content": {
"application/vnd.tcpdump.pcap": {
"schema": {
"$ref": "#/components/schemas/File"
}
}
}
},
"400": {
"description": "Bad Request",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/UserError"
}
}
}
},
"403": {
"description": "Forbidden",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ApiError"
}
}
}
}
},
"parameters": [
{
"name": "instanceId",
"in": "path",
"description": "Instance ID - uuid",
"required": true,
"deprecated": false,
"schema": {
"type": "string"
}
}
],
"tags": [
"Instances",
"Netdump"
]
}
},
"/v1/instances/{instanceId}/start": {
"post": {
"deprecated": false,
"summary": "Start an Instance",
"security": [
{
"BearerAuth": []
}
],
"responses": {
"204": {
"description": "Accepted"
},
"403": {
"description": "Forbidden",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ApiError"
},
"examples": {
"example1": {
"summary": "Forbidden",
"value": {
"error": "Invalid or missing authorization token",
"errorID": "PermissionDenied",
"originalError": "Invalid or missing authorization token"
}
}
}
}
}
},
"404": {
"description": "Not Found",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ApiError"
},
"examples": {
"example2": {
"summary": "Not Found",
"value": {
"error": "No instance associated with this value",
"errorID": "UserError",
"field": "InstanceId"
}
}
}
}
}
},
"409": {
"description": "Conflict",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ApiError"
},
"examples": {
"example3": {
"summary": "Conflict",
"value": {
"error": "Instance is already started",
"errorID": "UserError",
"field": "InstanceId"
}
}
}
}
}
}
},
"parameters": [
{
"name": "instanceId",
"in": "path",
"description": "Instance ID - uuid",
"required": true,
"deprecated": false,
"schema": {
"type": "string"
}
}
],
"tags": [
"Instances"
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/InstanceStartOptions"
}
}
},
"description": "Start options",
"required": false
},
"operationId": "v1StartInstance"
}
},
"/v1/instances/{instanceId}/stop": {
"post": {
"deprecated": false,
"summary": "Stop an Instance",
"security": [
{
"BearerAuth": []
}
],
"responses": {
"204": {
"description": "Accepted"
},
"403": {
"description": "Forbidden",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ApiError"
},
"examples": {
"example1": {
"summary": "Forbidden",
"value": {
"error": "Invalid or missing authorization token",
"errorID": "PermissionDenied",
"originalError": "Invalid or missing authorization token"
}
}
}
}
}
},
"404": {
"description": "Not Found",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ApiError"
},
"examples": {
"example2": {
"summary": "Not Found",
"value": {
"error": "No instance associated with this value",
"errorID": "UserError",
"field": "InstanceId"
}
}
}
}
}
},
"409": {
"description": "Conflict",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/UserError"
},
"examples": {
"example3": {
"summary": "Conflict",
"value": {
"error": "Instance is currently in an off state",
"errorID": "UserError",
"field": "InstanceId"
}
}
}
}
}
}
},
"parameters": [
{
"name": "instanceId",
"in": "path",
"description": "Instance ID - uuid",
"required": true,
"deprecated": false,
"schema": {
"type": "string"
}
}
],
"tags": [
"Instances"
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/InstanceStopOptions"
}
}
},
"description": "Stop options",
"required": false
},
"operationId": "v1StopInstance"
}
},
"/v1/instances/{instanceId}/reboot": {
"post": {
"deprecated": false,
"summary": "Reboot an Instance",
"security": [
{
"BearerAuth": []
}
],
"responses": {
"204": {
"description": "Accepted"
},
"403": {
"description": "Forbidden",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ApiError"
},
"examples": {
"example1": {
"summary": "Forbidden",
"value": {
"error": "Invalid or missing authorization token",
"errorID": "PermissionDenied",
"originalError": "Invalid or missing authorization token"
}
}
}
}
}
},
"404": {
"description": "Not Found",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ApiError"
},
"examples": {
"example2": {
"summary": "Not Found",
"value": {
"error": "No instance associated with this value",
"errorID": "UserError",
"field": "InstanceId"
}
}
}
}
}
}
},
"parameters": [
{
"name": "instanceId",
"in": "path",
"description": "Instance ID - uuid",
"required": true,
"deprecated": false,
"schema": {
"type": "string"
}
}
],
"tags": [
"Instances"
],
"operationId": "v1RebootInstance"
}
},
"/v1/instances/{instanceId}/pause": {
"post": {
"deprecated": false,
"summary": "Pause an Instance",
"security": [
{
"BearerAuth": []
}
],
"responses": {
"204": {
"description": "Accepted"
},
"403": {
"description": "Forbidden",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ApiError"
},
"examples": {
"example1": {
"summary": "Forbidden",
"value": {
"error": "Invalid or missing authorization token",
"errorID": "PermissionDenied",
"originalError": "Invalid or missing authorization token"
}
}
}
}
}
},
"404": {
"description": "Not Found",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ApiError"
},
"examples": {
"example2": {
"summary": "Not Found",
"value": {
"error": "No instance associated with this value",
"errorID": "UserError",
"field": "InstanceId"
}
}
}
}
}
}
},
"parameters": [
{
"name": "instanceId",
"in": "path",
"description": "Instance ID - uuid",
"required": true,
"deprecated": false,
"schema": {
"type": "string"
}
}
],
"tags": [
"Instances"
],
"operationId": "v1PauseInstance"
}
},
"/v1/instances/{instanceId}/unpause": {
"post": {
"deprecated": false,
"summary": "Unpause an Instance",
"security": [
{
"BearerAuth": []
}
],
"responses": {
"204": {
"description": "Accepted"
},
"403": {
"description": "Forbidden",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ApiError"
},
"examples": {
"example1": {
"summary": "Forbidden",
"value": {
"error": "Invalid or missing authorization token",
"errorID": "PermissionDenied",
"originalError": "Invalid or missing authorization token"
}
}
}
}
}
},
"404": {
"description": "Not Found",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/UserError"
},
"examples": {
"example2": {
"summary": "Not Found",
"value": {
"error": "No instance associated with this value",
"errorID": "UserError",
"field": "InstanceId"
}
}
}
}
}
}
},
"parameters": [
{
"name": "instanceId",
"in": "path",
"description": "Instance ID - uuid",
"required": true,
"deprecated": false,
"schema": {
"type": "string"
}
}
],
"tags": [
"Instances"
],
"operationId": "v1UnpauseInstance"
}
},
"/v1/instances/{instanceId}/state": {
"put": {
"deprecated": false,
"summary": "Set state of Instance",
"security": [
{
"BearerAuth": []
}
],
"responses": {
"204": {
"description": "Accepted"
},
"400": {
"description": "Bad Request",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/UserError"
},
"examples": {
"example1": {
"summary": "Task in Progress",
"value": {
"error": "Instance is currently attempting to process a different task",
"errorID": "UserError",
"field": "InstanceId"
}
}
}
}
}
},
"403": {
"description": "Forbidden",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ApiError"
},
"examples": {
"example2": {
"summary": "Forbidden",
"value": {
"error": "Invalid or missing authorization token",
"errorID": "PermissionDenied",
"originalError": "Invalid or missing authorization token"
}
}
}
}
}
},
"404": {
"description": "Not Found",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/UserError"
},
"examples": {
"example3": {
"summary": "Not Found",
"value": {
"error": "Instance not found",
"errorID": "UserError",
"field": "InstanceId"
}
}
}
}
}
},
"409": {
"description": "Conflict",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/UserError"
},
"examples": {
"example4": {
"summary": "Conflict",
"value": {
"error": "Instance cannot transition to that state",
"errorID": "UserError",
"field": "state"
}
}
}
}
}
}
},
"parameters": [
{
"name": "instanceId",
"in": "path",
"description": "Instance ID - uuid",
"required": true,
"deprecated": false,
"schema": {
"type": "string"
}
}
],
"tags": [
"Instances"
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/V1SetStateBody"
}
}
},
"description": "Desired State",
"required": true
},
"operationId": "v1SetInstanceState"
}
},
"/v2/instances/{instanceId}/state": {
"get": {
"deprecated": false,
"summary": "Get state of Instance",
"security": [
{
"BearerAuth": []
}
],
"responses": {
"200": {
"description": "Current Instance State",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/InstanceState"
},
"examples": {
"example1": {
"summary": "Current Instance State",
"value": "on"
}
}
}
}
},
"403": {
"description": "Forbidden",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ApiError"
},
"examples": {
"example2": {
"summary": "Forbidden",
"value": {
"error": "Invalid or missing authorization token",
"errorID": "PermissionDenied",
"originalError": "Invalid or missing authorization token"
}
}
}
}
}
},
"404": {
"description": "Not Found",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/UserError"
},
"examples": {
"example3": {
"summary": "Not Found",
"value": {
"error": "No instance associated with this value",
"errorID": "UserError",
"field": "InstanceId"
}
}
}
}
}
}
},
"parameters": [
{
"name": "instanceId",
"in": "path",
"description": "Instance ID - uuid",
"required": true,
"deprecated": false,
"schema": {
"type": "string"
}
},
{
"name": "returnAttr",
"in": "query",
"description": "The attributes to return.",
"required": false,
"deprecated": false,
"schema": {
"type": "Array",
"items": {
"type": "string"
}
}
}
],
"tags": [
"Instances"
],
"operationId": "v2GetInstanceState"
}
},
"/v1/instances/{instanceId}/rate": {
"get": {
"deprecated": false,
"summary": "Get rate information",
"description": "Returns the cost, in microcents, for the instance in the on and off state. Instances are charged $0.25 / day for storage (off) and $0.25 per core per hour (on).",
"security": [
{
"BearerAuth": []
}
],
"responses": {
"200": {
"description": "Rate Information",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/RateInfo"
},
"examples": {
"example1": {
"summary": "Rate Information",
"value": {
"onRateMicrocents": 13889,
"offRateMicrocents": 289
}
}
}
}
}
}
},
"parameters": [
{
"name": "instanceId",
"in": "path",
"description": "Instance ID - uuid",
"required": true,
"deprecated": false,
"schema": {
"type": "string"
}
}
],
"tags": [
"Instances"
],
"operationId": "v1GetInstanceRate"
}
},
"/v1/instances/{instanceId}/gpios": {
"get": {
"deprecated": false,
"summary": "Get Instance GPIOs",
"security": [
{
"BearerAuth": []
}
],
"responses": {
"200": {
"description": "Current GPIO State",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/GpiosState"
},
"examples": {
"example1": {
"summary": "Current GPIO State",
"value": {
"led": {
"bitCount": 8,
"banks": [
[
1,
0,
0,
0,
0,
0,
0,
0
]
]
},
"button": {
"bitCount": 2,
"banks": [
[
1,
0
],
[
0,
1
]
]
},
"switch": {
"bitCount": 8,
"banks": [
[
0,
0,
0,
0,
0,
0,
0,
1
]
]
}
}
}
}
}
}
},
"403": {
"description": "Forbidden",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ApiError"
},
"examples": {
"example2": {
"summary": "Forbidden",
"value": {
"error": "Invalid or missing authorization token",
"errorID": "PermissionDenied",
"originalError": "Invalid or missing authorization token"
}
}
}
}
}
},
"404": {
"description": "Not Found",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/UserError"
},
"examples": {
"example3": {
"summary": "Not Found",
"value": {
"error": "Instance with instanceId=3a28e565-cf46-4706-86e7-e3af6b33ae0dd not found",
"errorID": "NotFound",
"name": "Instance",
"params": {
"instanceId": "3a28e565-cf46-4706-86e7-e3af6b33ae0dd"
}
}
}
}
}
}
}
},
"parameters": [
{
"name": "instanceId",
"in": "path",
"description": "Instance ID - uuid",
"required": true,
"deprecated": false,
"schema": {
"type": "string"
}
}
],
"tags": [
"Instances"
],
"operationId": "v1GetInstanceGpios"
},
"put": {
"deprecated": false,
"summary": "Set Instance GPIOs",
"security": [
{
"BearerAuth": []
}
],
"responses": {
"200": {
"description": "Current GPIOs State",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/GpiosState"
},
"examples": {
"example1": {
"summary": "Current GPIOs State",
"value": {
"led": {
"bitCount": 8,
"banks": [
[
1,
0,
0,
0,
0,
0,
0,
0
]
]
},
"button": {
"bitCount": 2,
"banks": [
[
0,
1
],
[
1,
0
]
]
},
"switch": {
"bitCount": 8,
"banks": [
[
0,
1,
0,
1,
0,
1,
0,
1
]
]
}
}
}
}
}
}
},
"403": {
"description": "Forbidden",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ApiError"
},
"examples": {
"example2": {
"summary": "Forbidden",
"value": {
"error": "Invalid or missing authorization token",
"errorID": "PermissionDenied",
"originalError": "Invalid or missing authorization token"
}
}
}
}
}
},
"404": {
"description": "Not Found",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/UserError"
},
"examples": {
"example3": {
"summary": "Not Found",
"value": {
"error": "Instance with instanceId=3a28e565-cf46-4706-86e7-e3af6b33ae0dd not found",
"errorID": "NotFound",
"name": "Instance",
"params": {
"instanceId": "3a28e565-cf46-4706-86e7-e3af6b33ae0dd"
}
}
}
}
}
}
}
},
"parameters": [
{
"name": "instanceId",
"in": "path",
"description": "Instance ID - uuid",
"required": true,
"deprecated": false,
"schema": {
"type": "string"
}
}
],
"tags": [
"Instances"
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/GpiosState"
},
"examples": {
"example1": {
"summary": "Desired GPIO State",
"value": "{\n \"button\": {\n \"bitCount\": 2,\n \"banks\": [\n [0,1],\n [1,0]\n ]\n },\n \"switch\": {\n \"bitCount\": 8,\n \"banks\": [\n [0,1,0,1,0,1,0,1]\n ]\n }\n}"
}
}
}
},
"description": "New GPIO state",
"required": true
},
"operationId": "v1SetInstanceGpios"
}
},
"/v1/instances/{instanceId}/peripherals": {
"get": {
"deprecated": false,
"summary": "Get Instance Peripherals",
"security": [
{
"BearerAuth": []
}
],
"responses": {
"200": {
"description": "Current Peripherals State",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/PeripheralsData"
},
"examples": {
"example1": {
"summary": "Current Peripherals State",
"value": {
"acceleration": [
0,
9.81,
0
],
"gyroscope": [
0,
0,
0
],
"magnetic": [
0,
45,
0
],
"orientation": [
0,
0,
0
],
"temperature": 25,
"proximity": 50,
"light": 20,
"pressure": 1013.25,
"humidity": 55
}
}
}
}
}
},
"403": {
"description": "Forbidden",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ApiError"
},
"examples": {
"example2": {
"summary": "Forbidden",
"value": {
"error": "Invalid or missing authorization token",
"errorID": "PermissionDenied",
"originalError": "Invalid or missing authorization token"
}
}
}
}
}
},
"404": {
"description": "Not Found",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/UserError"
},
"examples": {
"example3": {
"summary": "Not Found",
"value": {
"error": "Instance with instanceId=3a28e565-cf46-4706-86e7-e3af6b33ae0dd not found",
"errorID": "NotFound",
"name": "Instance",
"params": {
"instanceId": "3a28e565-cf46-4706-86e7-e3af6b33ae0dd"
}
}
}
}
}
}
}
},
"parameters": [
{
"name": "instanceId",
"in": "path",
"description": "Instance ID - uuid",
"required": true,
"deprecated": false,
"schema": {
"type": "string"
}
}
],
"tags": [
"Instances"
],
"operationId": "v1GetInstancePeripherals"
},
"put": {
"deprecated": false,
"summary": "Set Instance Peripherals",
"security": [
{
"BearerAuth": []
}
],
"responses": {
"200": {
"description": "Current Peripherals State",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/PeripheralsData"
},
"examples": {
"example1": {
"summary": "Current Peripherals State",
"value": {
"acceleration": [
0,
9.81,
0
],
"gyroscope": [
0,
0,
0
],
"magnetic": [
0,
45,
0
],
"orientation": [
0,
0,
0
],
"temperature": 25,
"proximity": 50,
"light": 20,
"pressure": 1013.25,
"humidity": 55
}
}
}
}
}
},
"403": {
"description": "Forbidden",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ApiError"
},
"examples": {
"example2": {
"summary": "Forbidden",
"value": {
"error": "Invalid or missing authorization token",
"errorID": "PermissionDenied",
"originalError": "Invalid or missing authorization token"
}
}
}
}
}
},
"404": {
"description": "Not Found",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/UserError"
},
"examples": {
"example3": {
"summary": "Not Found",
"value": {
"error": "Instance with instanceId=3a28e565-cf46-4706-86e7-e3af6b33ae0dd not found",
"errorID": "NotFound",
"name": "Instance",
"params": {
"instanceId": "3a28e565-cf46-4706-86e7-e3af6b33ae0dd"
}
}
}
}
}
}
}
},
"parameters": [
{
"name": "instanceId",
"in": "path",
"description": "Instance ID - uuid",
"required": true,
"deprecated": false,
"schema": {
"type": "string"
}
}
],
"tags": [
"Instances"
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/PeripheralsData"
},
"examples": {
"example1": {
"summary": "Current Peripherals State",
"value": "{\n \"acceleration\": [0, 9.81, 0],\n \"gyroscope\": [0, 0, 0],\n \"magnetic\": [0, 45, 0 ],\n \"orientation\": [0, 0, 0 ],\n \"temperature\": 25,\n \"proximity\": 50,\n \"light\": 20,\n \"pressure\": 1013.25,\n \"humidity\": 55\n}"
}
}
}
},
"description": "New peripherals state",
"required": true
},
"operationId": "v1SetInstancePeripherals"
}
},
"/v1/instances/{instanceId}/restoreBackup": {
"post": {
"deprecated": false,
"summary": "Restore backup",
"security": [
{
"BearerAuth": []
}
],
"responses": {
"204": {
"description": "No Content"
},
"400": {
"description": "Bad Request",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/UserError"
}
}
}
},
"403": {
"description": "Forbidden",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ApiError"
}
}
}
}
},
"parameters": [
{
"name": "instanceId",
"in": "path",
"description": "Instance ID - uuid",
"required": true,
"deprecated": false,
"schema": {
"type": "string"
}
}
],
"tags": [
"Instances"
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/RestoreBackupData"
}
}
},
"description": "Restore backup data",
"required": false
},
"operationId": "v1RestoreBackup"
}
},
"/v1/instances/{instanceId}/screenshot.{format}": {
"get": {
"deprecated": false,
"summary": "Get Instance Screenshot",
"security": [
{
"BearerAuth": []
}
],
"responses": {
"200": {
"description": "Screenshot",
"content": {
"image/png": {
"schema": {
"$ref": "#/components/schemas/Screenshot"
}
},
"image/jpeg": {
"schema": {
"$ref": "#/components/schemas/Screenshot"
}
}
}
},
"403": {
"description": "Forbidden",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ApiError"
},
"examples": {
"example1": {
"summary": "Forbidden",
"value": {
"error": "Invalid or missing authorization token",
"errorID": "PermissionDenied",
"originalError": "Invalid or missing authorization token"
}
}
}
}
}
},
"404": {
"description": "Not Found",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/UserError"
},
"examples": {
"example2": {
"summary": "Not Found",
"value": {
"error": "Instance with instanceId=3a28e565-cf46-4706-86e7-e3af6b33ae0dd not found",
"errorID": "NotFound",
"name": "Instance",
"params": {
"instanceId": "3a28e565-cf46-4706-86e7-e3af6b33ae0dd"
}
}
}
}
}
}
}
},
"parameters": [
{
"name": "instanceId",
"in": "path",
"description": "Instance ID - uuid",
"required": true,
"deprecated": false,
"schema": {
"type": "string"
}
},
{
"name": "format",
"in": "path",
"description": "New peripherals state",
"required": true,
"deprecated": false,
"schema": {
"type": "string",
"enum": [
"png",
"jpeg"
]
}
},
{
"name": "scale",
"in": "query",
"description": "Screenshot scale 1:N",
"required": false,
"deprecated": false,
"schema": {
"type": "integer"
}
}
],
"tags": [
"Instances"
],
"operationId": "v1GetInstanceScreenshot"
}
},
"/v1/instances/{instanceId}/rotate": {
"post": {
"deprecated": false,
"summary": "Rotate device to specified orientation",
"description": "Rotate device to orientation. Accepted orientations:\n1. Portrait\n2. Portrait vertically inverted (up-side-down)\n3. Landscape with top of the device to the left\n4. Landscape with top of the device to the right",
"security": [
{
"BearerAuth": []
}
],
"responses": {
"204": {
"description": "Accepted"
},
"403": {
"description": "Forbidden",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ApiError"
},
"examples": {
"example1": {
"summary": "Forbidden",
"value": {
"error": "Invalid or missing authorization token",
"errorID": "PermissionDenied",
"originalError": "Invalid or missing authorization token"
}
}
}
}
}
},
"404": {
"description": "Not Found",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ApiNotFoundError"
},
"examples": {
"example2": {
"summary": "Not Found",
"value": {
"error": "Instance with instanceId=7f4f241c-821f-4219-905f-c3b50b0db5dd not found",
"errorID": "InstanceNotFound",
"name": "Instance",
"params": {
"instanceId": "7f4f241c-821f-4219-905f-c3b50b0db5dd"
}
}
}
}
}
}
}
},
"parameters": [
{
"name": "instanceId",
"in": "path",
"description": "",
"required": true,
"deprecated": false,
"schema": {
"type": "string"
}
}
],
"tags": [
"Instances"
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/RotateBody"
},
"examples": {
"example1": {
"summary": "Portrait orientation",
"value": "{\n \"orientation\": 1\n}"
},
"example2": {
"summary": "Landscape orientation",
"value": "{\n \"orientation\": 4\n}"
}
}
}
},
"description": "",
"required": true
},
"operationId": "v1RotateInstance"
}
},
"/v1/instances/{instanceId}/input": {
"post": {
"deprecated": false,
"summary": "Provide Instance Input",
"description": "Sends a touch or button event to the VM.\n\n- Buttons (or keys) to be held during the input are specified as an array of strings, each string must be either a single ascii character or one of the following keywords:\n - VM Buttons: finger, homeButton, holdButton, volumeUp, volumeDown, ringerSwitch, backButton, overviewButton\n - Keyboard Buttons: again, alt, alterase, apostrophe, back, backslash, backspace, bassboost, bookmarks, bsp, calc, camera, cancel, caps, capslock, chat, close, closecd, comma, compose, computer, config, connect, copy, ctrl, cut, cyclewindows, dashboard, del, delete, deletefile, dot, down, edit, eject, ejectclose, email, end, enter, equal, esc, escape, exit, f1, f10, f11, f12, f13, f14, f15, f16, f17, f18, f19, f2, f20, f21, f22, f23, f24, f3, f4, f5, f6, f7, f8, f9, fastfwd, file, finance, find, forward, front, grave, hangeul, hanja, help, henkan, home, homepage, hp, hrgn, ins, insert, iso, k102, kp0, kp1, kp2, kp3, kp4, kp5, kp6, kp7, kp8, kp9, kpasterisk, kpcomma, kpdot, kpenter, kpequal, kpjpcomma, kpleftparen, kpminus, kpplus, kpplusminus, kprightparen, kpslash, ktkn, ktknhrgn, left, leftalt, leftbrace, leftctrl, leftmeta, leftshift, linefeed, macro, mail, menu, meta, minus, move, msdos, muhenkan, mute, new, next, numlock, open, pagedown, pageup, paste, pause, pausecd, pgdn, pgup, phone, play, playcd, playpause, power, previous, print, prog1, prog2, prog3, prog4, props, question, record, redo, refresh, return, rewind, right, rightalt, rightbrace, rightctrl, rightmeta, rightshift, ro, rotate, scale, screenlock, scrolldown, scrolllock, scrollup, search, semicolon, sendfile, setup, shift, shop, slash, sleep, sound, space, sport, stop, stopcd, suspend, sysrq, tab, undo, up, voldown, volup, wakeup, www, xfer, yen, zkhk",
"security": [
{
"BearerAuth": []
}
],
"responses": {
"200": {
"description": "ETA of input completion in milliseconds",
"content": {
"application/json": {
"schema": {
"type": "integer"
}
}
}
},
"403": {
"description": "Forbidden",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ApiError"
},
"examples": {
"example1": {
"summary": "Forbidden",
"value": {
"error": "Invalid or missing authorization token",
"errorID": "PermissionDenied",
"originalError": "Invalid or missing authorization token"
}
}
}
}
}
},
"404": {
"description": "Not Found",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/UserError"
},
"examples": {
"example2": {
"summary": "Not Found",
"value": {
"error": "Instance with instanceId=3a28e565-cf46-4706-86e7-e3af6b33ae0dd not found",
"errorID": "NotFound",
"name": "Instance",
"params": {
"instanceId": "3a28e565-cf46-4706-86e7-e3af6b33ae0dd"
}
}
}
}
}
}
}
},
"parameters": [
{
"name": "instanceId",
"in": "path",
"description": "Instance ID - uuid",
"required": true,
"deprecated": false,
"schema": {
"type": "string"
}
}
],
"tags": [
"Instances"
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"type": "array",
"items": {
"$ref": "#/components/schemas/InstanceInput"
}
},
"examples": {
"example1": {
"summary": "100ms touch at 300,600",
"value": "[\n {\n \"buttons\": [\"finger\"],\n \"position\": [\n [300, 600]\n ],\n \"wait\": 0\n },\n {\n \"buttons\": [],\n \"wait\": 100\n }\n]"
},
"example2": {
"summary": "One finger swipe",
"value": "[\n {\n \"startButtons\": [\"finger\"],\n \"start\": [\n [300, 600]\n ],\n \"bezierPoints\": [\n [ [350, 700] ],\n [ [375, 750] ]\n ],\n \"end\": [\n [400, 650]\n ],\n \"endButtons\": [],\n \"duration\": 200\n }\n]"
},
"example3": {
"summary": "Two finger swipe",
"value": "[\n {\n \"startButtons\": [\"finger\"],\n \"start\": [\n [300, 600], [350, 650]\n ],\n \"bezierPoints\": [\n [ [350, 700], [400, 750] ],\n [ [375, 750], [425, 800] ]\n ],\n \"end\": [\n [400, 650], [450, 700]\n ],\n \"endButtons\": [],\n \"duration\": 200\n }\n]"
},
"example4": {
"summary": "Type Hello, world",
"value": "[\n {\n \"text\": \"Hello, world\"\n }\n]"
},
"example5": {
"summary": "Touch point then type \"Hello, world\"",
"value": "[\n {\n \"buttons\": [\"finger\"],\n \"position\": [\n [300, 600]\n ],\n \"wait\": 0\n },\n {\n \"buttons\": [],\n \"wait\": 100\n },\n {\n \"text\": \"Hello, world\"\n }\n]"
},
"example6": {
"summary": "Example of pressing/releasing the fingerprint sensor",
"value": "[\n {\n \"buttons\": [\"finger:1\"]\n },\n {\n \"buttons\": [],\n \"wait\": 500\n }\n ]"
}
}
}
},
"description": "The input to send to the VM",
"required": true
},
"operationId": "v1PostInstanceInput"
}
},
"/v1/instances/{instanceId}/consoleLog": {
"get": {
"deprecated": false,
"summary": "Get Console Log",
"security": [
{
"BearerAuth": []
}
],
"responses": {
"200": {
"description": "Current console log",
"content": {
"text/plain": {
"schema": {
"type": "string"
}
}
}
},
"403": {
"description": "Forbidden",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ApiError"
},
"examples": {
"example1": {
"summary": "Forbidden",
"value": {
"error": "Invalid or missing authorization token",
"errorID": "PermissionDenied",
"originalError": "Invalid or missing authorization token"
}
}
}
}
}
}
},
"parameters": [
{
"name": "instanceId",
"in": "path",
"description": "Instance ID - uuid",
"required": true,
"deprecated": false,
"schema": {
"type": "string"
}
}
],
"tags": [
"Instances"
],
"operationId": "v1GetInstanceConsoleLog"
}
},
"/v1/instances/{instanceId}/panics": {
"get": {
"deprecated": false,
"summary": "Get Panics",
"security": [
{
"BearerAuth": []
}
],
"responses": {
"200": {
"description": "Array of panics",
"content": {
"application/json": {
"schema": {
"type": "array",
"items": {
"type": "object"
}
}
}
}
},
"403": {
"description": "Forbidden",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ApiError"
},
"examples": {
"example1": {
"summary": "Forbidden",
"value": {
"error": "Invalid or missing authorization token",
"errorID": "PermissionDenied",
"originalError": "Invalid or missing authorization token"
}
}
}
}
}
}
},
"parameters": [
{
"name": "instanceId",
"in": "path",
"description": "Instance ID - uuid",
"required": true,
"deprecated": false,
"schema": {
"type": "string"
}
}
],
"tags": [
"Instances"
],
"operationId": "v1GetInstancePanics"
},
"delete": {
"deprecated": false,
"summary": "Clear Panics",
"security": [
{
"BearerAuth": []
}
],
"responses": {
"204": {
"description": "Accepted"
},
"403": {
"description": "Forbidden",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ApiError"
},
"examples": {
"example1": {
"summary": "Forbidden",
"value": {
"error": "Invalid or missing authorization token",
"errorID": "PermissionDenied",
"originalError": "Invalid or missing authorization token"
}
}
}
}
}
}
},
"parameters": [
{
"name": "instanceId",
"in": "path",
"description": "Instance ID - uuid",
"required": true,
"deprecated": false,
"schema": {
"type": "string"
}
}
],
"tags": [
"Instances"
],
"operationId": "v1ClearInstancePanics"
}
},
"/v1/instances/{instanceId}/media/play": {
"post": {
"deprecated": false,
"summary": "Start playing media",
"security": [
{
"BearerAuth": []
}
],
"responses": {
"204": {
"description": "Success response"
},
"400": {
"description": "Bad Request",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ValidationError"
}
}
}
},
"404": {
"description": "Not Found",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/UserError"
}
}
}
},
"409": {
"description": "Conflict",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/UserError"
}
}
}
}
},
"parameters": [
{
"name": "instanceId",
"in": "path",
"description": "Instance ID - uuid",
"required": true,
"deprecated": false,
"schema": {
"type": "string"
}
}
],
"tags": [
"Instances"
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/MediaPlayBody"
},
"examples": {
"example1": {
"summary": "Play a file located at a URL",
"value": "{\n \"url\": \"http://null.to/test.mp4\"\n}"
},
"example2": {
"summary": "Play an already uploaded file",
"value": "{\n \"imageId\": \"afec1445-979c-4181-8a3b-3099935085c7\"\n}"
}
}
}
},
"description": "Request Body",
"required": true
},
"operationId": "v1MediaPlay"
}
},
"/v1/instances/{instanceId}/media/stop": {
"post": {
"deprecated": false,
"summary": "Stop playing media",
"security": [
{
"BearerAuth": []
}
],
"responses": {
"204": {
"description": "Success response"
},
"400": {
"description": "Bad Request",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ValidationError"
}
}
}
},
"404": {
"description": "Not Found",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/UserError"
}
}
}
}
},
"parameters": [
{
"name": "instanceId",
"in": "path",
"description": "Instance ID - uuid",
"required": true,
"deprecated": false,
"schema": {
"type": "string"
}
}
],
"tags": [
"Instances"
],
"operationId": "v1MediaStop"
}
},
"/v1/instances/{instanceId}/strace": {
"delete": {
"deprecated": false,
"summary": "Clear CoreTrace logs",
"security": [
{
"BearerAuth": []
}
],
"responses": {
"204": {
"description": "Accepted"
},
"403": {
"description": "Forbidden",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ApiError"
},
"examples": {
"example1": {
"summary": "Forbidden",
"value": {
"error": "Invalid or missing authorization token",
"errorID": "PermissionDenied",
"originalError": "Invalid or missing authorization token"
}
}
}
}
}
}
},
"parameters": [
{
"name": "instanceId",
"in": "path",
"description": "Instance ID - uuid",
"required": true,
"deprecated": false,
"schema": {
"type": "string"
}
}
],
"tags": [
"CoreTrace",
"Instances"
],
"operationId": "v1ClearCoreTrace"
}
},
"/v1/instances/{instanceId}/strace/enable": {
"post": {
"deprecated": false,
"summary": "Start CoreTrace on an instance",
"security": [
{
"BearerAuth": []
}
],
"responses": {
"204": {
"description": "No Content"
},
"400": {
"description": "Bad Request",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/UserError"
}
}
}
},
"403": {
"description": "Forbidden",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ApiError"
}
}
}
}
},
"parameters": [
{
"name": "instanceId",
"in": "path",
"description": "Instance ID - uuid",
"required": true,
"deprecated": false,
"schema": {
"type": "string"
}
}
],
"tags": [
"CoreTrace",
"Instances"
],
"operationId": "v1StartCoreTrace"
}
},
"/v1/instances/{instanceId}/strace/disable": {
"post": {
"deprecated": false,
"summary": "Stop CoreTrace on an instance.",
"security": [
{
"BearerAuth": []
}
],
"responses": {
"204": {
"description": "No Content"
},
"400": {
"description": "Bad Request",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/UserError"
}
}
}
},
"403": {
"description": "Forbidden",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ApiError"
}
}
}
}
},
"parameters": [
{
"name": "instanceId",
"in": "path",
"description": "Instance ID - uuid",
"required": true,
"deprecated": false,
"schema": {
"type": "string"
}
}
],
"tags": [
"CoreTrace",
"Instances"
],
"operationId": "v1StopCoreTrace"
}
},
"/v1/instances/{instanceId}/strace/thread-list": {
"get": {
"deprecated": false,
"summary": "Get Running Threads (CoreTrace)",
"security": [
{
"BearerAuth": []
}
],
"responses": {
"200": {
"description": "Threads",
"content": {
"application/json": {
"schema": {
"type": "array",
"items": {
"$ref": "#/components/schemas/KernelTask"
}
},
"examples": {
"example1": {
"summary": "Threads",
"value": [
{
"kernelId": "ffffffc0117d7280",
"name": "swapper",
"pid": 0,
"threads": [
{
"kernelId": "ffffffc0117d7280",
"tid": 0,
"stack": [
"ffffffc01001655c",
"ffffffc010cf10c4",
"ffffffc010cf0c14",
"ffffffc010cf0dd4",
"ffffffc0100d768c",
"ffffffc010cfae2c",
"ffffffc01008b8a8",
"ffffffc01008bb24",
"ffffffc010cf11cc",
"ffffffc011530a04",
"ffffffc011530f60",
"00000000419f0000"
]
},
{
"kernelId": "ffffffc0117d8630",
"tid": 0,
"stack": [
"fffffffffffffffc"
]
}
]
}
]
}
}
}
}
},
"400": {
"description": "Bad Request",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/UserError"
}
}
}
},
"403": {
"description": "Forbidden",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ApiError"
}
}
}
}
},
"parameters": [
{
"name": "instanceId",
"in": "path",
"description": "Instance ID - uuid",
"required": true,
"deprecated": false,
"schema": {
"type": "string"
}
}
],
"tags": [
"CoreTrace",
"Instances"
],
"operationId": "v1ListThreads"
}
},
"/v1/instances/{instanceId}/btrace-authorize": {
"get": {
"deprecated": false,
"summary": "Pre-authorize an btrace download",
"security": [
{
"BearerAuth": []
}
],
"responses": {
"200": {
"description": "Token",
"content": {
"application/json": {
"schema": {
"type": "object"
}
}
}
},
"400": {
"description": "Bad Request",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/UserError"
}
}
}
},
"403": {
"description": "Forbidden",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ApiError"
}
}
}
}
},
"parameters": [
{
"name": "instanceId",
"in": "path",
"description": "Instance ID - uuid",
"required": true,
"deprecated": false,
"schema": {
"type": "string"
}
}
],
"tags": [
"HyperTrace",
"Instances"
],
"operationId": "v1BtracePreauthorize"
}
},
"/v1/instances/{instanceId}/btrace-kcrange": {
"get": {
"deprecated": false,
"summary": "Get Kernel extension ranges",
"security": [
{
"BearerAuth": []
}
],
"responses": {
"200": {
"description": "Kcranges",
"content": {
"application/json": {
"schema": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Kcrange"
}
},
"examples": {
"example1": {
"summary": "Kcranges",
"value": "[\n {\n \"kext\": \"com.apple.iokit.IOSlowAdaptiveClockingFamily\",\n \"range\": [\n \"fffffff005964000\",\n \"fffffff0059654c7\"\n ]\n },\n {\n \"kext\": \"com.apple.iokit.IOStorageFamily\",\n \"range\": [\n \"fffffff005966000\",\n \"fffffff005979ebf\"\n]"
}
}
}
}
},
"400": {
"description": "Bad Request",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/UserError"
}
}
}
},
"403": {
"description": "Forbidden",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ApiError"
}
}
}
}
},
"parameters": [
{
"name": "instanceId",
"in": "path",
"description": "Instance ID - uuid",
"required": true,
"deprecated": false,
"schema": {
"type": "string"
}
}
],
"tags": [
"HyperTrace",
"Instances"
],
"operationId": "v1Kcrange"
}
},
"/v1/instances/{instanceId}/btrace": {
"delete": {
"deprecated": false,
"summary": "Clear HyperTrace logs",
"security": [
{
"BearerAuth": []
}
],
"responses": {
"204": {
"description": "Accepted"
},
"403": {
"description": "Forbidden",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ApiError"
},
"examples": {
"example1": {
"summary": "Forbidden",
"value": {
"error": "Invalid or missing authorization token",
"errorID": "PermissionDenied",
"originalError": "Invalid or missing authorization token"
}
}
}
}
}
}
},
"parameters": [
{
"name": "instanceId",
"in": "path",
"description": "Instance ID - uuid",
"required": true,
"deprecated": false,
"schema": {
"type": "string"
}
}
],
"tags": [
"HyperTrace",
"Instances"
],
"operationId": "v1ClearHyperTrace"
}
},
"/v1/instances/{instanceId}/btrace/enable": {
"post": {
"deprecated": false,
"summary": "Start HyperTrace on an instance",
"security": [
{
"BearerAuth": []
}
],
"responses": {
"204": {
"description": "No Content"
},
"400": {
"description": "Bad Request",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/UserError"
}
}
}
},
"403": {
"description": "Forbidden",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ApiError"
}
}
}
}
},
"parameters": [
{
"name": "instanceId",
"in": "path",
"description": "Instance ID - uuid",
"required": true,
"deprecated": false,
"schema": {
"type": "string"
}
}
],
"tags": [
"HyperTrace",
"Instances"
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/BtraceEnableOptions"
}
}
},
"description": "",
"required": true
},
"operationId": "v1StartHyperTrace"
}
},
"/v1/instances/{instanceId}/btrace/disable": {
"post": {
"deprecated": false,
"summary": "Stop HyperTrace on an instance.",
"security": [
{
"BearerAuth": []
}
],
"responses": {
"204": {
"description": "No Content"
},
"400": {
"description": "Bad Request",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/UserError"
}
}
}
},
"403": {
"description": "Forbidden",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ApiError"
}
}
}
}
},
"parameters": [
{
"name": "instanceId",
"in": "path",
"description": "Instance ID - uuid",
"required": true,
"deprecated": false,
"schema": {
"type": "string"
}
}
],
"tags": [
"HyperTrace",
"Instances"
],
"operationId": "v1StopHyperTrace"
}
},
"/v1/instances/{instanceId}/hooks/execute": {
"post": {
"deprecated": false,
"summary": "Execute Hooks on an instance",
"security": [
{
"BearerAuth": []
}
],
"responses": {
"204": {
"description": "No Content"
},
"400": {
"description": "Bad Request",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/UserError"
}
}
}
},
"403": {
"description": "Forbidden",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ApiError"
}
}
}
}
},
"parameters": [
{
"name": "instanceId",
"in": "path",
"description": "Instance ID - uuid",
"required": true,
"deprecated": false,
"schema": {
"type": "string"
}
}
],
"tags": [
"Hypervisor Hooks",
"Instances"
],
"operationId": "v1ExecuteHyperTraceHooks"
}
},
"/v1/instances/{instanceId}/hooks/clear": {
"post": {
"deprecated": false,
"summary": "Clear Hooks on an instance",
"security": [
{
"BearerAuth": []
}
],
"responses": {
"204": {
"description": "No Content"
},
"400": {
"description": "Bad Request",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/UserError"
}
}
}
},
"403": {
"description": "Forbidden",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ApiError"
}
}
}
}
},
"parameters": [
{
"name": "instanceId",
"in": "path",
"description": "Instance ID - uuid",
"required": true,
"deprecated": false,
"schema": {
"type": "string"
}
}
],
"tags": [
"Hypervisor Hooks",
"Instances"
],
"operationId": "v1ClearHyperTraceHooks"
}
},
"/v1/instances/{instanceId}/sslsplit/enable": {
"post": {
"deprecated": false,
"summary": "Start Network Monitor on an instance.",
"security": [
{
"BearerAuth": []
}
],
"responses": {
"204": {
"description": "No Content"
},
"400": {
"description": "Bad Request",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/UserError"
}
}
}
},
"403": {
"description": "Forbidden",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ApiError"
}
}
}
}
},
"parameters": [
{
"name": "instanceId",
"in": "path",
"description": "Instance ID - uuid",
"required": true,
"deprecated": false,
"schema": {
"type": "string"
}
}
],
"tags": [
"Instances"
],
"operationId": "v1StartNetworkMonitor"
}
},
"/v1/instances/{instanceId}/sslsplit/disable": {
"post": {
"deprecated": false,
"summary": "Stop Network Monitor on an instance.",
"security": [
{
"BearerAuth": []
}
],
"responses": {
"204": {
"description": "No Content"
},
"400": {
"description": "Bad Request",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/UserError"
}
}
}
},
"403": {
"description": "Forbidden",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ApiError"
}
}
}
}
},
"parameters": [
{
"name": "instanceId",
"in": "path",
"description": "Instance ID - uuid",
"required": true,
"deprecated": false,
"schema": {
"type": "string"
}
}
],
"tags": [
"Instances"
],
"operationId": "v1StopNetworkMonitor"
}
},
"/v1/instances/{instanceId}/netdump/enable": {
"post": {
"deprecated": false,
"summary": "Start Enhanced Network Monitor on an instance.",
"security": [
{
"BearerAuth": []
}
],
"responses": {
"204": {
"description": "No Content"
},
"400": {
"description": "Bad Request",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/UserError"
}
}
}
},
"403": {
"description": "Forbidden",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ApiError"
}
}
}
}
},
"parameters": [
{
"name": "instanceId",
"in": "path",
"description": "Instance ID - uuid",
"required": true,
"deprecated": false,
"schema": {
"type": "string"
}
}
],
"tags": [
"Instances",
"Netdump"
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/NetdumpFilter"
},
"examples": {
"example1": {
"summary": "Capture all traffic",
"value": "{ }"
},
"example2": {
"summary": "Capture only port 443 or 80 traffic from pid 42",
"value": "{\n ports: [ \"443\", \"80\" ],\n processes: [ \"42\" ]\n}"
},
"example3": {
"summary": "Capture only port 443 or 80 traffic from process named misd",
"value": "{\n ports: [ \"443\", \"80\" ],\n processes: [ \"misd\" ]\n}"
},
"example4": {
"summary": "Capture only TCP port 443 or 80 traffic to host 1.1.1.1",
"value": "{\n ports: [ \"443\", \"80\" ],\n protocols: [ \"tcp\" ],\n hosts: [ \"1.1.1.1\" ]\n}"
}
}
}
},
"description": "",
"required": false
},
"operationId": "v1StartNetdump"
}
},
"/v1/instances/{instanceId}/netdump/disable": {
"post": {
"deprecated": false,
"summary": "Stop Enhanced Network Monitor on an instance.",
"security": [
{
"BearerAuth": []
}
],
"responses": {
"204": {
"description": "No Content"
},
"400": {
"description": "Bad Request",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/UserError"
}
}
}
},
"403": {
"description": "Forbidden",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ApiError"
}
}
}
}
},
"parameters": [
{
"name": "instanceId",
"in": "path",
"description": "Instance ID - uuid",
"required": true,
"deprecated": false,
"schema": {
"type": "string"
}
}
],
"tags": [
"Instances",
"Netdump"
],
"operationId": "v1StopNetdump"
}
},
"/v1/instances/{instanceId}/exposeport/enable": {
"post": {
"deprecated": false,
"summary": "Enable an exposed port on an instance for device access.",
"security": [
{
"BearerAuth": []
}
],
"responses": {
"204": {
"description": "No Content"
},
"400": {
"description": "Bad Request",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/UserError"
}
}
}
},
"403": {
"description": "Forbidden",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ApiError"
}
}
}
}
},
"parameters": [
{
"name": "instanceId",
"in": "path",
"description": "Instance ID - uuid",
"required": true,
"deprecated": false,
"schema": {
"type": "string"
}
}
],
"tags": [
"Instances"
],
"operationId": "v1EnableExposePort"
}
},
"/v1/instances/{instanceId}/exposeport/disable": {
"post": {
"deprecated": false,
"summary": "Disable an exposed port on an instance for device access.",
"security": [
{
"BearerAuth": []
}
],
"responses": {
"204": {
"description": "No Content"
},
"400": {
"description": "Bad Request",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/UserError"
}
}
}
},
"403": {
"description": "Forbidden",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ApiError"
}
}
}
}
},
"parameters": [
{
"name": "instanceId",
"in": "path",
"description": "Instance ID - uuid",
"required": true,
"deprecated": false,
"schema": {
"type": "string"
}
}
],
"tags": [
"Instances"
],
"operationId": "v1DisableExposePort"
}
},
"/v1/instances/{instanceId}/message": {
"post": {
"deprecated": false,
"summary": "Receive a message on an iOS vm",
"security": [
{
"BearerAuth": []
}
],
"responses": {
"204": {
"description": "No Content"
},
"400": {
"description": "Bad Request",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/UserError"
}
}
}
},
"403": {
"description": "Forbidden",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ApiError"
}
}
}
}
},
"parameters": [
{
"name": "instanceId",
"in": "path",
"description": "Instance ID - uuid",
"required": true,
"deprecated": false,
"schema": {
"type": "string"
}
}
],
"tags": [
"Instances"
]
}
},
"/v2/instances/{instanceId}/quickConnectCommand": {
"get": {
"deprecated": false,
"summary": "Recommended SSH Command for Quick Connect",
"security": [
{
"BearerAuth": []
}
],
"responses": {
"200": {
"description": "Quick Connect Command",
"content": {
"application/json": {
"schema": {
"type": "string"
},
"examples": {
"example1": {
"summary": "Quick Connect Command",
"value": "ssh -J 17e41199-edb8-4c5f-912a-5e42550b0a9d@proxy.ci-2.corellium.co root@10.11.221.3"
}
}
}
}
},
"400": {
"description": "Bad Request",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/UserError"
}
}
}
},
"403": {
"description": "Forbidden",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ApiError"
}
}
}
}
},
"parameters": [
{
"name": "instanceId",
"in": "path",
"description": "Instance ID - uuid",
"required": true,
"deprecated": false,
"schema": {
"type": "string"
}
}
],
"tags": [
"Instances"
],
"operationId": "v2GetInstanceQuickConnectCommand"
}
},
"/v1/instances/{instanceId}/upgrade": {
"post": {
"deprecated": false,
"summary": "Upgrade iOS version",
"security": [
{
"BearerAuth": []
}
],
"responses": {
"202": {
"description": "Accepted"
},
"400": {
"description": "Bad Request",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/UserError"
}
}
}
},
"403": {
"description": "Forbidden",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ApiError"
}
}
}
}
},
"parameters": [
{
"name": "instanceId",
"in": "path",
"description": "",
"required": true,
"deprecated": false,
"schema": {
"type": "string"
}
}
],
"tags": [
"Instances"
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/InstanceUpgradeBody"
},
"examples": {
"example1": {
"summary": "application/json",
"value": "{\n \"os\":\"16.1\",\n \"osbuild\":\"20B79\"\n}"
}
}
}
},
"description": "",
"required": true
},
"operationId": "v1UpgradeInstance"
}
},
"/v1/instances/{instanceId}/snapshots": {
"get": {
"deprecated": false,
"summary": "Get Instance Snapshots",
"security": [
{
"BearerAuth": []
}
],
"responses": {
"200": {
"description": "application/json",
"content": {
"application/json": {
"schema": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Snapshot"
}
},
"examples": {
"example1": {
"summary": "application/json",
"value": [
{
"id": "c96b1f17-d694-45a9-af68-0a08f9c6098b",
"name": "Initial Snapshot - Thu Mar 31 2022 23:56:32 GMT+0000 (Coordinated Universal Time)",
"instance": "1008acc6-4886-41c3-9373-196114993a96",
"status": {
"task": "none",
"created": true
},
"date": 1648770996000,
"fresh": true,
"live": false,
"local": true
}
]
}
}
}
}
},
"403": {
"description": "Forbidden",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ApiError"
},
"examples": {
"example2": {
"summary": "Forbidden",
"value": {
"error": "Invalid or missing authorization token",
"errorID": "PermissionDenied",
"originalError": "Invalid or missing authorization token"
}
}
}
}
}
},
"404": {
"description": "Not Found",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/UserError"
},
"examples": {
"example3": {
"summary": "Not Found",
"value": {
"error": "Instance with instanceId=3a28e565-cf46-4706-86e7-e3af6b33ae0dd not found",
"errorID": "NotFound",
"name": "Instance",
"params": {
"instanceId": "3a28e565-cf46-4706-86e7-e3af6b33ae0dd"
}
}
}
}
}
}
}
},
"parameters": [
{
"name": "instanceId",
"in": "path",
"description": "Instance ID - uuid",
"required": true,
"deprecated": false,
"schema": {
"type": "string"
}
}
],
"tags": [
"Snapshots",
"Instances"
],
"operationId": "v1GetInstanceSnapshots"
},
"post": {
"deprecated": false,
"summary": "Create Instance Snapshot",
"security": [
{
"BearerAuth": []
}
],
"responses": {
"200": {
"description": "application/json",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Snapshot"
},
"examples": {
"example1": {
"summary": "application/json",
"value": {
"id": "16312ce2-a4b8-4a12-a60e-4f0f5b493418",
"name": "Snapshot Name",
"instance": "1008acc6-4886-41c3-9373-196114993a96",
"status": {
"task": "creating"
},
"date": 1648841621613,
"local": true
}
}
}
}
}
},
"403": {
"description": "Forbidden",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ApiError"
},
"examples": {
"example2": {
"summary": "Forbidden",
"value": {
"error": "Invalid or missing authorization token",
"errorID": "PermissionDenied",
"originalError": "Invalid or missing authorization token"
}
}
}
}
}
},
"404": {
"description": "Not Found",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/UserError"
},
"examples": {
"example3": {
"summary": "Not Found",
"value": {
"error": "Instance with instanceId=3a28e565-cf46-4706-86e7-e3af6b33ae0dd not found",
"errorID": "NotFound",
"name": "Instance",
"params": {
"instanceId": "3a28e565-cf46-4706-86e7-e3af6b33ae0dd"
}
}
}
}
}
}
}
},
"parameters": [
{
"name": "instanceId",
"in": "path",
"description": "Instance ID - uuid",
"required": true,
"deprecated": false,
"schema": {
"type": "string"
}
}
],
"tags": [
"Snapshots",
"Instances"
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/SnapshotCreationOptions"
}
}
},
"description": "",
"required": true
},
"operationId": "v1CreateSnapshot"
}
},
"/v1/instances/{instanceId}/snapshots/{snapshotId}": {
"get": {
"deprecated": false,
"summary": "Get Instance Snapshot",
"security": [
{
"BearerAuth": []
}
],
"responses": {
"200": {
"description": "application/json",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Snapshot"
},
"examples": {
"example1": {
"summary": "application/json",
"value": {
"id": "c96b1f17-d694-45a9-af68-0a08f9c6098b",
"name": "Initial Snapshot - Thu Mar 31 2022 23:56:32 GMT+0000 (Coordinated Universal Time)",
"instance": "1008acc6-4886-41c3-9373-196114993a96",
"status": {
"task": "none",
"created": true
},
"date": 1648770996000,
"fresh": true,
"live": false,
"local": true
}
}
}
}
}
},
"403": {
"description": "Forbidden",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ApiError"
},
"examples": {
"example2": {
"summary": "Forbidden",
"value": {
"error": "Invalid or missing authorization token",
"errorID": "PermissionDenied",
"originalError": "Invalid or missing authorization token"
}
}
}
}
}
},
"404": {
"description": "Not Found",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/UserError"
},
"examples": {
"example3": {
"summary": "Not Found",
"value": {
"error": "Instance with instanceId=3a28e565-cf46-4706-86e7-e3af6b33ae0dd not found",
"errorID": "NotFound",
"name": "Instance",
"params": {
"instanceId": "3a28e565-cf46-4706-86e7-e3af6b33ae0dd"
}
}
}
}
}
}
}
},
"parameters": [
{
"name": "instanceId",
"in": "path",
"description": "Instance ID - uuid",
"required": true,
"deprecated": false,
"schema": {
"type": "string"
}
},
{
"name": "snapshotId",
"in": "path",
"description": "Snapshot ID - uuid",
"required": true,
"deprecated": false,
"schema": {
"type": "string"
}
}
],
"tags": [
"Snapshots",
"Instances"
],
"operationId": "v1GetInstanceSnapshot"
},
"patch": {
"deprecated": false,
"summary": "Rename a Snapshot",
"security": [
{
"BearerAuth": []
}
],
"responses": {
"200": {
"description": "application/json",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Snapshot"
},
"examples": {
"example1": {
"summary": "application/json",
"value": {
"id": "16312ce2-a4b8-4a12-a60e-4f0f5b493418",
"name": "New Name",
"instance": "1008acc6-4886-41c3-9373-196114993a96",
"status": {
"task": "none",
"created": true
},
"date": 1648841621000,
"live": false,
"local": true
}
}
}
}
}
},
"403": {
"description": "Forbidden",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ApiError"
},
"examples": {
"example2": {
"summary": "Forbidden",
"value": {
"error": "Invalid or missing authorization token",
"errorID": "PermissionDenied",
"originalError": "Invalid or missing authorization token"
}
}
}
}
}
},
"404": {
"description": "Not Found",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/UserError"
},
"examples": {
"example3": {
"summary": "Not Found",
"value": {
"error": "Instance with instanceId=3a28e565-cf46-4706-86e7-e3af6b33ae0dd not found",
"errorID": "NotFound",
"name": "Instance",
"params": {
"instanceId": "3a28e565-cf46-4706-86e7-e3af6b33ae0dd"
}
}
}
}
}
}
}
},
"parameters": [
{
"name": "instanceId",
"in": "path",
"description": "Instance ID - uuid",
"required": true,
"deprecated": false,
"schema": {
"type": "string"
}
},
{
"name": "snapshotId",
"in": "path",
"description": "Snapshot ID - uuid",
"required": true,
"deprecated": false,
"schema": {
"type": "string"
}
}
],
"tags": [
"Snapshots",
"Instances"
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/SnapshotCreationOptions"
}
}
},
"description": "",
"required": true
},
"operationId": "v1RenameInstanceSnapshot"
},
"delete": {
"deprecated": false,
"summary": "Delete a Snapshot",
"security": [
{
"BearerAuth": []
}
],
"responses": {
"204": {
"description": "Accepted"
},
"403": {
"description": "Forbidden",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ApiError"
},
"examples": {
"example1": {
"summary": "Forbidden",
"value": {
"error": "Invalid or missing authorization token",
"errorID": "PermissionDenied",
"originalError": "Invalid or missing authorization token"
}
}
}
}
}
},
"404": {
"description": "Not Found",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/UserError"
},
"examples": {
"example2": {
"summary": "Not Found",
"value": {
"error": "Instance with instanceId=3a28e565-cf46-4706-86e7-e3af6b33ae0dd not found",
"errorID": "NotFound",
"name": "Instance",
"params": {
"instanceId": "3a28e565-cf46-4706-86e7-e3af6b33ae0dd"
}
}
}
}
}
}
}
},
"parameters": [
{
"name": "instanceId",
"in": "path",
"description": "Instance ID - uuid",
"required": true,
"deprecated": false,
"schema": {
"type": "string"
}
},
{
"name": "snapshotId",
"in": "path",
"description": "Snapshot ID - uuid",
"required": true,
"deprecated": false,
"schema": {
"type": "string"
}
}
],
"tags": [
"Snapshots",
"Instances"
],
"operationId": "v1DeleteInstanceSnapshot"
}
},
"/v1/instances/{instanceId}/snapshots/{snapshotId}/restore": {
"post": {
"deprecated": false,
"summary": "Restore a Snapshot",
"security": [
{
"BearerAuth": []
}
],
"responses": {
"204": {
"description": "Accepted"
},
"403": {
"description": "Forbidden",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ApiError"
},
"examples": {
"example1": {
"summary": "Forbidden",
"value": {
"error": "Invalid or missing authorization token",
"errorID": "PermissionDenied",
"originalError": "Invalid or missing authorization token"
}
}
}
}
}
},
"404": {
"description": "Not Found",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/UserError"
},
"examples": {
"example2": {
"summary": "Not Found",
"value": {
"error": "Instance with instanceId=3a28e565-cf46-4706-86e7-e3af6b33ae0dd not found",
"errorID": "NotFound",
"name": "Instance",
"params": {
"instanceId": "3a28e565-cf46-4706-86e7-e3af6b33ae0dd"
}
}
}
}
}
}
}
},
"parameters": [
{
"name": "instanceId",
"in": "path",
"description": "Instance ID - uuid",
"required": true,
"deprecated": false,
"schema": {
"type": "string"
}
},
{
"name": "snapshotId",
"in": "path",
"description": "Snapshot ID - uuid",
"required": true,
"deprecated": false,
"schema": {
"type": "string"
}
}
],
"tags": [
"Snapshots",
"Instances"
],
"operationId": "v1RestoreInstanceSnapshot"
}
},
"/v1/license/features": {
"get": {
"deprecated": false,
"summary": "Get all supported features for user",
"security": [
{
"BearerAuth": []
}
],
"responses": {
"200": {
"description": "application/json",
"content": {
"application/json": {
"schema": {
"type": "array",
"items": {
"type": "string"
}
},
"examples": {
"example1": {
"summary": "application/json",
"value": [
"RestoreBackup",
"Netdump",
"OsUpdate"
]
}
}
}
}
},
"403": {
"description": "Forbidden",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ApiError"
},
"examples": {
"example2": {
"summary": "Forbidden",
"value": {
"error": "Invalid or missing authorization token",
"errorID": "PermissionDenied",
"originalError": "Invalid or missing authorization token"
}
}
}
}
}
}
},
"parameters": [],
"tags": [
"Licensing"
],
"operationId": "v1GetSupportedFeatures"
}
},
"/v1/models": {
"get": {
"deprecated": false,
"summary": "Get Supported Models",
"security": [
{
"BearerAuth": []
}
],
"responses": {
"200": {
"description": "Supported device configurations",
"content": {
"application/json": {
"schema": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Model"
}
},
"examples": {
"example1": {
"summary": "Supported device configurations",
"value": [
{
"type": "iot",
"name": "rpi4b",
"flavor": "rpi4b",
"description": "Raspberry Pi 4",
"model": "rpi4b",
"peripherals": false,
"quotas": {
"cores": 4,
"cpus": 4
}
}
]
}
}
}
}
}
},
"parameters": [],
"tags": [
"Models"
],
"operationId": "v1GetModels"
}
},
"/v1/models/{model}/software": {
"get": {
"deprecated": false,
"summary": "Get Software for Model",
"security": [
{
"BearerAuth": []
}
],
"responses": {
"200": {
"description": "Supported software loads for this model",
"content": {
"application/json": {
"schema": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Firmware"
}
},
"examples": {
"example1": {
"summary": "Supported software loads",
"value": [
{
"version": "11.2.0",
"buildid": "lite",
"AndroidFlavor": null,
"APIVersion": null,
"sha256sum": null,
"sha1sum": null,
"md5sum": "43419a06ef040f07161d574a03bd7a46-89",
"size": 463812863,
"uniqueid": "Raspberry Pi OS lite",
"metadata": {},
"releasedate": "2022-04-08T16:00:45Z",
"uploaddate": null,
"url": "https://firmwares-us-east-1-avh-s3-arm-com.s3.amazonaws.com/rpi4b-11.2-lite.coreimg-88715747-93d8-4d48-b8af-94507662df9d",
"orig_url": "https://firmwares-us-east-1-avh-s3-arm-com.s3.amazonaws.com/rpi4b-11.2-lite.coreimg-88715747-93d8-4d48-b8af-94507662df9d",
"filename": "rpi4b-11.2-lite.coreimg-88715747-93d8-4d48-b8af-94507662df9d"
},
{
"version": "11.2.0",
"buildid": "desktop",
"AndroidFlavor": null,
"APIVersion": null,
"sha256sum": null,
"sha1sum": null,
"md5sum": "cab7f75cd1347c521c0173717b04c5cd-229",
"size": 1197657757,
"uniqueid": "Raspberry Pi OS Desktop",
"metadata": {},
"releasedate": "2022-04-08T16:00:45Z",
"uploaddate": null,
"url": "https://firmwares-us-east-1-avh-s3-arm-com.s3.amazonaws.com/rpi4b-11.2-desktop.coreimg-2df8a164-06bd-4342-885f-fb20d51feb76",
"orig_url": "https://firmwares-us-east-1-avh-s3-arm-com.s3.amazonaws.com/rpi4b-11.2-desktop.coreimg-2df8a164-06bd-4342-885f-fb20d51feb76",
"filename": "rpi4b-11.2-desktop.coreimg-2df8a164-06bd-4342-885f-fb20d51feb76"
}
]
}
}
}
}
}
},
"parameters": [
{
"name": "model",
"in": "path",
"description": "Model to list available software for",
"required": true,
"deprecated": false,
"schema": {
"type": "string"
}
}
],
"tags": [
"Models"
],
"operationId": "v1GetModelSoftware"
}
},
"/v1/projects": {
"get": {
"deprecated": false,
"summary": "Get Projects",
"security": [
{
"BearerAuth": []
}
],
"responses": {
"200": {
"description": "Projects",
"content": {
"application/json": {
"schema": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Project"
}
},
"examples": {
"example1": {
"summary": "All Projects",
"value": [
{
"id": "d59db33d-27bd-4b22-878d-49e4758a648e",
"name": "ProjectName",
"settings": {
"internet-access": true,
"dhcp": true
},
"quotas": {
"cores": 30,
"instances": 75,
"ram": 184320
},
"quotasUsed": {
"cores": 2,
"instances": 7,
"ram": 2048,
"gpu": 0
}
},
{
"id": "e2fdb33c-37ae-4b22-878d-49e4758a51f0",
"name": "OtherProject",
"settings": {
"internet-access": true,
"dhcp": true
},
"quotas": {
"cores": 30,
"instances": 75,
"ram": 184320
},
"quotasUsed": {
"cores": 2,
"instances": 7,
"ram": 2048,
"gpu": 0
}
}
]
},
"example2": {
"summary": "Project: Filtered by Name",
"value": [
{
"id": "d59db33d-27bd-4b22-878d-49e4758a648e",
"name": "ProjectName",
"settings": {
"internet-access": true,
"dhcp": true
},
"quotas": {
"cores": 30,
"instances": 75,
"ram": 184320
},
"quotasUsed": {
"cores": 2,
"instances": 7,
"ram": 2048,
"gpu": 0
}
}
]
},
"example3": {
"summary": "All Projects: id only",
"value": [
{
"id": "d59db33d-27bd-4b22-878d-49e4758a648e"
},
{
"id": "e2fdb33c-37ae-4b22-878d-49e4758a51f0"
}
]
}
}
}
}
},
"403": {
"description": "Forbidden",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ApiError"
},
"examples": {
"example4": {
"summary": "Forbidden",
"value": {
"error": "Invalid or missing authorization token",
"errorID": "PermissionDenied",
"originalError": "Invalid or missing authorization token"
}
}
}
}
}
},
"404": {
"description": "No Projects Found",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/UserError"
},
"examples": {
"example5": {
"summary": "No Projects Found",
"value": {}
}
}
}
}
}
},
"parameters": [
{
"name": "name",
"in": "query",
"description": "Filter by project name",
"required": false,
"deprecated": false,
"schema": {
"type": "string"
}
},
{
"name": "ids_only",
"in": "query",
"description": "Only include id of project in results",
"required": false,
"deprecated": false,
"schema": {
"type": "boolean"
}
}
],
"tags": [
"Projects"
],
"operationId": "v1GetProjects"
},
"post": {
"deprecated": false,
"summary": "Create a Project",
"security": [
{
"BearerAuth": []
}
],
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Project"
}
}
}
},
"403": {
"description": "Forbidden",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ApiError"
}
}
}
}
},
"parameters": [],
"tags": [
"Projects"
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Project"
},
"examples": {
"example1": {
"summary": "New Project",
"value": "{\n \"name\": \"New Project\",\n \"settings\": {\n \"internet-access\": true\n },\n \"quotas\": {\n \"cores\": 8,\n \"instances\": 2,\n \"ram\": 16384\n }\n}"
}
}
}
},
"description": "Project",
"required": true
},
"operationId": "v1CreateProject"
}
},
"/v1/projects/{projectId}": {
"get": {
"deprecated": false,
"summary": "Get a Project",
"security": [
{
"BearerAuth": []
}
],
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Project"
}
}
}
},
"403": {
"description": "Forbidden",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ApiError"
},
"examples": {
"example1": {
"summary": "Forbidden",
"value": {
"error": "Invalid or missing authorization token",
"errorID": "PermissionDenied",
"originalError": "Invalid or missing authorization token"
}
}
}
}
}
}
},
"parameters": [
{
"name": "projectId",
"in": "path",
"description": "Project ID - uuid",
"required": true,
"deprecated": false,
"schema": {
"type": "string"
}
}
],
"tags": [
"Projects"
],
"operationId": "v1GetProject"
},
"patch": {
"deprecated": false,
"summary": "Update a Project",
"security": [
{
"BearerAuth": []
}
],
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Project"
}
}
}
},
"403": {
"description": "Forbidden",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ApiError"
},
"examples": {
"example1": {
"summary": "Forbidden",
"value": {
"error": "Invalid or missing authorization token",
"errorID": "PermissionDenied",
"originalError": "Invalid or missing authorization token"
}
}
}
}
}
}
},
"parameters": [
{
"name": "projectId",
"in": "path",
"description": "Project ID - uuid",
"required": true,
"deprecated": false,
"schema": {
"type": "string"
}
}
],
"tags": [
"Projects"
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Project"
}
}
},
"description": "Updated Project Settings",
"required": true
},
"operationId": "v1UpdateProject"
},
"delete": {
"deprecated": false,
"summary": "Delete a Project",
"security": [
{
"BearerAuth": []
}
],
"responses": {
"204": {
"description": "OK"
},
"403": {
"description": "Forbidden",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ApiError"
},
"examples": {
"example1": {
"summary": "Forbidden",
"value": {
"error": "Invalid or missing authorization token",
"errorID": "PermissionDenied",
"originalError": "Invalid or missing authorization token"
}
}
}
}
}
}
},
"parameters": [
{
"name": "projectId",
"in": "path",
"description": "Project ID - uuid",
"required": true,
"deprecated": false,
"schema": {
"type": "string"
}
}
],
"tags": [
"Projects"
],
"operationId": "v1DeleteProject"
}
},
"/v1/projects/{projectId}/instances": {
"get": {
"deprecated": false,
"summary": "Get Instances in Project",
"security": [
{
"BearerAuth": []
}
],
"responses": {
"200": {
"description": "Success",
"content": {
"application/json": {
"schema": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Instance"
}
}
}
}
},
"403": {
"description": "Forbidden",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ApiError"
},
"examples": {
"example1": {
"summary": "Forbidden",
"value": {
"error": "Invalid or missing authorization token",
"errorID": "PermissionDenied",
"originalError": "Invalid or missing authorization token"
}
}
}
}
}
}
},
"parameters": [
{
"name": "projectId",
"in": "path",
"description": "Project ID - uuid",
"required": true,
"deprecated": false,
"schema": {
"type": "string"
}
},
{
"name": "name",
"in": "query",
"description": "Filter by project name",
"required": false,
"deprecated": false,
"schema": {
"type": "string"
}
},
{
"name": "returnAttr",
"in": "query",
"description": "Attributes to include in instance return",
"required": false,
"deprecated": false,
"explode": false,
"schema": {
"type": "array",
"items": {
"type": "string"
}
}
}
],
"tags": [
"Projects"
],
"operationId": "v1GetProjectInstances"
}
},
"/v1/projects/{projectId}/settings": {
"patch": {
"deprecated": false,
"summary": "Change Project Settings",
"security": [
{
"BearerAuth": []
}
],
"responses": {
"204": {
"description": "Success"
},
"403": {
"description": "Forbidden",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ApiError"
},
"examples": {
"example1": {
"summary": "Forbidden",
"value": {
"error": "Invalid or missing authorization token",
"errorID": "PermissionDenied",
"originalError": "Invalid or missing authorization token"
}
}
}
}
}
}
},
"parameters": [
{
"name": "projectId",
"in": "path",
"description": "Project ID - uuid",
"required": true,
"deprecated": false,
"schema": {
"type": "string"
}
}
],
"tags": [
"Projects"
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ProjectSettings"
}
}
},
"description": "New settings",
"required": true
},
"operationId": "v1UpdateProjectSettings"
}
},
"/v1/projects/{projectId}/vpnconfig/{format}": {
"get": {
"deprecated": false,
"summary": "Get Project VPN Configuration",
"security": [
{
"BearerAuth": []
}
],
"responses": {
"200": {
"description": "OpenVPN Configuration",
"content": {
"application/x-openvpn-profile": {
"schema": {
"type": "string"
}
}
}
},
"403": {
"description": "Forbidden",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ApiError"
},
"examples": {
"example1": {
"summary": "Forbidden",
"value": {
"error": "Invalid or missing authorization token",
"errorID": "PermissionDenied",
"originalError": "Invalid or missing authorization token"
}
}
}
}
}
}
},
"parameters": [
{
"name": "projectId",
"in": "path",
"description": "Project ID - uuid",
"required": true,
"deprecated": false,
"schema": {
"type": "string"
}
},
{
"name": "format",
"in": "path",
"description": "VPN Config format",
"required": true,
"deprecated": false,
"schema": {
"type": "string",
"enum": [
"ovpn"
]
}
}
],
"tags": [
"Projects"
],
"operationId": "v1GetProjectVpnConfig"
}
},
"/v1/projects/{projectId}/keys": {
"get": {
"deprecated": false,
"summary": "Get Project Authorized Keys",
"security": [
{
"BearerAuth": []
}
],
"responses": {
"200": {
"description": "Authorized Keys",
"content": {
"application/json": {
"schema": {
"type": "array",
"items": {
"$ref": "#/components/schemas/ProjectKey"
}
},
"examples": {
"example1": {
"summary": "Authorized Keys",
"value": [
{
"identifier": "28c55862-ea9e-4120-8ec9-678972ed9388",
"kind": "ssh",
"project": "50e8c4bd-11a0-4c78-bd57-20481f0272c8",
"label": "My New Key",
"key": "ssh-ed25519 <key>",
"updatedAt": "2022-05-06T01:45:25.377Z",
"createdAt": "2022-05-06T01:45:25.377Z",
"fingerprint": "<fingerprint>"
}
]
}
}
}
}
},
"403": {
"description": "Forbidden",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ApiError"
},
"examples": {
"example2": {
"summary": "Forbidden",
"value": {
"error": "Invalid or missing authorization token",
"errorID": "PermissionDenied",
"originalError": "Invalid or missing authorization token"
}
}
}
}
}
}
},
"parameters": [
{
"name": "projectId",
"in": "path",
"description": "Project ID - uuid",
"required": true,
"deprecated": false,
"schema": {
"type": "string"
}
}
],
"tags": [
"Projects"
],
"operationId": "v1GetProjectKeys"
},
"post": {
"deprecated": false,
"summary": "Add Project Authorized Key",
"security": [
{
"BearerAuth": []
}
],
"responses": {
"200": {
"description": "Authorized Key",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ProjectKey"
},
"examples": {
"example1": {
"summary": "Authorized Key",
"value": {
"identifier": "28c55862-ea9e-4120-8ec9-678972ed9388",
"kind": "ssh",
"project": "50e8c4bd-11a0-4c78-bd57-20481f0272c8",
"label": "My New Key",
"key": "ssh-ed25519 <key>",
"updatedAt": "2022-05-06T01:45:25.377Z",
"createdAt": "2022-05-06T01:45:25.377Z",
"fingerprint": "<fingerprint>"
}
}
}
}
}
},
"403": {
"description": "Forbidden",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ApiError"
},
"examples": {
"example2": {
"summary": "Forbidden",
"value": {
"error": "Invalid or missing authorization token",
"errorID": "PermissionDenied",
"originalError": "Invalid or missing authorization token"
}
}
}
}
}
}
},
"parameters": [
{
"name": "projectId",
"in": "path",
"description": "Project ID - uuid",
"required": true,
"deprecated": false,
"schema": {
"type": "string"
}
}
],
"tags": [
"Projects"
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ProjectKey"
},
"examples": {
"example1": {
"summary": "New ed25519 SSH key",
"value": "{\n \"kind\": \"ssh\",\n \"label\": \"My New Key\",\n \"key\": \"ssh-ed25519 <key>\"\n}"
}
}
}
},
"description": "Key to add",
"required": true
},
"operationId": "v1AddProjectKey"
}
},
"/v1/projects/{projectId}/keys/{keyId}": {
"delete": {
"deprecated": false,
"summary": "Delete Project Authorized Key",
"security": [
{
"BearerAuth": []
}
],
"responses": {
"204": {
"description": "Deleted"
},
"403": {
"description": "Forbidden",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ApiError"
},
"examples": {
"example1": {
"summary": "Forbidden",
"value": {
"error": "Invalid or missing authorization token",
"errorID": "PermissionDenied",
"originalError": "Invalid or missing authorization token"
}
}
}
}
}
},
"404": {
"description": "Not found",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ApiNotFoundError"
},
"examples": {
"example2": {
"summary": "Not found",
"value": {
"error": "projectKey with project=50e8c4bd-11a0-4c78-bd57-20481f0272c8, identifier=28c55862-ea9e-4120-8ec9-678972ed9388 not found",
"errorID": "NotFound",
"name": "projectKey",
"params": {
"project": "50e8c4bd-11a0-4c78-bd57-20481f0272c8",
"identifier": "28c55862-ea9e-4120-8ec9-678972ed9388"
}
}
}
}
}
}
}
},
"parameters": [
{
"name": "projectId",
"in": "path",
"description": "Project ID - uuid",
"required": true,
"deprecated": false,
"schema": {
"type": "string"
}
},
{
"name": "keyId",
"in": "path",
"description": "Key ID - uuid",
"required": true,
"deprecated": false,
"schema": {
"type": "string"
}
}
],
"tags": [
"Projects"
],
"operationId": "v1RemoveProjectKey"
}
},
"/v1/roles": {
"get": {
"deprecated": false,
"summary": "Get all roles",
"description": "This endpoint is available for Enterprise accounts only",
"security": [
{
"BearerAuth": []
}
],
"responses": {
"200": {
"description": "Roles",
"content": {
"application/json": {
"schema": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Role"
}
},
"examples": {
"example1": {
"summary": "Roles",
"value": [
{
"role": "admin",
"project": "df67838d-0ada-499c-b7a0-e55da078c76b",
"user": "bbae7b15-c212-4055-a0ee-89381d01d160"
},
{
"role": "_member_",
"project": "df67838d-0ada-499c-b7a0-e55da078c76b",
"user": "bbae7b15-c212-4055-a0ee-89381d01d160"
},
{
"role": "admin",
"project": "df67838d-0ada-499c-b7a0-e55da078c76b",
"team": "ad423e65-8744-4289-92c4-aa9770dc0153"
}
]
}
}
}
}
},
"400": {
"description": "Bad Request",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/UserError"
}
}
}
},
"403": {
"description": "Forbidden",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ApiError"
},
"examples": {
"example2": {
"summary": "Forbidden",
"value": {
"error": "Invalid or missing authorization token",
"errorID": "PermissionDenied",
"originalError": "Invalid or missing authorization token"
}
}
}
}
}
}
},
"parameters": [],
"tags": [
"Roles"
],
"operationId": "v1Roles"
}
},
"/v1/roles/projects/{projectId}/users/{userId}/roles/{roleId}": {
"put": {
"deprecated": false,
"summary": "Add user role to project",
"description": "This endpoint is available for Enterprise accounts only",
"security": [
{
"BearerAuth": []
}
],
"responses": {
"200": {
"description": "Success"
},
"400": {
"description": "Bad Request",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/UserError"
}
}
}
},
"403": {
"description": "Forbidden",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ApiError"
},
"examples": {
"example1": {
"summary": "Forbidden",
"value": {
"error": "Invalid or missing authorization token",
"errorID": "PermissionDenied",
"originalError": "Invalid or missing authorization token"
}
}
}
}
}
}
},
"parameters": [
{
"name": "projectId",
"in": "path",
"description": "Project ID - uuid",
"required": true,
"deprecated": false,
"schema": {
"type": "string"
}
},
{
"name": "userId",
"in": "path",
"description": "User ID - uuid",
"required": true,
"deprecated": false,
"schema": {
"type": "string"
}
},
{
"name": "roleId",
"in": "path",
"description": "Role ID - uuid",
"required": true,
"deprecated": false,
"schema": {
"type": "string"
}
}
],
"tags": [
"Roles"
],
"operationId": "v1AddUserRoleToProject"
},
"delete": {
"deprecated": false,
"summary": "Remove user role from project",
"description": "This endpoint is available for Enterprise accounts only",
"security": [
{
"BearerAuth": []
}
],
"responses": {
"200": {
"description": "Success"
},
"400": {
"description": "Bad Request",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/UserError"
}
}
}
},
"403": {
"description": "Forbidden",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ApiError"
},
"examples": {
"example1": {
"summary": "Forbidden",
"value": {
"error": "Invalid or missing authorization token",
"errorID": "PermissionDenied",
"originalError": "Invalid or missing authorization token"
}
}
}
}
}
}
},
"parameters": [
{
"name": "projectId",
"in": "path",
"description": "Project ID - uuid",
"required": true,
"deprecated": false,
"schema": {
"type": "string"
}
},
{
"name": "userId",
"in": "path",
"description": "User ID - uuid",
"required": true,
"deprecated": false,
"schema": {
"type": "string"
}
},
{
"name": "roleId",
"in": "path",
"description": "Role ID - uuid",
"required": true,
"deprecated": false,
"schema": {
"type": "string"
}
}
],
"tags": [
"Roles"
],
"operationId": "v1RemoveUserRoleFromProject"
}
},
"/v1/roles/projects/{projectId}/teams/{teamId}/roles/{roleId}": {
"put": {
"deprecated": false,
"summary": "Add team role to project",
"description": "This endpoint is available for Enterprise accounts only",
"security": [
{
"BearerAuth": []
}
],
"responses": {
"200": {
"description": "Success"
},
"400": {
"description": "Bad Request",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/UserError"
}
}
}
},
"403": {
"description": "Forbidden",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ApiError"
},
"examples": {
"example1": {
"summary": "Forbidden",
"value": {
"error": "Invalid or missing authorization token",
"errorID": "PermissionDenied",
"originalError": "Invalid or missing authorization token"
}
}
}
}
}
}
},
"parameters": [
{
"name": "projectId",
"in": "path",
"description": "Project ID - uuid",
"required": true,
"deprecated": false,
"schema": {
"type": "string"
}
},
{
"name": "teamId",
"in": "path",
"description": "Team ID - uuid",
"required": true,
"deprecated": false,
"schema": {
"type": "string"
}
},
{
"name": "roleId",
"in": "path",
"description": "Role ID - uuid",
"required": true,
"deprecated": false,
"schema": {
"type": "string"
}
}
],
"tags": [
"Roles"
],
"operationId": "v1AddTeamRoleToProject"
},
"delete": {
"deprecated": false,
"summary": "Remove team role from project",
"description": "This endpoint is available for Enterprise accounts only",
"security": [
{
"BearerAuth": []
}
],
"responses": {
"200": {
"description": "Success"
},
"400": {
"description": "Bad Request",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/UserError"
}
}
}
},
"403": {
"description": "Forbidden",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ApiError"
},
"examples": {
"example1": {
"summary": "Forbidden",
"value": {
"error": "Invalid or missing authorization token",
"errorID": "PermissionDenied",
"originalError": "Invalid or missing authorization token"
}
}
}
}
}
}
},
"parameters": [
{
"name": "projectId",
"in": "path",
"description": "Project ID - uuid",
"required": true,
"deprecated": false,
"schema": {
"type": "string"
}
},
{
"name": "teamId",
"in": "path",
"description": "Team ID - uuid",
"required": true,
"deprecated": false,
"schema": {
"type": "string"
}
},
{
"name": "roleId",
"in": "path",
"description": "Role ID - uuid",
"required": true,
"deprecated": false,
"schema": {
"type": "string"
}
}
],
"tags": [
"Roles"
],
"operationId": "v1RemoveTeamRoleFromProject"
}
},
"/v1/snapshots/{snapshotId}": {
"get": {
"deprecated": false,
"summary": "Get Snapshot",
"security": [
{
"BearerAuth": []
}
],
"responses": {
"200": {
"description": "application/json",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Snapshot"
},
"examples": {
"example1": {
"summary": "application/json",
"value": {
"id": "c96b1f17-d694-45a9-af68-0a08f9c6098b",
"name": "Initial Snapshot - Thu Mar 31 2022 23:56:32 GMT+0000 (Coordinated Universal Time)",
"instance": "1008acc6-4886-41c3-9373-196114993a96",
"status": {
"task": "none",
"created": true
},
"date": 1648770996000,
"fresh": true,
"live": false,
"local": true
}
}
}
}
}
},
"403": {
"description": "Forbidden",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ApiError"
},
"examples": {
"example2": {
"summary": "Forbidden",
"value": {
"error": "Invalid or missing authorization token",
"errorID": "PermissionDenied",
"originalError": "Invalid or missing authorization token"
}
}
}
}
}
},
"404": {
"description": "Not Found",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/UserError"
},
"examples": {
"example3": {
"summary": "Not Found",
"value": {
"error": "Instance with instanceId=3a28e565-cf46-4706-86e7-e3af6b33ae0dd not found",
"errorID": "NotFound",
"name": "Instance",
"params": {
"instanceId": "3a28e565-cf46-4706-86e7-e3af6b33ae0dd"
}
}
}
}
}
}
}
},
"parameters": [
{
"name": "snapshotId",
"in": "path",
"description": "Snapshot ID - uuid",
"required": true,
"deprecated": false,
"schema": {
"type": "string"
}
}
],
"tags": [
"Snapshots"
],
"operationId": "v1GetSnapshot"
},
"patch": {
"deprecated": false,
"summary": "Rename a Snapshot",
"security": [
{
"BearerAuth": []
}
],
"responses": {
"200": {
"description": "application/json",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Snapshot"
},
"examples": {
"example1": {
"summary": "application/json",
"value": {
"id": "16312ce2-a4b8-4a12-a60e-4f0f5b493418",
"name": "New Name",
"instance": "1008acc6-4886-41c3-9373-196114993a96",
"status": {
"task": "none",
"created": true
},
"date": 1648841621000,
"live": false,
"local": true
}
}
}
}
}
},
"403": {
"description": "Forbidden",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ApiError"
},
"examples": {
"example2": {
"summary": "Forbidden",
"value": {
"error": "Invalid or missing authorization token",
"errorID": "PermissionDenied",
"originalError": "Invalid or missing authorization token"
}
}
}
}
}
},
"404": {
"description": "Not Found",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/UserError"
},
"examples": {
"example3": {
"summary": "Not Found",
"value": {
"error": "Instance with instanceId=3a28e565-cf46-4706-86e7-e3af6b33ae0dd not found",
"errorID": "NotFound",
"name": "Instance",
"params": {
"instanceId": "3a28e565-cf46-4706-86e7-e3af6b33ae0dd"
}
}
}
}
}
}
}
},
"parameters": [
{
"name": "snapshotId",
"in": "path",
"description": "Snapshot ID - uuid",
"required": true,
"deprecated": false,
"schema": {
"type": "string"
}
}
],
"tags": [
"Snapshots"
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/SnapshotCreationOptions"
}
}
},
"description": "",
"required": true
},
"operationId": "v1SnapshotRename"
},
"delete": {
"deprecated": false,
"summary": "Delete a Snapshot",
"security": [
{
"BearerAuth": []
}
],
"responses": {
"204": {
"description": "Accepted"
},
"403": {
"description": "Forbidden",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ApiError"
},
"examples": {
"example1": {
"summary": "Forbidden",
"value": {
"error": "Invalid or missing authorization token",
"errorID": "PermissionDenied",
"originalError": "Invalid or missing authorization token"
}
}
}
}
}
},
"404": {
"description": "Not Found",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/UserError"
},
"examples": {
"example2": {
"summary": "Not Found",
"value": {
"error": "Instance with instanceId=3a28e565-cf46-4706-86e7-e3af6b33ae0dd not found",
"errorID": "NotFound",
"name": "Instance",
"params": {
"instanceId": "3a28e565-cf46-4706-86e7-e3af6b33ae0dd"
}
}
}
}
}
}
}
},
"parameters": [
{
"name": "snapshotId",
"in": "path",
"description": "Snapshot ID - uuid",
"required": true,
"deprecated": false,
"schema": {
"type": "string"
}
}
],
"tags": [
"Snapshots"
],
"operationId": "v1DeleteSnapshot"
}
},
"/v1/teams": {
"get": {
"deprecated": false,
"summary": "Get teams",
"description": "This endpoint is available for Enterprise accounts only",
"security": [
{
"BearerAuth": []
}
],
"responses": {
"200": {
"description": "Teams",
"content": {
"application/json": {
"schema": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Team"
}
},
"examples": {
"example1": {
"summary": "Teams",
"value": [
{
"id": "all-users",
"label": "All Users",
"users": [
{
"id": "83d6b5f9-ca8b-45a5-b73a-b4f9d2a8f30f",
"label": "User",
"name": "user@gmail.com",
"email": "user@gmail.com",
"administrator": true
},
{
"id": "bbae7b15-c212-4055-a0ee-89381d01d160",
"label": "User2",
"name": "user2@gmail.com",
"email": "user2@gmail.com",
"administrator": null
}
]
},
{
"id": "ad423e65-8744-4289-92c4-aa9770dc0153",
"label": "Team Leads",
"users": [
{
"id": "83d6b5f9-ca8b-45a5-b73a-b4f9d2a8f30f",
"label": "User",
"name": "user@gmail.com",
"email": "user@gmail.com",
"administrator": true
}
]
}
]
}
}
}
}
},
"400": {
"description": "Bad Request",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/UserError"
}
}
}
},
"403": {
"description": "Forbidden",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ApiError"
},
"examples": {
"example2": {
"summary": "Forbidden",
"value": {
"error": "Invalid or missing authorization token",
"errorID": "PermissionDenied",
"originalError": "Invalid or missing authorization token"
}
}
}
}
}
}
},
"parameters": [],
"tags": [
"Teams"
],
"operationId": "v1Teams"
},
"post": {
"deprecated": false,
"summary": "Create team",
"description": "This endpoint is available for Enterprise accounts only",
"security": [
{
"BearerAuth": []
}
],
"responses": {
"200": {
"description": "User",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/TeamCreate"
}
}
}
},
"403": {
"description": "Forbidden",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ApiError"
},
"examples": {
"example1": {
"summary": "Forbidden",
"value": {
"error": "Invalid or missing authorization token",
"errorID": "PermissionDenied",
"originalError": "Invalid or missing authorization token"
}
}
}
}
}
}
},
"parameters": [],
"tags": [
"Teams"
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/CreateTeam"
},
"examples": {
"example1": {
"summary": "Create Team",
"value": "{ \"name\": \"Test Team\"}"
}
}
}
},
"description": "",
"required": true
},
"operationId": "v1TeamCreate"
}
},
"/v1/teams/{teamId}": {
"patch": {
"deprecated": false,
"summary": "Update team",
"description": "This endpoint is available for Enterprise accounts only",
"security": [
{
"BearerAuth": []
}
],
"responses": {
"204": {
"description": "Success"
},
"403": {
"description": "Forbidden",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ApiError"
},
"examples": {
"example1": {
"summary": "Forbidden",
"value": {
"error": "Invalid or missing authorization token",
"errorID": "PermissionDenied",
"originalError": "Invalid or missing authorization token"
}
}
}
}
}
},
"404": {
"description": "Not Found",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ApiNotFoundError"
}
}
}
}
},
"parameters": [
{
"name": "teamId",
"in": "path",
"description": "Team ID - uuid",
"required": true,
"deprecated": false,
"schema": {
"type": "string"
}
}
],
"tags": [
"Teams"
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/CreateTeam"
},
"examples": {
"example1": {
"summary": "Create Team",
"value": "{ \"name\": \"Test Team\"}"
}
}
}
},
"description": "",
"required": true
},
"operationId": "v1TeamChange"
},
"delete": {
"deprecated": false,
"summary": "Delete team",
"description": "This endpoint is available for Enterprise accounts only",
"security": [
{
"BearerAuth": []
}
],
"responses": {
"204": {
"description": "Success"
},
"403": {
"description": "Forbidden",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ApiError"
},
"examples": {
"example1": {
"summary": "Forbidden",
"value": {
"error": "Invalid or missing authorization token",
"errorID": "PermissionDenied",
"originalError": "Invalid or missing authorization token"
}
}
}
}
}
},
"500": {
"description": "Internal Server Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ApiInternalConsistencyError"
}
}
}
}
},
"parameters": [
{
"name": "teamId",
"in": "path",
"description": "Team ID - uuid",
"required": true,
"deprecated": false,
"schema": {
"type": "string"
}
}
],
"tags": [
"Teams"
],
"operationId": "v1TeamDelete"
}
},
"/v1/teams/{teamId}/users/{userId}": {
"put": {
"deprecated": false,
"summary": "Add user to team",
"description": "This endpoint is available for Enterprise accounts only",
"security": [
{
"BearerAuth": []
}
],
"responses": {
"204": {
"description": "Success"
},
"403": {
"description": "Forbidden",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ApiError"
},
"examples": {
"example1": {
"summary": "Forbidden",
"value": {
"error": "Invalid or missing authorization token",
"errorID": "PermissionDenied",
"originalError": "Invalid or missing authorization token"
}
}
}
}
}
},
"500": {
"description": "Internal Server Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ApiInternalConsistencyError"
}
}
}
}
},
"parameters": [
{
"name": "teamId",
"in": "path",
"description": "Team ID - uuid",
"required": true,
"deprecated": false,
"schema": {
"type": "string"
}
},
{
"name": "userId",
"in": "path",
"description": "User ID - uuid",
"required": true,
"deprecated": false,
"schema": {
"type": "string"
}
}
],
"tags": [
"Teams"
],
"operationId": "v1AddUserToTeam"
},
"delete": {
"deprecated": false,
"summary": "Remove user from team",
"description": "This endpoint is available for Enterprise accounts only",
"security": [
{
"BearerAuth": []
}
],
"responses": {
"204": {
"description": "Success"
},
"403": {
"description": "Forbidden",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ApiError"
},
"examples": {
"example1": {
"summary": "Forbidden",
"value": {
"error": "Invalid or missing authorization token",
"errorID": "PermissionDenied",
"originalError": "Invalid or missing authorization token"
}
}
}
}
}
},
"500": {
"description": "Internal Server Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ApiInternalConsistencyError"
}
}
}
}
},
"parameters": [
{
"name": "teamId",
"in": "path",
"description": "Team ID - uuid",
"required": true,
"deprecated": false,
"schema": {
"type": "string"
}
},
{
"name": "userId",
"in": "path",
"description": "User ID - uuid",
"required": true,
"deprecated": false,
"schema": {
"type": "string"
}
}
],
"tags": [
"Teams"
],
"operationId": "v1RemoveUserFromTeam"
}
},
"/v1/users": {
"post": {
"deprecated": false,
"summary": "Create User",
"security": [
{
"BearerAuth": []
}
],
"responses": {
"200": {
"description": "User",
"content": {
"application/json": {
"schema": {
"type": "object"
}
}
}
},
"403": {
"description": "Forbidden",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ApiError"
},
"examples": {
"example1": {
"summary": "Forbidden",
"value": {
"error": "Invalid username or password.",
"errorID": "InvalidUsernameorPassword",
"originalError": "Access denied"
}
}
}
}
}
}
},
"parameters": [],
"tags": [
"Users"
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"type": "object"
}
}
},
"description": "User data",
"required": true
},
"operationId": "v1CreateUser"
}
},
"/v1/users/agree": {
"post": {
"deprecated": false,
"summary": "Consent to the current terms and conditions",
"security": [
{
"BearerAuth": []
}
],
"responses": {
"200": {
"description": "application/json",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/AgreedAck"
}
}
}
},
"403": {
"description": "Forbidden",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ApiError"
}
}
}
}
},
"parameters": [],
"tags": [
"Users"
],
"operationId": "v1UserAgreeTerms"
}
},
"/v1/users/{userId}": {
"patch": {
"deprecated": false,
"summary": "Update User",
"security": [
{
"BearerAuth": []
}
],
"responses": {
"200": {
"description": "User",
"content": {
"application/json": {
"schema": {
"type": "object"
}
}
}
},
"403": {
"description": "Forbidden",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ApiError"
},
"examples": {
"example1": {
"summary": "Forbidden",
"value": {
"error": "Invalid username or password.",
"errorID": "InvalidUsernameorPassword",
"originalError": "Access denied"
}
}
}
}
}
}
},
"parameters": [
{
"name": "userId",
"in": "path",
"description": "userId - uuid",
"required": true,
"deprecated": false,
"schema": {
"type": "string"
}
}
],
"tags": [
"Users"
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"type": "object"
}
}
},
"description": "User data",
"required": true
},
"operationId": "v1UpdateUser"
},
"delete": {
"deprecated": false,
"summary": "Delete User",
"security": [
{
"BearerAuth": []
}
],
"responses": {
"200": {
"description": "User",
"content": {
"application/json": {
"schema": {
"type": "object"
}
}
}
},
"403": {
"description": "Forbidden",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ApiError"
},
"examples": {
"example1": {
"summary": "Forbidden",
"value": {
"error": "Invalid username or password.",
"errorID": "InvalidUsernameorPassword",
"originalError": "Access denied"
}
}
}
}
}
}
},
"parameters": [
{
"name": "userId",
"in": "path",
"description": "userId - uuid",
"required": true,
"deprecated": false,
"schema": {
"type": "string"
}
}
],
"tags": [
"Users"
],
"operationId": "v1DeleteUser"
}
},
"/v1/users/login": {
"post": {
"deprecated": false,
"summary": "Log In",
"security": [],
"responses": {
"200": {
"description": "User Authorization",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Token"
},
"examples": {
"example1": {
"summary": "Success",
"value": {
"token": "eyJhbGciOiJSUzM4NCIsInR5cCI6IkpXVCJ9.eyJ1c2VyIjoiZjU0MmY3NTktNGQ3OC00MTE5LWE4MWQtNDVmM2YxNTdhYmZkIiwiZG9tYWluIjoiNjQzMjM3ZWYtMzQ3My00ZTc3LTg3NTEtMWI1YTY4ZWU4ZTY5Iiwibm9JT1MiOmZhbHNlLCJhZG1pbmlzdHJhdG9yIjp0cnVlLCJwcm9qZWN0LWFkbWluaXN0cmF0b3IiOnRydWUsInRvdHAiOm51bGwsImVwb2NoIjpudWxsLCJpYXQiOjE2NDc3MTk0MTAsImV4cCI6MTY0Nzc0MTAxMH0.f9qD88Zaj-ux6Sc2NTGMDp0Q0WQlLQtDwOJsaajvaG_B0B8DABNU3lyCqU1eYmHOUH7cdTIfxg6PommhVh6TeIr7NNW8r1da4YYVg8Dltpv5WjIHTrHTPK-hpfvvArnhY6IszEy9o4fd4YYIYxEn4wxqNJoFG9ZygX3iN4aL5pU0ZtPyjj6Rhb8wTXikwIlqf2-mE1hwUlJt6b_HEf9B5gle_zMeLsDssDQ34SrBgIzD8Hqqnb2pfu9w7VCc2xGyBfa5hy1eIdwgc_A9S44G4jzf7OKAkm1BP239dMlIfv6YUrDOVSqip1j2UleTRRRT2dQiPdeKAzOltPhMQ_qB9o6plXUvQh4GKyavDWiM1Kvcj-HN6NdvPDG24CyZIqV3Hr_KgC5laCG6xaJY6G4whVyY-tFfWuG5Kw8oX_Ao5BXBl6MbrDTLgDauNoua_zVeeWOiAA1tT6lcno3ppHcb-9ikozVhLX5z7jegmzuVYyYBwqlpI_m0A-bQE_MAoMpt5GNRwz0tkQqHL4-lIL9M5vy04BrkNsxLlY0lrfGj9VFIIv8ojxMUERfGP5FnS3CsEqTgZogOjk96EMEeHCUv1JciOSOcnVFB5NqM84ueeViNkRpDasD0lJY0arJMG4DegORmWT6pLrK76M-M-Eoize343uSPgIGikbhfVTS9njQ",
"expiration": "2022-03-20T01:50:10.000Z"
}
}
}
}
}
},
"403": {
"description": "Forbidden",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ApiError"
},
"examples": {
"example2": {
"summary": "Forbidden",
"value": {
"error": "Invalid username or password.",
"errorID": "InvalidUsernameorPassword",
"originalError": "Access denied"
}
}
}
}
}
}
},
"parameters": [],
"tags": [
"Users"
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Credentials"
},
"examples": {
"example1": {
"summary": "Authorization data",
"value": "{\n \"username\": \"admin\",\n \"password\": \"password\"\n}"
}
}
}
},
"description": "Authorization data",
"required": true
},
"operationId": "v1UsersLogin"
}
},
"/v1/users/change-password": {
"post": {
"deprecated": false,
"summary": "Change User Password",
"description": "Authenticated solely by the old-password.",
"security": [],
"responses": {
"204": {
"description": "Accepted"
},
"403": {
"description": "Forbidden",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ApiError"
},
"examples": {
"example1": {
"summary": "Forbidden",
"value": {
"error": "Invalid username or password.",
"errorID": "InvalidUsernameorPassword",
"originalError": "Access denied"
}
}
}
}
}
}
},
"parameters": [],
"tags": [
"Users"
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/PasswordChangeBody"
},
"examples": {
"example1": {
"summary": "Password Change",
"value": "{\n \"user\": \"<userId>\",\n \"old-password\": \"Password1\",\n \"new-password\": \"Password2\"\n}"
}
}
}
},
"description": "",
"required": true
}
}
},
"/v1/users/reset-password": {
"post": {
"deprecated": false,
"summary": "Reset User Password",
"security": [],
"responses": {
"204": {
"description": "Accepted"
},
"403": {
"description": "Forbidden",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ApiError"
},
"examples": {
"example1": {
"summary": "Forbidden",
"value": {
"error": "Invalid username or password.",
"errorID": "InvalidUsernameorPassword",
"originalError": "Access denied"
}
}
}
}
}
}
},
"parameters": [],
"tags": [
"Users"
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/PasswordResetBody"
},
"examples": {
"example1": {
"summary": "Password Reset",
"value": "{\n \"token\": \"<token>\",\n \"totpToken\": \"<totpToken>\",\n \"new-password\": \"password\"\n}"
}
}
}
},
"description": "application/json",
"required": true
},
"operationId": "v1ResetUserPassword"
}
},
"/v1/users/send-reset-link": {
"post": {
"deprecated": false,
"summary": "Send Password Reset Link",
"security": [],
"responses": {
"204": {
"description": "Accepted"
},
"403": {
"description": "Forbidden",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ApiError"
},
"examples": {
"example1": {
"summary": "Forbidden",
"value": {
"error": "Invalid username or password.",
"errorID": "InvalidUsernameorPassword",
"originalError": "Access denied"
}
}
}
}
}
}
},
"parameters": [],
"tags": [
"Users"
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ResetLinkBody"
}
}
},
"description": "application/json",
"required": true
},
"operationId": "v1SendUserResetLink"
}
},
"/v1/users/reset-link-info": {
"get": {
"deprecated": false,
"summary": "Send Password Reset Link Info",
"security": [],
"responses": {
"200": {
"description": "Reset Link Info",
"content": {
"application/json": {
"schema": {
"type": "object"
}
}
}
},
"403": {
"description": "Forbidden",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ApiError"
},
"examples": {
"example1": {
"summary": "Forbidden",
"value": {
"error": "Invalid username or password.",
"errorID": "InvalidUsernameorPassword",
"originalError": "Access denied"
}
}
}
}
}
}
},
"parameters": [
{
"name": "token",
"in": "query",
"description": "Reset token",
"required": true,
"deprecated": false,
"schema": {
"type": "string"
}
}
],
"tags": [
"Users"
],
"operationId": "v1GetResetLinkInfo"
}
}
},
"tags": [
{
"name": "Agent",
"description": ""
},
{
"name": "Authentication",
"description": ""
},
{
"name": "Config",
"description": ""
},
{
"name": "CoreTrace",
"description": ""
},
{
"name": "Deployments",
"description": ""
},
{
"name": "Domain",
"description": ""
},
{
"name": "DomainAuthProvider",
"description": ""
},
{
"name": "Extensions",
"description": ""
},
{
"name": "Flavors",
"description": ""
},
{
"name": "HyperTrace",
"description": ""
},
{
"name": "Hypervisor Hooks",
"description": ""
},
{
"name": "Images",
"description": ""
},
{
"name": "Instances",
"description": ""
},
{
"name": "Invites",
"description": ""
},
{
"name": "Licensing",
"description": ""
},
{
"name": "Models",
"description": ""
},
{
"name": "Netdump",
"description": ""
},
{
"name": "Projects",
"description": ""
},
{
"name": "Roles",
"description": ""
},
{
"name": "Services",
"description": ""
},
{
"name": "Snapshots",
"description": ""
},
{
"name": "Status",
"description": ""
},
{
"name": "TOTP",
"description": ""
},
{
"name": "Teams",
"description": ""
},
{
"name": "TrialRequests",
"description": ""
},
{
"name": "Users",
"description": ""
},
{
"name": "VPN",
"description": ""
},
{
"name": "WebPlayer",
"description": ""
},
{
"name": "hidden",
"description": ""
},
{
"name": "internal",
"description": ""
},
{
"name": "noArm",
"description": ""
}
]
}
FROM python:3.12-alpine
RUN apk update
RUN apk add git gcc musl-dev python3-dev
COPY requirements.txt /app/requirements.txt
COPY google_main.py /app/google_main.py
WORKDIR /app
RUN pip install -r requirements.txt
CMD ["python", "google_main.py"]
#!/usr/bin/env python3.11
# -*- coding: utf-8 -*-
# Author: David Manouchehri
import os
import corellium_api
import asyncio
import openai
import boto3
from botocore.client import Config as BotoConfig
from datetime import datetime, timezone
import hashlib
import base64
import json_repair
import json
from time import sleep
import logging
import random
logger = logging.getLogger(__name__)
logger.setLevel(logging.DEBUG)
c_handler = logging.StreamHandler()
logger.addHandler(c_handler)
CORELLIUM_API_TOKEN = os.getenv("CORELLIUM_API_TOKEN")
CORELLIUM_API_HOST = os.getenv("CORELLIUM_API_HOST") or "https://app.corellium.com/api"
INSTANCE_ID = "7da8cc6d-00fa-44ce-a4cb-e9311a1f852a"
APP_BUNDLE_ID = "net.he.NetworkUtility"
OPENAI_API_KEY = os.getenv("OPENAI_API_KEY")
OPENAI_API_BASE = os.getenv("OPENAI_API_BASE") or "https://api.openai.com/v1"
client = openai.OpenAI(
api_key=OPENAI_API_KEY,
base_url=OPENAI_API_BASE,
)
SLEEP_TIME_SECONDS = 0.9
AWS_BUCKET_NAME = os.getenv("AWS_BUCKET_NAME")
s3_client = boto3.client(
"s3",
config=BotoConfig(s3={"addressing_style": "virtual"}, signature_version="s3v4"),
)
def generate_random_key_presses(length: int = 9) -> list[str]:
keys = ["up", "down", "left", "right", "space", "back", "forward"]
return [random.choice(keys) for _ in range(length)]
def map_key_to_corellium_input(key: str) -> list[str]:
if key == "back":
return ["shift", "tab"]
elif key == "forward":
return ["tab"]
return [key]
async def press_keys(
api_instance: corellium_api.CorelliumApi,
inputs: list[str],
take_screen_shot: bool = False,
):
# make sure the device is unlocked
unlock_res = await api_instance.v1_agent_system_unlock(INSTANCE_ID)
logger.debug(unlock_res)
# kill the app
kill_res = await api_instance.v1_agent_kill_app(INSTANCE_ID, APP_BUNDLE_ID)
logger.debug(kill_res)
# launch the app
launch_res = await api_instance.v1_agent_run_app(INSTANCE_ID, APP_BUNDLE_ID)
logger.debug(launch_res)
sleep(SLEEP_TIME_SECONDS)
upload_futures = []
if take_screen_shot:
logger.debug("Waiting for initial screenshot...")
screenshot_file_path = await api_instance.v1_get_instance_screenshot(
INSTANCE_ID, "png"
)
# Ensure the upload_to_s3 function is scheduled to run
upload_future = asyncio.ensure_future(upload_to_s3(screenshot_file_path))
upload_futures.append(upload_future)
logger.debug("Beginning to send inputs...")
for input in inputs:
instance_input = [
{
"buttons": map_key_to_corellium_input(input),
}
]
logger.debug(f"Sending input: {instance_input}")
api_response = await api_instance.v1_post_instance_input(
INSTANCE_ID, instance_input
)
sleep(SLEEP_TIME_SECONDS)
if take_screen_shot:
logger.debug("Waiting for screenshot...")
screenshot_file_path = await api_instance.v1_get_instance_screenshot(
INSTANCE_ID, "png"
)
# Ensure the upload_to_s3 function is scheduled to run
upload_future = asyncio.ensure_future(upload_to_s3(screenshot_file_path))
upload_futures.append(upload_future)
logger.debug("Done sending inputs, now waiting for uploads to finish...")
screenshot_urls = await asyncio.gather(*upload_futures)
return screenshot_urls
async def upload_to_s3(screenshot_file_path: str) -> str:
logger.debug(f"Uploading {screenshot_file_path} to S3")
with open(screenshot_file_path, "rb") as f:
file_source = f.read()
md5_hash_obj = hashlib.md5(file_source)
md5_hash_hex = md5_hash_obj.hexdigest()
md5_hash_bytes = md5_hash_obj.digest()
content_md5 = base64.b64encode(md5_hash_bytes).decode("ascii")
filename = f"screenshots/{md5_hash_hex}.png"
put_res = s3_client.put_object(
Bucket=AWS_BUCKET_NAME,
Key=filename,
Body=file_source,
ContentType="image/png",
ContentLanguage="en",
CacheControl="public, immutable, max-age=31536000, s-maxage=31536000",
Metadata={"INSTANCE_ID": INSTANCE_ID},
ContentMD5=content_md5,
Expires=datetime(9999, 12, 31, 23, 59, 59, tzinfo=timezone.utc),
ContentDisposition=f'inline; filename="corellium_screenshot_{INSTANCE_ID}_{md5_hash_hex}.png"',
)
version_id = put_res["VersionId"]
presigned_url = s3_client.generate_presigned_url(
"get_object",
Params={
"Bucket": AWS_BUCKET_NAME,
"Key": filename,
"VersionId": version_id,
},
ExpiresIn=86400,
HttpMethod="GET",
)
logger.debug(f"presigned_url: {presigned_url}")
return presigned_url
def inject_urls_and_list_to_text(
prompt: str, urls: list[str], inputs: list[str]
) -> list[dict]:
result = []
numbered_inputs = [f"{i+1}. {input}" for i, input in enumerate(inputs)]
result.append(
{
"type": "text",
"text": prompt
+ "\n\nScreenshot descriptions:\n"
+ "\n".join(numbered_inputs),
}
)
for url in urls:
result.append(
{
"type": "image_url",
"image_url": {"url": url, "detail": "low"},
}
)
return result
def inputs_to_text(inputs: list[str]) -> list[str]:
return ["Initial state, no keys pressed yet."] + [
f"`{i}` was pressed" for i in inputs
]
ses_client = boto3.client(
"ses",
region_name="us-west-1",
aws_access_key_id=os.environ["AWS_ACCESS_KEY_ID_SES"],
aws_secret_access_key=os.environ["AWS_SECRET_ACCESS_KEY_SES"],
)
from datetime import timedelta
def create_email_text(screenshot_url: str):
cayman_time = datetime.now(timezone.utc) - timedelta(hours=5)
vision_prompt = f"Write an email body describing if the screenshot shows a successful response of a DNS query to `corellium.com`. The current local time for the user is {cayman_time}, and you must add a reference the approximate time in the message to make it feel more natural (like saying `good morning`)."
completion_vision = client.chat.completions.create(
model="gpt-4-vision-preview",
messages=[
{
"role": "user",
"content": [
{
"type": "text",
"text": vision_prompt,
},
{
"type": "image_url",
"image_url": {
"url": screenshot_url,
"detail": "low",
},
},
],
}
],
max_tokens=4096,
temperature=0.0,
)
logger.debug(completion_vision.model_dump_json(indent=2))
vision_content = completion_vision.choices[0].message.content
text_prompt = "You take in an email template from the user and convert it to JSON object that follows {msg: str}. If there are any placeholders, modify the template to remove them so we can send the email to the user. Your name is modabot (all lowercase) and the user we're emailing is David. Change the message to be in an informal tone like colleagues would. Instead of saying things like `the screenshot provided`, say `the screenshot below`. The screenshot was created by us, not the user. You should use paragraphs and punctuation in your response."
text_response = client.chat.completions.create(
model="gpt-3.5-turbo-1106",
response_format={"type": "json_object"},
messages=[
{
"role": "system",
"content": text_prompt,
},
{"role": "user", "content": vision_content},
],
temperature=0.0,
)
text_content = json.loads(text_response.choices[0].message.content)
msg_content = text_content["msg"]
return msg_content
from email.message import EmailMessage
from email.headerregistry import Address
def send_email(screenshot_url: str, email_body_text: str):
msg = EmailMessage()
msg["Subject"] = "Corellium App Run Result"
msg["From"] = Address(display_name="ai.moda", addr_spec="modabot@corelliumai.testing.email.ai.moda")
msg["To"] = Address(
display_name="David Manouchehri", addr_spec="david@corelliumai.testing.email.ai.moda"
)
msg.set_content(
f"""{email_body_text}
See screenshot here: {screenshot_url}
"""
)
email_body_html = email_body_text.replace("\n", "<br>")
msg.add_alternative(
f"""<html>
<head></head>
<body>
<p>{email_body_html}</p>
<img src="{screenshot_url}" />
</body>
</html>
""",
subtype="html",
)
print(msg.as_string())
response = ses_client.send_raw_email(
RawMessage={
"Data": msg.as_bytes(),
}
)
print(response)
async def main():
configuration = corellium_api.Configuration(host=CORELLIUM_API_HOST)
configuration.access_token = CORELLIUM_API_TOKEN
api_client = corellium_api.ApiClient(configuration)
api_instance = corellium_api.CorelliumApi(api_client)
keys_seq_list = ["back", "space", "forward", "down", "down", "space", "space"]
website = "corellium.com"
keys_seq_list.extend(list(website))
keys_seq_list.append("enter")
await press_keys(api_instance, keys_seq_list, False)
screenshot_file_path = await api_instance.v1_get_instance_screenshot(
INSTANCE_ID, "png"
)
screenshot_url = await upload_to_s3(screenshot_file_path)
email_body_text = create_email_text(screenshot_url)
send_email(screenshot_url, email_body_text)
await api_client.close()
if __name__ == "__main__":
asyncio.run(main())
#!/usr/bin/env python3
# https://python.langchain.com/docs/integrations/toolkits/openapi
import os
import json
from langchain.agents.agent_toolkits.openapi.spec import reduce_openapi_spec
from langchain.requests import RequestsWrapper
from langchain.chat_models import ChatOpenAI
from langchain.agents.agent_toolkits.openapi import planner
# curl "https://aidmoda.enterprise.corellium.com/api/openapi.json" | jq > corellium_openapi.json
# go to corellium_openapi and fix the spec for the server URL
with open("corellium_openapi.json") as f:
raw_corellium_api_spec = json.load(f)
corellium_api_spec = reduce_openapi_spec(raw_corellium_api_spec)
headers = {"Authorization": f"Bearer {os.getenv('CORELLIUM_API_TOKEN')}"}
requests_wrapper = RequestsWrapper(headers=headers)
OPENAI_API_KEY = os.getenv("OPENAI_API_KEY")
OPENAI_API_BASE = os.getenv("OPENAI_API_BASE") or "https://api.openai.com/v1"
chat = ChatOpenAI(
# temperature=0.0,
openai_api_key=OPENAI_API_KEY,
base_url=OPENAI_API_BASE,
model_name="gpt-4-1106-preview"
)
corellium_agent = planner.create_openapi_agent(
corellium_api_spec, requests_wrapper, chat
)
user_query = "what devices are currently running?"
result = corellium_agent.run(user_query)
print(result)
#!/usr/bin/env python3.11
# -*- coding: utf-8 -*-
# Author: David Manouchehri
import os
import corellium_api
import asyncio
import openai
import boto3
from botocore.client import Config as BotoConfig
from datetime import datetime, timezone
import hashlib
import base64
import json_repair
import json
from time import sleep
import logging
import random
logger = logging.getLogger(__name__)
logger.setLevel(logging.DEBUG)
c_handler = logging.StreamHandler()
logger.addHandler(c_handler)
CORELLIUM_API_TOKEN = os.getenv("CORELLIUM_API_TOKEN")
CORELLIUM_API_HOST = os.getenv("CORELLIUM_API_HOST") or "https://app.corellium.com/api"
INSTANCE_ID = "7da8cc6d-00fa-44ce-a4cb-e9311a1f852a"
APP_BUNDLE_ID = "net.he.NetworkUtility"
OPENAI_API_KEY = os.getenv("OPENAI_API_KEY")
OPENAI_API_BASE = os.getenv("OPENAI_API_BASE") or "https://api.openai.com/v1"
client = openai.OpenAI(
api_key=OPENAI_API_KEY,
base_url=OPENAI_API_BASE,
)
SLEEP_TIME_SECONDS = 0.9
AWS_BUCKET_NAME = os.getenv("AWS_BUCKET_NAME")
s3_client = boto3.client(
"s3",
config=BotoConfig(s3={"addressing_style": "virtual"}, signature_version="s3v4"),
)
def generate_random_key_presses(length: int = 9) -> list[str]:
keys = ["up", "down", "left", "right", "space", "back", "forward"]
return [random.choice(keys) for _ in range(length)]
def map_key_to_corellium_input(key: str) -> list[str]:
if key == "back":
return ["shift", "tab"]
elif key == "forward":
return ["tab"]
return [key]
async def press_keys(
api_instance: corellium_api.CorelliumApi,
inputs: list[str],
take_screen_shot: bool = False,
):
# make sure the device is unlocked
unlock_res = await api_instance.v1_agent_system_unlock(INSTANCE_ID)
logger.debug(unlock_res)
# kill the app
kill_res = await api_instance.v1_agent_kill_app(INSTANCE_ID, APP_BUNDLE_ID)
logger.debug(kill_res)
# launch the app
launch_res = await api_instance.v1_agent_run_app(INSTANCE_ID, APP_BUNDLE_ID)
logger.debug(launch_res)
sleep(SLEEP_TIME_SECONDS)
upload_futures = []
if take_screen_shot:
logger.debug("Waiting for initial screenshot...")
screenshot_file_path = await api_instance.v1_get_instance_screenshot(
INSTANCE_ID, "png"
)
# Ensure the upload_to_s3 function is scheduled to run
upload_future = asyncio.ensure_future(upload_to_s3(screenshot_file_path))
upload_futures.append(upload_future)
logger.debug("Beginning to send inputs...")
for input in inputs:
instance_input = [
{
"buttons": map_key_to_corellium_input(input),
}
]
logger.debug(f"Sending input: {instance_input}")
api_response = await api_instance.v1_post_instance_input(
INSTANCE_ID, instance_input
)
sleep(SLEEP_TIME_SECONDS)
if take_screen_shot:
logger.debug("Waiting for screenshot...")
screenshot_file_path = await api_instance.v1_get_instance_screenshot(
INSTANCE_ID, "png"
)
# Ensure the upload_to_s3 function is scheduled to run
upload_future = asyncio.ensure_future(upload_to_s3(screenshot_file_path))
upload_futures.append(upload_future)
logger.debug("Done sending inputs, now waiting for uploads to finish...")
screenshot_urls = await asyncio.gather(*upload_futures)
return screenshot_urls
async def upload_to_s3(screenshot_file_path: str) -> str:
logger.debug(f"Uploading {screenshot_file_path} to S3")
with open(screenshot_file_path, "rb") as f:
file_source = f.read()
md5_hash_obj = hashlib.md5(file_source)
md5_hash_hex = md5_hash_obj.hexdigest()
md5_hash_bytes = md5_hash_obj.digest()
content_md5 = base64.b64encode(md5_hash_bytes).decode("ascii")
filename = f"screenshots/{md5_hash_hex}.png"
put_res = s3_client.put_object(
Bucket=AWS_BUCKET_NAME,
Key=filename,
Body=file_source,
ContentType="image/png",
ContentLanguage="en",
CacheControl="public, immutable, max-age=31536000, s-maxage=31536000",
Metadata={"INSTANCE_ID": INSTANCE_ID},
ContentMD5=content_md5,
Expires=datetime(9999, 12, 31, 23, 59, 59, tzinfo=timezone.utc),
ContentDisposition=f'inline; filename="corellium_screenshot_{INSTANCE_ID}_{md5_hash_hex}.png"',
)
version_id = put_res["VersionId"]
presigned_url = s3_client.generate_presigned_url(
"get_object",
Params={
"Bucket": AWS_BUCKET_NAME,
"Key": filename,
"VersionId": version_id,
},
ExpiresIn=86400,
HttpMethod="GET",
)
logger.debug(f"presigned_url: {presigned_url}")
return presigned_url
def inject_urls_and_list_to_text(
prompt: str, urls: list[str], inputs: list[str]
) -> list[dict]:
result = []
numbered_inputs = [f"{i+1}. {input}" for i, input in enumerate(inputs)]
result.append(
{
"type": "text",
"text": prompt
+ "\n\nScreenshot descriptions:\n"
+ "\n".join(numbered_inputs),
}
)
for url in urls:
result.append(
{
"type": "image_url",
"image_url": {"url": url, "detail": "low"},
}
)
return result
def inputs_to_text(inputs: list[str]) -> list[str]:
return ["Initial state, no keys pressed yet."] + [
f"`{i}` was pressed" for i in inputs
]
async def main():
configuration = corellium_api.Configuration(host=CORELLIUM_API_HOST)
configuration.access_token = CORELLIUM_API_TOKEN
api_client = corellium_api.ApiClient(configuration)
api_instance = corellium_api.CorelliumApi(api_client)
test_prompt = "Which screenshots have the `Quick Start` drop down menu open? You must answer in JSON like: [1, 2, 3] for the screenshots you want to select. The first screenshot is considered index 1. If no screenshots are correct, enter an empty list."
for _ in range(100):
random_keys_list = generate_random_key_presses()
press_keys_res = await press_keys(api_instance, random_keys_list, True)
text_inputs = inputs_to_text(random_keys_list)
test_content = inject_urls_and_list_to_text(
test_prompt, press_keys_res, text_inputs
)
logger.debug(json.dumps(test_content, indent=2))
logger.debug(test_content[0]['text'])
completion_vision = client.chat.completions.create(
model="gpt-4-vision-preview",
messages=[
{
"role": "user",
"content": test_content,
}
],
max_tokens=4096,
temperature=0.0,
)
logger.debug(completion_vision.model_dump_json(indent=2))
try:
decoded_object = json_repair.loads(completion_vision.choices[0].message.content)
logger.debug("Decoded object:")
logger.debug(json.dumps(decoded_object, indent=2))
if len(decoded_object) > 0:
logger.debug("Found a valid response!")
# log the number of attempts
logger.debug(f"Attempt #{_+1}")
logger.debug(random_keys_list)
break
else:
logger.debug("No valid response")
except Exception:
logger.debug("Failed to parse")
await api_client.close()
if __name__ == "__main__":
asyncio.run(main())
corellium_api @ git+https://github.com/corellium/python-api-client@6f4363a7886cda671415864129784b1a75ca9bfd
openai==1.8.0
boto3==1.34.20
json-repair==0.5.0
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": "ses:SendRawEmail",
"Resource": "*",
"Condition": {
"StringEquals": {
"ses:FromAddress": "modabot@corelliumai.testing.email.ai.moda"
},
"ForAllValues:StringLike": {
"ses:Recipients": [
"david@corelliumai.testing.email.ai.moda"
]
}
}
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment