#Discovering fields available via CLI Passthrough

1 messages · Page 1 of 1 (latest)

lilac orbit
#

The use of the CLI Passthrough pretty much requires the use of the "fields" parameter to get anything useful. But sometimes I don't know what fields are available and the normal method for field discovery (fields=* and **) doesn't work for CLI Passthrough (by design, which I accept).

It would be really nice though if we could somehow discover just the field names that can be fetched using the API. One record returned, no data, just the field names. I don't always have easy access to the CLI to be able to run the command and discover field names that way. Even then, if you're not familiar with the ONTAP CLI, you still might not be able to discover the field names since the standard output of most commands uses "pretty" names.

lilac orbit
#

As an example...

{
  "records": [
    {
      "node": "node1"
    },
    {
      "node": "node2"
    }
  ],
  "num_records": 2
}

That's really not helpful but I can't know what I need to request to make it helpful unless I can go login on the CLI first.

Maybe we could do something like this:

{
  "records": [
    {
      "node": "node",
      "max_aggr_size": "max_aggr_size",
      "max_vol_size": "max_vol_size",
      "max_node_vvols": "max_node_vvols",
      "max_hya_ssd_limit": "max_hya_ssd_limit",
      "is_200tb_vvol_size_allowed": "is_200tb_vvol_size_allowed",
      "max_vol_size_old": "max_vol_size_old"
    }
  ],
  "num_records": 1
}

I find myself trying to use the REST API more and more in place of logging in on the CLI to gather data. Being forced to use the CLI in order to use the API fully is ... bad.