Realtime Stream: API Reference

GitHub


This is a tool to redirect terminal streams to so everyone with the link will be able to access them. Below is a list of API endpoints with examples.

Output streams are kept for 24 hours by default. After that duration, they're deleted.

To view an output stream in the web view, visit the /v/<uuid> endpoint in a browser or fill the field below.




Use the bash script

You can find out bash script here. Install it using the following command:
curl "http://rtstream.freeddns.org/script" > ~/.local/bin/rts && chmod +x ~/.local/bin/rts


Script examples

Auto-create new stream and append command output immediately:
neofetch | rts
Stream UUID will be printed to stdout.

Pass custom UUID to append command output to existing stream:
neofetch | rts uuid12
A new UUID can be acquired using curl -X POST http://rtstream.freeddns.org/c.



Endpoints

Create a new output stream

Endpoint: /c
HTTP Method: POST
Successful response content: The UUID of the newly created output stream.

Examples (cURL):
curl -X POST http://rtstream.freeddns.org/c
curl -X POST -d "Initial Data" http://rtstream.freeddns.org/c



Append to an output stream

Endpoint: /a/<uuid>
HTTP Method: PATCH

Example (cURL):
curl -X PATCH -d "Some new output for the stream" http://rtstream.freeddns.org/a/ABC123



Delete an output stream

Endpoint: /d/<uuid>
HTTP Method: DELETE

Example (cURL):
curl -X DELETE http://rtstream.freeddns.org/d/ABC123



Fetch a stream's full output

Endpoint: /g/<uuid>
Successful response content: The full output as plain text.
HTTP Method: GET

Example (cURL):
curl http://rtstream.freeddns.org/g/ABC123