feat(api): add get app endpoint#6490
Draft
ogzhanolguncu wants to merge 2 commits into
Draft
Conversation
This was referenced Jun 18, 2026
Collaborator
Author
|
Warning This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
This stack of pull requests is managed by Graphite. Learn more about stacking. |
This was referenced Jun 18, 2026
b11231d to
e2f1e95
Compare
b064fea to
86f152b
Compare
86f152b to
294bf2b
Compare
e2f1e95 to
3e476a4
Compare
This was referenced Jun 19, 2026
3e476a4 to
d11c4c6
Compare
294bf2b to
8168cec
Compare
d11c4c6 to
a67c015
Compare
8168cec to
2d5fd6a
Compare
2d5fd6a to
683d77d
Compare
a67c015 to
b904b7d
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Important
Unkey is not accepting external pull requests at this time. Pull requests from people outside the Unkey team will not be reviewed or merged.
What does this PR do?
Adds the
POST /v2/apps.getAppendpoint, which retrieves a single app by its unique identifier within the caller's workspace.The handler looks up the app by workspace ID and app ID, then checks that the root key holds a
read_apppermission scoped to either the specific project (project.<project_id>.read_app) or all projects (project.*.read_app). If the app is not found or the key lacks the required permission, the response is an identical 404 — preventing an unauthorized caller from probing which apps exist in the workspace.Supporting changes include:
err:unkey:data:app_not_founderror code with a corresponding documentation pageReadAppRBAC action type andread_apppermission entries in the dashboard root-key dialog (workspace-wide and per-project)FindAppByWorkspaceAndIdSQL query and generated codeAppshared component,V2AppsGetAppRequestBody, andV2AppsGetAppResponseBodyapp_not_foundmapped to HTTP 404 in the error-handling middlewareType of change
How should this be tested?
200: Create a project and app, callapps.getAppwith a root key holdingproject.*.read_app— expect the full app object returned.400: Send requests with a missingappId, one that is too short, contains invalid characters, or exceeds the maximum length — expect 400 withinvalid_inputerror type.401: Call the endpoint with an invalid bearer token — expect 401.403 → 404: Call with a root key that lacksread_appagainst a real app — expect 404 with no app ID in the response body.404: Query an unknown app ID or an app belonging to a different workspace — expect 404.Checklist
Required
pnpm buildpnpm fmtmise run fmtconsole.logsgit pull origin mainAppreciated