This library can be used to interact with your Redash server on a programatic level. The API functions it currently exposes are:
- Create new data-source
- Update specific data-source
- List all data-sources
- Delete specific data-source
- Create new user-group
- Add user to specific user-group(s)
- Add data-source to specific user-group(s)
- Remove user from specific user-group(s)
- Remove data-source from specific user-groups(s)
- List all user-groups
- Delete specific user-group
- List all users
- Get specific user
- Get specific data-source
Let us know if there are other endpoints you would like to see added here!
Please see the Javadoc for help in understanding the API or the Setup Guide for help on integrating the library.
This library has been tested with the following versions of Redash:
- 3.0.0+b3134
Assuming git, Vagrant and VirtualBox installed:
host$ git clone https://github.com/snowplow-incubator/redash-java-sdk.git
host$ cd redash-java-sdk
host$ vagrant up && vagrant ssh
guest$ cd /vagrant
The tests require a local Redash server be setup and configured in a certain way. This setup has been fully automated and added as a custom gradle task redashSetup
which is always run before running test
. This task does several things:
- Launches the 5 docker containers required for redash
- Configures an admin and default user
- Extracts the admin users API key
- Populates a dynamic properties resource within
src/test/resources/redash_dynamic.properties
Note: If there are any issues with this setup you can first try resetting the setup via ./gradlew redashDestroy
and then rerunning the ./gradlew redashSetup
.
guest$ ./gradlew clean build
guest$ ./gradlew test
The Redash Java SDK is copyright 2018 Snowplow Analytics Ltd.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this software except in compliance with the License.
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.