Skip to main content

json-url-output

This is a simple Sequence that pulls data from JSON url every x seconds and writes it to Instance stdout endpoint. The Sequence takes two arguments:

Running

❗ Remember to setup transform-hub locally or use the platform's environment for the sequence deployment.

Sequence is ready to use, id doesn't use any external modules so no dependencies need to be installed.

Open the terminal and run the following commands:

# go to 'javascript' directory
cd javascript

# deploy 'json-url-output' Sequence
si seq deploy json-url-output --args [\"https://api.agify.io?name=bella\",10000]

# see the Instance output
si inst output -

Output

Result:

$ si inst output -
{ name: 'bella', age: 35, count: 40138 }
{ name: 'bella', age: 35, count: 40138 }

The request is sent to API every 10 seconds, so the result will be printed out after every request until the Instance is stopped.

Check out the source on GitHub

Was it helpful?

Didn't find information needed?

Join our Scramjet Community on Discord, where you can get help from our engineers directly.