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"
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())
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());
{
"workingHours": 40,
"comparisonsReady": true
}
{ "code": 16, "message": "unauthenticated" }
API
Get sprint elapsed hours
Working hours in a period and whether the period is long enough for comparisons.
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"
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())
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());
{
"workingHours": 40,
"comparisonsReady": true
}
{ "code": 16, "message": "unauthenticated" }
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
string
required
Bearer <key>. See Authentication.Path parameters
string
required
GITHUB_ORGANIZATION or GITHUB_USER.string
required
Numeric GitHub ID of the organization or user.
Query parameters
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.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
number
Working hours in the period. Can be fractional.
0 means no working hours, not missing data.boolean
true when workingHours is at least 8. Does not indicate that a report or comparison data exists.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"
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())
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());
{
"workingHours": 40,
"comparisonsReady": true
}
{ "code": 16, "message": "unauthenticated" }