Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi
What's wrong with this please?
# Set URI variable for retrieving properties
[String]$Uri = "https://$ClusterIP/api/private/cli/system/service-processor/fields=node,type,fw_version,status,address"
Try{
# Trigger REST API call and store in a variable
$UriResponse = Invoke-RestMethod -Method GET -Uri $Uri -Headers $Headers -ErrorAction Stop
Thanks
Solved! See The Solution
1 ACCEPTED SOLUTION
TAO1 has accepted the solution
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
If the post has your exact request, then I think the issue is you need to change "/fields=" to "?fields=" in your URI. So it would look like this:
# Set URI variable for retrieving properties
[String]$Uri = "https://$ClusterIP/api/private/cli/system/service-processor?fields=node,type,fw_version,status,address"
Try{
# Trigger REST API call and store in a variable
$UriResponse = Invoke-RestMethod -Method GET -Uri $Uri -Headers $Headers -ErrorAction Stop
3 REPLIES 3
TAO1 has accepted the solution
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
If the post has your exact request, then I think the issue is you need to change "/fields=" to "?fields=" in your URI. So it would look like this:
# Set URI variable for retrieving properties
[String]$Uri = "https://$ClusterIP/api/private/cli/system/service-processor?fields=node,type,fw_version,status,address"
Try{
# Trigger REST API call and store in a variable
$UriResponse = Invoke-RestMethod -Method GET -Uri $Uri -Headers $Headers -ErrorAction Stop
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks very much Robert.
I was following this article. It gives an example as this: /api/private/cli/system/fru-check/fields=node,fru_name,fru_status
Thanks again
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Glad you shared the article link. I just updated the article to correct that line in the example.
Community Manager \\ NetApp
