Skip to content

Latest commit

 

History

History
274 lines (249 loc) · 20.6 KB

File metadata and controls

274 lines (249 loc) · 20.6 KB

C API client for arm_api

Overview

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

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

Installation

You'll need the curl 7.58.0 package in order to build the API. To have code formatted nicely, you also need to have uncrustify version 0.67 or later.

Prerequisites

Install the curl 7.58.0 package with the following command on Linux.

sudo apt remove curl
wget http://curl.haxx.se/download/curl-7.58.0.tar.gz
tar -xvf curl-7.58.0.tar.gz
cd curl-7.58.0/
./configure
make
sudo make install

Install the uncrustify 0.67 package with the following command on Linux.

git clone https://github.com/uncrustify/uncrustify.git
cd uncrustify
mkdir build
cd build
cmake ..
make
sudo make install

Compile the sample:

This will compile the generated code and create a library in the build folder which has to be linked to the codes where API will be used.

mkdir build
cd build
// To install library to specific location, use following commands
cmake -DCMAKE_INSTALL_PREFIX=/pathtolocation ..
// for normal install use following command
cmake ..
make
sudo make install

How to use compiled library

Considering the test/source code which uses the API is written in main.c(respective api include is written and all objects necessary are defined and created)

To compile main.c(considering the file is present in build folder) use following command -L - location of the library(not required if cmake with normal installation is performed) -l library name

gcc main.c -L. -larm_api -o main

Once compiled, you can run it with ./main

Note: You don't need to specify includes for models and include folder separately as they are path linked. You just have to import the api.h file in your code, the include linking will work.

Documentation for API Endpoints

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

Category Method HTTP request Description
ArmAPI ArmAPI_trialStatus GET /v1/billing/trial-status/{trialEmail} Get Trial Status
ArmAPI ArmAPI_v1AddProjectKey POST /v1/projects/{projectId}/keys Add Project Authorized Key
ArmAPI ArmAPI_v1AddTeamRoleToProject PUT /v1/roles/projects/{projectId}/teams/{teamId}/roles/{roleId} Add team role to project
ArmAPI ArmAPI_v1AddUserRoleToProject PUT /v1/roles/projects/{projectId}/users/{userId}/roles/{roleId} Add user role to project
ArmAPI ArmAPI_v1AddUserToTeam PUT /v1/teams/{teamId}/users/{userId} Add user to team
ArmAPI ArmAPI_v1AuthLogin POST /v1/auth/login Log In
ArmAPI ArmAPI_v1BtracePreauthorize GET /v1/instances/{instanceId}/btrace-authorize Pre-authorize an btrace download
ArmAPI ArmAPI_v1ClearCoreTrace DELETE /v1/instances/{instanceId}/strace Clear CoreTrace logs
ArmAPI ArmAPI_v1ClearHyperTrace DELETE /v1/instances/{instanceId}/btrace Clear HyperTrace logs
ArmAPI ArmAPI_v1ClearHyperTraceHooks POST /v1/instances/{instanceId}/hooks/clear Clear Hooks on an instance
ArmAPI ArmAPI_v1ClearInstancePanics DELETE /v1/instances/{instanceId}/panics Clear Panics
ArmAPI ArmAPI_v1CreateHook POST /v1/instances/{instanceId}/hooks Create hypervisor hook for Instance
ArmAPI ArmAPI_v1CreateImage POST /v1/images Create a new Image
ArmAPI ArmAPI_v1CreateInstance POST /v1/instances Create Instance
ArmAPI ArmAPI_v1CreateProject POST /v1/projects Create a Project
ArmAPI ArmAPI_v1CreateSnapshot POST /v1/instances/{instanceId}/snapshots Create Instance Snapshot
ArmAPI ArmAPI_v1CreateSubscriberInvite POST /v1/billing/invites Create Subscriber Invite
ArmAPI ArmAPI_v1DeleteHook DELETE /v1/hooks/{hookId} Delete an existing hypervisor hook
ArmAPI ArmAPI_v1DeleteImage DELETE /v2/images/{imageId} Delete Image
ArmAPI ArmAPI_v1DeleteInstance DELETE /v1/instances/{instanceId} Remove Instance
ArmAPI ArmAPI_v1DeleteInstanceSnapshot DELETE /v1/instances/{instanceId}/snapshots/{snapshotId} Delete a Snapshot
ArmAPI ArmAPI_v1DeleteProject DELETE /v1/projects/{projectId} Delete a Project
ArmAPI ArmAPI_v1DeleteSnapshot DELETE /v1/snapshots/{snapshotId} Delete a Snapshot
ArmAPI ArmAPI_v1DisableExposePort POST /v1/instances/{instanceId}/exposeport/disable Disable an exposed port on an instance for device access.
ArmAPI ArmAPI_v1EnableExposePort POST /v1/instances/{instanceId}/exposeport/enable Enable an exposed port on an instance for device access.
ArmAPI ArmAPI_v1ExecuteHyperTraceHooks POST /v1/instances/{instanceId}/hooks/execute Execute Hooks on an instance
ArmAPI ArmAPI_v1GetHookById GET /v1/hooks/{hookId} Get hypervisor hook by id
ArmAPI ArmAPI_v1GetHooks GET /v1/instances/{instanceId}/hooks Get all hypervisor hooks for Instance
ArmAPI ArmAPI_v1GetImage GET /v1/images/{imageId} Get Image Metadata
ArmAPI ArmAPI_v1GetImages GET /v1/images Get all Images Metadata
ArmAPI ArmAPI_v1GetInstance GET /v1/instances/{instanceId} Get Instance
ArmAPI ArmAPI_v1GetInstanceConsole GET /v1/instances/{instanceId}/console Get console websocket URL
ArmAPI ArmAPI_v1GetInstanceConsoleLog GET /v1/instances/{instanceId}/consoleLog Get Console Log
ArmAPI ArmAPI_v1GetInstanceGpios GET /v1/instances/{instanceId}/gpios Get Instance GPIOs
ArmAPI ArmAPI_v1GetInstancePanics GET /v1/instances/{instanceId}/panics Get Panics
ArmAPI ArmAPI_v1GetInstancePeripherals GET /v1/instances/{instanceId}/peripherals Get Instance Peripherals
ArmAPI ArmAPI_v1GetInstanceQuickConnectCommand GET /v1/instances/{instanceId}/quickConnectCommand Recommended SSH Command for Quick Connect
ArmAPI ArmAPI_v1GetInstanceScreenshot GET /v1/instances/{instanceId}/screenshot.{format} Get Instance Screenshot
ArmAPI ArmAPI_v1GetInstanceSnapshot GET /v1/instances/{instanceId}/snapshots/{snapshotId} Get Instance Snapshot
ArmAPI ArmAPI_v1GetInstanceSnapshots GET /v1/instances/{instanceId}/snapshots Get Instance Snapshots
ArmAPI ArmAPI_v1GetInstanceState GET /v1/instances/{instanceId}/state Get state of Instance
ArmAPI ArmAPI_v1GetInstances GET /v1/instances Get Instances
ArmAPI ArmAPI_v1GetModelSoftware GET /v1/models/{model}/software Get Software for Model
ArmAPI ArmAPI_v1GetModels GET /v1/models Get Supported Models
ArmAPI ArmAPI_v1GetProject GET /v1/projects/{projectId} Get a Project
ArmAPI ArmAPI_v1GetProjectInstances GET /v1/projects/{projectId}/instances Get Instances in Project
ArmAPI ArmAPI_v1GetProjectKeys GET /v1/projects/{projectId}/keys Get Project Authorized Keys
ArmAPI ArmAPI_v1GetProjectVpnConfig GET /v1/projects/{projectId}/vpnconfig/{format} Get Project VPN Configuration
ArmAPI ArmAPI_v1GetProjects GET /v1/projects Get Projects
ArmAPI ArmAPI_v1GetSnapshot GET /v1/snapshots/{snapshotId} Get Snapshot
ArmAPI ArmAPI_v1Kcrange GET /v1/instances/{instanceId}/btrace-kcrange Get Kernel extension ranges
ArmAPI ArmAPI_v1ListThreads GET /v1/instances/{instanceId}/strace/thread-list Get Running Threads (CoreTrace)
ArmAPI ArmAPI_v1MediaPlay POST /v1/instances/{instanceId}/media/play Start playing media
ArmAPI ArmAPI_v1MediaStop POST /v1/instances/{instanceId}/media/stop Stop playing media
ArmAPI ArmAPI_v1PatchInstance PATCH /v1/instances/{instanceId} Update Instance
ArmAPI ArmAPI_v1PauseInstance POST /v1/instances/{instanceId}/pause Pause an Instance
ArmAPI ArmAPI_v1PostInstanceInput POST /v1/instances/{instanceId}/input Provide Instance Input
ArmAPI ArmAPI_v1Ready GET /v1/ready API Status
ArmAPI ArmAPI_v1RebootInstance POST /v1/instances/{instanceId}/reboot Reboot an Instance
ArmAPI ArmAPI_v1RemoveProjectKey DELETE /v1/projects/{projectId}/keys/{keyId} Delete Project Authorized Key
ArmAPI ArmAPI_v1RemoveTeamRoleFromProject DELETE /v1/roles/projects/{projectId}/teams/{teamId}/roles/{roleId} Remove team role from project
ArmAPI ArmAPI_v1RemoveUserFromTeam DELETE /v1/teams/{teamId}/users/{userId} Remove user from team
ArmAPI ArmAPI_v1RemoveUserRoleFromProject DELETE /v1/roles/projects/{projectId}/users/{userId}/roles/{roleId} Remove user role from project
ArmAPI ArmAPI_v1RenameInstanceSnapshot PATCH /v1/instances/{instanceId}/snapshots/{snapshotId} Rename a Snapshot
ArmAPI ArmAPI_v1RestoreInstanceSnapshot POST /v1/instances/{instanceId}/snapshots/{snapshotId}/restore Restore a Snapshot
ArmAPI ArmAPI_v1Roles GET /v1/roles Get all roles
ArmAPI ArmAPI_v1SetInstanceGpios PUT /v1/instances/{instanceId}/gpios Set Instance GPIOs
ArmAPI ArmAPI_v1SetInstancePeripherals PUT /v1/instances/{instanceId}/peripherals Set Instance Peripherals
ArmAPI ArmAPI_v1SetInstanceState PUT /v1/instances/{instanceId}/state Set state of Instance
ArmAPI ArmAPI_v1SnapshotRename PATCH /v1/snapshots/{snapshotId} Rename a Snapshot
ArmAPI ArmAPI_v1StartCoreTrace POST /v1/instances/{instanceId}/strace/enable Start CoreTrace on an instance
ArmAPI ArmAPI_v1StartHyperTrace POST /v1/instances/{instanceId}/btrace/enable Start HyperTrace on an instance
ArmAPI ArmAPI_v1StartInstance POST /v1/instances/{instanceId}/start Start an Instance
ArmAPI ArmAPI_v1StartNetworkMonitor POST /v1/instances/{instanceId}/sslsplit/enable Start Network Monitor on an instance.
ArmAPI ArmAPI_v1StopCoreTrace POST /v1/instances/{instanceId}/strace/disable Stop CoreTrace on an instance.
ArmAPI ArmAPI_v1StopHyperTrace POST /v1/instances/{instanceId}/btrace/disable Stop HyperTrace on an instance.
ArmAPI ArmAPI_v1StopInstance POST /v1/instances/{instanceId}/stop Stop an Instance
ArmAPI ArmAPI_v1StopNetworkMonitor POST /v1/instances/{instanceId}/sslsplit/disable Stop Network Monitor on an instance.
ArmAPI ArmAPI_v1TeamChange PATCH /v1/teams/{teamId} Update team
ArmAPI ArmAPI_v1TeamCreate POST /v1/teams Create team
ArmAPI ArmAPI_v1TeamDelete DELETE /v1/teams/{teamId} Delete team
ArmAPI ArmAPI_v1Teams GET /v1/teams Get teams
ArmAPI ArmAPI_v1UnpauseInstance POST /v1/instances/{instanceId}/unpause Unpause an Instance
ArmAPI ArmAPI_v1UpdateHook PUT /v1/hooks/{hookId} Update an existing hypervisor hook
ArmAPI ArmAPI_v1UpdateProject PATCH /v1/projects/{projectId} Update a Project
ArmAPI ArmAPI_v1UpdateProjectSettings PATCH /v1/projects/{projectId}/settings Change Project Settings
ArmAPI ArmAPI_v1UploadImageData POST /v1/images/{imageId} Upload Image Data
ArmAPI ArmAPI_v1WebPlayerAllowedDomains GET /v1/webplayer/allowedDomains Retrieve the list of allowed domains for all Web Player sessions
ArmAPI ArmAPI_v1WebPlayerCreateSession POST /v1/webplayer Create a new Web Player Session
ArmAPI ArmAPI_v1WebPlayerDestroySession DELETE /v1/webplayer/{sessionId} Tear down a Web Player Session
ArmAPI ArmAPI_v1WebPlayerListSessions GET /v1/webplayer List all Web Player sessions
ArmAPI ArmAPI_v1WebPlayerSessionInfo GET /v1/webplayer/{sessionId} Retrieve Web Player Session Information

Documentation for Models

Documentation for Authorization

BearerAuth

  • Type: HTTP basic authentication

Author