Rivier/ Reference/ hosting

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

  • namestringrequired
    In the query

Request bodyapplication/octet-stream, required

string (binary)

Responses

  • 201application/json
    Success
    • projectobjectrequired
      • idstringrequired
      • namestringrequired
      • stackstringrequired
        One of: next, static, harness.
      • libraryobjectrequired
        • versionstringrequired
        • commitstringrequired
      • entriesobjectrequired
      • headstring or nullrequired
      • checkpointsnumberrequired
      • eventsnumberrequired
      • cloudobject
        • namestringrequired
        • urlstringrequired
        • deployobject
        • liveobject
        • previewobject
        • lockobject
      • carriedobject
        Set for a project that carries over a site made with the earlier designer
        • sitestringrequired
        • hoststring
      • originobject
        Set for a project that was brought in from outside
        • kindstringrequired
          One of: upload, cloud, github.
        • frameworkstringrequired
        • versionstringrequired
        • fromstring
      • createdAtstringrequired
      • updatedAtstringrequired
    • checkpointobjectrequired
      • idstringrequired
      • projectIdstringrequired
      • seqnumberrequired
      • parentstring or nullrequired
      • messagestringrequired
      • restoresstring
      • bystringrequired
      • createdAtstringrequired
      • filesnumberrequired
    • supportobjectrequired
      • frameworknextrequired
      • versionstringrequired
      • noteslist of stringrequired
    • leftlist of objectrequired
      Files that were not kept, and why
      • pathstringrequired
      • whystringrequired
        One of: secret, too_large, name, too_many.
    • keptnumberrequired
      Files kept beside the source: pictures, fonts, the lockfile
    • skippednumberrequired
      Installed packages, build output and version-control files that were passed over
  • 400application/json
    The request was malformed
    • errorstringrequired
    • messagestring
  • 401application/json
    No valid credential
    • errorstringrequired
    • messagestring
  • 403application/json
    The credential lacks the scope, origin or address
    • errorstringrequired
    • messagestring
  • 429application/json
    Over the key's rate limit; see Retry-After
    • errorstringrequired
    • messagestring

This page as Markdown