@@ -142,7 +142,32 @@ function createRegionRoutes(
142142 return { status : 404 , body : notFoundFixture } ;
143143 } ,
144144 } ,
145- // Issues list for project
145+ // Issues list (org-scoped endpoint used by @sentry/api SDK)
146+ // Filters by project slug from the "query" search param (e.g., query=project:my-project)
147+ {
148+ method : "GET" ,
149+ path : "/api/0/organizations/:orgSlug/issues/" ,
150+ response : ( req , params ) => {
151+ if ( orgSet . has ( params . orgSlug ) ) {
152+ const url = new URL ( req . url ) ;
153+ const query = url . searchParams . get ( "query" ) ?? "" ;
154+ const projectMatch = query . match ( / p r o j e c t : ( \S + ) / ) ;
155+ const projectSlug = projectMatch ?. [ 1 ] ;
156+ if ( projectSlug ) {
157+ const issues = issuesByProject . get ( projectSlug ) ?? [ ] ;
158+ return { body : issues } ;
159+ }
160+ // No project filter: return all issues for all projects in this org
161+ const orgProjects = projectsByOrg . get ( params . orgSlug ) ?? [ ] ;
162+ const allIssues = ( orgProjects as Array < { slug : string } > ) . flatMap (
163+ ( p ) => issuesByProject . get ( p . slug ) ?? [ ]
164+ ) ;
165+ return { body : allIssues } ;
166+ }
167+ return { status : 404 , body : notFoundFixture } ;
168+ } ,
169+ } ,
170+ // Issues list (legacy project-scoped endpoint)
146171 {
147172 method : "GET" ,
148173 path : "/api/0/projects/:orgSlug/:projectSlug/issues/" ,
0 commit comments