Published On: August 6ᵗʰ, 2019 02:11

API Reference for Cisco Enterprise Network Function Virtualization Infrastructure Software

External Disks API

Table 1. External Disks API

Action

Method

Payload Required

API

To get a list of external disks

GET

No

/api/operational/system/ext-disks

Example: GET External Disks API


curl -X GET -v -k -u admin:admin https://1.2.3.4/api/operational/system/ext-disks
    *   Trying 172.19.147.237...
    * Connected to 172.19.147.237 (172.19.147.237) port 443 (#0)
    * TLS 1.2 connection using TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384
    * Server certificate: Cisco-Enterprise-NFVIS-Self-Signed-Certificate
    * Server auth using Basic with user 'admin'
    > GET /api/operational/system/ext-disks HTTP/1.1
    > Host: 172.19.147.237
    > Authorization: Basic YWRtaW46YWRtaW4=
    > User-Agent: curl/7.43.0
    > Accept: */*
    >
    < HTTP/1.1 204 No Conten
    < Server: nginx/1.6.3
    < Date: Fri, 26 Aug 2016 23:03:50 GMT
    < Content-Type: application/vnd.yang.collection+xml
    < Content-Length: 0
    < Connection: keep-alive
    < Cache-Control: private, no-cache, must-revalidate, proxy-revalidate
    < Pragma: no-cache
    <
    <name>extdatastore1</data>


File List APIs

Use the File List APIs to get information about all files under the "/mnt-usb" (USB) and "/data/upload1" (local) folders.

Table 2. File List APIs

Action

Method

Payload Required

API

To get a list of VM images available for registration on the USB

GET

No

/api/operational/system/file-list/disk/usb

To get a list of VM images available for registration on the local system

GET

No

api/operational/system/file-list/disk/local

Example: GET File List APIs


curl -k -v -u "admin:Cisco#123" -H "Accept:application/vnd.yang.collection+json" -H "Content-Type:application/vnd.yang.collection+json" -X 
GET https://209.165.201.1/api/operational/system/file-list/disk/usb
*   Trying 209.165.201.1...
* Connected to 209.165.201.1 (209.165.201.1) port 443 (#0)
* TLS 1.2 connection using TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384
* Server certificate: Cisco-Enterprise-NFVIS-Self-Signed-Certificate
* Server auth using Basic with user 'admin'
> GET /api/operational/system/file-list/disk/usb HTTP/1.1
> Host: 209.165.201.1
> Authorization: Basic YWRtaW46Q2lzY28jMTIz
> User-Agent: curl/7.43.0
> Accept:application/vnd.yang.collection+json
> Content-Type:application/vnd.yang.collection+json
>
< HTTP/1.1 200 OK
< Server: nginx/1.10.1
< Date: Wed, 22 Feb 2017 12:12:11 GMT
< Content-Type: application/vnd.yang.collection+json
< Transfer-Encoding: chunked
< Connection: keep-alive
< Cache-Control: private, no-cache, must-revalidate, proxy-revalidate
< Pragma: no-cache
<
{
  "collection": {
    "system:usb": [
      {
        "name": "win2k.tar.gz",
        "path": "/mnt-usb/usb1/Win2k",
        "size": "5.1G",
        "type": "VM Package",
        "date-modified": "2016-04-06 12:07:52"
      },
      {
        "name": "CentOS-7-x86_64-Everything-1511.tar.gz",
        "path": "/mnt-usb/usb1/OtherLin",
        "size": "439M",
        "type": "VM Package",
        "date-modified": "2016-01-19 12:47:38"
      },
      {
        "name": "ubuntu-14.04.3-server-amd64-disk1.tar.gz",
        "path": "/mnt-usb/usb1/OtherLin",
        "size": "527M",
        "type": "VM Package",
        "date-modified": "2016-01-19 12:46:30"
      },
      {
        "name": "Cisco_NFVIS-3.4.0-454-20160927_022810.iso",
        "path": "/mnt-usb/usb1",
        "size": "1.8G",
        "type": "Other",
        "date-modified": "2016-09-27 02:06:48"
      },
      {
        "name": "asav961.tar.gz",
        "path": "/mnt-usb/usb1",
        "size": "164M",
        "type": "VM Package",
        "date-modified": "2016-10-07 14:20:52"
      },
      {
        "name": "Cisco-KVM-vWAAS-2500-6.2.1-b-11.tar.gz",
        "path": "/mnt-usb/usb1",
        "size": "919M",
        "type": "VM Package",
        "date-modified": "2016-10-07 14:19:24"
      },
      {
        "name": "TinyLinux.tar.gz",
        "path": "/mnt-usb/usb1",
        "size": "17M",
        "type": "VM Package",
        "date-modified": "2016-01-19 11:23:14"
      },
      {
        "name": "Cisco-KVM-vWAAS-2500-6.3.0-b98.tar.gz",
        "path": "/mnt-usb/usb1",
        "size": "979M",
        "type": "VM Package",
        "date-modified": "2016-12-05 10:29:52"
      },
      {
        "name": "IndexerVolumeGuid",
        "path": "/mnt-usb/usb1/System Volume Information",
        "size": "76",
        "type": "Other",
        "date-modified": "2017-02-06 11:05:38"
      },
      {
        "name": "isrv-universalk9.16.03.01.tar.gz",
        "path": "/mnt-usb/usb2",
        "size": "1.1G",
        "type": "VM Package",
        "date-modified": "2016-08-18 10:45:04"
      }
    ]
  }
}



curl -k -v -u "admin:Cisco#123" -H "Accept:application/vnd.yang.collection+json" -H "Content-Type:application/vnd.yang.collection+json" -X 
GET https://209.165.201.1/api/operational/system/file-list/disk/local
*   Trying 209.165.201.1...
* Connected to 209.165.201.1 (209.165.201.1) port 443 (#0)
* TLS 1.2 connection using TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384
* Server certificate: Cisco-Enterprise-NFVIS-Self-Signed-Certificate
* Server auth using Basic with user 'admin'
> GET /api/operational/system/file-list/disk/local HTTP/1.1
> Host: 209.165.201.1
> Authorization: Basic YWRtaW46Q2lzY28jMTIz
> User-Agent: curl/7.43.0
> Accept:application/vnd.yang.collection+json
> Content-Type:application/vnd.yang.collection+json
>
< HTTP/1.1 200 OK
< Server: nginx/1.10.1
< Date: Wed, 22 Feb 2017 12:32:17 GMT
< Content-Type: application/vnd.yang.collection+json
< Transfer-Encoding: chunked
< Connection: keep-alive
< Cache-Control: private, no-cache, must-revalidate, proxy-revalidate
< Pragma: no-cache
<
{
  "collection": {
    "system:local": [
      {
        "name": "IndexerVolumeGuid",
        "path": "/data/upload1",
        "size": "76",
        "type": "Other",
        "date-modified": "2017-02-22 12:31:38"
      },
      {
        "name": "Cisco_NFVIS-3.4.0-454-20160927_022810.iso",
        "path": "/data/upload1",
        "size": "1.8G",
        "type": "Other",
        "date-modified": "2017-02-22 12:31:47"
      }
    ]
  }
}


File Delete API

Table 3. File Delete API

Action

Method

Payload Required

API

Delete one or more files from the host server (/data/upload1/)

POST

Yes

/api/operations/system/file-delete/file

Example for File Delete Payload


<input><name><xyz.txt></name></input>

Table 4. File Delete Payload Description

Property

Type

Description

Mandatory/Default Value

name string

Name of the file that you want to delete.

Yes

Example: File Delete API


 curl -k -v -u "admin:admin" -H content-type:application/vnd.yang.data+json -X
 POST https://209.165.201.1/api/operations/system/file-delete/file -d "<input><name>xyz.txt</name></input>"
 Trying 209.165.201.1...
* Connected to 209.165.201.1 (209.165.201.1) port 443 (#0)
* Cipher selection: ALL:!EXPORT:!EXPORT40:!EXPORT56:!aNULL:!LOW:!RC4:@STRENGTH
* successfully set certificate verify locations:
* CAfile: /etc/pki/tls/certs/ca-bundle.crt
 CApath: none
* TLSv1.0 (OUT), TLS handshake, Client hello (1):
* TLSv1.0 (IN), TLS handshake, Server hello (2):
* TLSv1.0 (IN), TLS handshake, Certificate (11):
* TLSv1.0 (IN), TLS handshake, Server key exchange (12):
* TLSv1.0 (IN), TLS handshake, Server finished (14):
* TLSv1.0 (OUT), TLS handshake, Client key exchange (16):
* TLSv1.0 (OUT), TLS change cipher, Client hello (1):
* TLSv1.0 (OUT), TLS handshake, Finished (20):
* TLSv1.0 (IN), TLS change cipher, Client hello (1):
* TLSv1.0 (IN), TLS handshake, Finished (20):
* SSL connection using TLSv1.0 / DHE-RSA-AES256-SHA
* Server certificate:
* subject: CN=Cisco-Enterprise-NFVIS-Self-Signed-Certificate
* start date: Oct 21 07:43:27 2016 GMT
* expire date: Oct 19 07:43:27 2026 GMT
* issuer: CN=Cisco-Enterprise-NFVIS-Self-Signed-Certificate
* SSL certificate verify result: self signed certificate (18), continuing anyway.
* Server auth using Basic with user 'admin'
> POST /api/operations/system/file-delete/file HTTP/1.1
> Host: 209.165.201.1
> Authorization: Basic YWRtaW46YWRtaW4=
> User-Agent: curl/7.49.1
> Accept: */*
> content-type:application/vnd.yang.data+json
> Content-Length: 34
> 
* upload completely sent off: 34 out of 34 bytes
< HTTP/1.1 204 No Content
< Server: nginx/1.6.3
< Date: Thu, 01 Dec 2016 07:37:28 GMT
< Content-Type: text/html
< Content-Length: 0
< Connection: keep-alive
< Cache-Control: private, no-cache, must-revalidate, proxy-revalidate
< Pragma: no-cache

USB Mount API

The supported USB formats are FAT32 and exFAT.

Table 5. USB Mount API

Action

Method

Payload Required

API

To mount a USB drive on a server that supports Cisco Enterprise NFVIS

POST

Yes

/api/operations/system/usb/mount

To unmount a USB drive from an NFVIS server

POST

No

/api/operations/system/usb/unmount

To view list of mount points

GET

No

/api/operational/system/usb/mnt-info

Example for USB Mount Payload

<mount>ACTIVE</mount>
Table 6. USB Mount Payload Description

Property

Type

Description

Mandatory/Default Value

mount string Mounts the USB drive.
Note 

You can copy files from the USB drive only after mounting the USB drive.

Yes

Example: POST USB Mount API

Trying 209.165.201.1...

* Connected to 209.165.201.1 (209.165.201.1) port 443 (#0)

* TLS 1.2 connection using TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384

* Server certificate: Cisco-Enterprise-NFVIS-Self-Signed-Certificate

* Server auth using Basic with user 'admin'

> POST /api/operations/system/usb/mount HTTP/1.1

> Host: 209.165.201.1

> Authorization: Basic YWRtaW46Q2lzY28xMjMj

> User-Agent: curl/7.49.1

> Accept:application/vnd.yang.data+xml

> Content-Type:application/vnd.yang.data+xml

>

< HTTP/1.1 204 No Content

< Server: nginx/1.6.3

< Date: Tue, 31 Jan 2017 22:25:38 GMT

< Content-Type: text/html

< Content-Length: 0

< Connection: keep-alive

< Cache-Control: private, no-cache, must-revalidate, proxy-revalidate

< Pragma: no-cache

<

* Connection #0 to host 209.165.201.1 left intact

 

Example: POST USB Unmount API


Trying 209.165.201.1...

* Connected to 209.165.201.1 (209.165.201.1) port 443 (#0)

* TLS 1.2 connection using TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384

* Server certificate: Cisco-Enterprise-NFVIS-Self-Signed-Certificate

* Server auth using Basic with user 'admin'

> POST /api/operations/system/usb/unmount HTTP/1.1

> Host: 209.165.201.1

> Authorization: Basic YWRtaW46Q2lzY28xMjMj

> User-Agent: curl/7.49.1

> Accept:application/vnd.yang.data+xml

> Content-Type:application/vnd.yang.data+xml

>

< HTTP/1.1 204 No Content

< Server: nginx/1.6.3

< Date: Tue, 31 Jan 2017 22:25:38 GMT

< Content-Type: text/html

< Content-Length: 0

< Connection: keep-alive

< Cache-Control: private, no-cache, must-revalidate, proxy-revalidate

< Pragma: no-cache

<

* Connection #0 to host 209.165.201.1 left intact

 

Example: GET USB Mount Point


             

*   Trying 209.165.201.1...

* Connected to 209.165.201.1 (209.165.201.1) port 443 (#0)

* TLS 1.2 connection using TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384

* Server certificate: Cisco-Enterprise-NFVIS-Self-Signed-Certificate

* Server auth using Basic with user 'admin'

> GET /api/operational/system/usb/mnt-info HTTP/1.1

> Host: 209.165.201.1

> Authorization: Basic YWRtaW46Q2lzY28xMjMj

> User-Agent: curl/7.49.1

> Accept:application/vnd.yang.collection+xml

> Content-Type:application/vnd.yang.data+xml

>

< HTTP/1.1 204 No Content

< Server: nginx/1.6.3

< Date: Tue, 31 Jan 2017 23:53:41 GMT

< Content-Type: application/vnd.yang.collection+xml

< Content-Length: 0

< Connection: keep-alive

< Cache-Control: private, no-cache, must-revalidate, proxy-revalidate

< Pragma: no-cache

<

* Connection #0 to host 209.165.201.1 left intact

USB Copy API

Table 7. USB Copy API

Action

Method

Payload Required

API

Copy a single file from a mounted USB drive to the local folder of the server (/data/upload1/)

POST

Yes

/api/operations/system/file-copy/usb/file

Example for USB Copy Payload


<input><name><path_of_file_relative_to_usb/example_file.txt></name></input>

Table 8. USB Copy Payload Description

Property

Type

Description

Mandatory/Default Value

name string

Name of the file with complete path relative to USB

Path of the file within the USB drive. For example, if the file in the USB drive is like the following :

images/isrv.tar.gz—The name parameter in payload must be "images/isrv.tar.gz".

asav.tar.gz—The name parameter in payload must be "asav.tar.gz".

Yes

Example: POST USB Copy API


curl -k -v -u admin:admin -H "Accept:application/vnd.yang.data+xml" -H Content-Type:application/vnd.yang.data+xml -X
POST https://209.165.201.1/api/operations/system/file-copy/usb/file -d "<input><name>asav.tat.gz</name></input>"
   Output Logs :
   * upload completely sent off: 21 out of 21 bytes
     < HTTP/1.1 204 No Content
     < Server: nginx/1.6.3
     < Date: Sat, 06 Aug 2016 10:05:48 GMT
     < Content-Type: text/html
     < Content-Length: 0
     < Connection: keep-alive
     < Cache-Control: private, no-cache, must-revalidate, proxy-revalidate
     < Pragma: no-cache

Host Reboot API

Table 9. Host Reboot API

Action

Method

Payload Required

API

To reboot the host server

POST

No

/api/operations/hostaction/reboot

DHCP Renew API

Table 10. WAN DHCP Renew API

Action

Method

Payload Required

API

To renew the DHCP IP address on the WAN bridge

POST

No

/api/operations/hostaction/wan-dhcp-renew

To renew DHCP on bridge

POST

Yes

/api/operations/hostaction/bridge-dhcp-renew/bridge/<br_name>

Example: POST WAN DHCP Renew API


curl -k -v -u admin:Cisco123# -H content-type: application/vnd.yang.data+xml -H Accept:application/vnd.yang.data+xml -X 
POST https://209.165.201.1/api/operations/hostaction/wan-dhcp-renew
* Hostname was NOT found in DNS cache
* Trying 209.165.201.1...
* Connected to 209.165.201.1 (209.165.201.1) port 443 (#0)
* successfully set certificate verify locations:
* CAfile: none
 CApath: /etc/ssl/certs
* SSLv3, TLS handshake, Client hello (1):
* SSLv3, TLS handshake, Server hello (2):
* SSLv3, TLS handshake, CERT (11):
* SSLv3, TLS handshake, Server key exchange (12):
* SSLv3, TLS handshake, Server finished (14):
* SSLv3, TLS handshake, Client key exchange (16):
* SSLv3, TLS change cipher, Client hello (1):
* SSLv3, TLS handshake, Finished (20):
* SSLv3, TLS change cipher, Client hello (1):
* SSLv3, TLS handshake, Finished (20):
* SSL connection using ECDHE-RSA-AES256-GCM-SHA384
* Server certificate:
* subject: CN=Cisco-Enterprise-NFVIS-Self-Signed-Certificate
* start date: 2016-04-17 23:36:59 GMT
* expire date: 2026-04-15 23:36:59 GMT
* issuer: CN=Cisco-Enterprise-NFVIS-Self-Signed-Certificate
* SSL certificate verify result: self signed certificate (18), continuing anyway.
* Server auth using Basic with user 'admin'
> POST /api/operations/hostaction/wan-dhcp-renew HTTP/1.1
> Authorization: Basic YWRtaW46YWRtaW4=
> User-Agent: curl/7.35.0
> Host: 209.165.201.1
> content-type: application/vnd.yang.data+xml
> Accept:application/vnd.yang.data+xml
>
< HTTP/1.1 204 No Content
* Server nginx/1.6.3 is not blacklisted
< Server: nginx/1.6.3
< Date: Wed, 20 Apr 2016 23:05:05 GMT
< Content-Type: text/html
< Content-Length: 0
< Connection: keep-alive
< Cache-Control: private, no-cache, must-revalidate, proxy-revalidate
< Pragma: no-cache
<

Example: Bridge DHCP Renew


curl -k -v -u admin:admin -H "Accept:application/vnd.yang.data+json" -H "Content-Type:application/vnd.yang.data+json" -X POST 
https://localhost/api/operations/hostaction/bridge-dhcp-renew/bridge/test-br