Vito Liu and Shamrai Aleksander solution verified. Below is my code:
$url_base = "https://dev.azure.com/{org}/{project}/"
$url_endpoint = "apis/wit/wiql?$top=True&api-version=7.1-preview.2"
$url = $url_base + $url_endpoint
$PAT = "Your PAT"
$user = ""
$token = [Convert]::ToBase64String([Text.Encoding]::ASCII.Getbytes(("{0}:{1}" -f $user,$PAT)))
$header = @{Authorization = "Basic $token"; 'Content-Type' = application/json}
$body = @{'query' = 'Select [System.Id], [System.Title], [System.State] From WorkItems Where [System.WorkItemType] = "Task" AND [State] = "Active"}
$response = Invoke-RestMethod -uri $url -Method POST -headers $header -Body ($body | ConvertTo-Json)
$response
The only issue I ran into was the HTTP variable $top which claims to be a INT32 data type in msft documentation is a boolean. When you place in an integer the code returns an error claiming that $top must be a Boolean value.
Does anyone have a solution to limit the amount of queries received?