a-baas v0.3.2
a-baas
Utilities for working with Apigee Baas
Not affiliated with Apigee
Commands
export can export collections from Apigee Baas as JSON files using the REST API exposed by Apigee BaaS
Usage
Install:
npm install a-baasYou can install it globally
npm install -g a-baasCLI
The following assumes that you have installed a-baas globally.
Help!
$a-baas -hTo export all collections
$a-baas export -o org -a app -k key -s secret -c *To export specified collections
If there are spaces in this list, they have to be surrounded with the relevant quotes based on your operating system. For windows, use double quotes
$a-baas export -o org -a app -k key -s secret -c 'collection1, collection2, collection3'Specifying a output directory (default = current directory)
One JSON file/collection will be created in this directory The directory must exist. It won't be created
$a-baas export -o org -a app -k key -s secret -c * -d tempSpecifying a host (only needed for sandbox orgs and on-premise hosting)
$a-baas export -o org -a app -k key -s secret -c * -H apibaas-trial.apigee.netThrottling specified as requests per minute (default = 120 rpm) The maximum allowed value is 150 rpm, which translates to 3 requests per second
The requests will be spaced out evenly within the minute interval
$a-baas export -o org -a app -k key -s secret -c * -t 150 Pretty print JSON (default = false)
To turn on pretty printing in the JSON output files,
$a-baas export -o org -a app -k key -s secret -c * -pEntity Page size aka limit (default = 1000, max = 1000)
The maximum allowed limit size is 1000.
If you are having problems, try reducing the limit size to less than 1000
$a-baas export -o org -a app -k key -s secret -c * -l 300Query and Export
Note the query is common for all listed collections. So be careful when using it with all collections. In that case, it can still be used, but use only the common fields like 'created', 'modified', etc
$a-baas export -o org -a app -k key -s secret -c roles -q "name='guest'"CSV Format
$a-baas export -o org -a app -k key -s secret -c roles -f csvNo Metadata
If you don't need the metadata field in the output file,
$a-baas export -o org -a app -k key -s secret -c roles --no-metadata