The VRL Web server is a Rust web server created using the Warp framework. It's essentially a
thin HTTP layer over Vector Remap Language logic found in the main Vector repo, specifically
the vrl
libraries.
The server is deployed as a Docker image on the Fly PaaS platform. The current web address of the server is https://vrl-server.fly.dev.
cargo run
The default HTTP port is 8080. You can specify a different port using the -p
or --port
flag
or the PORT
environment variable.
The server is deployed as a Docker image running on Fly. To build and push the image:
make docker-build && make docker-push
This currently uses the lucperkins
org on Docker Hub but we will update this to the
vectordotdev
org later on.
The VRL Web server's API is described in OpenAPI format in openapi.yaml
. Below are some
example API calls (using HTTPie).
http :8080/functions
http post :8080/resolve program='.id = uuid_v4(); .timestamp = now()' event:='{"message":"success"}'
Example result:
{
"success": {
"output": "2021-11-19T15:56:54.908681Z",
"result": {
"id": "b2d63616-a0b1-4943-aed8-d6be509371e9",
"message": "success",
"timestamp": "2021-11-19T15:56:54.908681Z"
}
}
}
http post :8080/resolve program='includes(["apple"], "orange")'
Result:
{
"success": {
"output": false,
"result": {}
}
}