How it works

Loopitis is a tool designed to help developers manage and monitor recurring tasks. With Loopitis, developers can easily set up intervals for notifications and receive POST requests with payloads at the specified intervals. Here’s how it works:

  • interval – the time interval in milliseconds between each execution of the task
  • occurrences – the number of times the task should be executed
  • name – the name of the task for reference
  • return_url – the URL where the POST request with the payload will be sent
  • payload – the payload to be included in the POST request
  • callback_type – the HTTP method to be used for the POST request (e.g. POST or PUT)

Here’s an example request in JSON format:

{
    "interval": 5000,
    "occurrences": 10,
    "name": "example_task",
    "return_url": "https://example.com/post_endpoint",
    "payload": "{"key": "value"}",
    "callback_type": "POST"
}

In this example, the task will execute every 5 seconds and will execute a total of 10 times. The payload to be included in the POST request is a JSON string with a single key-value pair.

Executing the Task

Once the task is set up, Loopitis will execute the task at the specified interval, sending a POST request with the payload to the specified URL. Here’s an example of the JSON data that Loopitis sends with each execution:

{

{
    "requestedTimes": 3,
    "parentRequestId": "6d2f103f-8720-4c8e-b841-3ff5ace52481",
    "parentRequestName": "example_task",
    "executionNumer": 1,
    "executionId": "0937479a-0032-4138-bde7-c4f428cef444",
    "payload": "{\"key\": \"value\"}",
    "cancelLink": "https://call.loopitis.com/requests/cancel_task?requestId=6d2f103f-8720-4c8e-b841-3ff5ace52481"
    "showRequest": "https://call.loopitis.com/requests/get_list?requestId=6d2f103f-8720-4c8e-b841-3ff5ace52481",
}
}

This JSON data includes information about the execution, including the request ID, the number of times the task has been executed, and the payload included in the POST request.

Monitoring and Updating the Task

Developers can monitor the status of their tasks by calling the Loopitis API with the request ID. They can also update the status of a task by sending a PUT request to the API with the request ID and the updated status. This allows developers to cancel a task, update the payload, or modify other parameters as needed.

Using the CLI

In addition to the API, Loopitis also provides a command-line interface (CLI) for developers to manage their tasks. The CLI supports several commands, including showing all requests with a specific status, showing all executions for a specific request, and adding a request with all parameters.

Scroll to Top