functions/Invoke-AnalysisPrep.ps1

Function Invoke-AnalysisPrep
{
    [cmdletbinding()]
    param(
        [Parameter(Mandatory=$true)]
        [string]$ProjectID
    )
    
    
    $uri = $CDXSERVER + "/api/analysis-prep"

    $body = @{
                projectId= $ProjectID
            } | ConvertTo-Json

    Write-Verbose $body

    $PrepInfo = Invoke-RestMethod -Uri $uri -Method Post -Headers $headers -ContentType "application/json" -Body $body
    
    Write-Verbose ( $PrepInfo | Format-Table | Out-String )

    $PrepInfo.prepID
}