---
updatedAt: 2025-08-14T13:36:36.000Z
agentTools:
  siteIndex: https://developer.n-able.com/llms.txt
  projectIndex: https://developer.n-able.com/n-central/llms.txt
---

# Retrieves aggregated status for a given task.

Retrieves the aggregated status associated with a given task using the task ID.

# OpenAPI definition

```json
{
  "openapi": "3.0.1",
  "info": {
    "title": "N-central API-Service",
    "description": "<h3>API Access</h3>\n<p>In order to use the API-Service endpoints, ensure the following prerequisites are met:</p>\n<ol>\n    <li>User is created in N-central with appropriate permissions and configuration\n        (roles, access groups, MFA disabled, 2FA disabled).</li>\n    <li>API access is set up in N-central by having a JWT\n        (Json Web Token, referred to as \"N-central User-API Token\") generated,\n        acting as the permanent secret solely used for fetching access and refresh tokens.</li>\n</ol>\n<p>To access the API-Service endpoints, the JWT must first be exchanged with access and refresh tokens:</p>\n<ul>\n    <li>\n        <p><b>Using Swagger UI:</b></p>\n        <ol>\n            <li>Click on the <b>\"Authorize\"</b> button and enter the JWT into the value field\n                under <b>\"N-central_User-API_Token_JWT\"</b>, then navigate to\n                the <code>/api/auth/authenticate</code> endpoint, click <b>\"Try it out\"</b>\n                and then <b>\"Execute\"</b>.\n                <br/>The new “Access Token” and “Refresh Token” fields will be available in the “Server Response”\n                section below. Note that the expiry is 3600s ( 1h ). Copy the value of the access token.</li>\n            <li>Click on the <b>lock icon</b> to the right of any endpoint\n                (or the <b>\"Authorize\"</b> button at the top), enter the access token in the\n                <b>\"API-Access_Token\"</b> field and click <b>\"Authorize\"</b>.</li>\n            <li>To call an API-Service endpoint, navigate to it, click <b>\"Try it out\"</b> button and\n            then <b>\"Execute\"</b>. If the steps above were successful, the access token is included in requests\n            automatically.</li>\n        </ol>\n    </li>\n    <li>\n        <p><b>Using a different HTTP client:</b></p>\n        <ol>\n            <li>Call the <code>/api/auth/authenticate</code> endpoint.\n                The JWT token must be specified under the <code>Authorization</code> header,\n                in the form <code>Bearer &lt;YOUR_JWT&gt;\"</code>.\n                <br/>The access and refresh tokens are present in the response.</li>\n            <li>When calling API-Service endpoints, make sure to specify the <b>access token</b> in\n            the <code>Authorization</code> header as <code>Bearer &lt;ACCESS_TOKEN&gt;</code>.</li>\n        </ol>\n    </li>\n</ul>\n<h3>API Pagination & Sorting</h3>\n<p>Certain API-Service query endpoints support pagination and sorting through the use of query parameters.</p>\n<p><b>Pagination query parameters:</b></p>\n<ul>\n    <li>pageSize: number between 1 and 1000 specifying how many items to return for each page (if available).\n        If unspecified, the default is 50.</li>\n    <li>pageNumber: number specifying what page of data to retrieve, starting from 1 as the first page.\n        If unspecified, the default is 1.</li>\n</ul>\n<p>A paginated response contains several related fields, such as pageSize, pageNumber, itemCount, totalItems,\n    totalPages, _links (first, last, previous and next pages) and _warning (containing any warning messages,\n    if present).</p>\n<p><b>Sorting query parameters:</b></p>\n<ul>\n    <li>sortBy: the name of the field to sort the results by. If unspecified, no sorting is applied.</li>\n    <li>sortOrder: the case insensitive sorting direction supporting ASC/ASCENDING/NATURAL and\n        DESC/DESCENDING/REVERSE. If unspecified, the default is ASC.</li>\n</ul>\n<h3>API Rate Limiting</h3>\n<p>The API-Service endpoints are rate limited to ensure the stability, availability and performance of\n    the overall system.</p>\n<p>Upon reaching such a rate limit, the endpoints return HTTP Status 429 - Too Many Requests.</p>\n<p>The system will accept further requests once existing in-flight requests are completed.</p>\n",
    "version": "1.0"
  },
  "servers": [
    {
      "url": "https://{custom-server}/",
      "description": "Default Server URL"
    }
  ],
  "tags": [
    {
      "name": "Scheduled Tasks",
      "description": "Scheduled tasks operations"
    }
  ],
  "paths": {
    "/api/scheduled-tasks/{taskId}/status": {
      "get": {
        "tags": [
          "Scheduled Tasks"
        ],
        "summary": "Retrieves aggregated status for a given task.",
        "description": "Retrieves the aggregated status associated with a given task using the task ID.",
        "operationId": "getTaskStatus",
        "parameters": [
          {
            "name": "taskId",
            "in": "path",
            "description": "ID of the task for which aggregated status needs to be fetched.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful retrieval of aggregated status.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ScheduledTaskAggregatedStatusResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Authentication Failure.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "*/*": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Device Id not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "*/*": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "API-Access_Token": []
          }
        ]
      }
    }
  },
  "components": {
    "schemas": {
      "ErrorResponse": {
        "type": "object",
        "properties": {
          "status": {
            "type": "integer",
            "format": "int32"
          },
          "message": {
            "type": "string"
          },
          "errors": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ValidationError"
            }
          }
        },
        "description": "Error response",
        "example": {
          "status": 400,
          "message": "[ID=2b85998f-26a3-467a] BAD REQUEST: InvalidInputFormatException: Invalid customerId format: 'null'."
        }
      },
      "ValidationError": {
        "type": "object",
        "properties": {
          "field": {
            "type": "string"
          },
          "message": {
            "type": "string"
          }
        }
      },
      "ScheduledTaskAggregatedStatusResponse": {
        "type": "object",
        "properties": {
          "data": {
            "$ref": "#/components/schemas/TaskAggregatedStatus"
          },
          "_links": {
            "type": "object",
            "additionalProperties": {
              "type": "string",
              "description": "Links to related endpoints."
            },
            "description": "Links to related endpoints."
          }
        },
        "description": "Aggregated status response.",
        "example": {
          "data": {
            "taskName": "Task Name",
            "statusCounts": {
              "Completed": 3,
              "In Pending": 2
            }
          },
          "_links": {
            "details": "/api/scheduled-tasks/{taskId}/status/details"
          }
        }
      },
      "TaskAggregatedStatus": {
        "type": "object",
        "properties": {
          "taskName": {
            "type": "string",
            "description": "Name of the task."
          },
          "statusCounts": {
            "type": "object",
            "additionalProperties": {
              "type": "integer",
              "description": "Map of status counts where keys are status names and values are status counts.",
              "format": "int32"
            },
            "description": "Map of status counts where keys are status names and values are status counts."
          }
        },
        "description": "Aggregated status response.",
        "example": {
          "taskName": "Task Name",
          "statusCounts": {
            "Completed": 3,
            "In Pending": 2
          }
        }
      }
    },
    "securitySchemes": {
      "API-Access_Token": {
        "type": "http",
        "description": "Access token for API. You can get the token by authenticating. See \"POST - /api/auth/authenticate\".",
        "scheme": "bearer",
        "bearerFormat": "JWT"
      }
    }
  },
  "x-readme": {
    "explorer-enabled": true,
    "proxy-enabled": true
  }
}
```