Skip to content

Small Paco Event Query Language

Bob Evans edited this page Oct 7, 2013 · 5 revisions

There is a small query language to the /events endpoint that allows narrowing the events returned.

Introduction

There is a simple query language for retrieving select events. It allows querying across experiments, by date ranges, and for key/value pairs.

You can also append &json or &csv to get json or csv output respectively instead of an html table.

BNF Grammar

param_string :: 'q=\'' keyvalue_pair_list '\'' 
keyvalue_pair_list :: EMPTY |keyvalue_pair (':' keyvalue_pair)* 
EMPTY :: '' 
keyvalue_pair :: date_range | keyword ('=' value)+ 
date_range :: 'date_range=' date (-date)+ 
date :: [0-0]{4}[0-9]{2}[0-9]{2} 
keyword :: builtin_keyword | app_specific_keyword
builtin_keyword :: 'who' | 'when' | 'lat' | 'lon' | 'appId' | 'paco_version'
app_specific_keyword :: [a-zA-Z_][0-9a-zA-Z_]* 
value :: digit | word 
digit :: [0-9]+ 
word :: quoted_word | plain word 
quoted_word :: quote plain_word quote
quote :: ' | " 
plain_word :: [0-9a-zA-Z_ ]+  

==Examples== {{{
q='experimentName=My Experiment' }}} q='experimerntId=' {{{
q='restaurant' }}} q='restaurant=CafeMoma' q='[email protected]:weight' q='restaurant=CafeMoma:date_range=20090831-20090902' q='restaurant=CafeMoma:date_range=20090831'

Clone this wiki locally