23-Network Programmability Configuration Guide

HomeSupportConfigure & DeployConfiguration GuidesH3C MSR1000[2600][3600] Routers Configuration Guides(V9)-R9119-6W10023-Network Programmability Configuration Guide
01-RESTful configuration
Title Size Download
01-RESTful configuration 47.85 KB

Configuring RESTful

About RESTful

The device provides the Representational State Transfer application programming interface (RESTful API). Based on this API, you can use programming languages such as Python, Ruby, or Java to write programs to perform the following tasks:

·     Send RESTful requests to the device to pass authentication.

·     Use RESTful API operations to configure and manage the device. RESTful API operations include Get, Put, Post, and Delete.

The device supports using HTTP or HTTPS to transfer RESTful packets.

Configuring RESTful over HTTP

1.     Enter system view.

system-view

2.     (Optional.) Specify the service port number for RESTful access over HTTP.

restful http port port-number

By default, the service port number for RESTful access over HTTP is 80.

3.     Enable RESTful over HTTP.

restful http enable

By default, RESTful over HTTP is disabled.

4.     Create a local user and enter local user view.

local-user user-name [ class manage ]

5.     Configure a password for the local user.

password [ { hash | simple } password ]

6.     (Optional.) Assign a user role to the local user.

authorization-attribute user-role user-role

The default user role is network-operator for a RESTful user.

7.     Specify the HTTP service for the local user.

service-type http

By default, no service type is specified for a local user.

Configuring RESTful over HTTPS

1.     Enter system view.

system-view

2.     (Optional.) Apply an SSL server policy to the RESTful access over HTTPS service.

restful https ssl-server-policy policy-name

By default, no SSL server policy is applied to the RESTful access over HTTPS service.

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.

3.     (Optional.) Specify the service port number for RESTful access over HTTPS.

restful https port port-number

By default, the service port number for RESTful access over HTTPS is 443.

4.     Enable RESTful over HTTPS.

restful https enable

By default, RESTful over HTTPS is disabled.

5.     Create a local user and enter local user view.

local-user user-name [ class manage ]

6.     Configure a password for the local user.

password [ { hash | simple } password ]

7.     (Optional.) Assign a user role to the local user.

authorization-attribute user-role user-role

The default user role is network-operator for a RESTful user.

8.     Specify the HTTPS service for the local user.

service-type https

By default, no service type is specified for a local user.

 

  • 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 Policy & Program
  • Global Learning
  • Partner Sales Resources
  • Partner Business Management
  • Service Business
All Partners
  • Profile
  • News & Events
  • Online Exhibition Center
  • Contact Us
All About Us
新华三官网