Skip to main content

Preface

Qbilon provides a simple API that allows users to store and retrieve plain text data for input or output purposes. This plain text data is typically used in two contexts:
  • reading the content of a file that was uploaded through a file configuration parameter of that task or
  • creating an output that can be used by other tasks or by the same task as input later on.

Endpoints

A task that wants to create, read, or delete plain text data can interact with three endpoints:
  • Create/Replace: POST https://host/apiv1/data/blob/:taskId/:name
  • Read: GET https://host/apiv1/data/blob/:taskId/:name
  • Delete: DELETE https://host/apiv1/data/blob/:taskId/:name
The host part is the domain of your Qbilon instance. The taskId is the numeric ID of your task and can be retrieved via the environment variables of your custom task (see Custom Task). The name is the file name and is usually defined by a configuration parameter or freely by the author of a custom task.

Creating Data

To create text data from a custom task, simply make a call to the endpoint mentioned below. To make a successful call, adhere to the following:
  • Endpoint: POST https://<host>/apiv1/data/blob/<taskId>/<name>
  • Authentication: For authentication, you can use either Basic Authentication or a Bearer Authentication Token, which is provided by the environment variables to your task, see Custom Task.
  • Content-Type Header: use text/plain
  • Filename: may have a maximum of 255 characters
  • TaskId: must be an existing task ID
  • Content Size: should be a maximum of 10 MB.
The following code snippet depicts a simple example of what a custom task might look like in code:

Reading Data

To read text data from a custom task in Qbilon, you only need to call the endpoint mentioned below. To make a successful call, adhere to the following:
  • Endpoint: GET https://<host>/apiv1/data/blob/<taskId>/<name>
  • Authentication: For authentication, you can use either Basic Authentication or a Bearer Authentication Token, which is provided by environment variables to your task, see Custom Task.
  • Filename: may be a maximum of 255 characters long and must have been written beforehand
  • TaskId: must be an existing task ID
The following code snippet depicts a simple example of what a custom task might look like in code:

Deleting Data

To delete text data from a custom task in Qbilon, you only need to make a call to the endpoint mentioned below. To make a successful call, adhere to the following:
  • Endpoint: DELETE https://<host>/apiv1/data/blob/<taskId>/<name>
  • Authentication: For authentication, you can use either Basic Authentication or a Bearer Authentication Token, which is provided by the environment variables to your task, see Custom Task.
  • Filename: it may have at max 255 chars and must be one that was written beforehand
  • TaskId: must be an existing task ID
The following code snippet depicts a simple example of what a custom task might look like in code: