Performs a GET against a source queryUrl
and requries per queryInterval
, then does a POST to hookUrl
. You can specify Basic auth credentials and other options. This is a working prototype, but not a supported product. Use at your own discretion.
- Install Node.js if you don't already have it.
- Clone this repo, then from bash:
npm install
npm start
Now you must POST the definition of a hook to the server at /hook
.
Using cURL:
curl -i -X POST \
-H "Content-Type:application/json" \
-d \
'{
"queryCreds": "admin:admin",
"queryUrl": "https://www14.v1host.com/v1sdktesting/api/ActivityStream/Story%3a1124",
"queryRequeryParamsTemplate": "activityId=:body.id&direction=forward",
"queryInterval": 5000,
"hookUrl": "http://requestb.in/ol98pmol"
}' \
'http://localhost:9090/hook'
The source URL to query and requery at a specified interval
example: "https://www7.v1host.com/V1Production/api/ActivityStream/Scope%3a653184"
The target URL to which the results of querying and requerying queryUrl
will be POSTed
example: http://requestb.in/o0uouoo0
Polling interval in milliseconds
example: 5000
A template for additional query parameters to include on requery attempts
example: for VersionOne Activity Stream, it's "activityId=:body.id&direction=forward"
There are other defaults inside the code that currently apply to VersionOne ActivityStream.