Skip to main content

Getting Started

Let's get started with ServerlessQ 🚀

Sign Up

First of all you need an account to work with ServerlessQ. Sign-up here and create an account.

API Token

After creating an account we will automatically create an API Token for you. See more details at authentication.

Include your token in your header with the key x-api-key. You'll see some examples soon.

Message Queues

Onboarding Wizard

The onboarding wizard guides you through the first steps of ServerlessQ. You will create a queue, send some requests, and see how to send requests from the UI. But we will also show you how to create a queue manually.

Creating a Queue

Lets maunally create a queue.

  1. Go to your dashboard and hit the button Create Queue.
Add a Queue
  1. Define a name, for example My Queue and click on Submit.

Your queue is created with an unique URL 🥳. You can use this URL to send requests to your queue.

Sending Requests

That is the whole setup that is required to get started! Let's send some messages. There are two ways for sending messages:

  1. Queue Messages by sending a request to our API
  2. Send a mock message from the UI

Let's focus on code first 👨🏽‍💻

Send a request to our API

You can simply send a request to our API and we will queue your request.

The request looks like that: https://api.serverlessq.com?id=<QUEUE-ID>&target=<YOUR-TARGET-API>

For authentication please include the header x-api-key with your API Token. You find it in your profile

Let's see an example with cURL.

curl https://api.serverlessq.com/asdjkfh-hdsjfl-234324-dsfasd?target=https://mock.codes/200  \
-H 'x-api-key': 123'

You can copy the link to your queue with your ID included in your queue details.

Queue Overview Link

This will send the exact same request as above.

We simply copy:

  • Method (GET, POST, PUT, DELETE)
  • All headers
  • Your Body

And forward it to your defined URL, defined in the target query parameter.

You can of course use any other method or tool for that (Postman, Node.js, Python, etc.).

👆🏽 Tip: You can generate CURLS and JS fetchs directly from the UI.

Send Message from UI

We've also integrated a small UI to send messages to your queue. This is only meant for mocking purposes and to test out our system.

  1. Open your newly created queue
  2. Click on Send Message and a Drawer opens from the right side

You can simply use one of our GET or POST examples and see how it works. If you want to reuse your own API simply add it as a target. add some custom headers, and click on Send.

One of your pre-filles headers is automatocally your api token x-api-key.

Send a message from the UI

The drawer closes automatically and you will see your message appear in the list. No need to refresh the page.

Congrats 🥳! You have sent your first message to your queue.

Details of Request and Response

You've successfully sent your first requests, Wow! 🤩

You see all requests you have sent to the queue in your queue details. If you click on one request you can examine it in a bit more detail.

Queue Details

To see further details of the request and the response click on one message.

Message Details

You can now see your request and response in detail. In case we have retried your request you will see several responses for each request.

That's it for sending messages!

Cron Jobs

Our second powerful feature is the ability to create Cron Jobs.

A Cron Job is a scheduled event that will be executed in a regular time interval.

Creating a Cron Job

Header over to the Cron Overview and click on Create a Cron Job.

Create a Cron Job

You need to enter the following data:

  • Name of the job
  • Interval or Cron: Either an inteval (e.g. run every 5 minutes) or a cron expression like 0 */5 * * ? *. More info
  • Method with how your URL should be called with
  • The actual target URL that should be called regularly
  • Retries: By default 1. This is only customizable for Pro users

On the right side you see your schedule when your Cron Job will be executed.

After hitting Submit your Cron Job will be saved and executed.

Request Overview

You can see all of your executed crons by looking at the cron details. Simply click on your Cron Job and you will see all executed requests.

Requests

You can also see all requests in the requests page. Here all requests that have been sent to your queue or were executed by a cron job are listed.

Overview of all messages

That's it for the getting started guide! I hope you have fun with ServerlessQ and start building truly asynchronous applications.

Hit me up if you need help!