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-RubrikEvent endpoint has changed in 5.2 #626

Closed
mwpreston opened this issue May 13, 2020 · 4 comments · Fixed by #684
Closed

Get-RubrikEvent endpoint has changed in 5.2 #626

mwpreston opened this issue May 13, 2020 · 4 comments · Fixed by #684

Comments

@mwpreston
Copy link
Contributor

Current Behavior:

The endpoint used to query events has changed in 5.2. It now resides in /v1/events rather than /internal/events

PS C:\Users\mwpreston> get-rubrikevent -Verbose
VERBOSE: Validate the Rubrik token exists
VERBOSE: Found a Rubrik token for authentication
VERBOSE: Gather API Data for Get-RubrikEvent
VERBOSE: Selected 1.0 API Data for Get-RubrikEvent
VERBOSE: Load API data for Get-RubrikEvent
VERBOSE: Description: Retrieve information for the latest of related events that match the value specified in any of the following categories: type, status, or ID, and limit events by date.
VERBOSE: Build the URI
VERBOSE: URI = https://cluster-c-rr.rubrik.us/api/internal/event
VERBOSE: Build the query parameters for event_series_id,before_date,limit,object_name,status,object_ids,after_id,event_type,object_type,after_date
VERBOSE: URI = https://cluster-c-rr.rubrik.us/api/internal/event?limit=50
VERBOSE: Submitting the request
VERBOSE: GET https://cluster-c-rr.rubrik.us/api/internal/event?limit=50 with 0-byte payload
VERBOSE: received 103-byte response of content type text/plain
WARNING: user_error
WARNING: The events endpoints have moved from internal to v1
OperationStopped: C:\GitRepo\rubrik-sdk-for-powershell\Rubrik\Private\Submit-Request.ps1:94
Line |
94 | throw $_.Exception
| ~~~~~~~~~~~~~~~~~~
| Response status code does not indicate success: 422 (Unprocessable Entity).

PS C:\Users\mwpreston>

Expected Behavior:

Need to update Get-RubrikAPIData to support change in 5.2 - also, data is no longer encapsulated in a data stanza, instead, an events stanza is used

@bbrueske
Copy link

Any update on this? Any word on when Rubrik may have a fix for this?

@jaapbrasser
Copy link
Contributor

Hello @bbrueske,

Yes, I am currently working on fixing this, the initial draft PR is up and should be ready in the next 24hrs:

#684

@sujanrubrik
Copy link

sujanrubrik commented Sep 10, 2020

@jaapbrasser
When the "Get-RubrikEvent " cmdlet will be available for the customers to use in the CDM 5.2
What's the ETA for that.

@jaapbrasser
Copy link
Contributor

Hello Sujan,

The changes have been merged into the Devel repository, once the other required changes for full 5.2 compatibility are merged ( Currently being reviewed in #687 ) then we will create a new release.

If you already want to use the code today, then you can either download it manually from GitHub, or you can grab the prerelease version that I just published to the PowerShell Gallery. You can install the prerelease by running the following command in a recent version PowerShell:

Install-Module -AllowPrerelease Rubrik -Force

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants