23-Network Programmability Command Reference

HomeSupportReference GuidesCommand ReferencesH3C MSR1000[2600][3600] Routers Command Reference(V9)-R9119-6W10023-Network Programmability Command Reference
01-RESTful commands
Title Size Download
01-RESTful commands 44.49 KB

RESTful commands

restful http enable

Use restful http enable to enable RESTful over HTTP.

Use undo restful http enable to disable RESTful over HTTP.

Syntax

restful http enable

undo restful http enable

Default

RESTful over HTTP is disabled.

Views

System view

Predefined user roles

network-admin

Usage guidelines

For users to manage the device through the HTTP-based RESTful API, you must enable RESTful over HTTP.

Examples

# Enable RESTful over HTTP.

<Sysname> system-view

[Sysname] restful http enable

restful http port

Use restful http port to specify the service port number for RESTful access over HTTP.

Use undo restful http port to restore the default.

Syntax

restful http port port-number

undo restful http port

Default

The service port number for RESTful access over HTTP is 80.

Views

System view

Predefined user roles

network-admin

Parameters

port-number: Specifies a port number in the range of 1 to 65535.

Usage guidelines

When RESTful access over HTTP is enabled, changing the service port number re-enables the service and closes all RESTful access over HTTP connections. To log in again, users must use the new port number.

Examples

# Set the service port number to 1000 for RESTful access over HTTP.

<Sysname> system-view

[Sysname] restful http port 1000

restful https enable

Use restful https enable to enable RESTful over HTTPS.

Use undo restful https enable to disable RESTful over HTTPS.

Syntax

restful https enable

undo restful https enable

Default

RESTful over HTTPS is disabled.

Views

System view

Predefined user roles

network-admin

Usage guidelines

For users to manage the device through the HTTPS-based RESTful API, you must enable RESTful over HTTPS.

Examples

# Enable RESTful over HTTPS.

<Sysname> system-view

[Sysname] restful https enable

restful https port

Use restful https port to specify the service port number for RESTful access over HTTPS.

Use undo restful https port to restore the default.

Syntax

restful https port port-number

undo restful https port

Default

The service port number for RESTful access over HTTPS is 443.

Views

System view

Predefined user roles

network-admin

Parameters

port-number: Specifies a port number in the range of 1 to 65535.

Usage guidelines

When RESTful access over HTTPS is enabled, changing the service port number re-enables the service and closes all RESTful access over HTTPS connections. To log in again, users must use the new port number.

Examples

# Set the service port number to 1000 for RESTful access over HTTPS.

<Sysname> system-view

[Sysname] restful https port 1000

restful https ssl-server-policy

Use restful https ssl-server-policy to apply an SSL server policy to the RESTful access over HTTPS service.

Use undo restful https ssl-server-policy to restore the default.

Syntax

restful https ssl-server-policy policy-name

undo restful https ssl-server-policy

Default

No SSL server policy is applied to the RESTful access over HTTPS service.

Views

System view

Predefined user roles

network-admin

Parameters

policy-name: Specifies an SSL server policy name, a string of 1 to 31 characters.

Usage guidelines

The RESTful access over HTTPS service will use the SSL server policy to enhance service security. For more information about SSL server policies, see SSL configuration in Security Configuration Guide.

You can configure this command only when RESTful access over HTTPS is disabled.

This command takes effect after you enable RESTful access over HTTPS.

If you execute this command multiple times, the most recent configuration takes effect.

After the RESTful access over HTTPS service is enabled, changes to the applied SSL server policy take effect only on HTTPS connections established after the changes. These changes do not take effect on existing HTTPS connections.

Examples

# Apply SSL server policy myssl to the RESTful access over HTTPS service.

<Sysname> system-view

[Sysname] restful https ssl-server-policy myssl

Related commands

restful https enable

ssl server-policy (Security Command Reference)

  • Cloud & AI
  • InterConnect
  • Intelligent Computing
  • Security
  • SMB Products
  • Intelligent Terminal Products
  • Product Support Services
  • Technical Service Solutions
All Services
  • Resource Center
  • Policy
  • Online Help
All Support
  • Become a Partner
  • Partner Resources
  • Partner Business Management
All Partners
  • Profile
  • News & Events
  • Online Exhibition Center
  • Contact Us
All About Us
新华三官网