api-service

command
v0.0.0-...-0b46cb8 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 27, 2025 License: BSD-3-Clause Imports: 26 Imported by: 0

README

DataWatch API Service

this service provides a RESTful API for configuring users and listeners. Open API docs can be found here.

Examples

all examples will use datawatch.cyverse.org as the domain for the API and curl for demonstrating calls to the API.

Authentication

Before calling the API you need to obtain a keycloak token. It is recommended to surround the URL with single quotes so that the shell doesn't interpret any characters.

curl 'https://datawatch.cyverse.org/keycloakToken?username=<username>&password=<password>'

a keycloak token will be returned in double quotes. Do not include the double quotes when using the token.

Get Your User Info
curl -H "Authorization: <token>" https://datawatch.cyverse.org/users

User info is currently the username, the user's email address, and optionally the "admin" flag

Note: admin users will get a list of all the users

Get Listeners
curl -H "Authorization: <token>" https://datawatch.cyverse.org/listeners
Add Listener
curl -H "Authorization: <token>" https://datawatch.cyverse.org/listeners -d 'listenerTypeID=email&sourceID=cyverse&path=/iplant/home/<username>/test'

listenerTypeID can be "email", "webdav", or "webhook". The optional parameter notifyInterval may be used to override the default amount of time events are bundled together before being sent as a single notification. For example: &notifyInterval=600 will bundle events for this listener for 10 minutes.

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL