Projects
The /projects endpoint provides read-only access to MetaKraftwerk projects. Projects are top-level containers that group instances, builds, patterns, and other resources.
See Also
- Authentication — Required for all API requests
- Project — Web UI reference for projects
- Project Definition — Administering projects and permissions
GET /api/v1/projects — Find Projects
Retrieve a list of projects accessible to the authenticated user.
Endpoint
GET https://app.metakraftwerk.com/api/v1/projectsQuery Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
name | string | No | Filter by project name. |
Response Schema
Returns an array of project objects:
| Field | Type | Description |
|---|---|---|
id | integer | Unique project ID. |
name | string | Project name. |
deleted | boolean | Whether the project is marked as deleted. |
disabled | boolean | Whether the project is disabled. |
Examples
cURL
bash
# List all projects
curl -X GET "https://app.metakraftwerk.com/api/v1/projects" \
-H "Authorization: Bearer $ACCESS_TOKEN"
# Find by name
curl -X GET "https://app.metakraftwerk.com/api/v1/projects?name=DEMO_PROJECT" \
-H "Authorization: Bearer $ACCESS_TOKEN"JavaScript (Fetch)
javascript
const response = await fetch(
'https://app.metakraftwerk.com/api/v1/projects?name=DEMO_PROJECT',
{ headers: { 'Authorization': `Bearer ${accessToken}` } }
);
const projects = await response.json();Response Example
json
[
{
"id": 402,
"name": "DEMO_PROJECT",
"deleted": false,
"disabled": false
}
]Error Responses
| Status | Condition | Example Message |
|---|---|---|
401 | Missing or invalid token | Not authenticated |
GET /api/v1/projects/:id — Get Project
Retrieve a single project by its ID.
Endpoint
GET https://app.metakraftwerk.com/api/v1/projects/:idPath Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
id | integer | Yes | The project ID. |
Examples
cURL
bash
curl -X GET "https://app.metakraftwerk.com/api/v1/projects/402" \
-H "Authorization: Bearer $ACCESS_TOKEN"JavaScript (Fetch)
javascript
const response = await fetch(
'https://app.metakraftwerk.com/api/v1/projects/402',
{ headers: { 'Authorization': `Bearer ${accessToken}` } }
);
const project = await response.json();Error Responses
| Status | Condition | Example Message |
|---|---|---|
401 | Missing or invalid token | Not authenticated |
404 | Project not found | No record found for id 'X' |
POST /api/v1/projects — Create
Not implemented
PUT /api/v1/projects — Update
Not implemented
PATCH /api/v1/projects/:id — Patch
Not implemented
DELETE /api/v1/projects/:id — Remove
Not implemented