Tasks & Queues

queues

Operations about queues

Find out more

renameNimbusQueue

Code samples

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.put('http://localhost:8080/api/v1/queue/{queueId}', headers = headers)

print(r.json())

PUT /queue/{queueId}

Rename a queue

Rename a queue

Body parameter

{
  "queueName": "string"
}

Parameters

Name
In
Type
Required
Description

queueId

path

integer(int64)

true

none

body

body

queueNameRequest

false

New name for the queue

Example responses

200 Response

{
  "queueName": "queueName",
  "id": 0,
  "createdAt": "2000-01-23T04:56:07.000Z"
}

Responses

Status
Meaning
Description
Schema

200

Successful operation

queueResponse

400

Invalid ID supplied

None

404

Queue not found

None

To perform this operation, you must be authenticated by means of one of the following methods: jwt

deleteNimbusQueue

Code samples

import requests
headers = {
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.delete('http://localhost:8080/api/v1/queue/{queueId}', headers = headers)

print(r.json())

DELETE /queue/{queueId}

Delete a queue

Delete a queue

Parameters

Name
In
Type
Required
Description

queueId

path

integer(int64)

true

none

Example responses

200 Response

{
  "queueName": "queueName",
  "id": 0,
  "createdAt": "2000-01-23T04:56:07.000Z"
}

Responses

Status
Meaning
Description
Schema

200

Successful operation

queueResponse

400

Invalid ID supplied

None

404

Queue not found

None

To perform this operation, you must be authenticated by means of one of the following methods: jwt

getNimbusAllQueues

Code samples

import requests
headers = {
  'Accept': 'application/json'
}

r = requests.get('http://localhost:8080/api/v1/queue', headers = headers)

print(r.json())

GET /queue

Get all queues

Get all queues

Example responses

200 Response

{
  "queueName": "queueName",
  "id": 0,
  "createdAt": "2000-01-23T04:56:07.000Z"
}

Responses

Status
Meaning
Description
Schema

200

Successful operation

queueResponse

500

Server Error

None

This operation does not require authentication

createNimbusQueue

Code samples

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.post('http://localhost:8080/api/v1/queue', headers = headers)

print(r.json())

POST /queue

Create a new queue

Create a new queue

Body parameter

{
  "queueName": "string"
}

Parameters

Name
In
Type
Required
Description

body

body

queueNameRequest

false

Queue object to be created

Example responses

200 Response

{
  "queueName": "queueName",
  "id": 0,
  "createdAt": "2000-01-23T04:56:07.000Z"
}

Responses

Status
Meaning
Description
Schema

200

Successful operation

queueResponse

400

Invalid input

None

422

Validation exception

None

To perform this operation, you must be authenticated by means of one of the following methods: jwt

popNimbusTask

Code samples

import requests
headers = {
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.get('http://localhost:8080/api/v1/queue/pop/{queueName}', headers = headers)

print(r.json())

GET /queue/pop/{queueName}

Pop a task

Pop a task from the task queue

Parameters

Name
In
Type
Required
Description

queueName

path

string

true

none

Example responses

200 Response

{
  "taskID": "taskID"
}

Responses

Status
Meaning
Description
Schema

200

Successful operation

inlineResponse200

404

No tasks available

None

To perform this operation, you must be authenticated by means of one of the following methods: jwt

tasks

getAllNimbusTasks

Code samples

import requests
headers = {
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.get('http://localhost:8080/api/v1/task/{queueName}/fromqueue', headers = headers)

print(r.json())

GET /task/{queueName}/fromqueue

Get all tasks from a queue

Get all tasks

Parameters

Name
In
Type
Required
Description

queueName

path

string

true

none

Example responses

200 Response

[
  {
    "createdAt": "2000-01-23T04:56:07.000Z",
    "queueId": 6,
    "completedAt": "2000-01-23T04:56:07.000Z",
    "payload": "payload",
    "startedAt": "2000-01-23T04:56:07.000Z",
    "id": 0,
    "status": "TO_DO"
  }
]

Responses

Status
Meaning
Description
Schema

200

Successful operation

Inline

400

Invalid queuename supplied

None

404

Task not found

None

Response Schema

Status Code 200

Name
Type
Required
Restrictions
Description

anonymous

[taskResponse]

false

none

none

» id

integer(int64)

false

none

Unique ID of the task

» status

string

false

none

Current status of task

» createdAt

string(date-time)

false

none

Task creation time-date

» startedAt

string(date-time)

false

none

task starting time

» completedAt

string(date-time)

false

none

task completion time-date

» payload

string

false

none

data regarding task

» queueId

integer(int64)

false

none

queueID to which task belongs

Enumerated Values

Property
Value

status

TO_DO

status

IN_PROGRESS

status

DONE

To perform this operation, you must be authenticated by means of one of the following methods: jwt

createNimbusTask

Code samples

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.post('http://localhost:8080/api/v1/task', headers = headers)

print(r.json())

POST /task

Create a new task

Create a new task

Body parameter

{
  "queueName": "patient",
  "payload": "payload"
}

Parameters

Name
In
Type
Required
Description

body

body

addTaskToqueueRequest

false

Task object to be created

Example responses

200 Response

{
  "createdAt": "2000-01-23T04:56:07.000Z",
  "queueId": 6,
  "completedAt": "2000-01-23T04:56:07.000Z",
  "payload": "payload",
  "startedAt": "2000-01-23T04:56:07.000Z",
  "id": 0,
  "status": "TO_DO"
}

Responses

Status
Meaning
Description
Schema

200

Successful operation

taskResponse

400

Invalid input

None

422

Validation exception

None

To perform this operation, you must be authenticated by means of one of the following methods: jwt

getNimbusTaskById

Code samples

import requests
headers = {
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.get('http://localhost:8080/api/v1/task/{taskId}', headers = headers)

print(r.json())

GET /task/{taskId}

Get task by ID

Returns a single task

Parameters

Name
In
Type
Required
Description

taskId

path

integer(int64)

true

none

Example responses

200 Response

{
  "createdAt": "2000-01-23T04:56:07.000Z",
  "queueId": 6,
  "completedAt": "2000-01-23T04:56:07.000Z",
  "payload": "payload",
  "startedAt": "2000-01-23T04:56:07.000Z",
  "id": 0,
  "status": "TO_DO"
}

Responses

Status
Meaning
Description
Schema

200

Successful operation

taskResponse

400

Invalid ID supplied

None

404

Task not found

None

To perform this operation, you must be authenticated by means of one of the following methods: jwt

updateNimbusTask

Code samples

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.put('http://localhost:8080/api/v1/task/{taskId}', headers = headers)

print(r.json())

PUT /task/{taskId}

Update task

Update an existing task by ID

Body parameter

{
  "status": "T0_D0"
}

Parameters

Name
In
Type
Required
Description

taskId

path

integer(int64)

true

none

body

body

taskUpdateRequest

false

Update an existing task in the store

Example responses

200 Response

{
  "createdAt": "2000-01-23T04:56:07.000Z",
  "queueId": 6,
  "completedAt": "2000-01-23T04:56:07.000Z",
  "payload": "payload",
  "startedAt": "2000-01-23T04:56:07.000Z",
  "id": 0,
  "status": "TO_DO"
}

Responses

Status
Meaning
Description
Schema

200

Successful operation

taskResponse

400

Invalid ID supplied

None

404

Task not found

None

To perform this operation, you must be authenticated by means of one of the following methods: jwt

deleteNimbusTask

Code samples

import requests
headers = {
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.delete('http://localhost:8080/api/v1/task/{taskId}', headers = headers)

print(r.json())

DELETE /task/{taskId}

Delete task

Delete a task by ID

Parameters

Name
In
Type
Required
Description

taskId

path

integer(int64)

true

none

Example responses

200 Response

{
  "createdAt": "2000-01-23T04:56:07.000Z",
  "queueId": 6,
  "completedAt": "2000-01-23T04:56:07.000Z",
  "payload": "payload",
  "startedAt": "2000-01-23T04:56:07.000Z",
  "id": 0,
  "status": "TO_DO"
}

Responses

Status
Meaning
Description
Schema

200

Successful operation

taskResponse

400

Invalid ID supplied

None

404

Task not found

None

To perform this operation, you must be authenticated by means of one of the following methods: jwt

getNimbusTaskStatus

Code samples

import requests
headers = {
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.get('http://localhost:8080/api/v1/task/{taskId}/status', headers = headers)

print(r.json())

GET /task/{taskId}/status

Get task status

Get the status of a task by ID

Parameters

Name
In
Type
Required
Description

taskId

path

integer(int64)

true

none

Example responses

200 Response

{
  "status": "status"
}

Responses

Status
Meaning
Description
Schema

200

Successful operation

taskStatus

400

Invalid ID supplied

None

404

Task not found

None

To perform this operation, you must be authenticated by means of one of the following methods: jwt

Last updated