---
title: "Get Remaining Task Instances Endpoint"
method: GET
path: "/api/occupations/tasks-completion"
tags: ["occupations"]
---

# Get Remaining Task Instances Endpoint

`GET /api/occupations/tasks-completion`

## Request

- Base URL: `https://api.mit-llm-survey.academy` (the document declares no server; this is the origin it was published from)
- URL: `https://api.mit-llm-survey.academy/api/occupations/tasks-completion`
- Auth: none declared

Get occupations with remaining task instance counts (paginated).

Returns available occupations (available=True) that have available (not deleted) task instances.

Args:
    limit: Number of records to return (default: 10, max: 50)
    skip: Number of records to skip for pagination (default: 0)
    search: Optional search string to filter occupations by name (case-insensitive)
    touched: When true, only occupations selected by a consented participant; when false, only not
    completed: When true, only occupations with completed=true; when false, only not completed
    sort_by: Column to sort by: available_count, unavailable_count, total_count, or completion_percentage
    order: Sort order: asc or desc

Returns:
    - items: List of available occupations with occupation_id, occupation_name, available_count,
      total_count, unavailable_count, completion_percentage, completed (occupation fully done),
      touched (selected by at least one consented participant)
    - total: Total count of matching records
    - skip: Applied skip (for pagination)
    - limit: Applied limit (for pagination)
    - occupation_touch_summary: Catalog occupations not yet taken by participants

## Query parameters

- `limit` integer: Number of records to return
- `skip` integer: Number of records to skip (for pagination)
- `search` string, nullable: Search occupations by substring (case-insensitive)
- `touched` boolean: Filter by participant selection: true=Yes, false=No
- `completed` boolean: Filter by occupation completed flag: true=Yes, false=No
- `sort_by` 'available_count' | 'unavailable_count' | 'total_count' | 'completion_percentage': Column to sort by
- `order` 'asc' | 'desc': Sort order: asc or desc

## Response `200`

Successful Response

- OccupationTaskCountResponse: Response model for occupation task count endpoint
  - `items` OccupationTaskCount[], required
    - `occupation_id` string, required
    - `occupation_name` string, required
    - `available_count` integer, required
    - `total_count` integer, required
    - `unavailable_count` integer, required
    - `completion_percentage` number, required
    - `completed` boolean, required
    - `touched` boolean, required
  - `total` integer, required
  - `skip` integer, required
  - `limit` integer, required
  - `occupation_touch_summary` OccupationTouchSummary, required: Raw catalog occupation counts for tasks page summary cards.
    - `catalog_count` integer, required
    - `ever_taken_count` integer, required
    - `completed_count` integer, required

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/mit-llm-survey/apis/llm-survey-backend.md) - [All operations](https://skmtc.dev/mit-llm-survey/apis/llm-survey-backend/llms.txt) - [OpenAPI document](https://skmtc.dev/mit-llm-survey/apis/llm-survey-backend/revisions/6a5ef49cfcc4?raw)
