HP Insight Control Server Provisioning 7.3 Update 1 Administrator Guide

if( !$loginresponse) { Write-Host "*** ERROR *** Login Failed"; exit; }
#########################################################################################
# make all subsequent requests with the auth token
$webclient.Headers.add('auth', $loginresponse.sessionID)
#########################################################################################
# if a single job was requested get the details for it
if($onejob)
{
showJobDetails("$joblisturl/$onejob")
exit
}
#########################################################################################
# get the list of jobs
$joblist = $webclient.DownloadString($joblisturl) | ConvertFrom-Json
foreach($onejob in $joblist.members) {
if($joblistonly -or $onejob.state -eq "STATUS_PENDING" -or $onejob.jobProgress -ne $null
-or $onejob.jobResult -ne $null)
{
#--- display for list only and 7.2.2 and later
Write-Host "`n`n"
$onejob
continue
}
# get details
else
{
# this is pre-7.2.2 when progress/result details are not in the job listing
# OR this is a scheduled job in 7.2.2 or later where progress/result details don't exist yet
$joburi = $onejob.uri
showJobDetails("https://$applianceip$joburi")
}
}
Common errors from listing the jobs:
500 — Internal Server Error
Resolution: Create a support dump
403 — Request Forbidden
Cause: Failed to login a user with provided credentials
Resolution: Try logging in again with valid credentials
400 — Bad Request
Cause: When making a REST call one of the supplied parameters could be missing, malformed
or invalid.
Resolution: Verify that parameters are in correct form.
REST API call to upload the update file
When updating your appliance to a new version you can use a REST API to upload the update
file to the appliance. The REST API allows you to upload a file to your appliance and then you can
use the Update Appliance screen to install the update. Refer to the HP Insight Control Server
Provisioning Installation Guide chapter on Updating for more information on updating your
appliance.
A list of the components of the REST call is shown in the following table:
DescriptionREST component
https://<appliance-hostname-or-address>/rest/appliance/firmware/image
where you supply <appliance-hostname-or-address>
URL:
POSTMessage Type:
accept: application/jsonHTTP Headers:
REST API call to upload the update file 113