Palbase Machines · API
/machines/github/detectTell what a repository's directory is
Reads a directory of a repository one of the project's installations reaches, at its branch's head — its package.json, its framework's configuration, its lockfiles, its Node.js version file — and says what it is and how it is built, as Vercel's import does. Nothing is made: a static web app is then opened as a site (POST /sites, with this build), a web app that runs on a server as a machine (POST /machines) and a site whose server it is (POST /sites with server), a backend as a machine. project_not_detected (422) when nothing there says what it is.
Called by your server, with the project's secret key.
Query
repositorystring · requiredThe repository: owner/name.branchstring · requiredIts branch, read at its head.pathstring · optionalThe directory in the repository; none for its root.curl -X GET "https://<your-ref>.palbase.studio/machines/github/detect" \
-H "apikey: $PALBASE_SECRET_KEY"Responses
200What it is
400Validation failed or a required field is missing
401Missing or invalid API key
403Not the project's secret key
404The project has no machine of this name
422Nothing there says what it is, or its package.json cannot be read (`project_not_detected`): its message says why
429Over the project's request limit, or its machine time for this period is used up
503Temporarily unavailable; retrying is safe after Retry-After
defaultAn error: the envelope names it (`error`) and explains it (`error_description`).
Operation DetectProject of machines's contract.