Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Get-RubrikAPIToken fails with unclear error message #381

Closed
jaapbrasser opened this issue Jul 14, 2019 · 0 comments
Closed

Get-RubrikAPIToken fails with unclear error message #381

jaapbrasser opened this issue Jul 14, 2019 · 0 comments

Comments

@jaapbrasser
Copy link
Contributor

Current Behavior:

Provide information about the failure by issuing the command using the -Verbose command.

Get-RubrikAPIToken
Invoke-WebRequest : Failed to parse the query parameter
At C:\temp\rubrik-sdk-for-powershell\Rubrik\Private\Invoke-RubrikWebRequest.ps1:17 char:19
+ ...       $result = Invoke-WebRequest -UseBasicParsing @PSBoundParameters
+                     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidOperation: (System.Net.HttpWebRequest:HttpWebRequest) [Invoke-WebRequest], WebExc
   eption
    + FullyQualifiedErrorId : WebCmdletWebResponseException,Microsoft.PowerShell.Commands.InvokeWebRequestCommand

Expected Behavior:

Steps to Reproduce:

Please provide detailed steps for reproducing the issue.

  • Connect-Rubrik -Token xxx
  • Get-RubrikAPIToken

Failure Logs

Verbose log

Get-RubrikAPIToken -Verbose
VERBOSE: Validate the Rubrik token exists
VERBOSE: Found a Rubrik token for authentication
VERBOSE: Gather API Data for Get-RubrikAPIToken
VERBOSE: Selected 5.0 API Data for Get-RubrikAPIToken
VERBOSE: Load API data for
VERBOSE: Description: Retrieves list of generated API tokens from the Rubrik cluster
VERBOSE: Build the URI
VERBOSE: URI = https://192.168.150.121/api/internal/session
VERBOSE: Build the query parameters for user_id
VERBOSE: Query = Found limit flag
VERBOSE: URI = https://192.168.150.121/api/internal/session?limit=9999
VERBOSE: Submitting the request
VERBOSE: GET https://192.168.150.121/api/internal/session?limit=9999 with 0-byte payload
Invoke-WebRequest : Failed to parse the query parameter
At C:\temp\rubrik-sdk-for-powershell\Rubrik\Private\Invoke-RubrikWebRequest.ps1:17 char:19
+ ...       $result = Invoke-WebRequest -UseBasicParsing @PSBoundParameters
+                     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidOperation: (System.Net.HttpWebRequest:HttpWebRequest) [Invoke-WebRequest], WebExc
   eption
    + FullyQualifiedErrorId : WebCmdletWebResponseException,Microsoft.PowerShell.Commands.InvokeWebRequestCommand
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants