functions/Invoke-Analysis.ps1

function Invoke-Analysis
{
    [cmdletbinding()]
    param(
        [Parameter(Mandatory=$true)]
        [string]$AnalysisPrepID
    )

    $uri = $CDXSERVER + "/api/analysis-prep/" + $AnalysisPrepID + "/analyze"

    $AnalysisJobInfo = Invoke-RestMethod -Uri $uri -Method Post -Headers $headers -ContentType "application/json" 

    Write-Verbose ( $AnalysisJobInfo | Format-Table | Out-String )

    $AnalysisJobInfo.jobId
}