Community maintenance is complete. Thank you for your patience!

Software Development Kit (SDK) and API Discussions

get a cli output via api

HAIT_NETAPP

Is there a way that I can get a cli output via api, rather than get a xml file and I have to parse it?

for example, I need following snap list output,

> snap list vol0

Volume vol0

working...

  %/used       %/total  date          name

----------  ----------  ------------  --------

  1% ( 1%)    0% ( 0%)  Jan 22 12:00  hourly.0

  2% ( 1%)    0% ( 0%)  Jan 22 08:00  hourly.1

  4% ( 2%)    0% ( 0%)  Jan 22 00:01  nightly.0

  5% ( 1%)    0% ( 0%)  Jan 21 20:00  hourly.2

  6% ( 1%)    0% ( 0%)  Jan 21 16:00  hourly.3

  7% ( 1%)    0% ( 0%)  Jan 21 12:01  hourly.4

  9% ( 1%)    0% ( 0%)  Jan 21 08:01  hourly.5

10% ( 2%)    0% ( 0%)  Jan 21 00:01  nightly.1

is that doable?

2 REPLIES 2

aborzenkov

Just run the command via ssh/rsh. The whole point of using API is to avoid parsing command output. You get exactly the same information via API calls but in more reliable and “computer-friendly” way.

DANIELCM6

agreed

Announcements
NetApp on Discord Image

We're on Discord, are you?

Live Chat, Watch Parties, and More!

Explore Banner

Meet Explore, NetApp’s digital sales platform

Engage digitally throughout the sales process, from product discovery to configuration, and handle all your post-purchase needs.

NetApp Insights to Action
I2A Banner
Public