HPE OneView
1758568 Members
1929 Online
108872 Solutions
New Discussion юеВ

How can I get a filename/uri for an LE-Dump I created with the OneView REST API 5800?

 
ChrisROI
Occasional Contributor

How can I get a filename/uri for an LE-Dump I created with the OneView REST API 5800?

Hi

How can I get a filename/uri for an LE-Dump I created with the REST API?

xapi version: 5800

my func on pwsh works fine and creates the LE-Dump in OVA:

function create_le_dump{
 param($x_api_version, $session_key, $le_uri)

$headers = New-Object "System.Collections.Generic.Dictionary[[String],[String]]"
$headers.Add("X-Api-Version", $x_api_version)
$headers.Add("Content-Type", "application/json")
$headers.Add("Auth", "$session_key")

$body = @"
{
`"errorCode`": `"LE`",
`"excludeApplianceDump`": true
}
"@

$URI='https://192.168.60.10'+$le_uri+'/support-dumps'

$response = Invoke-RestMethod $URI -Method 'POST' -Headers $headers -Body $body

return $response 

}


But the task uri Iam getting back sends me no file name....
It only gives me back the uri of the Logical Enclosure Group.....
So a GET on that task uri gives me not the file, it gives me back the le data . Under associatedResource, resourceUri:
/rest/logical-enclosures/df5c349c-ce48-4cf6-8d6a-d36282f5e0cd

If I create a LE-Dump in the OVA manually and check the task uri, then I get a filename and the .sdmp file back. (associatedResource, resourceUri)

resourceUri : /rest/appliance/support-dumps/oneview-lab.de-LE-LELAB12-2024_03_28-08_55_40.085928.sdmp

So how can I get a filename/uri for an LE-Dump I created with the REST API?

And after the GET, how should I convert the response into an file?

Thanks for your support

2 REPLIES 2
TVVJ
HPE Pro

Re: How can I get a filename/uri for an LE-Dump I created with the OneView REST API 5800?

Hello,

You may refer to "HPE OneView 8.6 API Reference for HPE Synergy" and see if it helps.

Regards,

I work for HPE
Views expressed herein are my personal opinion and are not the views of HPE

Accept or Kudo

Suvamay
HPE Pro

Re: How can I get a filename/uri for an LE-Dump I created with the OneView REST API 5800?

Please find the below link to get the info 

https://techlibrary.hpe.com/docs/enterprise/servers/oneview5.0/cicf-api/en/index.html#rest/logical-enclosures

The response to the POST request includes a Task URI (returned via the Location header) that can be used to track the progress of the support dump and download the file when complete.

If the logical enclosure support dump was generated successfully, the taskState will change to "Completed" and the resourceUri attribute under the associatedResource object will change to the download link for the support dump. To download the support dump, perform a GET request on the provided URI.

I'm an HPE employee.
[Any personal opinions expressed are mine, and not official statements on behalf of Hewlett Packard Enterprise]
Accept or Kudo