Skip to content

feat(sentry-apps): Return installation UUID with org components - #127591

Merged
Christinarlong merged 2 commits into
masterfrom
feat/sentry-app-components-installation-uuid
Oct 15, 2026
Merged

Christinarlong merged 2 commits into
masterfrom
feat/sentry-app-components-installation-uuid

Conversation

@sentry-junior

@sentry-junior sentry-junior Bot commented Oct 15, 2026

Copy link
Copy Markdown
Contributor

Agents like Seer Agent (code mode) and MCP should be able to create a Linear ticket for a Sentry issue using only the public API. Linear is a Sentry App, so that flow goes through the issue-link endpoints #124068 published as experimental:

  1. GET /organizations/{org}/sentry-app-components/?filter=issue-link returns the app's create/link form.
  2. GET /sentry-app-installations/{uuid}/external-requests/ loads options for select fields such as team.
  3. POST /sentry-app-installations/{uuid}/external-issue-actions/ creates or links the issue.

Steps 2 and 3 need the installation UUID, and nothing published returns it. Only the private GET /organizations/{org}/sentry-app-installations/ has it, so an agent can read the form but can't submit it.

This adds installationUuid to each component returned by the organization components endpoint, which already loads the installations. It also explains the create/link steps in the endpoint docs so agents can follow them from the OpenAPI spec.

I didn't publish the installations list endpoint because its response can include the installation's OAuth grant code. The private, app-scoped components endpoint doesn't change.

The field is additive. First-party integrations (Jira, GitHub, …) are already covered by the public GroupIntegrationDetailsEndpoint.

Refs ISWF-3567

via @sentaur-athena.

--

View Junior Session [Sentry]

Agents can read an app's issue-link form from the public components
endpoint, but creating the issue needs the installation UUID, which
only a private endpoint returns. Include it on each component.

Refs ISWF-3567

Co-Authored-By: Athena Moghaddam <[email protected]>
@linear-code

linear-code Bot commented Oct 15, 2026

Copy link
Copy Markdown

ISWF-3567

@github-actions github-actions Bot added the Scope: Backend Automatically applied to PRs that change backend components label Oct 15, 2026
@sentaur-athena sentaur-athena added the Trigger: getsentry tests Once code is reviewed: apply label to PR to trigger getsentry tests label Oct 15, 2026
).order_by("pk")

for install in installs:
installation_uuids[install.sentry_app_id] = str(install.uuid)

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.

Can you give me an example for what the new data/payload shape will look like with these changes?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Sure. Each component returned by GET /api/0/organizations/{org}/sentry-app-components/ gets one new top-level field, installationUuid. It's the UUID of the org's installation of that component's app. Nothing else in the payload changes.

Before:

[
  {
    "uuid": "6f1c0e2a-1b7d-4c55-9a7e-0d6b2b1f9c11",
    "type": "issue-link",
    "schema": {
      "type": "issue-link",
      "create": {
        "uri": "/sentry/issues/create",
        "required_fields": [
          {"type": "text", "name": "title", "label": "Title"},
          {"type": "select", "name": "teamId", "label": "Team", "uri": "/sentry/teams"}
        ]
      },
      "link": {
        "uri": "/sentry/issues/link",
        "required_fields": [
          {"type": "select", "name": "issueId", "label": "Issue", "uri": "/sentry/issues/search"}
        ]
      }
    },
    "error": "",
    "sentryApp": {
      "uuid": "a3b8f1d2-5c4e-4f60-8e21-7c9d0b6a4e33",
      "slug": "linear",
      "name": "Linear",
      "avatars": []
    }
  }
]

After:

[
  {
    "uuid": "6f1c0e2a-1b7d-4c55-9a7e-0d6b2b1f9c11",
    "type": "issue-link",
    "schema": { "...": "unchanged" },
    "error": "",
    "installationUuid": "e7d24b90-3f1a-4c8b-b5d6-2a9f8c7e1d44",
    "sentryApp": {
      "uuid": "a3b8f1d2-5c4e-4f60-8e21-7c9d0b6a4e33",
      "slug": "linear",
      "name": "Linear",
      "avatars": []
    }
  }
]

An agent then uses that UUID for the next two calls:

GET  /api/0/sentry-app-installations/e7d24b90-.../external-requests/?uri=/sentry/teams&projectId=123
POST /api/0/sentry-app-installations/e7d24b90-.../external-issue-actions/
     {"groupId": "456", "action": "create", "uri": "/sentry/issues/create",
      "title": "...", "teamId": "..."}

Up to now, the only way to get e7d24b90-... was the private GET /organizations/{org}/sentry-app-installations/ endpoint, which the frontend uses.

The app-scoped GET /api/0/sentry-apps/{app}/components/ endpoint doesn't take an installation, so its response stays the same and has no installationUuid. The UUIDs and schema above are illustrative; I made them up for this example.

@Christinarlong
Christinarlong merged commit b3feda4 into master Oct 15, 2026
70 of 71 checks passed
@Christinarlong
Christinarlong deleted the feat/sentry-app-components-installation-uuid branch October 15, 2026 22:19
BYK added a commit to getsentry/toolkit that referenced this pull request Oct 23, 2026
Upgrades the CLI's `@sentry/api` dependency from `^0.356.0` to
`^0.399.0`, the release that includes getsentry/sentry-api-schema#108.
That release exports a named type for every enum-valued query parameter,
such as `ListOrganizationTraceItemAttributesQueryDataset`, so callers no
longer need to derive them with `NonNullable<…["query"]>`. #1559 will
switch its trace-item attribute types to these once this lands.

The lockfile change only covers `@sentry/api`. `pnpm-workspace.yaml`
moves the `minimumReleaseAgeExclude` entry to the new version, because
0.399.0 was published today.

Two schema changes between 0.356.0 and 0.399.0 broke existing tests.
Both changes match Sentry's current behavior, so the tests were updated
rather than the code:

- **Sentry App components:** the organization endpoint now returns a
required `installationUuid` (getsentry/sentry#127591). The CLI validates
this response against the schema, so the `issue-app-links` test fixture
now includes the field; without it, all 37 issue-link tests failed. The
org endpoint always passes `installation_uuids` to the serializer, so
live responses always include the field. Self-hosted servers older than
that change will fail this validation.
- **Replay fields:** the replay index now accepts every replay response
field, including `replay_type`, because the field list comes from
`ReplayDetailsResponse` (getsentry/sentry#128518). The two tests that
expected `replay_type` to be rejected now check a field that isn't in
the schema, `device.model_id`.

Verification: typecheck and lint pass. CLI tests: 11,295 passed and 6
failed. The 6 failures are permission tests that also fail on a clean
`main` in my sandbox (completions, code-scanner, file-changes,
telemetry, upgrade).

<!-- junior-request-attribution:start -->
via **BYK**.
<!-- junior-request-attribution:end -->

<!-- junior-session-footer:start -->
<!-- junior-conversation-id:local%3Aweb%3A7fba2603229556152deec3d2 -->

--

[View Junior Session in
Sentry](https://sentry.sentry.io/explore/conversations/local%3Aweb%3A7fba2603229556152deec3d2/?project=4510944073809921)

<!-- junior-session-footer:end -->

Co-authored-by: sentry-junior[bot] <264270552+sentry-junior[bot]@users.noreply.github.com>
Co-authored-by: BYK <[email protected]>
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 Trigger: getsentry tests Once code is reviewed: apply label to PR to trigger getsentry tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants