https://github.com/timeplus-io/java-demo
Sample Java code to demo how to call Timeplus REST API (not for Proton)
https://github.com/timeplus-io/java-demo
Last synced: 2 months ago
JSON representation
Sample Java code to demo how to call Timeplus REST API (not for Proton)
- Host: GitHub
- URL: https://github.com/timeplus-io/java-demo
- Owner: timeplus-io
- License: apache-2.0
- Created: 2022-08-27T04:45:30.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2023-09-15T14:35:40.000Z (almost 3 years ago)
- Last Synced: 2025-03-06T11:39:43.651Z (over 1 year ago)
- Language: Java
- Homepage:
- Size: 202 KB
- Stars: 0
- Watchers: 4
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Timeplus Java API demo
[ApplicationSample.java](https://github.com/timeplus-io/java-demo/blob/main/src/main/java/samples/ApplicationSample.java) contains three basic samples to demonstrate how to interacting with Timeplus Rest API.
1. List streams ([doc](https://docs.timeplus.com/rest.html#tag/Streams-v1beta2/paths/~1v1beta2~1streams/get))
2. List 10 queries ([doc](https://docs.timeplus.com/rest.html#tag/Queries-v1beta2/paths/~1v1beta2~1queries/get))
3. Create query and get its results ([doc](https://docs.timeplus.com/rest.html#tag/Queries-v1beta2/paths/~1v1beta2~1queries/post))
You will need to setup the following environment variables:
```bash
export TIMEPLUS_API_KEY=""
# Make sure there is no trailing `/`
export TIMEPLUS_ADDRESS="https://us.timeplus.cloud"
# This is the ID (not friendly name) of your workspace
export TIMEPLUS_WORKSPACE=""
```
Then you can simply run `make run` to start the sample application.