test
This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
#creazione nuovo mirror
|
||||
|
||||
#compongo url da chiamare per creazione nuovo mirror
|
||||
$callUrl = "https://liman.egalware.com/ELM.API/api/release/save"
|
||||
$dateTime = (Get-Date).toString("yyyy-MM-ddTHH:mm:ss.fffZ")
|
||||
#creo body da convertire in json
|
||||
$body =
|
||||
@{
|
||||
codInst = "EgalWare"
|
||||
codApp = "TestMachine"
|
||||
uplAppId = "UpdateManager"
|
||||
masterKey = "PMmdzvCDsQ8tf3NKRTtXnKSI50/b1iFFjrAfwQlvgK/1o/30sxf+jUUqGYsdQ/Q3"
|
||||
tipo = "Machine"
|
||||
versNum = "0.1.2.5"
|
||||
versText = "0.1B5"
|
||||
releaseDate = $dateTime
|
||||
relTags = "DEMO"
|
||||
}
|
||||
|
||||
#converto body in json prima di passarlo alla chiamata POST
|
||||
$jsonBody = ConvertTo-Json -InputObject $body
|
||||
#chiamata api POST che crea mirror con url e body specificati
|
||||
Invoke-WebRequest -Method Post -URI $callUrl -ContentType "application/json" -Body $jsonBody -UseBasicParsing
|
||||
#conversione da Json della risposta alla chiamata POST
|
||||
# $parsedRebuild = $rebuildResponse.Content | ConvertFrom-Json
|
||||
Reference in New Issue
Block a user