tasks

Retrieve a list of tasks.

Arguments

assigned_to (ID)

Filter tasks by the "assigned to" user. Specify null to retrieve unassigned tasks.

created_by (ID)

Filter tasks by the user that created them. Can be used to list tasks you created.

include_descendant_organizations (Boolean)

Expand results to include tasks farther down the organization hierarchy. Defaults to true if not specified.

organization_sentera_id (ID)

List tasks for this organization. This organization can be one of: The calling user's assigned organization, A child of that assigned organization, An organization with which the calling user is partnered, A child of an organization with which the calling user is partnered.

pagination (Pagination!)

Paginate the results.

status (TaskStatus)
Deprecation notice

Please use statuses instead.

Filter tasks by status.

statuses ([TaskStatus!])

Filter tasks by one or more statuses.

task_type (TaskType)
Deprecation notice

Scout tasks are no longer supported.

Filter tasks by their type.

Return fields

page (Int!)

The page of results returned in this structure when using pagination.

page_size (Int!)

The number of results returned in this structure when using pagination.

present (Boolean!)

Whether or not there are any results in this structure.

results ([Task]!)

A collection of tasks matching the query constraints.

total_count (Int!)

The total number of items matching the query constraints.

Examples

All Tasks

Retrieve all tasks.

Try this example in GraphiQL
query AllTasks {
  tasks(pagination: { page: 1, page_size: 100 }) {
  total_count
  results {
    sentera_id
    name
  }
  }
}

{
  "data": {
  "tasks": {
    "total_count": 5,
    "results": [
      {
        "sentera_id": "jp3tzd6_TA__CV_deve_68366ac38_201020_161513",
        "name": "Example Task 1"
      },
      {
        "sentera_id": "vjqxexr_TA__CV_deve_68366ac38_201020_161514",
        "name": "Example Task 2"
      },
      {
        "sentera_id": "rqw6rpc_TA__CV_deve_68366ac38_201020_161514",
        "name": "Example Task 3"
      },
      {
        "sentera_id": "d2qfxxb_TA__CV_deve_68366ac38_201020_161514",
        "name": "Example Task 4"
      },
      {
        "sentera_id": "a9jhjtv_TA__CV_deve_68366ac38_201020_161514",
        "name": "Example Task 5"
      }
    ]
  }
  }
}

Tasks by Status

Retrieve tasks that have a status matching a set of specified statuses

Try this example in GraphiQL
query TasksByStatus {
  tasks(
  pagination: { page: 1, page_size: 100 }
  statuses: [
    OPEN
    IN_PROGRESS
  ]
  ) {
  total_count
  results {
    sentera_id
    name
    status
  }
  }
}

{
  "data": {
  "tasks": {
    "total_count": 2,
    "results": [
      {
        "sentera_id": "jp3tzd6_TA__CV_deve_68366ac38_201020_161513",
        "name": "Example Task 1",
        "status": "OPEN"
      },
      {
        "sentera_id": "vjqxexr_TA__CV_deve_68366ac38_201020_161514",
        "name": "Example Task 2",
        "status": "IN_PROGRESS"
      }
    ]
  }
  }
}

Tasks by Assigned To

Retrieve tasks assigned to a specific user.

Try this example in GraphiQL
query TasksByAssignedTo {
  tasks(pagination: { page: 1, page_size: 100 }, assigned_to: "b8rkroo_US_dq7fSHORT1_CV_test_035689828_200623_082612") {
  total_count
  results {
    sentera_id
    name
    assigned_to {
      sentera_id
    }
  }
  }
}

{
  "data": {
  "tasks": {
    "total_count": 2,
    "results": [
      {
        "sentera_id": "jp3tzd6_TA__CV_deve_68366ac38_201020_161513",
        "name": "Example Task 1",
        "assigned_to": {
          "sentera_id": "b8rkroo_US_dq7fSHORT1_CV_test_035689828_200623_082612"
        }
      },
      {
        "sentera_id": "vjqxexr_TA__CV_deve_68366ac38_201020_161514",
        "name": "Example Task 2",
        "assigned_to": {
          "sentera_id": "b8rkroo_US_dq7fSHORT1_CV_test_035689828_200623_082612"
        }
      }
    ]
  }
  }
}

Unassigned Tasks

Retrieve unassigned tasks.

Try this example in GraphiQL
query UnassignedTasks {
  tasks(pagination: { page: 1, page_size: 100 }, assigned_to: null) {
  total_count
  results {
    sentera_id
    name
    assigned_to {
      sentera_id
    }
  }
  }
}

{
  "data": {
  "tasks": {
    "total_count": 1,
    "results": [
      {
        "sentera_id": "rqw6rpc_TA__CV_deve_68366ac38_201020_161514",
        "name": "Example Task 2",
        "assigned_to": null
      }
    ]
  }
  }
}

Tasks Created by a Specific User

Get tasks that were created by a user represented by the created_by parameter. This would primarily be used to get all the tasks that you created.

Try this example in GraphiQL
query TasksByAssociation {
  tasks(pagination: { page: 1, page_size: 100 }, created_by: "b8rkroo_US_dq7fSHORT1_CV_test_035689828_200623_082612") {
  total_count
  results {
    sentera_id
    name
  }
  }
}

{
  "data": {
  "tasks": {
    "total_count": 3,
    "results": [
      {
        "sentera_id": "stx6n84_TA_SHORT1_CV_test_db0cedc1_190124_154249",
        "name": "Example Task 1"
      },
      {
        "sentera_id": "bhw9a32_TA_SHORT1_CV_test_db0cedc1_190124_154249",
        "name": "Example Task 2"
      },
      {
        "sentera_id": "nxm4o99_TA_SHORT1_CV_test_db0cedc1_190124_154249",
        "name": "Example Task 3"
      }
    ]
  }
  }
}

Paginating Tasks

Retrieve tasks a page at a time.

Try this example in GraphiQL
query PaginatedTasks {
  tasks (
  pagination: {
    page: 1
    page_size: 10
  }){
  total_count
  results {
    sentera_id
    name
  }
  }
}

{
  "data": {
  "tasks": {
    "total_count": 2,
    "results": [
      {
        "sentera_id": "stx6n84_FL_SHORT1_CV_test_db0cedc1_190124_154249",
        "name": "Example Task 1"
      },
      {
        "sentera_id": "bhw9a32_FL_SHORT1_CV_test_db0cedc1_190124_154249",
        "name": "Example Task 2"
      }
    ]
  }
  }
}

Tasks within a Specific Organization

Retrieve tasks within a specified organization.


This organization can be one of: Try this example in GraphiQL
query TasksForOrganization {
  tasks(pagination: { page: 1, page_size: 100 }, organization_sentera_id: "fkqbg8f_OR_8y24DenisOrgC_CV_stag_1de18e2_200806_133132") {
  total_count
  results {
    sentera_id
    name
    assigned_to {
      sentera_id
    }
  }
  }
}

{
  "data": {
  "tasks": {
    "total_count": 2,
    "results": [
      {
        "sentera_id": "bnyu5x32_FL_SHORT1_CV_test_db0cedc1_190124_154249",
        "name": "Example Task 1",
        "assigned_to": {
          "sentera_id": "b8rkroo_US_dq7fSHORT1_CV_test_035689828_200623_082612"
        }
      },
      {
        "sentera_id": "moi4s21_FL_SHORT1_CV_test_db0cedc1_190124_154249",
        "name": "Example Task 2",
        "assigned_to": {
          "sentera_id": "b8rkroo_US_dq7fSHORT1_CV_test_035689828_200623_082612"
        }
      }
    ]
  }
  }
}