Bring an existing Next.js project in
post/hosting/coder/projects/import
Bring an existing Next.js project in: its source as a zip or a gzip tar in the request body, up to 10 MB, without installed packages or build output. Nothing in it is run. Text files become the project's first checkpoint; pictures, fonts and the lockfile are kept beside it; secrets (.env files, keys) are never kept and are named in the answer. Refused with the reason when it is not a Next.js project. The project keeps its own conventions: the library, token and layout rules are advice for it.
Before you call
- Credential
Authorization: Bearer $KEY- Scope
hosting:write- Sdk
hosting.coderProject.import- Cli
hosting coder project import
Parameters
- namestringrequiredIn the query
Request bodyapplication/octet-stream, required
string (binary)
Responses
- 201application/jsonSuccess
- projectobjectrequired
- idstringrequired
- namestringrequired
- stackstringrequiredOne of: next, static, harness.
- libraryobjectrequired
- versionstringrequired
- commitstringrequired
- entriesobjectrequired
- headstring or nullrequired
- checkpointsnumberrequired
- eventsnumberrequired
- cloudobject
- namestringrequired
- urlstringrequired
- deployobject
- liveobject
- previewobject
- lockobject
- carriedobjectSet for a project that carries over a site made with the earlier designer
- sitestringrequired
- hoststring
- originobjectSet for a project that was brought in from outside
- kindstringrequiredOne of: upload, cloud, github.
- frameworkstringrequired
- versionstringrequired
- fromstring
- kindstringrequired
- createdAtstringrequired
- updatedAtstringrequired
- checkpointobjectrequired
- idstringrequired
- projectIdstringrequired
- seqnumberrequired
- parentstring or nullrequired
- messagestringrequired
- restoresstring
- bystringrequired
- createdAtstringrequired
- filesnumberrequired
- supportobjectrequired
- frameworknextrequired
- versionstringrequired
- noteslist of stringrequired
- leftlist of objectrequiredFiles that were not kept, and why
- pathstringrequired
- whystringrequiredOne of: secret, too_large, name, too_many.
- keptnumberrequiredFiles kept beside the source: pictures, fonts, the lockfile
- skippednumberrequiredInstalled packages, build output and version-control files that were passed over
- projectobjectrequired
- 400application/jsonThe request was malformed
- errorstringrequired
- messagestring
- 401application/jsonNo valid credential
- errorstringrequired
- messagestring
- 403application/jsonThe credential lacks the scope, origin or address
- errorstringrequired
- messagestring
- 429application/jsonOver the key's rate limit; see Retry-After
- errorstringrequired
- messagestring