< Back

Get-HPERedfishHttpData

Tue Jan 14, 2020 1:57 am

NAME Get-HPERedfishHttpData



SYNOPSIS

Retrieves HTTP data for provided Odataid.





SYNTAX

Get-HPERedfishHttpData [-Odataid] <String> [[-Session] <PSObject>] [-DisableCertificateAuthentication]

[<CommonParameters>]





DESCRIPTION

Retrieves the HTTP web response with the redfish data returned from the source pointed to by the Odataid in

PSObject format.

This cmdlet uses the session information to connect to the Redfish data source and retrieves the webresponse which

has the headers from which 'Allow' methods can be found. These can be GET, POST, PATCH, PUT, DELETE. Session

object with ???????RootUri????????, ???????X-Auth-Token???????? and ???????Location???????? information of the session must be provided for using

sessions to retrieve data.





PARAMETERS

-Odataid <String>

Specifies the value of Odataid of Redfish data source to be retrieved. This is concatenated with the root URI

(obtained from session parameter) to get the URI to send the WebRequest to.



Required? true

Position? 1

Default value

Accept pipeline input? true (ByValue, ByPropertyName)

Accept wildcard characters? false



-Session <PSObject>

Session PSObject returned by executing Connect-HPERedfish cmdlet. It must have RootURI and X-Auth-Token for

executing this cmdlet.



Required? false

Position? 2

Default value

Accept pipeline input? true (ByPropertyName)

Accept wildcard characters? false



-DisableCertificateAuthentication [<SwitchParameter>]

If this switch parameter is present then server certificate authentication is disabled for the execution of

this cmdlet. If not present it will execute according to the global certificate authentication setting. The

default is to authenticate server certificates. See Enable-HPERedfishCertificateAuthentication and

Disable-HPERedfishCertificateAuthentication to set the per PowerShell session default.



Required? false

Position? named

Default value False

Accept pipeline input? false

Accept wildcard characters? false



<CommonParameters>

This cmdlet supports the common parameters: Verbose, Debug,

ErrorAction, ErrorVariable, WarningAction, WarningVariable,

OutBuffer, PipelineVariable, and OutVariable. For more information, see

about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).



INPUTS

System.String

You can pipe the Odataid parameter to Get-HPERedfishHttpData.





OUTPUTS

System.Management.Automation.PSCustomObject

Get-HPERedfishHttpData returns a PSCustomObject that has the retrieved HTTP data.





NOTES





See typical usage examples in the HPERedfishExamples.ps1 file installed with this module.



-------------------------- EXAMPLE 1 --------------------------



PS C:\\>$httpSys = Get-HPERedfishHttpData -Odataid /redfish/v1/systems/1/ -Session $s



PS C:\\> $httpSys





IsMutuallyAuthenticated : False

Cookies : {}

Headers : {Allow, Link, OData-Version, X-Frame-Options...}

SupportsHeaders : True

ContentLength : 2970

ContentEncoding :

ContentType : application/json; charset=utf-8

CharacterSet : utf-8

Server : HPE-iLO-Server/1.30

LastModified : 2/9/2016 12:02:06 PM

StatusCode : OK

StatusDescription : OK

ProtocolVersion : 1.1

ResponseUri : https://192.184.217.212/redfish/v1/systems/1/

Method : GET

IsFromCache : False







PS C:\\> $httpSys.Headers['Allow']

GET, HEAD, POST, PATCH



PS C:\\> $httpSys.Headers['Connection']

keep-alive



The example shows HTTP details returned and the 'Allow' and 'Connection' header values











RELATED LINKS

http://www.hpe.com/servers/powershell