No relevant resource is found in the selected language.

This site uses cookies. By continuing to browse the site you are agreeing to our use of cookies. Read our privacy policy>Search

Reminder

To have a better experience, please upgrade your IE browser.

upgrade

eSight V300R010C00SPC200, 300, and 500 Self-Service Integration Guide 11

Rate and give feedback:
Huawei uses machine translation combined with human proofreading to translate this document to different languages in order to help you better understand the content of this document. Note: Even the most advanced machine translation cannot match the quality of professional translators. Huawei shall not bear any responsibility for translation accuracy and it is recommended that you refer to the English document (a link for which has been provided).
Verify Open APIs Using Restclient (only for openid Based Authentication)

Verify Open APIs Using Restclient (only for openid Based Authentication)

You can use the third-party tool Restclient to verify open APIs.

Obtain Restclient at https://github.com/wiztools/rest-client/releases/download/restclient-3.5/restclient-ui-3.5-jar-with-dependencies.jar

  • Before using the Restclient tool to verify open APIs, follow instructions in Preparation to make preparations.
  • Please make sure that the protocol version of the client is in agreement with the server, otherwise the interface will not be called. For details about how to configure server protocol versions, see Modify the Configuration File.
  • AS the Restclient tool has its own limitations, before you verify open APIs, please add the ssl.protocol item in the eSight installation directory/AppBase/etc/oms.ros/ros.xml file in the server (the configuration item path is webservers/rosOpenAPIROA/connectors/openapiROAConnector/ssl.protocol), and then restart the server.
    <property name="ssl.protocol" value="SSLv2Hello;TLSv1.1;TLSv1.2;TLSv1" />

Run the Tool

Right-click the JAR package and use the Java to open Restclient.

JRE has been installed in the running environment.

Obtain openid

  1. Enter a URL.

    The URL format is https://IP:32102/rest/openapi/sm/session, where IP address is the that of the computer where the open API service is located, for example, https://10.66.69.188:32102/rest/openapi/sm/session.

  2. On the Method tab page, select PUT.

  3. On the Body tab page, set parameters. For details about how to set parameters, see Log In to the.

    The body type is String body, and the packet type is application/x-www-form-urlencoded; charset=UTF-8.

    The body is userid=admin&value=Test1234&ipaddr=10.66.69.182, where userid, value, and ipaddr are parameters. These parameters are described in the open APIs. In the body, admin, Test1234, and 10.66.69.182 are values.

  4. On the SSL tab page, click the Truststore tab page and enter the certificate path and password.

    You can obtain the certificate from eSight. For details about the certificate path, see ssl.keystore.path in ros.xml.

    Set Password to the actual password of the certificate. The default password is Changeme_123.

  5. On the General tab page, set parameters shown in the following figure.

  6. Click on the right.

    In the packet, 367606819df8ea25ad5a9a9e5dd92fb286368c76504d1697 is the openid.

Call Open APIs

When the method selected on the Method tab page is DELETE, please take the parameters in the Parameter list to the URL, for example, http://10.66.69.188:32102/rest/openapi/user?userid=user01, otherwise the interface may fail to be called.

The following uses the interface for querying device information as an example. The methods for calling other interfaces are similar.

Read the interface for querying device information and obtain the following:

  • URL:/rest/openapi/nedevice
  • http method:GET
  • The following table lists some parameters.

    Parameter

    Mandatory/Optional

    Location

    Value Type

    Value Range

    necategory

    Optional

    Parameter list

    String

    Indicates the device category.

    netype

    Optional

    Parameter list

    String

    Indicates the device type

    neip

    Optional

    Parameter list

    String

    Indicates the IP address of the device.

  1. Enter the URL https://10.66.69.188:32102/rest/openapi/nedevice.
  2. On the Method tab page, select GET.

  3. On the Headers tab page, add the openid.

    The key is openid and the value is 367606819df8ea25ad5a9a9e5dd92fb286368c76504d1697, which is previously obtained.

  4. On the SSL tab page, click the Truststore tab page and enter the certificate path and password.

    Obtain the certificates from the eSight and set the path by following the ros.xml file.

    The password must be the actual certificate password.

  5. On the General tab page, set parameters shown in the following figure.

  6. Click on the right.

Download
Updated: 2019-12-13

Document ID: EDOC1100044386

Views: 20890

Downloads: 90

Average rating:
This Document Applies to these Products

Related Version

Related Documents

Share
Previous Next