Add_workflow_for_techpubs |
---|
AUTH1 | |
---|
JIRAIDAUTH | SYM-22656 |
---|
REV5 | |
---|
REV6 | |
---|
REV3 | |
---|
REV1 | |
---|
|
...
Log into REST
Login using a public signed certificate (untested)
...
Login without certificate
...
Code Block |
---|
$url= "https://134.56.226.215/rest/system?action=importconfig"
$body = "--MyBoundary`n"
$body += 'Content-Disposition: form-data; name="Filename"; filename="symphonyconfig.xml"'
$body += "`nContent-Type: application/xml`n`n"
$body += $(get-content symphonyconfig.xml -raw)
$body += "`n--MyBoundary--"
Invoke-RestMethod -uri $url -method POST -ContentType "multipart/form-data; boundary=MyBoundary" -body $body -WebSession $ps |
Upload new Sbc Firmware (Does not work)
Log in with cURL
This operation allows login to the
with cURL, and stores the PHP Session ID into Powershell for reuse later. Code Block |
---|
$login = ./curl.exe -k --data "Username=restuser&Password=restpass" -i -v |
Code Block |
---|
$url= "https://134192.56168.226123.21553/rest/partition/1?action=upgrade"
$body = "--MyBoundary`n"
$body += 'Content-Disposition: form-data; name="Filename"; filename="sbc1000-release-3.1.0.img"'
$body += "`nContent-Type: application/octet-stream`n`n"
$body += $(get-content sbc1000-release-3.1.0.img -raw)
$body += "`n--MyBoundary--"
Invoke-RestMethod -uri $url -method POST -ContentType "multipart/form-data; boundary=MyBoundary" -body $body -WebSession $ps
|
Upload new SbcComms (Does not work)
...
login
$PHPSESSID = 0
foreach ($line in $login) {
if ($line.contains("PHPSESSID=")) {
$correctline = $line.split(";")
$splitedline = $correctline.split("=")
$PHPSESSID = $splitedline[1]
}
} |
Update SbcComms
This operation allows installation of Communication service updates on the ASM. Refer to Resource - sbaconfig.
Query
Code Block |
---|
curl.exe --cookie PHPSESSID=$PHPSESSID -k -i https://134.56.226.215/rest/sbaconfig?action=sbaupgrade |
...
...
...
F sbaInstallFilename=@setup.msi |
Response
Code Block |
---|
<?xml version="1.0"?>
<root>
<status>
<http_code>200</http_code>
</status>
</root> |
Action end on status
Code Block |
---|
$url = "https://134.56.226.215/rest/sbaactionstatus"
Invoke-RestMethod -Uri $url -Method GET -WebSession $MyPs
<?xml version="1.0"?>
<root>
<status>
<http_code>200</http_code>
</status>
<sbaactionstatus href="https://134.56.226.215/rest/sbaactionstatus">
<rt_Success>1</rt_Success>
<rt_ActionType>15</rt_ActionType>
<rt_PercentComplete>100</rt_PercentComplete>
<rt_Duration>5</rt_Duration>
<rt_StatusText>setup.msi: Update Complete</rt_StatusText>
<rt_AllActionsBitmap>0</rt_AllActionsBitmap>
<rt_ActionStartTime>0</rt_ActionStartTime>
</sbaactionstatus>
</root> |
Scripting with REST
Basic Handler (PUT, POST, GET, DELETE)
...