Agree with Shamrai Aleksander.
We could list all bugs via wiql query and then get the work item detail info via the REST API you shared in the issue description.
Here is power shell script sample:
$connectionToken="{PAT}"
$base64AuthInfo= [System.Convert]::ToBase64String([System.Text.Encoding]::ASCII.GetBytes(":$($connectionToken)"))
$WorkItemQueryURL = "https://dev.azure.com/{Org name}/{Project name}/{Team name}/_apis/wit/wiql?api-version=6.0"
$body =@"
{
"query": "Select [System.Id], [System.Title], [System.State] From WorkItems Where [System.TeamProject] = @project AND [System.WorkItemType] = 'Bug'"
}
"@
$WorkItem = Invoke-RestMethod -Uri $WorkItemQueryURL -ContentType "application/json" -Body $body -Headers @{Authorization=("Basic {0}" -f $base64AuthInfo)} -Method POST
Write-host $WorkItem.workItems.id
ForEach ($ID in $WorkItem.workItems.id)
{
$WorkItemInfoURL = "https://dev.azure.com/{Org name}/{Project name}/_apis/wit/workitems/$($ID)?api-version=6.0"
Invoke-RestMethod -Uri $WorkItemInfoURL -Method Get -Headers @{Authorization=("Basic {0}" -f $base64AuthInfo)}
}