https://github.com/harrymoore/cloudcms-query-runner
Command line script to perform various types of Cloud CMS queries
https://github.com/harrymoore/cloudcms-query-runner
Last synced: 4 months ago
JSON representation
Command line script to perform various types of Cloud CMS queries
- Host: GitHub
- URL: https://github.com/harrymoore/cloudcms-query-runner
- Owner: harrymoore
- Created: 2020-01-31T16:31:32.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2022-12-10T16:41:17.000Z (over 3 years ago)
- Last Synced: 2025-10-31T10:54:55.289Z (8 months ago)
- Language: JavaScript
- Size: 76.2 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Cloud CMS Query Example Runner
[](https://www.npmjs.com/package/cloudcms-query-runner)
[](https://www.npmjs.com/package/cloudcms-query-runner)
Command line script to perform various Cloud CMS queries. There are several APIs available in Cloud CMS to discover content nodes. This script is intened to demonstrate the use of each of these methods.
It is not necessary to install cloudcms-query-runner. It runs as an npx script. But it will run faster if it installed first (otherwise npx will install it on demand and remove it when it finishes executing each command).
## Install:
npm install -g cloudcms-query-runner
## Help:
npx cloudcms-query-runner -h
## Usage
Download or otherwise create a gitana.json file from the Cloud CMS API Keys of a Project's Application object.
Create a json file containing the query, search, traverse, find, or tree API call you wish to make.
Ex.:
npx cloudcms-query-runner -g ./path/to/project-x-gitana.json --query --query-file-path ./query-files/query-test-1.json
# Examples
## Query for nodes by type.
Create file test1.json with this content:
`{
"_type": "my:type"
}`
`npx cloudcms-query-runner -g ./path/to/project-x-gitana.json --query --query-file-path ./test1.json`
## Show directory tree.
Create file print-tree.json with this content:
`{
"basePath": "/",
"containers": true ,
"depth": 3
}`
`npx cloudcms-query-runner -g ./gitana.json --tree --query-file-path ./print-tree.json`