<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: powershell invoke-ncsystemapi and CLI differ for the same user in ONTAP Discussions</title>
    <link>https://community.netapp.com/t5/ONTAP-Discussions/powershell-invoke-ncsystemapi-and-CLI-differ-for-the-same-user/m-p/443975#M42147</link>
    <description>&lt;P&gt;Hello Matt,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you for your fast response and scripts. Your suspicion was right:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Using my admin account it works for the first script, so the swagger UI.&lt;/P&gt;&lt;P&gt;Using my admin account in the second script, so&amp;nbsp;&lt;SPAN&gt;using the private CLI via the REST API to invoke a CLI command, it gives me the volume back but not the tiering-minimum-cooling-days. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Using the readonly_cl_user account gives me only the volume names for both scripts.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Is there documentation for what I can enter in the CLI for privileges?&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;So I can play around with these privileges? &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Somewhere under the hood must be the right parameter .....&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;security login role create -role readonly_cl -cmddirname volume -access all -vserver xxx&amp;nbsp; did not do the trick for me......&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Thanks again, Moray&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Wed, 03 May 2023 06:44:15 GMT</pubDate>
    <dc:creator>MORAYHOONDERT</dc:creator>
    <dc:date>2023-05-03T06:44:15Z</dc:date>
    <item>
      <title>powershell invoke-ncsystemapi and CLI differ for the same user</title>
      <link>https://community.netapp.com/t5/ONTAP-Discussions/powershell-invoke-ncsystemapi-and-CLI-differ-for-the-same-user/m-p/443918#M42132</link>
      <description>&lt;P&gt;When connecting over an SSH-connection, the user: readonly_cl_user can see the tiering-minimum-cooling-days.&lt;/P&gt;&lt;P&gt;::&amp;gt; set d&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Warning: These diagnostic commands are for use by NetApp personnel only.&lt;/P&gt;&lt;P&gt;Do you want to continue? {y|n}: y&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;::*&amp;gt; volume show -fields tiering-minimum-cooling-days&lt;/P&gt;&lt;P&gt;vserver&amp;nbsp; volume&amp;nbsp;&amp;nbsp; tiering-minimum-cooling-days&lt;/P&gt;&lt;P&gt;-------- -------- ----------------------------&lt;/P&gt;&lt;P&gt;nct_cifs02 sns004_cifs_vol01 30&lt;/P&gt;&lt;P&gt;nct_cifs02 sns004_cifs_vol02 30&lt;/P&gt;&lt;P&gt;nct_cifs02 sns004_cifs_vol03 30&lt;/P&gt;&lt;P&gt;nct_cifs02 sns004_cifs_vol04 30&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;BUT:&lt;/P&gt;&lt;P&gt;When running the command from powershell, with invoke-ncsystemapi. It says:&lt;/P&gt;&lt;P&gt;PS H:\&amp;gt;&amp;nbsp; Invoke-NcSystemApi -Request $api -ErrorAction Stop&lt;/P&gt;&lt;P&gt;Invoke-NcSystemApi : Insufficient privileges: user 'readonly_cl_user' does not have write access to this&lt;/P&gt;&lt;P&gt;At line:1 char:2&lt;/P&gt;&lt;P&gt;+&amp;nbsp; Invoke-NcSystemApi -Request $api -ErrorAction Stop&lt;/P&gt;&lt;P&gt;+&amp;nbsp; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; + CategoryInfo&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; : InvalidOperation: (ncu:NcController) [Invoke-NcSystemApi], EAPIPRIVILEGE&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; + FullyQualifiedErrorId : ApiException,DataONTAP.C.PowerShell.SDK.Cmdlets.System.InvokeNcSystemApi&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;PRIVILEGES IN THE ROLE ARE:&lt;/P&gt;&lt;P&gt;::&amp;gt; security login role show -vserver xxx&lt;/P&gt;&lt;P&gt;readonly_cl DEFAULT readonly&lt;BR /&gt;metrocluster check run all&lt;BR /&gt;set all&lt;BR /&gt;system all&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;MY QUESTION IS: WHAT privilege do I need to create for WHICH command on the CLI to make it work in Powershell over the invoke-ncsystemapi-command?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;thank you in advance !&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Moray&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 04 Jun 2025 09:49:54 GMT</pubDate>
      <guid>https://community.netapp.com/t5/ONTAP-Discussions/powershell-invoke-ncsystemapi-and-CLI-differ-for-the-same-user/m-p/443918#M42132</guid>
      <dc:creator>MORAYHOONDERT</dc:creator>
      <dc:date>2025-06-04T09:49:54Z</dc:date>
    </item>
    <item>
      <title>Re: powershell invoke-ncsystemapi and CLI differ for the same user</title>
      <link>https://community.netapp.com/t5/ONTAP-Discussions/powershell-invoke-ncsystemapi-and-CLI-differ-for-the-same-user/m-p/443931#M42135</link>
      <description>&lt;P&gt;Hi Moray,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You can set the diag privilege level in the command. Have a look at this &lt;A href="https://community.netapp.com/t5/Microsoft-Virtualization-Discussions/NetApp-PowerShell-Toolkit-4-5P1-released/td-p/138566" target="_blank" rel="noopener"&gt;example&lt;/A&gt; (browse down)&lt;/P&gt;&lt;P&gt;EG something like this ...&lt;/P&gt;&lt;LI-CODE lang="csharp"&gt;[Array]$command = @("set diag;volume", "show", "-fields", "tiering-minimum-cooling-days")
Try{
   $api = $("&amp;lt;system-cli&amp;gt;&amp;lt;args&amp;gt;&amp;lt;arg&amp;gt;" + ($command -join "&amp;lt;/arg&amp;gt;&amp;lt;arg&amp;gt;") + "&amp;lt;/arg&amp;gt;&amp;lt;/args&amp;gt;&amp;lt;/system-cli&amp;gt;")
   Write-Host $("Executed Command`: " + $([String]::Join(" ", $command)))
   $output = Invoke-NcSystemApi -Request $api -ErrorAction Stop
}Catch{
   Write-Warning -Message $("Failed Executing Command`: " + $([String]::Join(" ", $command))
   Break;
}&lt;/LI-CODE&gt;&lt;P&gt;Hope that helps&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;/Matt&lt;/P&gt;</description>
      <pubDate>Tue, 02 May 2023 02:27:53 GMT</pubDate>
      <guid>https://community.netapp.com/t5/ONTAP-Discussions/powershell-invoke-ncsystemapi-and-CLI-differ-for-the-same-user/m-p/443931#M42135</guid>
      <dc:creator>mbeattie</dc:creator>
      <dc:date>2023-05-02T02:27:53Z</dc:date>
    </item>
    <item>
      <title>Re: powershell invoke-ncsystemapi and CLI differ for the same user</title>
      <link>https://community.netapp.com/t5/ONTAP-Discussions/powershell-invoke-ncsystemapi-and-CLI-differ-for-the-same-user/m-p/443934#M42136</link>
      <description>&lt;P&gt;Hello Matt,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you for your reply, I already tried this but the result is empty. I try the invoke-command as the Powershell Toolkit does not show the minimum-cooling-days field. No luck until now. If I enter your code:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Executed Command: set diag;volume show -fields tiering-minimum-cooling-days&lt;/P&gt;&lt;P&gt;PS H:\&amp;gt;&lt;/P&gt;&lt;P&gt;PS H:\&amp;gt; $output.results.'cli-output'&lt;/P&gt;&lt;P&gt;.....EMPTY&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What do I oversee or do wrong....&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;running on&amp;nbsp;9.11.1P5&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;with regards, Moray&lt;/P&gt;</description>
      <pubDate>Tue, 02 May 2023 06:10:44 GMT</pubDate>
      <guid>https://community.netapp.com/t5/ONTAP-Discussions/powershell-invoke-ncsystemapi-and-CLI-differ-for-the-same-user/m-p/443934#M42136</guid>
      <dc:creator>MORAYHOONDERT</dc:creator>
      <dc:date>2023-05-02T06:10:44Z</dc:date>
    </item>
    <item>
      <title>Re: powershell invoke-ncsystemapi and CLI differ for the same user</title>
      <link>https://community.netapp.com/t5/ONTAP-Discussions/powershell-invoke-ncsystemapi-and-CLI-differ-for-the-same-user/m-p/443935#M42137</link>
      <description>&lt;P&gt;PS H:\&amp;gt; $output.results&lt;/P&gt;&lt;P&gt;status cli-output cli-result-value&lt;BR /&gt;------ ---------- ----------------&lt;BR /&gt;passed 0&lt;/P&gt;</description>
      <pubDate>Tue, 02 May 2023 06:14:43 GMT</pubDate>
      <guid>https://community.netapp.com/t5/ONTAP-Discussions/powershell-invoke-ncsystemapi-and-CLI-differ-for-the-same-user/m-p/443935#M42137</guid>
      <dc:creator>MORAYHOONDERT</dc:creator>
      <dc:date>2023-05-02T06:14:43Z</dc:date>
    </item>
    <item>
      <title>Re: powershell invoke-ncsystemapi and CLI differ for the same user</title>
      <link>https://community.netapp.com/t5/ONTAP-Discussions/powershell-invoke-ncsystemapi-and-CLI-differ-for-the-same-user/m-p/443940#M42140</link>
      <description>&lt;P&gt;Hi Moray,&lt;/P&gt;&lt;P&gt;It seems like a permission issue as the output returned results for me when i ran it on a cluster using admin credentials. I'm guessing you are trying to implement some type of health check as a read-only user? Perhaps the volume REST API might be an alternative option?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;/Matt&lt;/P&gt;</description>
      <pubDate>Tue, 02 May 2023 09:26:23 GMT</pubDate>
      <guid>https://community.netapp.com/t5/ONTAP-Discussions/powershell-invoke-ncsystemapi-and-CLI-differ-for-the-same-user/m-p/443940#M42140</guid>
      <dc:creator>mbeattie</dc:creator>
      <dc:date>2023-05-02T09:26:23Z</dc:date>
    </item>
    <item>
      <title>Re: powershell invoke-ncsystemapi and CLI differ for the same user</title>
      <link>https://community.netapp.com/t5/ONTAP-Discussions/powershell-invoke-ncsystemapi-and-CLI-differ-for-the-same-user/m-p/443945#M42141</link>
      <description>Hi Matt,&lt;BR /&gt;&lt;BR /&gt;Never thought of the REST API, is there a way to learn this quick, as I did not find any clear and simple manual for this, I even do not know how to start.&lt;BR /&gt;&lt;BR /&gt;And yes, I am already running a script that collects daily data and I want the tiering-minumum-cooling-days in it as well. The script runs over the readonly_cl_user with minimal privileges.&lt;BR /&gt;&lt;BR /&gt;Thanks again!&lt;BR /&gt;&lt;BR /&gt;Moray</description>
      <pubDate>Tue, 02 May 2023 10:46:14 GMT</pubDate>
      <guid>https://community.netapp.com/t5/ONTAP-Discussions/powershell-invoke-ncsystemapi-and-CLI-differ-for-the-same-user/m-p/443945#M42141</guid>
      <dc:creator>MORAYHOONDERT</dc:creator>
      <dc:date>2023-05-02T10:46:14Z</dc:date>
    </item>
    <item>
      <title>Re: powershell invoke-ncsystemapi and CLI differ for the same user</title>
      <link>https://community.netapp.com/t5/ONTAP-Discussions/powershell-invoke-ncsystemapi-and-CLI-differ-for-the-same-user/m-p/443974#M42146</link>
      <description>&lt;P&gt;Hi Moray,&lt;/P&gt;&lt;P&gt;You can view the Swagger UI for ONTAP in a browser using: &lt;A href="https://community.netapp.com/" target="_blank"&gt;https://&amp;lt;%cluster%&amp;gt;/docs/api&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Browse the Swagger UI and look for /storage/volume. Here is an example to query the tiering minimum cooling days for all volumes on a cluster:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="csharp"&gt;Param(
   [Parameter(Mandatory = $True, HelpMessage = "The Cluster name or IP Address")]
   [String]$Cluster,
   [Parameter(Mandatory = $True, HelpMessage = "The Credentials to authenticate to the destination cluster")]
   [System.Management.Automation.PSCredential]$Credential
)
#'------------------------------------------------------------------------------
#'Set the certificate policy and TLS version.
#'------------------------------------------------------------------------------
Add-Type @"
   using System.Net;
   using System.Security.Cryptography.X509Certificates;
   public class TrustAllCertsPolicy : ICertificatePolicy {
   public bool CheckValidationResult(
   ServicePoint srvPoint, X509Certificate certificate,
   WebRequest request, int certificateProblem) {
      return true;
   }
}
"@
[System.Net.ServicePointManager]::SecurityProtocol  = [System.Net.SecurityProtocolType]'Tls12'
[System.Net.ServicePointManager]::CertificatePolicy = New-Object TrustAllCertsPolicy
#'------------------------------------------------------------------------------
Function Get-NcAuthorization{
   [Alias("Get-NcAuth")]
   [CmdletBinding()]
   Param(
      [Parameter(Mandatory = $True, HelpMessage = "The Credential to authenticate to the cluster")]
      [ValidateNotNullOrEmpty()]
      [System.Management.Automation.PSCredential]$Credential
   )
   #'---------------------------------------------------------------------------
   #'Set the authentication header to connect to the cluster.
   #'---------------------------------------------------------------------------
   $auth    = [System.Convert]::ToBase64String([System.Text.Encoding]::UTF8.GetBytes($Credential.UserName + ':' + $Credential.GetNetworkCredential().Password))
   $headers = @{
      "Authorization" = "Basic $auth"
      "Accept"        = "application/json"
      "Content-Type"  = "application/json"
   }
   Return $headers;
}#'End Function Get-NcAuthorization.
#'------------------------------------------------------------------------------
#'Enumerate the volume tiering minimum cooling days for all volumes on the cluster.
#'------------------------------------------------------------------------------
$headers = Get-NcAuth -Credential $Credential
$url     = "https://$Cluster/api/storage/volumes?fields=tiering.min_cooling_days"
Try{
   $response = Invoke-RestMethod -Method GET -Uri $Url -Headers $headers -ErrorAction Stop
}Catch{
   Write-Warning -Message $("Failed Invoking Private CLI using URL ""$Url"". Error " + $_.Exception.Message)
   Break;
}
If($Null -ne $response){
   $response.records
}Else{
   Write-Host "No records returned"
}
#'------------------------------------------------------------------------------&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;To enumerate values not available via the REST API you can also use the private CLI via the REST API to invoke a CLI command.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="csharp"&gt;Param(
   [Parameter(Mandatory = $True, HelpMessage = "The URL of the private CLI to invoke")]
   [String]$Url,
   [Parameter(Mandatory = $True, HelpMessage = "The destination cluster name or IP Address")]
   [ValidateSet("GET","PATCH","POST","DELETE")]
   [String]$Method,
   [Parameter(Mandatory = $True, HelpMessage = "The Credentials to authenticate to the destination cluster")]
   [System.Management.Automation.PSCredential]$Credential
)
#'------------------------------------------------------------------------------
#'Set the certificate policy and TLS version.
#'------------------------------------------------------------------------------
Add-Type @"
   using System.Net;
   using System.Security.Cryptography.X509Certificates;
   public class TrustAllCertsPolicy : ICertificatePolicy {
   public bool CheckValidationResult(
   ServicePoint srvPoint, X509Certificate certificate,
   WebRequest request, int certificateProblem) {
      return true;
   }
}
"@
[System.Net.ServicePointManager]::SecurityProtocol  = [System.Net.SecurityProtocolType]'Tls12'
[System.Net.ServicePointManager]::CertificatePolicy = New-Object TrustAllCertsPolicy
#'------------------------------------------------------------------------------
Function Get-NcAuthorization{
   [Alias("Get-NcAuth")]
   [CmdletBinding()]
   Param(
      [Parameter(Mandatory = $True, HelpMessage = "The Credential to authenticate to the cluster")]
      [ValidateNotNullOrEmpty()]
      [System.Management.Automation.PSCredential]$Credential
   )
   #'---------------------------------------------------------------------------
   #'Set the authentication header to connect to the cluster.
   #'---------------------------------------------------------------------------
   $auth    = [System.Convert]::ToBase64String([System.Text.Encoding]::UTF8.GetBytes($Credential.UserName + ':' + $Credential.GetNetworkCredential().Password))
   $headers = @{
      "Authorization" = "Basic $auth"
      "Accept"        = "application/json"
      "Content-Type"  = "application/json"
   }
   Return $headers;
}#'End Function Get-NcAuthorization.
#'------------------------------------------------------------------------------
Function Invoke-OntapCommand{
   [CmdletBinding()]
   Param(
      [Parameter(Mandatory = $True, HelpMessage = "The URL of private CLI to invoke")]
      [String]$Url,
      [Parameter(Mandatory = $True, HelpMessage = "The destination cluster name or IP Address")]
      [ValidateSet("GET","PATCH","POST","DELETE")]
      [String]$Method,
      [Parameter(Mandatory = $True, HelpMessage = "The Credentials to authenticate to the destination cluster")]
      [System.Management.Automation.PSCredential]$Credential
   )
   #'---------------------------------------------------------------------------
   #'Invoke the Private CLI command.
   #'---------------------------------------------------------------------------
   $headers = Get-NcAuth -Credential $Credential
   Try{
      $response = Invoke-RestMethod -Method GET -Uri $Url -Headers $headers -ErrorAction Stop
   }Catch{
      Write-Warning -Message $("Failed Invoking Private CLI using URL ""$Url"". Error " + $_.Exception.Message)
      Return $Null;
   }
   Return $response
}
#'End Function Invoke-OntapCommand.
#'------------------------------------------------------------------------------
#'Display the response.
#'------------------------------------------------------------------------------
$response = Invoke-OntapCommand -Url $Url -Method $Method -Credential $credential
If($Null -ne $response){
   $response.records
}Else{
   Write-Host "No records returned"
}
#'------------------------------------------------------------------------------&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;EG:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="csharp"&gt;PS C:\Scripts\PowerShell\Projects\InvokeOntapCommand&amp;gt; .\InvokeOntapCommand.ps1 -Url "https://192.168.100.200/api/private/cli/volume?fields=tiering-minimum-cooling-days" -Method GET -Credential $credential&lt;/LI-CODE&gt;&lt;P&gt;I suspect you will have similar issues enumerating the information from the REST API though as your issue appears to be related to roles\permissions&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;/Matt&lt;/P&gt;</description>
      <pubDate>Wed, 03 May 2023 05:56:15 GMT</pubDate>
      <guid>https://community.netapp.com/t5/ONTAP-Discussions/powershell-invoke-ncsystemapi-and-CLI-differ-for-the-same-user/m-p/443974#M42146</guid>
      <dc:creator>mbeattie</dc:creator>
      <dc:date>2023-05-03T05:56:15Z</dc:date>
    </item>
    <item>
      <title>Re: powershell invoke-ncsystemapi and CLI differ for the same user</title>
      <link>https://community.netapp.com/t5/ONTAP-Discussions/powershell-invoke-ncsystemapi-and-CLI-differ-for-the-same-user/m-p/443975#M42147</link>
      <description>&lt;P&gt;Hello Matt,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you for your fast response and scripts. Your suspicion was right:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Using my admin account it works for the first script, so the swagger UI.&lt;/P&gt;&lt;P&gt;Using my admin account in the second script, so&amp;nbsp;&lt;SPAN&gt;using the private CLI via the REST API to invoke a CLI command, it gives me the volume back but not the tiering-minimum-cooling-days. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Using the readonly_cl_user account gives me only the volume names for both scripts.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Is there documentation for what I can enter in the CLI for privileges?&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;So I can play around with these privileges? &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Somewhere under the hood must be the right parameter .....&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;security login role create -role readonly_cl -cmddirname volume -access all -vserver xxx&amp;nbsp; did not do the trick for me......&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Thanks again, Moray&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 03 May 2023 06:44:15 GMT</pubDate>
      <guid>https://community.netapp.com/t5/ONTAP-Discussions/powershell-invoke-ncsystemapi-and-CLI-differ-for-the-same-user/m-p/443975#M42147</guid>
      <dc:creator>MORAYHOONDERT</dc:creator>
      <dc:date>2023-05-03T06:44:15Z</dc:date>
    </item>
    <item>
      <title>Re: powershell invoke-ncsystemapi and CLI differ for the same user</title>
      <link>https://community.netapp.com/t5/ONTAP-Discussions/powershell-invoke-ncsystemapi-and-CLI-differ-for-the-same-user/m-p/444138#M42171</link>
      <description>&lt;P&gt;Hi Moray,&lt;/P&gt;&lt;P&gt;Have you tried creating a read-only REST role? Is this just for one vserver or for all vservers? If you just want to target volumes on a single SVM then use: -query "-vserver &amp;lt;%svm%&amp;gt;" at the end of the first command below&lt;/P&gt;&lt;LI-CODE lang="csharp"&gt;security login role create -role volumeread -cmddirname "volume" -access readonly
vserver services web access create -name rest -role volumeread -vserver cluster1
security login create volumeread -application http -authentication-method password -role volumeread 

curl -X GET "https://&amp;lt;%cluster%&amp;gt;/api/storage/volumes?&amp;amp;fields=tiering.min_cooling_days" -H  "accept: application/json" -H  "authorization: Basic &amp;lt;%base64_encoded_credentials%&amp;gt;"&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;/Matt&lt;/P&gt;</description>
      <pubDate>Tue, 09 May 2023 05:09:20 GMT</pubDate>
      <guid>https://community.netapp.com/t5/ONTAP-Discussions/powershell-invoke-ncsystemapi-and-CLI-differ-for-the-same-user/m-p/444138#M42171</guid>
      <dc:creator>mbeattie</dc:creator>
      <dc:date>2023-05-09T05:09:20Z</dc:date>
    </item>
  </channel>
</rss>

