Close a Change via API and PowerShell (JSON Format)

Close a Change via API and PowerShell (JSON Format)

Does anyone know the correct JSON to close a Change?

  1. $JSON = @"
    {
        "operation": {
            "details": {
                "stagename": "Close",
                "statusname": "Closed - Completed",
                "statuscomments" : "Closed via API",
            }
        }
    }
    "@

    [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
    $postparams = @{OPERATION_NAME = 'update'TECHNICIAN_KEY = $apikeyINPUT_DATA = $JSONFORMAT = 'JSON'}
    $JSONresult = Invoke-WebRequest -Uri $URI -Method POST -Body $postparams -UseBasicParsing | ConvertFrom-Json

                  New to ADSelfService Plus?