Skip to content

Builds

The /builds endpoint allows you to list existing builds and trigger new build executions. A build generates executable process instances (e.g. Informatica mappings, DDL statements) from patterns and instance metadata.

See Also

GET /api/v1/builds — Find Builds

Retrieve a list of builds matching the specified filter criteria.

Endpoint

GET https://app.metakraftwerk.com/api/v1/builds

Query Parameters

ParameterTypeRequiredDescription
projectstringNoFilter by project name.
project_idintegerNoFilter by project ID.
userstringNoFilter by username who started the build.
user_idintegerNoFilter by user ID who started the build.
patternstringNoFilter by pattern name.
pattern_idintegerNoFilter by pattern ID.
releasesobjectNoJSON object mapping release group names to release names (e.g. {"DWH_GROUP": "R1"}).

Response Schema

Returns an array of build objects:

FieldTypeDescription
idintegerUnique build ID.
customer_idintegerCustomer ID.
user_idintegerUser ID who started the build.
project_idintegerProject ID.
progressintegerBuild progress percentage (0–100).
statusstringBuild status: BUILDING, FINISHED, FAILED, CANCELED.
messagestringCurrent status message.
build_startstringISO 8601 timestamp of build start.
build_endstringISO 8601 timestamp of build completion.
created_atstringISO 8601 timestamp of build creation.
updated_atstringISO 8601 timestamp of last update.
history_commitedintegerWhether the history has been committed.
versionintegerBuild version.
activeintegerWhether the build is active.
mtsintegerInternal timestamp.
namestringBuild name.
deliveries_calculatedintegerWhether deliveries have been calculated.
descriptionstringBuild description.
commit_indintegerCommit indicator.
deletedintegerWhether the build is deleted.
instancesintegerNumber of instances in the build.
patternsinteger[]Array of pattern IDs included in the build.
releasesinteger[]Array of release IDs included in the build.
downloadsobject[]Array of download objects (see Downloads).

Examples

cURL

bash
curl -X GET "https://app.metakraftwerk.com/api/v1/builds?project=DEMO_PROJECT" \
  -H "Authorization: Bearer $ACCESS_TOKEN"

JavaScript (Fetch)

javascript
const response = await fetch(
  'https://app.metakraftwerk.com/api/v1/builds?project=DEMO_PROJECT',
  { headers: { 'Authorization': `Bearer ${accessToken}` } }
);

const builds = await response.json();

Error Responses

StatusConditionExample Message
401Missing or invalid tokenNot authenticated
403User lacks project accessYou don't have permissions to access this project!
404Project not foundA project with the name 'X' does not exist!

GET /api/v1/builds/:id — Get Build

Retrieve a single build by its ID, including download links if the build has finished.

Endpoint

GET https://app.metakraftwerk.com/api/v1/builds/:id

Path Parameters

ParameterTypeRequiredDescription
idintegerYesThe build ID.

Response Schema

Returns a single build object with the same schema as the find response. If the build has finished, the downloads array contains the generated files.

Examples

cURL

bash
curl -X GET "https://app.metakraftwerk.com/api/v1/builds/5139" \
  -H "Authorization: Bearer $ACCESS_TOKEN"

JavaScript (Fetch)

javascript
const response = await fetch(
  'https://app.metakraftwerk.com/api/v1/builds/5139',
  { headers: { 'Authorization': `Bearer ${accessToken}` } }
);

const build = await response.json();

Error Responses

StatusConditionExample Message
401Missing or invalid tokenNot authenticated
404Build not foundNo record found for id 'X'

POST /api/v1/builds — Create Build

Start a new build for one or more instances.

Endpoint

POST https://app.metakraftwerk.com/api/v1/builds

Authentication

The authenticated user must have write_builds permission on the target project.

Request Headers

HeaderValue
Content-Typeapplication/json
AuthorizationBearer <ACCESS_TOKEN>

Request Body

FieldTypeRequiredDescription
projectstringYes*Project name. Mutually exclusive with project_id.
project_idintegerYes*Project ID. Mutually exclusive with project.
instancesobject[]YesArray of instance definitions to build.
releasesobjectNoObject mapping release group names to release names (e.g. {"DWH_GROUP": "R1"}).
descriptionstringNoDescription for the build.
waitbooleanNoWhen true, the request blocks until the build completes and returns the full result with downloads. Defaults to false.
restorebooleanNoWhen true, restores deleted instances before building. Defaults to false.

TIP

* Exactly one of project or project_id is required.

Instance Definition

Each entry in the instances array can be specified in two ways:

By ID:

FieldTypeDescription
idintegerInstance ID.

By name:

FieldTypeDescription
patternstringPattern name.
folderstringFolder path (e.g. /BUSINESS_VAULT).
namestringInstance name.

Response Schema

FieldTypeDescription
buildobjectThe created build object.
build.idintegerBuild ID.
build.statusstringBuild status (BUILDING or FINISHED if wait=true).
build.progressintegerBuild progress (0–100).
build.downloadsobject[]Array of download objects (only populated when wait=true and status is FINISHED).
build.downloads[].idintegerDownload ID. Use with the Downloads API to retrieve the file.
build.downloads[].patternstringPattern name.
build.downloads[].pattern_idintegerPattern ID.
build.downloads[].namestringFile name.
warningsstring[]Array of warning messages (e.g. missing releases).

Examples

cURL

bash
curl -X POST "https://app.metakraftwerk.com/api/v1/builds" \
  -H "Authorization: Bearer $ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "project": "DEMO_PROJECT",
    "releases": { "DWH_GROUP": "R1" },
    "instances": [
      { "pattern": "CORE_DV_HLS", "folder": "/BUSINESS_VAULT", "name": "AIRPLANE" }
    ],
    "description": "build via rest api",
    "wait": true,
    "restore": true
  }'

JavaScript (Fetch)

javascript
const response = await fetch('https://app.metakraftwerk.com/api/v1/builds', {
  method: 'POST',
  headers: {
    'Authorization': `Bearer ${accessToken}`,
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({
    project: 'DEMO_PROJECT',
    releases: { DWH_GROUP: 'R1' },
    instances: [
      { pattern: 'CORE_DV_HLS', folder: '/BUSINESS_VAULT', name: 'AIRPLANE' }
    ],
    description: 'build via rest api',
    wait: true,
    restore: true
  })
});

const result = await response.json();

Response Example (wait: true)

json
{
  "build": {
    "id": 5139,
    "customer_id": 1,
    "user_id": 1,
    "project_id": 402,
    "progress": 100,
    "status": "FINISHED",
    "message": "calculating deliveries ...",
    "build_start": "2026-04-02T08:14:40.320Z",
    "build_end": "2026-04-02T08:14:58.898Z",
    "created_at": "2026-04-02T08:14:40.320Z",
    "updated_at": "2026-04-02T08:14:58.898Z",
    "history_commited": 1,
    "version": 10,
    "active": 1,
    "mts": 1775124880390,
    "name": null,
    "deliveries_calculated": 1,
    "description": "build via rest api",
    "commit_ind": 0,
    "deleted": 0,
    "instances": 1,
    "patterns": [808],
    "releases": [21],
    "downloads": [
      {
        "id": 5442,
        "pattern": "CORE_DV_HLS",
        "pattern_id": 808,
        "file_id": null,
        "name": "CORE_DV_HLS_2026-4-2_10_14.zip"
      }
    ]
  },
  "warnings": []
}

Response Example (wait: false)

When wait is false or omitted, the build starts asynchronously and the response returns immediately:

json
{
  "build": {
    "id": 5139,
    "status": "BUILDING"
  },
  "warnings": []
}

You can poll the build status using GET /api/v1/builds/:id until the status changes to FINISHED.

Error Responses

StatusConditionExample Message
400Missing required fieldsA project id or name is required!
400No instances specifiedNo instances specified!
401Missing or invalid tokenNot authenticated
403User lacks project accessYou don't have permissions to access this project!
403User lacks build permissionYou don't have permissions to start builds in this project!
404Project not foundA project with the name 'X' does not exist!
404Instance not foundInstance not found

Build Workflow

The typical workflow for creating a build and retrieving results is:

  1. Start the buildPOST /api/v1/builds with wait: true (synchronous) or wait: false (asynchronous).
  2. Poll for completion (async only) — GET /api/v1/builds/:id until status is FINISHED.
  3. List downloads — The downloads array in the build response contains the generated files.
  4. Download files — Use GET /api/v1/downloads/:id to download each file.

WARNING

Long-running builds with wait: true may time out depending on your HTTP client configuration. For large builds, consider using wait: false and polling for status.


PUT /api/v1/builds — Update

Not implemented

PATCH /api/v1/builds/:id — Patch

Not implemented

DELETE /api/v1/builds/:id — Remove

Not implemented