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
- Authentication — Required for all API requests
- Deployments — Deployment configuration in patterns
- Deployment Guide — Guide to deployment types and workflows
- Build Deployments API — Triggering deployments for specific builds
GET /api/v1/deployments — Find Deployments
Retrieve a list of deployment definitions, optionally filtered by pattern.
Endpoint
GET https://app.metakraftwerk.com/api/v1/deploymentsQuery Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
pattern | string | No* | Filter by pattern name. |
pattern_id | integer | No* | Filter by pattern ID. |
name | string | No | Filter 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:
| Field | Type | Description |
|---|---|---|
id | integer | Unique deployment ID. |
pattern_id | integer | Associated pattern ID. |
name | string | Deployment 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
| Status | Condition | Example Message |
|---|---|---|
401 | Missing or invalid token | Not authenticated |
404 | Pattern not found | A 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/:idPath Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
id | integer | Yes | The 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
| Status | Condition | Example Message |
|---|---|---|
401 | Missing or invalid token | Not authenticated |
404 | Deployment not found | No 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