ONTAP Rest API Discussions

REST API brings result, but PowerShell doesn't.

PAVLENYCH

Hello all,

 

I'm trying to automate getting and setting Quota for users.

So far I'm doing well and have already gotten a huge help here, but recently I ran to some strange situation from my point of view at least.

What is happening is:

I get an answer while performing the following REST API request:

https://nanaspt1/api/storage/quota/reports?users.name=CLAL-INS\”userName”&fields=*

But when I'm try to get the same information for user "userName" by using PowerShell command it doesn't bring anything:

Get-NcQuota -Volume “volumeName” -Target “userName”

 

Could you please think about why there is a different behaviour, even though both ways have to bring the same result based on my knowledge with NetApp?

 

BR,

Pavel

6 REPLIES 6

Re: REST API brings result, but PowerShell doesn't.

aladd

Are you able to provide a sample output from "Get-NcQuota -Volume “volumeName” -Target *username*"?

Re: REST API brings result, but PowerShell doesn't.

aladd

Are you able to provide a sample output from "Get-NcQuota -Volume “volumeName” -Target *username*"?

Re: REST API brings result, but PowerShell doesn't.

PAVLENYCH

Hello.

It just brings no information.

By the way, one thing, but very important thing I didn't mention: "get-ncquota" doesn't bring anything not for all users.

To make picture cleaner:

Rest API does bring information for every user, but "get-ncquota" doesn't.

 

BR,

Pavel

 

Re: REST API brings result, but PowerShell doesn't.

aladd

Hi Pavel,

 

What version of the PSTK are you using, and with what version of ONTAP are you using?

 

Also, can you check the connection to storage, verifying that you are connected to the correct cluster management LIF, using the powershell cmdlets?

Re: REST API brings result, but PowerShell doesn't.

PAVLENYCH

@aladd 

 

I'm not sure about PowerShell version, but it must be the last one or one version before.

NetApp is 9.6.

I'm not Storage administrator, therefore sorry, if make a mistake in NetApp lexicon. 

There is one name I've gotten from NetApp administrator, as my understanding it's a virtual name of Cluster.

I don't think there is some problem with connection, because no matter from which server I'm connected to the storage there are users I can get their information regarding storage usage, using Rest API, but PowerShell doesn't bring me such information, it brings nothing.

 

BR,

Pavel

Re: REST API brings result, but PowerShell doesn't.

aladd

You can pull the version using the cmdlet "get-module -name *Data*"

 

Also, do you know which SVM you are connected to from the cluster?

Earn Rewards for Your Review!
GPI Review Banner
All Community Forums
Public