Skip to content

feat(apidocs): Publish open periods as experimental - #131257

Merged
BYK merged 3 commits into
masterfrom
byk/feat/apidocs-open-periods
Nov 17, 2026
Merged

BYK merged 3 commits into
masterfrom
byk/feat/apidocs-open-periods

Conversation

@sentry-junior

@sentry-junior sentry-junior Bot commented Nov 16, 2026

Copy link
Copy Markdown
Contributor

Part of #131199.

sentry-tui needs the open and closed history of an issue or detector, which the issue details and monitor pages show as open periods. It reads it through the generated @sentry/api SDK, which only has published operations. This endpoint already has extend_schema docs, but it's unpublished, and its operationId isn't a token.

Endpoint Decision Reason
GET /organizations/{org}/open-periods/ (OrganizationOpenPeriodsEndpoint) PRIVATE → PUBLIC_EXPERIMENTAL as listOrganizationOpenPeriods User-facing data with no published equivalent. Detectors are still evolving, so it isn't a firm promise.

Doc changes, checked against the handler and serializer:

  • operationId: Fetch Group Open Periods → listOrganizationOpenPeriods, plus a summary. The rename is safe. The endpoint was PRIVATE, so the old ID never reached the published spec, and no @sentry/api export or published operationId changes. Nothing in the repo refers to the old ID.
  • New bucketSize parameter: the handler reads it and subtracts that many seconds from each start/end.
  • 200 response: it was GroupOpenPeriodSerializer, a model serializer drf-spectacular can't describe. It's now list[GroupOpenPeriodResponse]. That TypedDict and GroupOpenPeriodActivityResponse get field descriptions.
  • Tag: Workflows → Monitors, the tag the published detector endpoints use. Workflows isn't a defined spec tag, so the build rejects it.
  • Description: it now notes that a request takes exactly one of detectorId or groupId. get declares its Response[...] type.

Behavior, permissions and responses stay the same, and nothing breaks. The spec only gains this one operation.

The agent-token permission matrix picks up the row, with a groupId query param.

Moving sentry-tui or the CLI onto this operation waits for an @sentry/api release that includes it.

via @BYK.

--

View Session [Sentry]

The organization open periods endpoint moves to PUBLIC_EXPERIMENTAL as
listOrganizationOpenPeriods. It gets a token operationId and summary, the
bucketSize parameter the handler reads, a typed list response with field
descriptions, and the Monitors tag. No behavior change.

Part of #131199
…en-periods

Co-Authored-By: BYK <[email protected]>

# Conflicts:
#	tests/sentry/seer/endpoints/test_organization_agent_token.py
@sentry-junior
sentry-junior Bot requested review from a team as code owners November 16, 2026 15:08
@sentry-junior
sentry-junior Bot requested a review from BYK November 16, 2026 15:08
@github-actions github-actions Bot added the Scope: Backend Automatically applied to PRs that change backend components label Nov 16, 2026
@BYK
BYK enabled auto-merge (squash) November 17, 2026 12:51
…en-periods

# Conflicts:
#	tests/sentry/seer/endpoints/test_organization_agent_token.py
@BYK
BYK merged commit 3859b86 into master Nov 17, 2026
85 checks passed
@BYK
BYK deleted the byk/feat/apidocs-open-periods branch November 17, 2026 13:02

This branch was successfully deployed

1 active deployment
Preview — 330148de Deployed Nov 17, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Scope: Backend Automatically applied to PRs that change backend components

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant