Networking NVIDIA NVOS User Manual for InfiniBand Switches

System API Commands

nv show system api


nv show system api

Shows the REST API configuration and connection statistics.

Syntax Description

N/A

Default

N/A

History


25.02.2002 


25.02.3000

Updated command output


Example

admin@nvos:~$ nv show system api
                     operational  applied
-------------------  -----------  -----------
state                enabled      enabled
port                 443          443
certificate          self-signed  self-signed
token-expiration     60           60
[listening-address]  any
connections
  active             1
  accepted           1
  handled            1
  requests           1
  reading            0
  writing            1
  waiting            0


versions
===========
             operational
    -------  -----------
    nvue     current
    nvue_v1  current

REST API

GET https://<ip>/nvue_v1/system/api

Related Commands

nv show system api versions
nv set/unset system api state
nv set/unset system api port <port-number>

Notes


nv show system api versions


nv show system api versions

Shows the REST API versions.

Syntax Description

N/A

Default

N/A

History


Example

admin@nvos:~$ nv show system api versions
         operational
-------  -----------
nvue     current
nvue_v1  current

REST API

GET https://<ip>/nvue_v1/system/api/versions

Related Commands

nv show system api

Notes


nv show system api connections


nv show system api connections

Shows the REST API connection statistics.

Syntax Description

N/A

Default

N/A

History


Example

admin@nvos:~$ nv show system api connections

REST API

GET https://<ip>/nvue_v1/system/api/connections

Related Commands

nv show system api

Notes

The output shows the active, accepted, handled, reading, writing, and waiting connections, and the number of requests.

nv set/unset system api state


nv set/unset system api state <enabled | disabled>

Enables or disables external access to the REST API.

Syntax Description

state

enabled, disabled

Default

enabled

History


25.02.2002 


Example

admin@nvos:~$ nv set system api state enabled

REST API

PATCH https://<ip>/nvue_v1/system/api

Related Commands

nv show system api

Notes

 

nv set/unset system api port


nv set/unset system api port <port-number>

Sets the port on which the REST API listens.

Syntax Description

port-number

Port number: 1–65535

Default

443

History


25.02.2002 


Example

admin@nvos:~$ nv set system api port 443

REST API

PATCH https://<ip>/nvue_v1/system/api

Related Commands

nv show system api

Notes

 

nv set/unset system api listening-address


nv set system api listening-address <listening-address>
nv unset system api listening-address [<listening-address>]

Sets an IP address on which the REST API listens. You can set more than one address.
The unset command removes the address, or all the addresses if you do not specify one.

Syntax Description

listening-address

IPv4 or IPv6 address, or localhost

Default

None (the REST API listens on all addresses)

History


Example

admin@nvos:~$ nv set system api listening-address 192.168.0.10

REST API

PATCH https://<ip>/nvue_v1/system/api

Related Commands

nv show system api
nv show system api listening-address

Notes


nv set/unset system api token-expiration


nv set system api token-expiration <minutes>
nv unset system api token-expiration

Sets the number of minutes that a REST API authentication token is valid. 0 disables tokens and invalidates the tokens already issued.
The unset command resets the value to the default.

Syntax Description

minutes

Integer: 0–10080

Default

60

History


Example

admin@nvos:~$ nv set system api token-expiration 120

REST API

PATCH https://<ip>/nvue_v1/system/api

Related Commands

nv show system api

Notes


nv set system api compression


nv set system api compression [gzip] 
nv unset system api compression

Enables gzip compression of REST API responses for clients that support it.
The unset form of the command disables compression.

Syntax Description

gzip

Compresses REST API responses with gzip.

Default

None (no compression)

History


25.02.7002


Example

admin@nvos:~$ nv set system api compression gzip

REST API

PATCH https://<ip>/nvue_v1/system/api?rev=<rev_id> Content-Type: application/json {"compression": "gzip"}

Related Commands

nv show system api

Notes

 

nv show system api mtls


nv show system api mtls

Shows the CA certificate for REST API mTLS connections.

Syntax Description

N/A

Default

N/A

History


25.02.2002 


Example

admin@nvos:~$ nv show system api mtls
                operational  applied
--------------  -----------  ---------
ca-certificate  nvue_root    nvue_root

REST API

GET https://<ip>/nvue_v1/system/api/mtls

Related Commands

nv show system api
nv set system api mtls ca-certificate

Notes


nv set system api mtls ca-certificate


nv set system api mtls ca-certificate <cacert-id>

Sets the CA certificate that the switch uses to validate clients in REST API mTLS connections.

Syntax Description

cacert-id

ID of an imported CA certificate (string)

Default

None

History


25.02.2002 


Example

admin@nvos:~$ nv set system api mtls ca-certificate nvue_root

REST API

PATCH https://<ip>/nvue_v1/system/api/mtls?rev=<rev_id> Content-Type: application/json {"ca-certificate": "<cacert-id>"}

Related Commands

nv show system api mtls

Notes


nv set/unset system api mtls crl


nv set system api mtls crl <crl-id>
nv unset system api mtls crl

Sets the certificate revocation list (CRL) that the switch uses to check client certificates in REST API mTLS connections.

Syntax Description

crl-id

ID of an imported CRL (string)

Default

None

History


Example

admin@nvos:~$ nv set system api mtls crl crl-1

REST API

PATCH https://<ip>/nvue_v1/system/api/mtls

Related Commands

nv show system api mtls
nv set system api mtls ca-certificate

Notes


nv set system api certificate


nv set system api certificate <cert-id | self-signed>

Sets the X.509 certificate that the REST API uses.

Syntax Description

cert-id

ID of an imported entity certificate (string), or self-signed

Default

self-signed

History


25.02.2002 


Example

admin@nvos:~$ nv set system api certificate tls-cert-1

REST API

PATCH https://<ip>/nvue_v1/system/api?rev=<rev_id> Content-Type: application/json {"certificate": "<cert-id>"}

Related Commands

nv show system api

Notes


nv action clear system api session


nv action clear system api session [user <user-id>]

Clears the REST API sessions. To clear the sessions of one user only, specify the user.

Syntax Description

user-id

User name (optional)

Default

N/A

History


Example

admin@nvos:~$ nv action clear system api session user admin

REST API

POST https://<ip>/nvue_v1/system/api/session/@clear

Related Commands

nv show system api

Notes




Last updated: