An open API service indexing awesome lists of open source software.

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)

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.