> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://developer.projectmanager.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://developer.projectmanager.com/_mcp/server.

# Planned allocations and actual timesheet minutes for a task, grouped by resource.

GET https://api.projectmanager.com/api/data/task/{taskId}/time

Returns a summary of planned allocations and logged timesheet minutes for the specified task,
grouped by resource. Use this when the client needs time rollups without loading individual
timesheet entries.

Reference: https://developer.projectmanager.com/api-reference/task/planned-allocations-and-actual-timesheet-minutes-for-a-task-grouped-by-resource

## Authentication

- `Authorization` header (bearer token, required) — Bearer authentication of the form `Bearer <token>`, where token is your auth token.

## Request

### Path parameters

- `taskId` (string, required) — The unique identifier of the task

### Headers

- `x-integration-name` (string, optional) — The name of the calling system passed along as a header parameter

## Response

### 200

Success

- `error` (AstroError, optional, nullable) — If the API call failed, this will contain information about the error that occurred.
- `success` (boolean, optional) — True if the API call succeeded; false otherwise.
- `hasError` (boolean, optional) — True if the API call failed.
- `statusCode` (enum, optional) — The HTTP code of the response.
  - Allowed values: `Continue`, `SwitchingProtocols`, `Processing`, `EarlyHints`, `OK`, `Created`, `Accepted`, `NonAuthoritativeInformation`, `NoContent`, `ResetContent`, `PartialContent`, `MultiStatus`, `AlreadyReported`, `IMUsed`, `MultipleChoices`, `MovedPermanently`, `Found`, `SeeOther`, `NotModified`, `UseProxy`, `Unused`, `TemporaryRedirect`, `PermanentRedirect`, `BadRequest`, `Unauthorized`, `PaymentRequired`, `Forbidden`, `NotFound`, `MethodNotAllowed`, `NotAcceptable`, `ProxyAuthenticationRequired`, `RequestTimeout`, `Conflict`, `Gone`, `LengthRequired`, `PreconditionFailed`, `RequestEntityTooLarge`, `RequestUriTooLong`, `UnsupportedMediaType`, `RequestedRangeNotSatisfiable`, `ExpectationFailed`, `MisdirectedRequest`, `UnprocessableEntity`, `Locked`, `FailedDependency`, `UpgradeRequired`, `PreconditionRequired`, `TooManyRequests`, `RequestHeaderFieldsTooLarge`, `UnavailableForLegalReasons`, `InternalServerError`, `NotImplemented`, `BadGateway`, `ServiceUnavailable`, `GatewayTimeout`, `HttpVersionNotSupported`, `VariantAlsoNegotiates`, `InsufficientStorage`, `LoopDetected`, `NotExtended`, `NetworkAuthenticationRequired`
- `data` (TaskTimeSummaryDto, optional) — Task-level planned work (TotalPlannedMinutes from task Work), per-resource assigned breakdown (Assigned / TotalAssignedMinutes), workspace-wide reported actual total (TotalActualMinutes), per-resource reported timesheet rows (Actual), scoped by permission, and HasTimeEntries (whether any logged minutes exist for the task in the workspace, regardless of Actual visibility).

## Types

### AstroError

Information about an error that occurred within the ProjectManager API.

- `technicalError` (string, optional, nullable) — A technical description of the error that occurred. Not suitable for display to end users.
- `additionalErrors` (list of string, optional, nullable) — If additional errors beyond the main error in `Message` occurred, they will be listed here as individual messages.
- `validationErrors` (map from string to list of string, optional, nullable) — This contains a dictionary of validation errors. The key is the name of the field
- `message` (string, optional, nullable) — A description of the error that occurred. If your application has a user interface, show this message to explain what went wrong.

### TaskTimeSummaryDto

Task-level planned work (TotalPlannedMinutes from task Work), per-resource assigned breakdown (Assigned / TotalAssignedMinutes), workspace-wide reported actual total (TotalActualMinutes), per-resource reported timesheet rows (Actual), scoped by permission, and HasTimeEntries (whether any logged minutes exist for the task in the workspace, regardless of Actual visibility).

- `totalPlannedMinutes` (integer, optional) — The task's planned work (Work), in minutes — same as the Gantt "Work" / planned effort on the task.
- `totalAssignedMinutes` (integer, optional) — Sum of minutes assigned (per-resource assigned/planned effort from allocations or assignment split).
- `totalActualMinutes` (integer, optional) — Sum of reported minutes on this task from all resources in the workspace (same merge as internal totals: direct task id, original task id, and weekly timesheet-task links). This is not limited to the caller's own entries.
- `hasTimeEntries` (boolean, optional) — True when at least one timesheet row for this task has non-zero reported minutes in the workspace (same merge as Astro.Api.Dto.Tasks.TaskTimeSummaryDto.TotalActualMinutes). False when there are none. Unlike Astro.Api.Dto.Tasks.TaskTimeSummaryDto.Actual, this does not depend on whether the caller can see other resources' entries.
- `assigned` (list of TaskPlannedResourceTimeDto, optional) — Planned effort by resource, including per-day allocation breakdown where available.
- `actual` (list of TaskActualResourceTimeDto, optional) — Reported timesheet time by resource, including individual timesheet rows. Callers with edit-all-projects or edit-team-timesheets workspace permission see every resource returned by secured timesheet queries; otherwise only the caller's own timesheet rows (same idea as the Edit all timesheets / team timesheet capability in roles).

### TaskPlannedResourceTimeDto

Planned time for one resource assigned to the task.

- `id` (string, optional) — Resource identifier for this planned row.
- `totalMinutes` (integer, optional) — Total planned minutes for this resource (sum of allocations when broken down by day).
- `allocations` (list of TaskPlannedAllocationDto, optional) — Planned minutes grouped by calendar date for this resource.

### TaskActualResourceTimeDto

Reported (timesheet) time for one resource on the task.

- `id` (string, optional) — Resource identifier for this actual row.
- `totalMinutes` (integer, optional) — Total reported minutes for this resource (sum of TimeEntries).
- `timeEntries` (list of TaskActualTimeEntryDto, optional) — Individual timesheet entries contributing to totalMinutes.

### TaskPlannedAllocationDto

Planned minutes attributed to a single calendar day for a resource.

- `date` (string, optional) — Calendar date for this planned segment (date-only; workspace calendar applies).
- `minutes` (integer, optional) — Planned minutes on date for this resource.

### TaskActualTimeEntryDto

A single timesheet line for the task and resource.

- `id` (string, optional) — Timesheet row identifier.
- `date` (string, optional) — Calendar date of the time entry (date-only).
- `minutes` (integer, optional) — Minutes reported on this timesheet row for the task.
- `approved` (boolean, optional) — True if this Timesheet was approved by a person with the role of a Timesheet approver
- `approvalStatusId` (integer, optional) — Approval status of the timesheet entry. 1 = New (not submitted for approval) 2 = Submitted (submitted for approval, pending review) 3 = Approved (approved by the approver) 4 = Declined (declined by the approver)

## Examples

**Response**

```json
{
  "error": {
    "technicalError": "string",
    "additionalErrors": [
      "string"
    ],
    "validationErrors": {},
    "message": "string"
  },
  "success": true,
  "hasError": true,
  "statusCode": "Continue",
  "data": {
    "totalPlannedMinutes": 1,
    "totalAssignedMinutes": 1,
    "totalActualMinutes": 1,
    "hasTimeEntries": true,
    "assigned": [
      {
        "id": "string",
        "totalMinutes": 1,
        "allocations": [
          {
            "date": "2023-01-15",
            "minutes": 1
          }
        ]
      }
    ],
    "actual": [
      {
        "id": "string",
        "totalMinutes": 1,
        "timeEntries": [
          {
            "id": "string",
            "date": "2023-01-15",
            "minutes": 1,
            "approved": true,
            "approvalStatusId": 1
          }
        ]
      }
    ]
  }
}
```

**SDK Code**

```python
import requests

url = "https://api.projectmanager.com/api/data/task/taskId/time"

headers = {"Authorization": "Bearer <token>"}

response = requests.get(url, headers=headers)

print(response.json())
```

```javascript
const url = 'https://api.projectmanager.com/api/data/task/taskId/time';
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://api.projectmanager.com/api/data/task/taskId/time"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("Authorization", "Bearer <token>")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby
require 'uri'
require 'net/http'

url = URI("https://api.projectmanager.com/api/data/task/taskId/time")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'

response = http.request(request)
puts response.read_body
```

```java
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.get("https://api.projectmanager.com/api/data/task/taskId/time")
  .header("Authorization", "Bearer <token>")
  .asString();
```

```php
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://api.projectmanager.com/api/data/task/taskId/time', [
  'headers' => [
    'Authorization' => 'Bearer <token>',
  ],
]);

echo $response->getBody();
```

```csharp
using RestSharp;

var client = new RestClient("https://api.projectmanager.com/api/data/task/taskId/time");
var request = new RestRequest(Method.GET);
request.AddHeader("Authorization", "Bearer <token>");
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = ["Authorization": "Bearer <token>"]

let request = NSMutableURLRequest(url: NSURL(string: "https://api.projectmanager.com/api/data/task/taskId/time")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```