Skip to content

Latest commit

 

History

History
624 lines (316 loc) · 14.3 KB

File metadata and controls

624 lines (316 loc) · 14.3 KB

vmware-rest-proxy

Informations

Version

0.1.0

Contact

DO!DevOps info@dodevops.io http://dodevops.io

Content negotiation

URI Schemes

  • http

Consumes

  • application/json

Produces

  • application/json

Access control

Security Schemes

BasicAuth

Type: basic

All endpoints

datastore

Method URI Name Summary
GET /datastores get datastores Retrieve a list of datastores

host

Method URI Name Summary
GET /hosts get hosts Retrieve a list of ESXi hosts

operations

Method URI Name Summary
GET /status get status Checks whether the service is running

vm

Method URI Name Summary
GET /vms get vms Retrieve a list of all vms
GET /vms/{id}/fqdn get vms ID fqdn Get fqdn of VM
GET /vms/{id}/info get vms ID info Get informational data about a VM
GET /vms/{id}/tags get vms ID tags Retrieve tags

Paths

Retrieve a list of datastores (GetDatastores)

GET /datastores

Fetches a list of registered datastores in the vCenter

Produces

  • application/json

Security Requirements

  • BasicAuth

All responses

Code Status Description Has headers Schema
200 OK OK schema
400 Bad Request Invalid request schema
401 Unauthorized Authorization is required schema

Responses

200 - OK

Status: OK

Schema

EndpointsDatastores

400 - Invalid request

Status: Bad Request

Schema
401 - Authorization is required

Status: Unauthorized

Schema

Retrieve a list of ESXi hosts (GetHosts)

GET /hosts

Fetches a list of registered ESXi hosts in the vCenter

Produces

  • application/json

Security Requirements

  • BasicAuth

All responses

Code Status Description Has headers Schema
200 OK OK schema
400 Bad Request Invalid request schema
401 Unauthorized Authorization is required schema

Responses

200 - OK

Status: OK

Schema

EndpointsHosts

400 - Invalid request

Status: Bad Request

Schema
401 - Authorization is required

Status: Unauthorized

Schema

Checks whether the service is running (GetStatus)

GET /status

Just responses with a 200 to signal that the service is running

Produces

  • application/json

All responses

Code Status Description Has headers Schema
200 OK OK schema

Responses

200 - OK

Status: OK

Schema

EndpointsStatus

Retrieve a list of all vms (GetVms)

GET /vms

Fetches a list of vms from the vCenter

Produces

  • application/json

Security Requirements

  • BasicAuth

All responses

Code Status Description Has headers Schema
200 OK OK schema
400 Bad Request Invalid request schema
401 Unauthorized Authorization is required schema

Responses

200 - OK

Status: OK

Schema

EndpointsVMS

400 - Invalid request

Status: Bad Request

Schema
401 - Authorization is required

Status: Unauthorized

Schema

Get fqdn of VM (GetVmsIDFqdn)

GET /vms/{id}/fqdn

Try to find out the fqdn of the given VM using the guest tools

Produces

  • application/json

Security Requirements

  • BasicAuth

Parameters

Name Source Type Go type Separator Required Default Description
id path string string ID of VM

All responses

Code Status Description Has headers Schema
200 OK OK schema
400 Bad Request Invalid request schema
401 Unauthorized Authorization is required schema

Responses

200 - OK

Status: OK

Schema

EndpointsFQDN

400 - Invalid request

Status: Bad Request

Schema
401 - Authorization is required

Status: Unauthorized

Schema

Get informational data about a VM (GetVmsIDInfo)

GET /vms/{id}/info

Find out some information about a VM and return them

Produces

  • application/json

Security Requirements

  • BasicAuth

Parameters

Name Source Type Go type Separator Required Default Description
id path string string ID of VM

All responses

Code Status Description Has headers Schema
200 OK OK schema
400 Bad Request Invalid request schema
401 Unauthorized Authorization is required schema

Responses

200 - OK

Status: OK

Schema

APIVMInfo

400 - Invalid request

Status: Bad Request

Schema
401 - Authorization is required

Status: Unauthorized

Schema

Retrieve tags (GetVmsIDTags)

GET /vms/{id}/tags

Retrieve tags and their categories for a vm

Produces

  • application/json

Security Requirements

  • BasicAuth

Parameters

Name Source Type Go type Separator Required Default Description
id path string string ID of VM

All responses

Code Status Description Has headers Schema
200 OK OK schema
400 Bad Request Invalid request schema
401 Unauthorized Authorization is required schema

Responses

200 - OK

Status: OK

Schema

EndpointsTags

400 - Invalid request

Status: Bad Request

Schema
401 - Authorization is required

Status: Unauthorized

Schema

Models

api.Datastore

Properties

Name Type Go type Required Default Description Example
capacity integer int64
datastore string string
free_space integer int64
name string string
type string string

api.Host

Properties

Name Type Go type Required Default Description Example
connection_state string string
host string string
name string string
power_state string string

api.VM

Properties

Name Type Go type Required Default Description Example
name string string
power_state string string
vm string string

api.VMInfo

Properties

Name Type Go type Required Default Description Example
cpu_cores integer int64
name string string
provisioned_ram integer int64
provisioned_storage integer int64
used_storage integer int64

api.VMTag

Properties

Name Type Go type Required Default Description Example
category string string Category holds the tag category
value string string Value holds the value of the tag

endpoints.Datastores

Properties

Name Type Go type Required Default Description Example
datastores EndpointsDatastoresResult EndpointsDatastoresResult

endpoints.DatastoresResult

Properties

Name Type Go type Required Default Description Example
count integer int64
datastores []APIDatastore []*APIDatastore

endpoints.FQDN

Properties

Name Type Go type Required Default Description Example
fqdn string string

endpoints.Hosts

Properties

Name Type Go type Required Default Description Example
hosts EndpointsHostsResult EndpointsHostsResult

endpoints.HostsResult

Properties

Name Type Go type Required Default Description Example
count integer int64
hosts []APIHost []*APIHost

endpoints.Status

Properties

Name Type Go type Required Default Description Example
status string string

endpoints.Tags

Properties

Name Type Go type Required Default Description Example
tags EndpointsTagsResult EndpointsTagsResult

endpoints.TagsResult

Properties

Name Type Go type Required Default Description Example
count integer int64
tags []APIVMTag []*APIVMTag

endpoints.VMS

Properties

Name Type Go type Required Default Description Example
vms EndpointsVMSResult EndpointsVMSResult

endpoints.VMSResult

Properties

Name Type Go type Required Default Description Example
count integer int64
vms []APIVM []*APIVM