Queues

A queue represents a manual process and works like a queue

The following parameters might be required as part of the request URL:

  • Organization ID. Visible in Settings.

  • Queue ID. Found in the URL when inside a queue.

A queue is denoted as an object with the following fields:

  • active_users: A list with the names of the users currently assigned to at least one pending task in the queue.

  • created_at: The queue's creation timestamp.

  • id: The queue's identifier.

  • n_tasks: The number of pending tasks in the queue, waiting to be completed.

  • name: The queue title.

  • data: The queue's data configuration, which consists of a list of Block objects. This field is only included when explicitly fetching a queue by its identifier.

Here is an example of how a queue object looks like:

{
"active_users": [
"Bernat"
],
"created_at": "2020-10-23T11:03:48.542064Z",
"data": [
{
"id": "paragraph",
"name": "Paragraph",
"text": {
"placeholder": "What is going on?"
},
"type": "text"
},
{
"id": "categories",
"name": "Categories",
"single_selection": {
"is_required": true,
"options": [
{
"id": "red",
"name": "Red"
},
{
"id": "blue",
"name": "Blue"
},
{
"id": "green",
"name": "Green"
}
]
},
"type": "single_selection"
},
{
"id": "picture",
"image": {
"placeholder": "https://i.imgur.com/3FlrkQd.jpg"
},
"name": "Picture",
"type": "image"
}
],
"description": "",
"id": 169,
"n_tasks": 2,
"name": "Categorization"
}

get
List all queues

https://api.humanlambdas.com/orgs/$ORGANIZATION_ID/queues
Lists all queues that exist within the organization.
Request
Response
Request
Path Parameters
ORGANIZATION_ID
required
integer
The ID of your organization.
Headers
Authorization
required
string
Token $API_KEY or visit the Introduction page for more details.
Response
200: OK
[
{
"active_users": [
"Bernat"
],
"created_at": "2020-11-20T17:20:43.444360Z",
"id": 213,
"n_tasks": 2,
"name": "Wikipedia"
},
{
"active_users": [
"Bernat"
],
"created_at": "2020-10-23T11:03:48.542064Z",
"id": 169,
"n_tasks": 2,
"name": "Categorization"
},
{
"active_users": [],
"created_at": "2020-11-24T10:56:13.779387Z",
"id": 218,
"n_tasks": 0,
"name": "Lead Gen Requests"
}
]

Sample request:

curl https://api.humanlambdas.com/orgs/$ORG_ID/queues \
-H "Authorization: Token $API_KEY"

get
Get queue by ID

https://api.humanlambdas.com/orgs/$ORGANIZATION_ID/queues/$QUEUE_ID
Retrieves a queue's information given a queue identifier.
Request
Response
Request
Path Parameters
ORGANIZATION_ID
required
string
The ID of your organization.
QUEUE_ID
required
string
The ID of your queue.
Headers
Authorization
required
string
Token $API_KEY or visit the Introduction page for more details.
Response
200: OK
{
"active_users": [
"Bernat"
],
"created_at": "2020-10-23T11:03:48.542064Z",
"data": [
{
"id": "paragraph",
"name": "Paragraph",
"text": {
"placeholder": "What is going on?"
},
"type": "text"
},
{
"id": "categories",
"name": "Categories",
"single_selection": {
"is_required": true,
"options": [
{
"id": "red",
"name": "Red"
},
{
"id": "blue",
"name": "Blue"
},
{
"id": "green",
"name": "Green"
}
]
},
"type": "single_selection"
},
{
"id": "picture",
"image": {
"placeholder": "https://i.imgur.com/3FlrkQd.jpg"
},
"name": "Picture",
"type": "image"
}
],
"id": 169,
"n_tasks": 2,
"name": "Categorization"
}

put
Flush a queue

https://api.humanlambdas.com/orgs/$ORGANIZATION_ID/queues/$QUEUE_ID/flush
Deletes all tasks in a queue whose status is not completed. Successful requests will result in an empty task queue.
Request
Response
Request
Path Parameters
ORGANIZATION_ID
required
integer
The ID of your organization.
QUEUE_ID
required
integer
The ID of your queue.
Headers
Authorization
required
string
Token API_KEY visit the Introduction page for more details).
Response
200: OK
Tasks successfully flushed
‚Äč