Search documentation
karat

+

K

User Documentation ↗

Create Builds

POST/api/v2/orchestration/builds/create
Warning

This endpoint is in preview and may be modified or removed at any time. To use this endpoint, add preview=true to the request query parameters.

Third-party applications using this endpoint via OAuth2 must request the following operation scope: api:orchestration-write.

Query parameters

preview
boolean
optional

Enables the use of preview functionality.

Request body

CreateBuildsRequest
object
Hide child attributes

Hide child attributes

target
union

The targets of the schedule.

Show child attributes

Show child attributes

upstream
object
optional

Target the specified datasets along with all upstream datasets except the ignored datasets.

Show child attributes

Show child attributes

targetRids
list<BuildableRid>
optional

The target datasets.

Show child attributes

Show child attributes

BuildableRid
string

The Resource Identifier (RID) of a Resource that can be built. For example, this is a Dataset RID, Media Set RID or Restricted View RID.

ignoredRids
list<BuildableRid>
optional

The datasets to ignore when calculating the final set of dataset to build.

Show child attributes

Show child attributes

BuildableRid
string

The Resource Identifier (RID) of a Resource that can be built. For example, this is a Dataset RID, Media Set RID or Restricted View RID.

manual
object
optional

Manually specify all datasets to build.

Show child attributes

Show child attributes

targetRids
list<BuildableRid>
optional
Show child attributes

Show child attributes

BuildableRid
string

The Resource Identifier (RID) of a Resource that can be built. For example, this is a Dataset RID, Media Set RID or Restricted View RID.

connecting
object
optional

All datasets between the input datasets (exclusive) and the target datasets (inclusive) except for the datasets to ignore.

Show child attributes

Show child attributes

inputRids
list<BuildableRid>
optional

The upstream input datasets (exclusive).

Show child attributes

Show child attributes

BuildableRid
string

The Resource Identifier (RID) of a Resource that can be built. For example, this is a Dataset RID, Media Set RID or Restricted View RID.

targetRids
list<BuildableRid>
optional

The downstream target datasets (inclusive).

Show child attributes

Show child attributes

BuildableRid
string

The Resource Identifier (RID) of a Resource that can be built. For example, this is a Dataset RID, Media Set RID or Restricted View RID.

ignoredRids
list<BuildableRid>
optional

The datasets between the input datasets and target datasets to exclude.

Show child attributes

Show child attributes

BuildableRid
string

The Resource Identifier (RID) of a Resource that can be built. For example, this is a Dataset RID, Media Set RID or Restricted View RID.

branchName
string
optional

The target branch the build should run on.

fallbackBranches
list<BranchName>
optional

The branches to retrieve JobSpecs from if no JobSpec is found on the target branch.

Show child attributes

Show child attributes

BranchName
string

The name of a Branch.

forceBuild
boolean
optional

Whether to ignore staleness information when running the build.

retryCount
integer
optional

The number of retry attempts for failed jobs.

retryBackoffDuration
object
optional

The duration to wait before retrying after a Job fails.

Show child attributes

Show child attributes

value
integer

The duration value.

unit
string (enum)

The unit of duration.

Enum values: MILLISECONDS, SECONDS, MINUTES, HOURS, DAYS, WEEKS, MONTHS, YEARS

abortOnFailure
boolean
optional

If any job in the build is unsuccessful, immediately finish the build by cancelling all other jobs.

notificationsEnabled
boolean
optional

Whether to receive a notification at the end of scheduled builds.

Response body

Build
object
Hide child attributes

Hide child attributes

rid
string

The RID of a build

branchName
string

The branch that the build is running on.

createdTime
string

The timestamp that the build was created.

createdBy
string

The user who created the build.

fallbackBranches
list<BranchName>
optional

The branches to retrieve JobSpecs from if no JobSpec is found on the target branch.

Show child attributes

Show child attributes

BranchName
string

The name of a Branch.

retryCount
integer

The number of retry attempts for failed Jobs within the Build. A Job's failure is not considered final until all retries have been attempted or an error occurs indicating that retries cannot be performed. Be aware, not all types of failures can be retried.

retryBackoffDuration
object

The duration to wait before retrying after a Job fails.

Show child attributes

Show child attributes

value
integer

The duration value.

unit
string (enum)

The unit of duration.

Enum values: MILLISECONDS, SECONDS, MINUTES, HOURS, DAYS, WEEKS, MONTHS, YEARS

abortOnFailure
boolean

If any job in the build is unsuccessful, immediately finish the build by cancelling all other jobs.

status
string (enum)

The status of the build.

Enum values: RUNNING, SUCCEEDED, FAILED, CANCELED

Examples

Request

Copied!
1 2 3 4 5 curl -X POST \ -H "Content-type: application/json" \ -H "Authorization: Bearer $TOKEN" \ "https://$HOSTNAME/api/v2/orchestration/builds/create?preview=true" \ -d '{"retryBackoffDuration":{"unit":"SECONDS","value":30},"fallbackBranches":["master"],"branchName":"master"}'

Response

Copied!
1 2 3 4 5 6 7 8 9 10 11 12 13 { "createdBy": "f05f8da4-b84c-4fca-9c77-8af0b13d11de", "retryBackoffDuration": { "unit": "SECONDS", "value": 30 }, "fallbackBranches": [ "master" ], "branchName": "master", "rid": "ri.foundry.main.build.a4386b7e-d546-49be-8a36-eefc355f5c58", "status": "RUNNING" }