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

New-IntersightManagedObject adding a 's' to ObjectType of TimeSeries #113

Open
briamorr opened this issue Aug 23, 2023 · 0 comments
Open
Labels
bug Something isn't working

Comments

@briamorr
Copy link

Describe the bug
Due to lack of a Get-IntersightTelmetryTimeseries cmdlet was trying to use New-IntersightManagedObject as a workaround.

Noticed that it was sending to the wrong API endpoint with an extra 's' unless I do the following:

New-IntersightManagedObject -ObjectType telemetry.TimeSerie -AdditionalProperties $hash

To Reproduce

$hash=@{
"aggregations"=@(@{"fieldName"="sumBytesTx"
"fieldNames"="sumBytesTx"
"name"="traffic"
type="longSum"})
"dataSource"="ucs_ether_port_stat"
"dimension"="deviceId"
"granularity"="all"
"intervals"= "2023-08-15T17:23:40+00:00/2023-08-22T17:23:40+00:00"
"metric"="traffic"
"postAggregations"=@()
"queryType"="topN"
"threshold"=100
}


New-IntersightManagedObject -ObjectType telemetry.TimeSeries -AdditionalProperties $hash
New-IntersightManagedObject: The remote server returned an error: (403) Forbidden.
{"code":"InvalidUrl","message":"Operation not supported. Check if the API path and method are valid.

However, this works fine if I truncate the tailing 's' from TimeSeries

New-IntersightManagedObject -ObjectType telemetry.TimeSerie -AdditionalProperties $hash
[{"timestamp":"2023-08-15T17:23:40.000Z","result":[{"deviceId":"6397e9ed6f72612d3867f5c7","traffic":814811023646}]}]

Version used
1.0.11.13236
SaaS

Expected behavior
-Being able to pass ObjectType=telemetry.TimeSeries
-Specialized cmdlets for TimeSeries API

Screenshots
If applicable, add screenshots to help explain your problem.

Additional context
Add any other context about the problem here.

@briamorr briamorr changed the title New-IntersightManagedObject adding a 's' to ObjectType to TimeSeries ObjectType New-IntersightManagedObject adding a 's' to ObjectType of TimeSeries Aug 23, 2023
@vvb vvb added the bug Something isn't working label Sep 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants