Contents
Setup Operational
👋Welcome to Operational!
This guide assumes you’ve signed up for a Operational.co account.
Setting up your project
Once you signup, you’ll be asked to create a project.
All your events, teammates, billing etc will be tied to the project.
In the near future, you can create additional projects too.
API key
Once your project is created, you will be given an API key.
Keep this somewhere safe, ideally inside a .env
file in your project.
Sending your first event
Copy and paste this snippet inside chrome devtools:
const baseUrl = "https://api.operational.co";
const event = {
name: "user signup",
avatar: "🤗",
content: "Someone signed up",
}
const apikey = ''; // <- Enter your API key here
const headers = {
"Authorization": `Bearer ${apikey}`,
"Content-Type": "application/json"
};
const response = await fetch(`${baseUrl}/api/v1/ingest`, {
method: "POST",
headers: headers,
body: JSON.stringify(event)
}).catch((err) => {});
Don’t forget to enter your API key in the apikey
var.
Running this inside chrome devtools(or any javascript environment) will send an event to Operational.
That’s all to it!
API key auth
You need to pass your api key as a bearer token.
Bearer API_KEY
For auth with our Nodejs SDK, see its dedicated page.
Playground
Writing events can be tediuous so we created a Playground section inside the webapp. Go to app.operational.co/playground and copy-paste event code.
Integrations
We have a Nodejs SDK available.
Other integrations will be added as we work on them.
Next up
- Take a look at setting up Operational on your phone with push notifications. This is where the real magic happens!
- Then check out the events API. You can do a lot more than just sending events. You can also send JSON logs, image urls and much more.