Skip to main content
POST
Create a BuildSpec

Authorizations

Authorization
string
header
required

Use a Bearer token for authentication. Submit the token using the Authorization header: Authorization: Bearer <token>.

Body

application/json
sources
object[]
required
Minimum array length: 1
destinations
object[]
required
Minimum array length: 1
code
object
codeSource
enum<string>
default:CodeBlob

The transform source. CodeBlob (the default) runs the inline code, which is then required. GitPipeline provisions a platform-hosted Git repo scaffolded from the declared sources and destinations, and the transform lives in that repo; code is ignored. A spec's code source is fixed at creation and cannot be changed by a later update.

Available options:
CodeBlob,
GitPipeline

Response

The created BuildSpec.

id
string<uuid>
required
owner
string
required

Username of the BuildSpec's owner.

version
integer
required
sources
object[]
required
destinations
object[]
required
code
object
required
codeSource
enum<string>
required

The spec's transform source. A GitPipeline spec's code is empty; edit its transform through the pipeline files API rather than this field.

Available options:
CodeBlob,
GitPipeline
createdAt
string<date-time>
required

Timestamp of the BuildSpec creation.

Example:

"2005-04-02T19:37:00.000Z"

updatedAt
string<date-time>
required

Timestamp of the BuildSpec last update.

Example:

"2005-04-02T19:37:00.000Z"