Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $apiToken = $env:ApiToken
- $username = $env:Username
- $apiUrl = $env:ApiUrl
- $appsUri = "$Uri/$Username/apps?apiToken=$ApiToken"
- $apps = Invoke-RestMethod -Uri $appsUri
- Write-Output $apps
- $jsonBody = @{Description = $description} | ConvertTo-JSON
- $newAppName = 'NewApp004'
- $createAppUrl = "$apiUrl/$username/apps/$newAppName?apiToken=$apiToken"
- $params = @{
- Uri = $createAppUrl
- Method = 'Put'
- ContentType = 'application/json'
- Body = $jsonBody
- }
- $returnValue = Invoke-RestMethod @params
- Write-Output $returnValue
Add Comment
Please, Sign In to add comment