- Table of Contents
- Related Documents
-
| Title | Size | Download |
|---|---|---|
| 01-RESTful commands | 44.34 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
