Enabling Native REST API

NAS File Storage REST API v7 Reference

Version
14.7.x
14.6.x
Audience
anonymous
Part Number
MK-92HNAS088-05

This document covers API version 7 supported by the HNAS native REST API. Native API mode has been introduced in software release 13.9.6800, and will be used for future API improvements and features, replacing the previous legacy API versions.

To check which mode is enabled, use the rest-server-status command:

G800-443037-1:$ rest-server-status

Node    Rest Server
----    -----------
1       running
2       running

RestAPI server current mode is legacy.

To switch to native mode, stop the REST API server, enable native mode, and then restart the REST API server, using the following commands:

G800-443037-1:$ rest-server-stop
The RestAPI server has been successfully stopped.
G800-443037-1:$ rest-server-mode --native
The RestAPI server mode change will not take affect until the RestAPI server is restarted.
G800-443037-1:$ rest-server-start
The RestAPI server has been successfully started.
G800-443037-1:$ rest-server-status

RestAPI server is running
 supported API versions:
  07.2.1
RestAPI server current mode is native.
G800-443037-1:$