Reference For: developers

API: nfc

Operations of the nfc tag of the native REST API.

ImportVApp / ExportVm HttpNfcLease lifecycle and file transfer

GET /v1/nfc-leases/{id}

GET /v1/nfc-leases/{id}: lease state (SOAP PropertyCollector on HttpNfcLease).

CLI
kyvernon nfc get <id>

Parameters

NameInTypeRequiredDescription
idpathstringyesId of the transfer lease

Responses

StatusDescriptionSchema
200OKNfcLeaseView
404Not found (or not visible to the caller)ErrorBody

POST /v1/nfc-leases/{id}/abort

POST /v1/nfc-leases/{id}/abort: SOAP HttpNfcLeaseAbort.

CLI
kyvernon nfc abort <id>

Parameters

NameInTypeRequiredDescription
idpathstringyesId of the transfer lease

Responses

StatusDescriptionSchema
200OKNfcLeaseView
404Not found (or not visible to the caller)ErrorBody

POST /v1/nfc-leases/{id}/complete

POST /v1/nfc-leases/{id}/complete: SOAP HttpNfcLeaseComplete.

CLI
kyvernon nfc complete <id>

Parameters

NameInTypeRequiredDescription
idpathstringyesId of the transfer lease

Responses

StatusDescriptionSchema
200OKNfcLeaseView
400Invalid argument; the error body names the fieldErrorBody

GET /v1/nfc-leases/{id}/files/{name}

GET /v1/nfc-leases/{id}/files/{name}: export download (SOAP /nfc GET).

CLI
kyvernon nfc download <id> <name>

Parameters

NameInTypeRequiredDescription
idpathstringyesId of the transfer lease
namepathstringyesFile name inside the library item

Responses

StatusDescriptionSchema
200octet-stream
404Not found (or not visible to the caller)ErrorBody

PUT /v1/nfc-leases/{id}/files/{name}

PUT /v1/nfc-leases/{id}/files/{name}: import upload (SOAP /nfc PUT).

CLI
kyvernon nfc upload <id> <name> <file>

Parameters

NameInTypeRequiredDescription
idpathstringyesId of the transfer lease
namepathstringyesFile name inside the library item

Request body

application/octet-stream: array of integer (int32)

Responses

StatusDescriptionSchema
200OKNfcLeaseView
404Not found (or not visible to the caller)ErrorBody

POST /v1/nfc-leases/{id}/progress

POST /v1/nfc-leases/{id}/progress: SOAP HttpNfcLeaseProgress.

CLI
kyvernon nfc progress <id> --percent <n>

Parameters

NameInTypeRequiredDescription
idpathstringyesId of the transfer lease

Request body

application/json: NfcLeaseProgressRequest

NameTypeRequiredDescription
percentinteger (int32)yesPercent complete (0 to 100).

Responses

StatusDescriptionSchema
200OKNfcLeaseView
404Not found (or not visible to the caller)ErrorBody

POST /v1/resource-pools/{id}/import-vapp

POST /v1/resource-pools/{id}/import-vapp: SOAP ResourcePool.ImportVApp.

From a browser: an OVA is a tar archive whose first entry is the .ovf descriptor. The console reads that entry from the selected file, sends it here, and uploads each disk entry of the archive (a slice of the file at the entry's offset and size) with PUT to the url of the matching lease file; bytesReceived on the lease shows the progress, POST .../progress keeps the lease alive (it expires after 15 minutes without use), and POST .../complete converts the disks and finishes the import. An OVF with separate disk files works the same with one file per disk.

CLI
kyvernon ovf import-vapp --pool <id> --body <json>

Parameters

NameInTypeRequiredDescription
idpathstringyesResource pool id

Request body

application/json: ImportVAppRequest

NameTypeRequiredDescription
datastoreIdstringyesTarget datastore (datastore-N).
deploymentOptionstring or nullOptional deployment configuration id.
entityNamestring or nullOverride entity name; defaults to the package VirtualSystem name.
folderIdstring or nullDestination VM folder (group-vN); defaults to the datacenter VM folder.
hostIdstring or nullDestination host (host-N).
networkMappingarray of OvfNetworkMappingRequestOVF network name → inventory network mappings.
ovfDescriptorstringyesOVF envelope XML.

Responses

StatusDescriptionSchema
200OKNfcLeaseView
400Invalid argument; the error body names the fieldErrorBody
403Permission denied; args.privilege names the missing privilegeErrorBody
404Not found (or not visible to the caller)ErrorBody

POST /v1/vms/{id}/export

POST /v1/vms/{id}/export: SOAP VirtualMachine.ExportVm.

CLI
kyvernon vm export <id>

Parameters

NameInTypeRequiredDescription
idpathstringyesVirtual machine id

Responses

StatusDescriptionSchema
200OKNfcLeaseView
400Invalid argument; the error body names the fieldErrorBody
403Permission denied; args.privilege names the missing privilegeErrorBody
404Not found (or not visible to the caller)ErrorBody

Version 0.1.