Skip to content
Reference>REST API>/deployments

Deployments

The /deployments endpoint provides read-only access to deployment definitions configured for patterns. Deployments define how build results are delivered to target environments (e.g. via API, database, or Git).

See Also

GET /api/v1/deployments — Find Deployments

Retrieve a list of deployment definitions, optionally filtered by pattern.

Endpoint

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

Query Parameters

ParameterTypeRequiredDescription
patternstringNo*Filter by pattern name.
pattern_idintegerNo*Filter by pattern ID.
namestringNoFilter by deployment name.

TIP

* At least one of pattern or pattern_id is recommended to scope the results to a specific pattern.

Response Schema

Returns an array of deployment objects:

FieldTypeDescription
idintegerUnique deployment ID.
pattern_idintegerAssociated pattern ID.
namestringDeployment name.

Examples

cURL

bash
curl -X GET "https://app.metakraftwerk.com/api/v1/deployments?pattern=CORE_DV_HLS" \
  -H "Authorization: Bearer $ACCESS_TOKEN"

JavaScript (Fetch)

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

const deployments = await response.json();

Error Responses

StatusConditionExample Message
401Missing or invalid tokenNot authenticated
404Pattern not foundA pattern with the name 'X' does not exist!

GET /api/v1/deployments/:id — Get Deployment

Retrieve a single deployment definition by its ID.

Endpoint

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

Path Parameters

ParameterTypeRequiredDescription
idintegerYesThe deployment ID.

Examples

cURL

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

JavaScript (Fetch)

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

const deployment = await response.json();

Error Responses

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

POST /api/v1/deployments — Create

Not implemented

PUT /api/v1/deployments — Update

Not implemented

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

Not implemented

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

Not implemented