Active Query Builder Web API

Client for Ruby

Download the client for Ruby

You can download the ready-to-use client for Ruby using the "Download now" link below or install the package from the public repository. Using the package will let you keep the client up-to-date. Full source code is available at GitHub.

Direct Download

Download Active Query Builder Web API Client for Ruby:

Download now

Install using GEM

Use GEM package manager to add Active Query Builder Web API Client to your Ruby project:

gem install webapi-active-query-builder
GEM package

Source code on GitHub

Download and review source code of Active Query Builder Web API Client for Ruby on GitHub

Source on Github
Getting started with the client for Ruby
Create a new API provider
api =
Create a new Transform object
transform =
transform.guid = '9dbd355e-360e-430e-9cca-df6dd8b6d8d1' #Metadata Guid from dashboard
transform.sql = 'select id, name from Person' #Initial sql query
Add totals calculation
max =
max.field = "id"
max.aggregate = "Max"

min =
min.field = "id"
min.aggregate = "Min"

transform.totals = [max, min]
Define pagination
page =
page.skip = 2
page.take = 3

transform.pagination = page
Setup sorting
asc =
asc.field = "id"
asc.order = "Asc"

desc =
desc.field = "id"
desc.order = "Desc"

transform.sortings = [asc, desc]
Apply filters
filter =

condition =
condition.field = "id"
condition.condition_operator = "Between"
condition.values = [1, 5]

filter.conditions = [condition]

transform.filter = filter
Hide some columns
column =
column.field = "name"

transform.hidden_columns = [column]
Send request to the API
result = api.transform_sql_post(transform)
transformedSql = result.sql
Get list of query columns
query =
query.guid = '9dbd355e-360e-430e-9cca-df6dd8b6d8d1' #Metadata Guid from dashboard
query.text = 'select id, name from Person' #Initial sql query

columns = api.get_query_columns_post(query)