Builds

Get a build

A version's build, by the version's id: the write's build.id, or build.next_id while the API is applying the compiler's changes (that build is Running until its version is saved).

get/v2/builds/{id}

Request

  • Base URL
    https://api.codepen.io
  • Auth
    • HTTP bearer
    • or API key in header X-API-Key

Query parameters

waitinteger

Seconds to wait for the build to settle (at most 75). Without it the build is answered as it is.

Response

The build, with output files when it succeeded.

ended_atstring date-time nullable required
idstring required

The version's id, before and after the version is saved.

next_idstring nullable required

The build applying this one's patches.

previous_idstring nullable required

The caller's build this one was converged from.

roundsinteger required

How many compiler builds it took, counted from the version the caller wrote.

started_atstring date-time nullable required
status'Queued' | 'Running' | 'Success' | 'Failed' | 'Canceled' required

Canceled means changes are still required; see patches and next_id.

version_idstring nullable required

Null while the version is still being converged.

Example response

{
  "files": [
    {
      "name": "app.js",
      "path": "/src/app.js"
    }
  ]
}

Changes

No recorded changes to this operation across all 1 revision of this API.