Skip to content

feat(api): make organization tags endpoint public with OpenAPI spec#116751

Merged
MathurAditya724 merged 5 commits into
masterfrom
make-organization-tags-endpoint-public
Jun 3, 2026
Merged

feat(api): make organization tags endpoint public with OpenAPI spec#116751
MathurAditya724 merged 5 commits into
masterfrom
make-organization-tags-endpoint-public

Conversation

@MathurAditya724

Copy link
Copy Markdown
Member

Summary

  • Makes GET /api/0/organizations/{organization_id_or_slug}/tags/ a public API endpoint by changing its publish_status from PRIVATE to PUBLIC
  • Adds full OpenAPI schema via @extend_schema decorators including operation ID, parameters, response types, and examples
  • Documents all query parameters: project, environment, statsPeriod, start, end, dataset, use_cache, and useFlagsBackend

Changes

src/sentry/api/endpoints/organization_tags.py

  • publish_status changed from ApiPublishStatus.PRIVATE to ApiPublishStatus.PUBLIC
  • Class-level @extend_schema(tags=["Discover"]) added
  • Method-level @extend_schema(...) added on get() with:
    • operation_id="List an Organization's Tags"
    • All path and query parameters documented via GlobalParams, OrganizationParams, and custom OpenApiParameter definitions
    • Response type: list[TagKeySerializerResponse]
    • Error responses: 400, 401, 403
    • Example response data
  • Docstring added to get() method

src/sentry/apidocs/examples/tags_examples.py

  • New SIMPLE_ORGANIZATION_TAGS example data (list of tag key objects with key and name fields)
  • New TagsExamples.ORGANIZATION_TAGS OpenApiExample entry

Add OpenAPI schema definition to the GET /api/0/organizations/{organization_id_or_slug}/tags/
endpoint by changing its publish_status from PRIVATE to PUBLIC, adding
@extend_schema decorators with full parameter, response, and example
definitions.
@github-actions github-actions Bot added the Scope: Backend Automatically applied to PRs that change backend components label Jun 3, 2026
@MathurAditya724 MathurAditya724 requested a review from cvxluo June 3, 2026 07:10

@cvxluo cvxluo left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🙏

SIMPLE_ORGANIZATION_TAGS = [
{
"key": "browser",
"name": "Browser",

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit, i think the response also will include totalValues which might be helpful in this example

required=False,
type=str,
description="The dataset to query. Defaults to `discover`.",
enum=["discover", "events", "search_issues"],

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i think we support replays as well

@MathurAditya724 MathurAditya724 marked this pull request as ready for review June 3, 2026 18:25
@MathurAditya724 MathurAditya724 requested review from a team as code owners June 3, 2026 18:25
@MathurAditya724 MathurAditya724 enabled auto-merge (squash) June 3, 2026 18:54
@MathurAditya724 MathurAditya724 merged commit 2dab56d into master Jun 3, 2026
62 of 63 checks passed
@MathurAditya724 MathurAditya724 deleted the make-organization-tags-endpoint-public branch June 3, 2026 19:11
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.

2 participants