2.11. RPC-API commands Commands

2.11.1. service rpc-api

Command Purpose

To enable RPC-API service, use service rpc-api enable command in Global Configuration. To disable RPC-API service, use service rpc-api disable command.

Prerequisites

Platform

Software

License

Comments

AQ-N3000

7.0

Base

AQ-N5000

7.0

Base

AQ-N6000

7.0

Base

Command Syntax

service rpc-api ( enable ( port PORT | ssl ( ssl-port SSLPORT | ) | ) ( vrf NAME | ) ( connect-timeout <10-300> | ) | disable )

service rpc-api disable

Parameter

Parameter Description

Parameter Value

enable

Turn on the RPC-API service

-

disable

Turn off the RPC-API service

-

PORT

TCP port number.TCP port number.By default, the RPC-API service listens on TCP port 80 (HTTP)

1025-65535

vrf NAME

VPN Routing/Forwarding instance

A string with 1-15 characters

ssl

Enable SSL (HTTPS)

-

SSLPORT

TCP port number.TCP port number.By default, the RPC-API service listens on TCP port 443 (HTTPS)

1025-65535

connect-timeout

TCP long connect mode with timeout

-

TIMEOUT

Timeout value

10-300

Command Mode

Global Config

Default

Disabled.

Usage

None

Examples

The following example shows how to enable RPC-API service:

Switch# configure terminal
Switch(config)# service rpc-api enable port 2000

2.11.2. service rpc-api auth-mode

Command Purpose

To enable RPC-API HTTP Basic authentication.

Prerequisites

Platform

Software

License

Comments

AQ-N3000

7.0

Base

AQ-N5000

7.0

Base

AQ-N6000

7.0

Base

Command Syntax

service rpc-api auth-mode basic

no service rpc-api auth-mode

Command Mode

Global Config

Default

Disabled.

Usage

Once enable or disable RPC-API HTTP Basic authentication, and users want to continue to use RPC-API service, users must re-enable it.

Examples

The following example shows how to enable RPC-API HTTP Basic authentication:

Switch# configure terminal
Switch(config)# service rpc-api auth-mode basic

Related Commands

service rpc-api enable

show services rpc-api

2.11.3. show services rpc-api

Command Purpose

To show RPC-API configuration information.

Prerequisites

Platform

Software

License

Comments

AQ-N3000

7.0

Base

AQ-N5000

7.0

Base

AQ-N6000

7.0

Base

Command Syntax

show services rpc-api

Command Mode

Privileged EXEC

Default

None

Usage

None

Examples

The following example shows the configuration information:

Switch(config)# show services rpc-api

RPC API services configuration:
HTTP server: shutdown, port: 80, authentication mode: none

Related Commands

service rpc-api enable