この記事の目的
公式ドキュメントにはリファレンスが記載されているが、実行するとき毎回変換する必要があるため、備忘の為、記載する
実行するAPI
Azure AI Language / Custom question answering のREST API である Question Answering - Get Answers APIを実行する
Language Studio のテスト時に実行されているAPI

実行方法
PowerShell の Invoke-RestMethod を使用して実行する
実行例
$key = "<api key>"
$Resource = "<Resource 名>"
$ProjectName = "<プロジェクト名>"
$DeploymentName = "<デプロイメント名>" #Studioと同じなら"test"
$apiversion = "<REST APIのバージョン>" #Stuioと同じなら"2021-10-01"
$url = "https://$Resource.cognitiveservices.azure.com/language/:query-knowledgebases?projectName=$ProjectName&api-version=$apiversion&deploymentName=$DeploymentName"
$headers = @{}
$headers["Content-Type"] = "application/json"
$headers["Ocp-Apim-Subscription-Key"] = "$key"
$body = '{
"question": "How do I setup my surface book?"
}'
$response = Invoke-RestMethod -Uri $url -Method POST -Headers $headers -Body $body
$response | Format-List
key などの取得方法はこちらを参照
APIのバージョンはREST APIのリファレンスを参照