19-Network Programmability Configuration Guide

HomeSupportSwitchesS12500R SeriesConfigure & DeployConfiguration GuidesH3C S12500R Switch Router Series Configuration Guides(R51xx)-6W10119-Network Programmability Configuration Guide
01-RESTful configuration
Title Size Download
01-RESTful configuration 44.61 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.     Enable RESTful over HTTP.

restful http enable

By default, RESTful over HTTP is disabled.

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

local-user user-name [ class manage ]

4.     Configure a password for the local user.

password [ { hash | simple } password ]

5.     (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.

6.     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.     Enable RESTful over HTTPS.

restful https enable

By default, RESTful over HTTPS is disabled.

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

local-user user-name [ class manage ]

4.     Configure a password for the local user.

password [ { hash | simple } password ]

5.     (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.

6.     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 Resources
  • Partner Business Management
All Partners
  • Profile
  • News & Events
  • Online Exhibition Center
  • Contact Us
All About Us
新华三官网