Server Management - Remote Server Management

HPE Amplifier pack API

Occasional Visitor

HPE Amplifier pack API

I"m trying to add servers via the RestAPI from Amplifier pack  via https://[server FQDN]/redfish/v1/AggregatorService/ManagedSystems/, but run into following error :

Invoke-webrequest : Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.
Please contact the server administrator at [no address given] to inform them of the time this error occurred, and the actions you performed just before this error.
More information about this error may be available in the server error log.
At C:\Users\TestAmplifier.ps1:98 char:14
+ ... addobject = Invoke-webrequest -ContentType 'application/json' -Uri $a ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (System.Net.HttpWebRequest:HttpWebRequest) [Invoke-WebRequest], WebException
+ FullyQualifiedErrorId : WebCmdletWebResponseException,Microsoft.PowerShell.Commands.InvokeWebRequestCommand

I use following code (after creating a connection
$addobject = Invoke-webrequest -ContentType 'application/json' -Uri https://[server FQDN]/redfish/v1/AggregatorService/ManagedSystems/ -Method POST -body $addserverjson -Headers $headers

Amplifier pack version 1.55

A GET works , so connection is OK.

Any idea in what logfile I can see what is going wrong ?

Occasional Visitor

Re: HPE Amplifier pack API

Found the reason : issue with the ILO of the server trying to add , restart of the ILO fixed it.
Would have been nice if Amplifier pack just reported a "connection" error instead of 500 internal server error.
Next issue is that the list of systems van API  only returns the first 500 servers ( out of +-800) ...


Re: HPE Amplifier pack API


Please follow the below steps.

Log into Amplifier > Diagnostics and save the support logs.  

 You can check the Diagnostics log for the cause of this issue.

If you feel this was helpful please click the KUDOS! thumb below!   


I am a HPE Employee

Accept or Kudo


Re: HPE Amplifier pack API


To extract all assets from IAP, when you have more than 500 is to used the "skip" parameter.

example :
you used normally  "/redfish/v1/AggregatorService/Managed/Systems" to get your asset.

Juste make a loop like this (pseudo code)
total_asset = 1200
i = 0
while total_asset > 500 :
    num = i * 500
    query = (your_query) "/redfish/v1/AggregatorService/Managed/Systems/?$Skip={num}"
    data = data + query
   total_asset = total_asset -500

At each loop, you skip the "num" first assets of the query.
Like this, in 2 iterations, you can have your 800 assets.