Create Analytics Job v2

POST https://{{apiHost}}/alpha/analytics

Create Analytics Job v2

Send the request to start an Analytics job.

Body Attibutes:

  • where: Combination of conditions in BigQuery SQL language.
  • frequency: Period of time to aggregate estimates. It can be MONTH or YEAR.
  • date_field: Date field to be used for the time-series. If unknown or unsure, use publication_datetime. For more specialised queries, fields ingestion_datetime and modification_datetime are also available.
  • group_dimensions: Array of strings that will be used for the estimates break-down.
  • top: Maximum number of group_dimensions values per period of time.

Request Body

{"query"=>{"where"=>"language_code IN ('en', 'fr', 'de') AND publication_datetime >= '2017-01-01 00:00:00' AND REGEXP_CONTAINS(subject_codes, r'(?i)(^|,)(gfraud|gdatap|clabdi)($|,)') AND REGEXP_CONTAINS(company_codes, r'(?i)(^|,)(mcrost|goog|applc)($|,)')", "frequency"=>"MONTH", "date_field"=>"publication_datetime", "group_dimensions"=>["source_code", "subject_codes", "region_codes", "industry_codes"], "top"=>10}}

HEADERS

KeyDatatypeRequiredDescription
user-keystring
Content-Typestring
X-API-VERSIONstring