API for queues
Access and manage queue-related data through the GraphQL API using the Nintex endpoint. These APIs allow you to interact with queues and tasks, enabling operations such as adding tasks, retrieving queue information, accessing queue items, and performing actions on queue items.
Before you begin:
-
Learn the fundamentals of GraphQL, the query language that enhances the ability to request and manage data through the Nintex public API.
-
Understand how to create effective queries and mutations to make requests and interact with the API.
-
Learn how to get and authenticate an access token.
-
Discover and understand the available endpoints.
Schema overview
The GraphQL API schema is a blueprint outlining the structure and functionality of the public APIs. The schema provides a clear overview of available data types, queries, and mutations, offering a foundation for understanding how to interact with the APIs effectively.
In GraphQL, using square brackets [ ] indicates a list, and the exclamation mark ! means non-nullable.
[Status!]!: The outer ! ensures that the API always returns a list (even if it's empty), and that the returned list will not be null.
Status!: The inner ! ensures that each element within the list is a non-nullable Status object. This guarantees that there won't be null values within the list, and any attempt to include null values would result in a failed query.

type QueueConfiguration {
queueOperationalHoursConfig: QueueOperationalHoursConfig
}
type QueueOperationalHoursConfig {
type: WorkingHoursTypes,
workingHours: WorkingHours,
calendars: [ID!]
}
enum WorkingHoursTypes {
ALWAYS
CUSTOM
}
type WorkingHours {
from: DateTime,
to: DateTime,
days: [DayOfTheWeek]
timeZone: String!
}
enum DayOfTheWeek {
SUNDAY
MONDAY
TUESDAY
WEDNESDAY
THURSDAY
FRIDAY
SATURDAY
}
type Queue {
id: ID!,
name: String,
tags: String,
tenantId: ID!,
createdAt: DateTime!
createdBy: String,
configJson: QueueConfiguration,
updatedAt: DateTime!
isActive: Boolean
}
type GetQueuesResponse {
items: [Queue]
totalRecords: Int!
}
input GetQueueInput {
queueId: ID!
}
input UpdateQueueInput {
queueId: ID!
name: String
queueOperationalHoursConfig: QueueOperationalHoursConfigInput
lastUpdateDate: DateTime!
}
input QueueWorkingHours {
from: DateTime!
to: DateTime!
timeZone: String!
days: [DayOfTheWeek]
}
input QueueOperationalHoursConfigInput {
type: WorkingHoursTypes!
workingHours: QueueWorkingHours
calendars: [String]
}
input AddQueueInput {
name: String!
queueOperationalHoursConfig: QueueOperationalHoursConfigInput
}
"""Variable to be passed to the wizard"""
input VariableInput {
"""Name (key) of the variable"""
name: String!
"""Value of the variable"""
value: String!
}
input EmailConfigInput {
"""List of email addresses"""
to: [String]
}
input WebhookConfigInput {
"""List of webhooks urls"""
urls: [String]
"""retry calling webhook timeout in minutes if not supplied retries for calling webhook will be performed for 1440 minutes (24 hours)"""
retryTimeoutMinutes: Int
}
input NotifierConfigInput {
email: EmailConfigInput
webhook: WebhookConfigInput
}
input NotifiersInput {
"""To be notified when task is created"""
created: NotifierConfigInput
"""To be notified when task completes"""
ended: NotifierConfigInput
"""To be notified when task starts"""
started: NotifierConfigInput
"""To be notified when wizard throws an error"""
wizardError: NotifierConfigInput
"""To be notified when task is either stopped, paused or resumed"""
stoppedPausedResumed: NotifierConfigInput
}
input AddTaskInput {
"""Id of target queue"""
queueId: ID!
"""Name of task"""
name: String!
"""Id of wizard"""
wizardId: ID!
"""Priority of task (1-10)"""
priority: Int!
"""Input Variables for wizard"""
variables: [VariableInput]
"""notifications configuration"""
notifiers: NotifiersInput
"""Output variables configuration"""
outputVariables: [String!]
}
type TaskTelemetry {
"""calculated based on the time the task was added to queue, in seconds"""
waitTimeInQueue: Int!
}
type Task {
"""ID of task"""
id: ID!
"""Name of task"""
name: String!
"""Priority of task (1-10)"""
priority: Int!
"""Id of target queue"""
queueId: ID!
"""Id of tenant/company"""
tenantId: ID!
"""Id of wizard"""
wizardId: ID!
"""Task state"""
state: String!
"""Timeout of task"""
ttl: String
"""Target queue operational hours"""
operationalHours: String
"""Retries limit to run task"""
retryLimit: Int!
"""Retry period to run task"""
retryTimes: Int!
"""Avg time of running similar task"""
avgTaskRun: Int!
"""Time of task creation"""
createdAt: DateTime!
"""Task telemetry data"""
telemetry: TaskTelemetry
"""Notifiers configuration"""
notifiers: Notifiers
"""Output variables configuration"""
outputVariables: [String]
"""Input Variables for wizard"""
variables: [Variable]
}
type EmailConfig {
"""List of email addresses"""
to: [String]
}
type WebhookConfig {
"""List of webhooks urls"""
urls: [String]
"""retry calling webhook timeout in minutes if not supplied retries for calling webhook will be performed for 10 minutes"""
retryTimeoutMinutes: Int
}
type NotifierConfig {
email: EmailConfig
webhook: WebhookConfig
}
type Notifiers {
"""To be notified when task is created"""
created: NotifierConfig
"""To be notified when task completes"""
ended: NotifierConfig
"""To be notified when task starts"""
started: NotifierConfig
"""To be notified when wizard throws an error"""
wizardError: NotifierConfig
"""To be notified when task is either stopped, paused or resumed"""
stoppedPausedResumed: NotifierConfig
}
type Variable {
"""Name (key) of the variable"""
name: String!
"""Value of the variable"""
value: String!
}
extend type Query {
getQueues(queryInput: QueryInput!): GetQueuesResponse
getQueue(queue: GetQueueInput!): Queue
}
extend type Mutation {
addQueue(queue: AddQueueInput!): Queue
updateQueue(queue: UpdateQueueInput!): Queue
deleteQueue(id: ID!): Queue
addTask(task: AddTaskInput!): Task
}
API requests
The following API requests provide the ability to manage queues and tasks using the Nintex endpoint:

QUERY
query($queueInput: GetQueueInput!) {
getQueue(queue: $queueInput) {
id
name
tenantId
createdAt
isDeleted
deletedAt
createdBy
}
}
RESPONSE
{
"data": {
"getQueue": {
"id": "28F762C0-72C2-41D1-AFEF-D2893405F1C7",
"name": "default_queue",
"tenantId": "1",
"createdAt": "2021-11-08T12:13:49.310Z",
"isDeleted": false,
"deletedAt": null,
"createdBy": "migration_v21.4"
}
}
}

QUERY
query ($queryInput: QueryInput!){
getQueues(queryInput: $queryInput) {
id
name
tenantId
createdAt
isDeleted
deletedAt
createdBy
}
}
GRAPHQL VARIABLES
{
"queryInput" : {
"filter": {
"field": 'name',
"value": 'EliTest',
"operator": CONTAINS
},
"sort": [{
"field": "id",
"dir": ASC
}]
}
}
RESPONSE
{
"data": {
"getQueues": [
{
"id": "b7575c5f-9c99-4e3f-b5fa-f682c3044446",
"name": "EliTest",
"tenantId": "1",
"createdAt": "2021-12-21T16:00:52.810Z",
"isDeleted": false,
"deletedAt": null,
"createdBy": "testuser"
},
{
"id": "983f2fed-a324-447f-9525-bba89400b823",
"name": "EliTest1",
"tenantId": "1",
"createdAt": "2021-12-22T06:15:30.785Z",
"isDeleted": false,
"deletedAt": null,
"createdBy": "testuser"
}
]
}
}

QUERY
mutation ($queue: AddQueueInput){
addQueue: addQueue(queue: $queue) {
id
name
tenantId
createdAt
isDeleted
deletedAt
createdBy
configJson
}
}
GRAPHQL VARIABLES
{
"queue": {
"name": "EliTest",
"queueOperationalHoursConfig": {
"type": CUSTOM,
"workingHours": {
"from": "1970-01-01T09:09:18.602Z",
"to": "1970-01-01T10:09:18.602Z",
"days": [SUNDAY, TUESDAY],
"timeZone": "Asia/Jerusalem"
},
"calendars": ["df0d8a87-b998-417d-8063-9560cc790629"]
}
}
}
RESPONSE
{
"data": {
"addQueue": {
"id": "1c86450b-9821-42a6-bc12-523191ca4fe6",
"name": "EliTest",
"tenantId": "1",
"createdAt": "2021-12-26T13:04:52.225Z",
"isDeleted": false,
"deletedAt": null,
"createdBy": "testuser",
"configJson": {
"queueOperationalHoursConfig": {
"type": CUSTOM,
"workingHours": {
"from": "1970-01-01T09:09:18.602Z",
"to": "1970-01-01T10:09:18.602Z",
"days": [SUNDAY, TUESDAY],
"timeZone": "Asia/Jerusalem"
},
"calendars": ["df0d8a87-b998-417d-8063-9560cc790629"]
}
}
}
}
}

QUERY
mutation ($updateQueueInput: UpdateQueueInput!) {
updateQueue(queue: $updateQueueInput) {
id
name
tenantId
createdAt
isDeleted
deletedAt
createdBy
}
}
GRAPHQL VARIABLES
{
queueId: "c764d59a-8f04-4647-be50-694f075ee477",
name: "publicQueue3",
queueOperationalHoursConfig: {
type: CUSTOM,
workingHours: {
from: "1970-01-01T09:09:18.602Z",
to: "1970-01-01T10:09:18.602Z",
days: [SUNDAY, TUESDAY],
timeZone: "Asia/Jerusalem"
},
calendars: ["df0d8a87-b998-417d-8063-9560cc790629"]
},
lastUpdateDate: "2022-07-11T10:01:08.424Z"
}
RESPONSE
{
"data": {
"updateQueue": {
"id": "c764d59a-8f04-4647-be50-694f075ee477",
"name": "publicQueue3",
"tenantId": "1",
"createdAt": "2021-12-22T10:45:00.697Z",
"isDeleted": false,
"deletedAt": null,
"createdBy": "testuser"
}
}
}

QUERY
mutation ($queueId: ID!) {
deleteQueue(id: $queueId) {
id
name
tenantId
isDeleted
deletedAt
}
}
RESPONSE
{
"data": {
"deleteQueue": {
"id": "c764d59a-8f04-4647-be50-694f075ee477",
"name": "publicQueue3",
"tenantId": "1",
"isDeleted": true,
"deletedAt": "2022-12-22T10:45:00.697Z",
}
}
}

QUERY
mutation ($task: AddTaskInput!) {
addTask(task: $task) {
id
name
tenantId
priority
queueId
wizardId
variables
notifiers
}
}
GRAPHQL VARIABLES
{
queueId: "5d1991c6-8c86-4ff2-a90c-130e3242cbf1",
name: "TaskTest",
wizardId: "10004",
priority: 1,
variables: [
{name: "name", value: "test"}
],
notifiers: {
ended: {
webhook: {
urls: ["http://dev.com:3939"],
retryTimeoutMinutes: 300
}
}
}
}
RESPONSE
{
"data": {
"addTask": {
id: "9n1921c6-8c56-4ff2-a90c-130e3242cbg1"
name: "TaskTest"
priority: 1
queueId: "5d1991c6-8c86-4ff2-a90c-130e3242cbf1"
tenantId: 1
wizardId: "10004"
variables: [
{name: "name", value: "test"}
],
notifiers: {
ended: {
webhook: {
urls: ["http://dev.com:3939"],
retryTimeoutMinutes: 300
}
}
}
}
}
}