deploy.hosting.detect-nextjsCheck whether a repository branch is a Next.js app the platform can build and serve on pooled hosting
Reads package.json and the lockfiles at the branch (a read of source, recorded like a clone). next 15 or newer builds; older is too-old; no next is not-nextjs.
Request syntax
GET /deploy/api/nextjs/detectQuery parameters
repositoryIdRequiredstring
The repository to look at
branchOptionalstring
The branch; default the repository’s default branch
Constraints: 1-255 chars
rootDirOptionalstring
Folder of the app in the repository; default the root (.)
Constraints: max 255 chars, /^[A-Za-z0-9._/-]*$/
Response
200 with `data`: kind, and for nextjs and too-old the version, major and packageManager; otherwise a reason. 404 when the repository or the branch does not exist.
A JSON response is wrapped as { "success": true, "data": … }; the CLI prints the whole body with --json.
Fields of data
kindAlwaysone of nextjs, too-old, not-nextjs, no-package-json
nextjs: builds; too-old: Next below 15; not-nextjs or no-package-json: deploy it as a containerversionWhen presentstring
The next dependency as written in package.jsonmajorWhen presentnumber, may be null
Its major version; null for a tag such as latestpackageManagerWhen presentone of npm, pnpm, yarn, bun
What the build installs with, from the lockfilereasonWhen presentstring
Why it is not a Next.js appcommitAlwaysstring
The commit readbranchAlwaysstring
The branch read
Checked against the handlers: every route test validates their answers against this schema.
Errors
- 400The request does not pass the schema above. The body is { "error": …, "issues": […] }, one issue per field.
- 401No credentials, or an access key that is unknown, revoked or expired.
- 403The caller's policies do not allow git:PullRepository on this resource. The body names the action and the resource, and the refusal is recorded in the audit log.
- 404The resource does not exist in your organization.
Examples
The required parameters only, with example values. Replace id and the other placeholders with your own.
dcloud deploy hosting detect-nextjs --repository-id examplecurl -X GET "https://console.platform.deutschecloud.app/deploy/api/nextjs/detect" \
-H "Authorization: EWS-ACCESS-KEY $ACCESS_KEY"import { DcloudClient } from '@dcloud/sdk';
const client = new DcloudClient();
const result = await client.deploy.hosting.detectNextjs({ repositoryId: "00000000-0000-0000-0000-000000000000" });from dcloud import Client
client = Client()
result = client.deploy.hosting.detect_nextjs(repository_id="00000000-0000-0000-0000-000000000000")Generated from the API description, the same one the API checks requests against and the CLI is built from. MCP tool: dcloud_deploy_hosting_detect-nextjs.