Hello,
Please try updated command below:
API_VERSION=2022-04-01-preview
az monitor activity-log list --offset 30d --max-events 10000 --namespace microsoft.containerservice --query "[?eventName.value == 'EndRequest' && contains(not_null(httpRequest.uri,''), '${API_VERSION}')]"
If this works for you please accept the answer.
Regards,