curl -s -H "Content-Type: application/json" \
  -H "Authorization: Bearer $(gcloud auth print-access-token)" \
  https://infer.googleapis.com/v1/projects/[YOURPROJECTIDHERE]/datasets/gdeltbq_geg_v1:query \
  -d'{
  "name": "gdeltbq_geg_v1",
  "queries": [{
    "query": {
      "type": "TYPE_AND",
        "children": [
          {
            "type": "TYPE_TERM",
            "term": {
              "name": "ted",
              "value": "[TEMPLATE_DAY]"
            }
          },
        ],
     },
    "distributionConfigs": {
      "dataName": "[TEMPLATE_ETYPE]",
      "maxResultEntries": 15,
      "bgprobExp": 0.3
    }
  }]
}' > [TEMPLATE_TMPFILE]
