RESTful: Building Liberator

Get List of Datasets Available from Liberator

The following bash script demonstrates pulling the full list of datasets from Liberator at the given URL. This example is found in datasets1.sh. The command returns a JSON list of datasets.

Example: datasets1.sh

#!/bin/bash
URL=https://api.cloudquant.ai
USER=TODO-ADD-YOUR-USERID-HERE
TOKEN=TODO-ADD-YOUR-TOKEN-HERE
curl -qs --cert-type P12 --cert liberator.pfx -H "Content-Type: application/json" --noproxy '*' --data "{}" $URL/liberator/datasets

Parameters that Can Be Added to /liberator/datasets

The following optional arguments can be added to the curl command to retrieve additional information. Arguments can be added together to get customized information about the available data.

Argument

Description

"details":true

true or false

Request meta information about the dataset. Each installation of Liberator has its own meta data. This typically includes descriptions of the dataset, information about the time that the data is available and more.

"schema":true

true or false

Request information about the columns contained in the dataset. This includes datatypes, column names, and descriptions.

"entitled":true

true or false

List only the datasets that the USER is entitled to. This argument requires passing the "user", "token","system" parameters.

"user":"YOUR-USER-ID"

The user requesting information. This is always needed for entitled = true calls.

" token":"YOUR-TOKEN"

The user’s token requesting information. This is always needed for entitled = true calls.

" system":"YOUR-SYSTEM"

This is required if you are specifying entitled = true.

Set this value to “API”.