This guide assumes that you have already installed and set up RudderStack in your preferred environment.
You can follow any of the two approaches to send test events and verify your RudderStack installation:
- Bundled shell script
- RudderStack's HTTP API
git clone https://github.com/rudderlabs/rudder-server.git
Then, follow the steps below to send test events.
If you have signed up for RudderStack Open Source, follow these steps to get the source write key:
- Set up a source and a destination in RudderStack.
- You can find the write key in the source details page, as shown:
The source write key is different from your workspace token. The write key is associated with the source, while the workspace token is associated with your RudderStack workspace.
If you are self-hosting RudderStack and have set up the control plane using the Control Plane Lite utility, you can obtain the source write key by following these steps:
- Set up a source and a destination.
- Note the write key associated with the source in the dashboard as shown:
To send the test events, follow the steps listed in the sections below depending on your preferred setup choice:
- Navigate to the folder where RudderStack is installed.
- Then, run the following command after replacing
<WRITE_KEY>with the source write key obtained in the previous section, and
<DATA_PLANE_URL>with your data plane URL.
./scripts/generate-event <WRITE_KEY> <DATA_PLANE_URL>/v1/batch
An example is shown below:
For a Dockerized setup, run the following command:
docker exec -ti \<rudder-server-running-container-id> \./scripts/generate-event <WRITE_KEY> <DATA_PLANE_URL>/v1/batch
You can then check your destination to verify that the events are delivered.
Note that unlike RudderStack Open Source, the control plane set up using the Control Plane Lite utility does not let you view live events.
If you supply an invalid source write key or data plane URL, you will get the following error:
To send test events via the RudderStack HTTP API, follow these steps:
- Import this Postman collection.
- Edit the variables
data_plane_urlin this collection with your source write key and your data plane URL.
RudderStack uses Basic Authentication for authenticating all the HTTP requests. The HTTP Basic Authentication requires a user name and password where:
- The user name is the
- The password is an empty string (
Now you can send test API requests and verify if your installation is working as expected.