/v1/git-connections/github-app/detectInspects a repository branch's file list and suggests how to build and run it: whether it
is a static site or a service, the framework, the root directory (for monorepos) and the
recommended build method. Only file names are inspected, not file contents.
How detection works:
- The repository root and common app folders (
apps/web,frontend,web,api,server,backendand so on) are checked, along with every other folder. The best match wins. - Framework config files are recognised first, for example Next.js, Nuxt, Remix and
SvelteKit (
service), and Astro, Gatsby, Angular and Vite (static). Then Go, Rust, Laravel, PHP, Rails, Ruby, Java, Elixir and Deno projects (service). Then generic markers:package.json,requirements.txt,pyproject.toml,index.phpandindex.html. - A
Dockerfilein a folder makesdockerfilethe recommended build method and setsdockerfile_path.railpackis always supported.
When nothing is recognised, detected is false and recommended_build_method is
omitted.
Requires the secrets read permission (owner, admin or developer role).
Authentication
Send your API key as Authorization: Bearer <token>. The request is scoped to the workspace in X-Workspace-Slug.
Query parameters
repostringRequiredRepository in owner/name form. Must not contain spaces.
branchstringBranch to inspect. Defaults to main.
Default main
Headers
X-Workspace-SlugstringRequiredSlug of the workspace the request acts on. You can also pass it as the workspace_slug query parameter.
Response
The detection result.
successbooleanRequiredtrue when the request succeeded.
messagestringRequiredHuman-readable status message.
dataobjectShow attributesHide attributes
detectedbooleanRequiredtrue when a supported app was recognised.
app_typestringstatic for sites built to static files, service for apps that run a server. Omitted when nothing was detected.
One ofstaticservice
frameworkstringDetected framework or language, for example Next.js, Vite, Go, Python, Static site or Dockerfile. Omitted when nothing was detected.
recommended_build_methodstringSuggested build method. dockerfile when a Dockerfile was found, otherwise railpack. Omitted when nothing was detected.
One ofrailpackdockerfile
supported_build_methodsarray of stringsRequiredBuild methods that can be used. Always includes railpack. dockerfile is added when a Dockerfile was found.
One ofrailpackdockerfile
root_directorystringRequiredFolder the app lives in, relative to the repository root. Empty string for the root.
dockerfile_pathstringPath of the detected Dockerfile. Omitted when there is none.
messagestringRequiredHuman-readable summary of what was detected.
Errors
| Status | Meaning |
|---|---|
400 | repo is missing or contains spaces. |
401 | The API key is missing, invalid, expired or revoked. |
403 | You cannot access the workspace, your role does not allow this action, or the account is suspended. |
404 | No GitHub account is connected, or none matches the repository's owner. |
500 | GitHub could not be reached, or the repository or branch is not accessible to the app. |
Errors use the standard error format.