Socket
Book a DemoInstallSign in
Socket

@arm-avh/avh-api

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@arm-avh/avh-api

Arm Virtual Hosting API

latest
npmnpm
Version
1.0.2
Version published
Maintainers
1
Created
Source

@arm-avh/avh-api

AvhApi - JavaScript client for @arm-avh/avh-api

This documents the Arm Virtual Hosting REST API. For other examples and API clients such as python or javascript please see API Clients (python/javascript). For a guide on using this interface please see API Quickstart

This SDK is automatically generated by the OpenAPI Generator project:

  • API version: 3.15.0-15704
  • Package version: 1.0.2
  • Build package: org.openapitools.codegen.languages.JavascriptClientCodegen

Installation

For Node.js

npm

To publish the library as a npm, please follow the procedure in "Publishing npm packages".

Then install it via:

npm install @arm-avh/avh-api --save

Finally, you need to build the module:

npm run build
Local development

To use the library locally without publishing to a remote npm registry, first install the dependencies by changing into the directory containing package.json (and this README). Let's call this JAVASCRIPT_CLIENT_DIR. Then run:

npm install

Next, link it globally in npm with the following, also from JAVASCRIPT_CLIENT_DIR:

npm link

To use the link you just defined in your project, switch to the directory you want to use your @arm-avh/avh-api from, and run:

npm link /path/to/<JAVASCRIPT_CLIENT_DIR>

Finally, you need to build the module:

npm run build

git

If the library is hosted at a git repository, e.g.https://github.com/GIT_USER_ID/GIT_REPO_ID then install it via:

    npm install GIT_USER_ID/GIT_REPO_ID --save

For browser

The library also works in the browser environment via npm and browserify. After following the above steps with Node.js and installing browserify with npm install -g browserify, perform the following (assuming main.js is your entry file):

browserify main.js > bundle.js

Then include bundle.js in the HTML pages.

Webpack Configuration

Using Webpack you may encounter the following error: "Module not found: Error: Cannot resolve module", most certainly you should disable AMD loader. Add/merge the following section to your webpack config:

module: {
  rules: [
    {
      parser: {
        amd: false
      }
    }
  ]
}

Getting Started

Please follow the installation instruction and execute the following JS code:

var AvhApi = require('@arm-avh/avh-api');


var api = new AvhApi.ArmApi()
var trialEmail = "trialEmail_example"; // {String} Trial Email
api.trialStatus(trialEmail).then(function(data) {
  console.log('API called successfully. Returned data: ' + data);
}, function(error) {
  console.error(error);
});


Documentation for API Endpoints

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

ClassMethodHTTP requestDescription
AvhApi.ArmApitrialStatusGET /v1/billing/trial-status/{trialEmail}Get Trial Status
AvhApi.ArmApiv1AddProjectKeyPOST /v1/projects/{projectId}/keysAdd Project Authorized Key
AvhApi.ArmApiv1AddTeamRoleToProjectPUT /v1/roles/projects/{projectId}/teams/{teamId}/roles/{roleId}Add team role to project
AvhApi.ArmApiv1AddUserRoleToProjectPUT /v1/roles/projects/{projectId}/users/{userId}/roles/{roleId}Add user role to project
AvhApi.ArmApiv1AddUserToTeamPUT /v1/teams/{teamId}/users/{userId}Add user to team
AvhApi.ArmApiv1AuthLoginPOST /v1/auth/loginLog In
AvhApi.ArmApiv1BtracePreauthorizeGET /v1/instances/{instanceId}/btrace-authorizePre-authorize an btrace download
AvhApi.ArmApiv1ClearCoreTraceDELETE /v1/instances/{instanceId}/straceClear CoreTrace logs
AvhApi.ArmApiv1ClearHyperTraceDELETE /v1/instances/{instanceId}/btraceClear HyperTrace logs
AvhApi.ArmApiv1ClearHyperTraceHooksPOST /v1/instances/{instanceId}/hooks/clearClear Hooks on an instance
AvhApi.ArmApiv1ClearInstancePanicsDELETE /v1/instances/{instanceId}/panicsClear Panics
AvhApi.ArmApiv1CreateHookPOST /v1/instances/{instanceId}/hooksCreate hypervisor hook for Instance
AvhApi.ArmApiv1CreateImagePOST /v1/imagesCreate a new Image
AvhApi.ArmApiv1CreateInstancePOST /v1/instancesCreate Instance
AvhApi.ArmApiv1CreateProjectPOST /v1/projectsCreate a Project
AvhApi.ArmApiv1CreateSnapshotPOST /v1/instances/{instanceId}/snapshotsCreate Instance Snapshot
AvhApi.ArmApiv1CreateSubscriberInvitePOST /v1/billing/invitesCreate Subscriber Invite
AvhApi.ArmApiv1DeleteHookDELETE /v1/hooks/{hookId}Delete an existing hypervisor hook
AvhApi.ArmApiv1DeleteImageDELETE /v2/images/{imageId}Delete Image
AvhApi.ArmApiv1DeleteInstanceDELETE /v1/instances/{instanceId}Remove Instance
AvhApi.ArmApiv1DeleteInstanceSnapshotDELETE /v1/instances/{instanceId}/snapshots/{snapshotId}Delete a Snapshot
AvhApi.ArmApiv1DeleteProjectDELETE /v1/projects/{projectId}Delete a Project
AvhApi.ArmApiv1DeleteSnapshotDELETE /v1/snapshots/{snapshotId}Delete a Snapshot
AvhApi.ArmApiv1DisableExposePortPOST /v1/instances/{instanceId}/exposeport/disableDisable an exposed port on an instance for device access.
AvhApi.ArmApiv1EnableExposePortPOST /v1/instances/{instanceId}/exposeport/enableEnable an exposed port on an instance for device access.
AvhApi.ArmApiv1ExecuteHyperTraceHooksPOST /v1/instances/{instanceId}/hooks/executeExecute Hooks on an instance
AvhApi.ArmApiv1GetHookByIdGET /v1/hooks/{hookId}Get hypervisor hook by id
AvhApi.ArmApiv1GetHooksGET /v1/instances/{instanceId}/hooksGet all hypervisor hooks for Instance
AvhApi.ArmApiv1GetImageGET /v1/images/{imageId}Get Image Metadata
AvhApi.ArmApiv1GetImagesGET /v1/imagesGet all Images Metadata
AvhApi.ArmApiv1GetInstanceGET /v1/instances/{instanceId}Get Instance
AvhApi.ArmApiv1GetInstanceConsoleGET /v1/instances/{instanceId}/consoleGet console websocket URL
AvhApi.ArmApiv1GetInstanceConsoleLogGET /v1/instances/{instanceId}/consoleLogGet Console Log
AvhApi.ArmApiv1GetInstanceGpiosGET /v1/instances/{instanceId}/gpiosGet Instance GPIOs
AvhApi.ArmApiv1GetInstancePanicsGET /v1/instances/{instanceId}/panicsGet Panics
AvhApi.ArmApiv1GetInstancePeripheralsGET /v1/instances/{instanceId}/peripheralsGet Instance Peripherals
AvhApi.ArmApiv1GetInstanceQuickConnectCommandGET /v1/instances/{instanceId}/quickConnectCommandRecommended SSH Command for Quick Connect
AvhApi.ArmApiv1GetInstanceScreenshotGET /v1/instances/{instanceId}/screenshot.{format}Get Instance Screenshot
AvhApi.ArmApiv1GetInstanceSnapshotGET /v1/instances/{instanceId}/snapshots/{snapshotId}Get Instance Snapshot
AvhApi.ArmApiv1GetInstanceSnapshotsGET /v1/instances/{instanceId}/snapshotsGet Instance Snapshots
AvhApi.ArmApiv1GetInstanceStateGET /v1/instances/{instanceId}/stateGet state of Instance
AvhApi.ArmApiv1GetInstancesGET /v1/instancesGet Instances
AvhApi.ArmApiv1GetModelSoftwareGET /v1/models/{model}/softwareGet Software for Model
AvhApi.ArmApiv1GetModelsGET /v1/modelsGet Supported Models
AvhApi.ArmApiv1GetProjectGET /v1/projects/{projectId}Get a Project
AvhApi.ArmApiv1GetProjectInstancesGET /v1/projects/{projectId}/instancesGet Instances in Project
AvhApi.ArmApiv1GetProjectKeysGET /v1/projects/{projectId}/keysGet Project Authorized Keys
AvhApi.ArmApiv1GetProjectVpnConfigGET /v1/projects/{projectId}/vpnconfig/{format}Get Project VPN Configuration
AvhApi.ArmApiv1GetProjectsGET /v1/projectsGet Projects
AvhApi.ArmApiv1GetSnapshotGET /v1/snapshots/{snapshotId}Get Snapshot
AvhApi.ArmApiv1KcrangeGET /v1/instances/{instanceId}/btrace-kcrangeGet Kernel extension ranges
AvhApi.ArmApiv1ListThreadsGET /v1/instances/{instanceId}/strace/thread-listGet Running Threads (CoreTrace)
AvhApi.ArmApiv1MediaPlayPOST /v1/instances/{instanceId}/media/playStart playing media
AvhApi.ArmApiv1MediaStopPOST /v1/instances/{instanceId}/media/stopStop playing media
AvhApi.ArmApiv1PatchInstancePATCH /v1/instances/{instanceId}Update Instance
AvhApi.ArmApiv1PauseInstancePOST /v1/instances/{instanceId}/pausePause an Instance
AvhApi.ArmApiv1PostInstanceInputPOST /v1/instances/{instanceId}/inputProvide Instance Input
AvhApi.ArmApiv1ReadyGET /v1/readyAPI Status
AvhApi.ArmApiv1RebootInstancePOST /v1/instances/{instanceId}/rebootReboot an Instance
AvhApi.ArmApiv1RemoveProjectKeyDELETE /v1/projects/{projectId}/keys/{keyId}Delete Project Authorized Key
AvhApi.ArmApiv1RemoveTeamRoleFromProjectDELETE /v1/roles/projects/{projectId}/teams/{teamId}/roles/{roleId}Remove team role from project
AvhApi.ArmApiv1RemoveUserFromTeamDELETE /v1/teams/{teamId}/users/{userId}Remove user from team
AvhApi.ArmApiv1RemoveUserRoleFromProjectDELETE /v1/roles/projects/{projectId}/users/{userId}/roles/{roleId}Remove user role from project
AvhApi.ArmApiv1RenameInstanceSnapshotPATCH /v1/instances/{instanceId}/snapshots/{snapshotId}Rename a Snapshot
AvhApi.ArmApiv1RestoreInstanceSnapshotPOST /v1/instances/{instanceId}/snapshots/{snapshotId}/restoreRestore a Snapshot
AvhApi.ArmApiv1RolesGET /v1/rolesGet all roles
AvhApi.ArmApiv1SetInstanceGpiosPUT /v1/instances/{instanceId}/gpiosSet Instance GPIOs
AvhApi.ArmApiv1SetInstancePeripheralsPUT /v1/instances/{instanceId}/peripheralsSet Instance Peripherals
AvhApi.ArmApiv1SetInstanceStatePUT /v1/instances/{instanceId}/stateSet state of Instance
AvhApi.ArmApiv1SnapshotRenamePATCH /v1/snapshots/{snapshotId}Rename a Snapshot
AvhApi.ArmApiv1StartCoreTracePOST /v1/instances/{instanceId}/strace/enableStart CoreTrace on an instance
AvhApi.ArmApiv1StartHyperTracePOST /v1/instances/{instanceId}/btrace/enableStart HyperTrace on an instance
AvhApi.ArmApiv1StartInstancePOST /v1/instances/{instanceId}/startStart an Instance
AvhApi.ArmApiv1StartNetworkMonitorPOST /v1/instances/{instanceId}/sslsplit/enableStart Network Monitor on an instance.
AvhApi.ArmApiv1StopCoreTracePOST /v1/instances/{instanceId}/strace/disableStop CoreTrace on an instance.
AvhApi.ArmApiv1StopHyperTracePOST /v1/instances/{instanceId}/btrace/disableStop HyperTrace on an instance.
AvhApi.ArmApiv1StopInstancePOST /v1/instances/{instanceId}/stopStop an Instance
AvhApi.ArmApiv1StopNetworkMonitorPOST /v1/instances/{instanceId}/sslsplit/disableStop Network Monitor on an instance.
AvhApi.ArmApiv1TeamChangePATCH /v1/teams/{teamId}Update team
AvhApi.ArmApiv1TeamCreatePOST /v1/teamsCreate team
AvhApi.ArmApiv1TeamDeleteDELETE /v1/teams/{teamId}Delete team
AvhApi.ArmApiv1TeamsGET /v1/teamsGet teams
AvhApi.ArmApiv1UnpauseInstancePOST /v1/instances/{instanceId}/unpauseUnpause an Instance
AvhApi.ArmApiv1UpdateHookPUT /v1/hooks/{hookId}Update an existing hypervisor hook
AvhApi.ArmApiv1UpdateProjectPATCH /v1/projects/{projectId}Update a Project
AvhApi.ArmApiv1UpdateProjectSettingsPATCH /v1/projects/{projectId}/settingsChange Project Settings
AvhApi.ArmApiv1UploadImageDataPOST /v1/images/{imageId}Upload Image Data
AvhApi.ArmApiv1WebPlayerAllowedDomainsGET /v1/webplayer/allowedDomainsRetrieve the list of allowed domains for all Web Player sessions
AvhApi.ArmApiv1WebPlayerCreateSessionPOST /v1/webplayerCreate a new Web Player Session
AvhApi.ArmApiv1WebPlayerDestroySessionDELETE /v1/webplayer/{sessionId}Tear down a Web Player Session
AvhApi.ArmApiv1WebPlayerListSessionsGET /v1/webplayerList all Web Player sessions
AvhApi.ArmApiv1WebPlayerSessionInfoGET /v1/webplayer/{sessionId}Retrieve Web Player Session Information

Documentation for Models

Documentation for Authorization

BearerAuth

  • Type: Bearer authentication (ApiToken or JWT)

FAQs

Package last updated on 13 Dec 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts