sonarJSON: Get a JSON document for a saved query

Description Usage Arguments Details See Also Examples

Description

Execute a query which has been saved and published in JSON Studio Finder, and get the response in an R object that is structured like a JSON document. This object is generated by the jsonlite package.

Usage

1
2
sonarJSON(connection, queryName, queryCol, type, bind = list(),
  limit = NULL, publishedBy = NULL)

Arguments

connection

a SonarConnection object created with new.SonarConnection

queryName

the name of the saved query to execute

queryCol

a collection in the database to use with the query

type

the type of query to execute ('agg' or 'find')

bind

a list of bind variables and their values

limit

the maximum number of results to return

publishedBy

the name of the user who we expect published the API

Details

The parameters for this function are explained in greater detail in the JSON Studio help page Using the Gateway.

See Also

http://jsonstudio.com/wp-content/uploads/2014/04/manual141/_build/html/index.html

Other connection: new.SonarConnection; sonarAgg; sonarCSV; sonarFind

Examples

1
2
3
4
connection <- new.SonarConnection('https://example.com', 'localhost', 'test')

delays <- sonarJSON(connection, 'delayed_flights', 'ExampleFlights', type='find', limit=5)
summary(delays$Origin$city)

jSonarR documentation built on May 2, 2019, 4:01 p.m.

Related to sonarJSON in jSonarR...