Dataset Schema

Use this route to return all the information about a Published Dataset, including Questions, Answers and any details.

This is a GET route. Must include the DATASET_ID and always include the API_KEY.

The DATASET_ID is the Dataset this Publication referenced, this is a alphanumeric ID (i.e. "my-cool-dataset").

JSON Example Output

Example:
                                       
                                          curl "https://api.monqcle.com/siteitem/[DATASET_ID]/get_by_dataset?site_key=[API_KEY]"
                                       
                                    
Example (Try it):
                                       
                                          curl "https://api.monqcle.com/siteitem/gmo-a1/get_by_dataset?site_key=56e805b9d6c9e75c1ac8cb12"
                                       
                                    

Dataset Query

Querying a Dataset requires a DATASET_ID and various parameters. This route can be either GET or POST.

The parameters "filter-parent" and "filter-child" are used with the QUESTION_ID as key (e.g. filter-parent[55e469c1c304740b715af4d1]=1), this equals a specific response to a question.

For a GET request (not using the Dataset Query Form), include these in the querystring:
do_get=true
and-or-or[]=$and
'and-or-or' can be either '$and' or '$or' operators, depending on the query you wish to submit.

Always include the API_KEY.

Results are in JSON.
See Dataset Schema documentation for details about using these results with Questions and Answers.

Question and Answer data is key/value, for example:
"55e9c928c304747d3d5af4d5":["my third choice"] The same key can be looked up in the Dataset Schema to provide question text and description.

Example (State & Year):
                                       
                                          curl "https://api.monqcle.com/api/v3.0/dataset/query/[DATASET_ID]?state=[STATE_ABBREVIATION]&StartYear=[YEAR]&site_key=[API_KEY]"
                                       
                                    
Example (Specific Question):
                                       
                                          curl "https://api.monqcle.com/api/v3.0/dataset/query/[DATASET_ID]?and-or-or[]=$and&do_get=true&filter-parent[KEY-OF-QUESTION]=[VALUE-OF-QUESTION]&StartYear=[YEAR]&site_key=[API_KEY]"
                                       
                                    
Example (Try it):
                                       
                                          curl "https://api.monqcle.com/api/v3.0/dataset/query/ak-first-dataset-test?and-or-or[]=$and&do_get=true&StartYear=2015&filter-parent[55e469c1c304740b715af4d1]=1&site_key=56e805b9d6c9e75c1ac8cb12"
                                       
                                    
Results:
                                           
                                              [{"_id":{"$id":"55e9caf3c30474131f5af4cd"},"_hidden":false,"ObsDate":{"sec":1441339200,"usec":0},"ObsDateRange":{"sec":1441339200,"usec":0},"StateAbbr":"AR","cities":[""],"counties":[""],"jurisdictions":["54f876be6eb07a31608b46fe"],"55e9c8fdc30474713d5af4ce":"1","_citation_55e9c8fdc30474713d5af4ce":"","_caution_note_55e9c8fdc30474713d5af4ce":"","_citation_55e9c928c304747d3d5af4d5":"","_caution_note_55e9c928c304747d3d5af4d5":"","_citation_55e9c95ac30474181f5af4db":"","_caution_note_55e9c95ac30474181f5af4db":"","55e9c928c304747d3d5af4d5":["my second choice"],"_CATEGORICAL_BOOLEANS":[],"_CITATIONS":{"_citation_json_55e9c8fdc30474713d5af4ce":[],"_citation_json_55e9c928c304747d3d5af4d5":[],"_citation_json_55e9c95ac30474181f5af4db":[]},"_TOUCHED_BY_USER":true,"55e9c95ac30474181f5af4db":"choice 2"},{"_id":{"$id":"55e9cb22c30474713d5af4d0"},"_hidden":false,"ObsDate":{"sec":1441339200,"usec":0},"ObsDateRange":{"sec":1441339200,"usec":0},"StateAbbr":"MO","cities":[""],"counties":[""],"jurisdictions":["54f89d7e6eb07a31608b61c5"],"55e9c8fdc30474713d5af4ce":"1","_citation_55e9c8fdc30474713d5af4ce":"","_caution_note_55e9c8fdc30474713d5af4ce":"","_citation_55e9c928c304747d3d5af4d5":"","_caution_note_55e9c928c304747d3d5af4d5":"","_citation_55e9c95ac30474181f5af4db":"okkk","_caution_note_55e9c95ac30474181f5af4db":"","_CATEGORICAL_BOOLEANS":[],"_CITATIONS":{"_citation_json_55e9c8fdc30474713d5af4ce":[],"_citation_json_55e9c928c304747d3d5af4d5":[],"_citation_json_55e9c95ac30474181f5af4db":[]},"_TOUCHED_BY_USER":true,"55e9c928c304747d3d5af4d5":["my second choice"],"55e9c95ac30474181f5af4db":"choice 3"},{"_id":{"$id":"55e9cb48c30474121f5af4cc"},"_hidden":false,"ObsDate":{"sec":1441339200,"usec":0},"ObsDateRange":{"sec":1441339200,"usec":0},"StateAbbr":"NC","cities":[""],"counties":[""],"jurisdictions":["54f8b21b6eb07acf618b45d9"],"55e9c8fdc30474713d5af4ce":"1","_citation_55e9c8fdc30474713d5af4ce":"","_caution_note_55e9c8fdc30474713d5af4ce":"","_citation_55e9c928c304747d3d5af4d5":"","_caution_note_55e9c928c304747d3d5af4d5":"","_citation_55e9c95ac30474181f5af4db":"","_caution_note_55e9c95ac30474181f5af4db":"","55e9c928c304747d3d5af4d5":["my third choice"],"_CATEGORICAL_BOOLEANS":[],"_CITATIONS":{"_citation_json_55e9c8fdc30474713d5af4ce":[],"_citation_json_55e9c928c304747d3d5af4d5":[],"_citation_json_55e9c95ac30474181f5af4db":[]},"_TOUCHED_BY_USER":true,"55e9c95ac30474181f5af4db":"choice 4"}]
                                           
                                        

Dataset Query Form

MonQcle provides an HTML form for querying a Dataset.

Passing the data from this form to the Data Query methods of the MonQcle API will produce the same results, using GET or POST.

Writing a client-side handler that interlaces the Dataset Schema and Dataset Query is the preferred method.

Dataset Schema information is embedded in this form, be careful changing it, best to use as is, dynamically.

Provide a DATASET_ID and DISPLAY_ID to use (as part of requrest uri).

Always include the API_KEY.

Example:
                                       
                                          curl "https://api.monqcle.com/api/v2.0/query/form/[DATASET_ID]/[DISPLAY_ID]?site_key=[API_KEY]"
                                       
                                    
Example (Try it):
                                       
                                          curl "https://api.monqcle.com/api/v2.0/query/form/gmo-a1/56f6a3c4d6c9e71611f89acf?site_key=56e805b9d6c9e75c1ac8cb12"
                                       
                                    

Get Law

Provide a DATASET_ID and ROW_ID to use (as part of requrest uri).

Always include the API_KEY.

Results include the included citations and the text of the law for a record.

Example:
                                       
                                          curl "https://api.monqcle.com/api/v2.0/lawGiver/[DATASET_ID]/[ROW_ID]?site_key=[API_KEY]"
                                       
                                    
Example (Try it):
                                       
                                          curl "https://api.monqcle.com/api/v2.0/lawGiver/gmo-a1/556d32b1d42e07975699d2dd?site_key=56e805b9d6c9e75c1ac8cb12"
                                       
                                    

Datasets, Views Information

Provide a API_KEY.

Results include all assets associated with a subscription.

The Site object has an array of "site_items" containing pages, previews and meta_queries (all the assets available to a subscription).

 

Hierarchy


  • Site
    • Site Items
      • Pages
      • Previews
        • Displays
      • Meta-Queries

Example:
                                      
                                         curl "https://api.monqcle.com/site/api/v2.0/[API_KEY]/assets"
                                      
                                    
Example (Try it):
                                       
                                          curl "https://api.monqcle.com/site/api/v2.0/56e805b9d6c9e75c1ac8cb12/assets"
                                       
                                    

Introduction

Use the API by including your API_KEY in requests. API_KEY is tied to the Datasets and other assets included in your account and available to the API.

API requests without API_KEY will fail. An API_KEY will be provided with a valid subscription to the API.


Definitions

API_KEY: The key to all assets part of the API subscription.

DATASET_ID: The alpha-numeric key for dataset assets (e.g. gmo-a1).

PREVIEW_ID: The Id for a Preview asset. Wrapper for Dataset displays.

DISPLAY_ID: The Id for the display of a Dataset asset.

ROW_ID: The Id of an observation to all assets part of the API subscription.

                                        
                                           curl https://api.stripe.com/v1/charges \ -u sk_test_your_secret_key :