> ## Documentation Index
> Fetch the complete documentation index at: https://docs.macroscope.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Get sprint elapsed hours

> Working hours in a period and whether the period is long enough for comparisons.

Returns the number of working hours in a period. Working hours are weekdays 09:00 to 17:00, not person-hours or coding time. Supported US and UK timezones also exclude actual and observed holidays; other timezones exclude weekends only.

Requires workspace Read, not Productivity. There is no pagination. `comparisonsReady` measures the working-hours threshold, not whether comparison data has been processed.

## Authorization

**Authorization** `string` *required*

`Bearer <key>`. See [Authentication](https://docs.macroscope.com/api#authentication).

## Path parameters

**workspaceType** `string` *required*

`GITHUB_ORGANIZATION` or `GITHUB_USER`.

**workspaceId** `string` *required*

Numeric GitHub ID of the organization or user.

## Query parameters

**from** `string`

Inclusive start (RFC 3339). Send both `from` and `to`, or neither. When both are omitted, the current sprint is used; if it has no working hours yet, the previous sprint is used.

**to** `string`

Exclusive end (RFC 3339). Must be later than `from` and at most 366 days after it. Explicit ranges use the workspace timezone and are not clipped to now.

## Response

**workingHours** `number`

Working hours in the period. Can be fractional. `0` means no working hours, not missing data.

**comparisonsReady** `boolean`

`true` when `workingHours` is at least 8. Does not indicate that a report or comparison data exists.

```bash cURL theme={null}
curl "https://api.macroscope.com/api/v1/workspaces/GITHUB_ORGANIZATION/12345678/sprintElapsedHours?from=2026-09-14T00:00:00Z&to=2026-09-21T00:00:00Z" \
  -H "Authorization: Bearer $MACROSCOPE_API_KEY"
```

```python Python theme={null}
import os, requests

r = requests.get(
    "https://api.macroscope.com/api/v1/workspaces/GITHUB_ORGANIZATION/12345678/sprintElapsedHours",
    headers={"Authorization": f"Bearer {os.environ['MACROSCOPE_API_KEY']}"},
    params={"from": "2026-09-14T00:00:00Z", "to": "2026-09-21T00:00:00Z"},
)
print(r.json())
```

```javascript JavaScript theme={null}
const params = new URLSearchParams({
  from: "2026-09-14T00:00:00Z",
  to: "2026-09-21T00:00:00Z",
});
const res = await fetch(
  `https://api.macroscope.com/api/v1/workspaces/GITHUB_ORGANIZATION/12345678/sprintElapsedHours?${params}`,
  { headers: { Authorization: `Bearer ${process.env.MACROSCOPE_API_KEY}` } }
);
console.log(await res.json());
```

```json 200 theme={null}
{
  "workingHours": 40,
  "comparisonsReady": true
}
```

```json 401 theme={null}
{ "code": 16, "message": "unauthenticated" }
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.