Skip to main content
NetApp Knowledge Base

CLI and REST API outpus show different integers

Views:
35
Visibility:
Public
Votes:
0
Category:
ontap-9
Specialty:
CORE
Last Updated:

Applies to

ONTAP 9.6

Answer

In release Ontap 9.6, REST API is introduced with "cli passthrough", also known as cli-based REST APIs.
 
REST API's return result in a json payload. Default for "all" integers, including hex unsigned integers is to put the value as "decimal" integer in the returned REST API response.
 
If a given table record's property value is in hex, in case here with initiator fcid, then by default the REST API response for the fcid will be in "decimal"
 
cli passthrough endpoint is "generic" and does NOT encode hexuint value of table record property value, so default is always decimal integer value.
 
However, the "normal" REST API "does" convert the hexuint to the "string" hence what the endpoint returns in response "is" hex encoded integer for the fcid.

Additional Information

additionalInformation_text
NetApp provides no representations or warranties regarding the accuracy or reliability or serviceability of any information or recommendations provided in this publication or with respect to any results that may be obtained by the use of the information or observance of any recommendations provided herein. The information in this document is distributed AS IS and the use of this information or the implementation of any recommendations or techniques herein is a customer's responsibility and depends on the customer's ability to evaluate and integrate them into the customer's operational environment. This document and the information contained herein may be used solely in connection with the NetApp products discussed in this document.