Skip to content
Reference>REST API>/instance_folders

Instance Folders ​

The /instance_folders endpoint provides read-only access to the folder hierarchy used to organize instances within a project. Folders form a nested tree structure, and each folder has a computed path (e.g. /RAW_VAULT, /BUSINESS_VAULT/CRM).

See Also

GET /api/v1/instance_folders — Find Instance Folders ​

Retrieve a list of instance folders for a project, optionally filtered by pattern or name.

Endpoint ​

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

Query Parameters ​

ParameterTypeRequiredDescription
projectstringYes*Project name. Mutually exclusive with project_id.
project_idintegerYes*Project ID. Mutually exclusive with project.
patternstringNoFilter by pattern name.
pattern_idintegerNoFilter by pattern ID.
namestringNoFilter by folder name.
deletedbooleanNoFilter by deletion status.

TIP

* Exactly one of project or project_id is required.

Response Schema ​

Returns an array of instance folder objects:

FieldTypeDescription
idintegerUnique folder ID.
project_idintegerProject ID.
pattern_idintegerAssociated pattern ID.
parent_folder_idintegerParent folder ID (null for root folders).
namestringFolder name.
pathstringComputed full path (e.g. /BUSINESS_VAULT).
deletedbooleanWhether the folder is marked as deleted.
upload_disabledbooleanWhether upload is disabled for instances in this folder.
insert_disabledbooleanWhether insert is disabled for instances in this folder.
build_disabledbooleanWhether build is disabled for instances in this folder.
edit_disabledbooleanWhether editing is disabled for instances in this folder.

Examples ​

cURL ​

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

# Find by project and pattern
curl -X GET "https://app.metakraftwerk.com/api/v1/instance_folders?project=DEMO_PROJECT&pattern=CORE_DV_HLS" \
  -H "Authorization: Bearer $ACCESS_TOKEN"

# Find by name
curl -X GET "https://app.metakraftwerk.com/api/v1/instance_folders?project_id=402&name=RAW_VAULT" \
  -H "Authorization: Bearer $ACCESS_TOKEN"

# Find non-deleted folders
curl -X GET "https://app.metakraftwerk.com/api/v1/instance_folders?project_id=402&deleted=false" \
  -H "Authorization: Bearer $ACCESS_TOKEN"

JavaScript (Fetch) ​

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

const folders = await response.json();

Response Example ​

json
[
  {
    "id": 903,
    "project_id": 402,
    "pattern_id": 808,
    "parent_folder_id": null,
    "name": "BUSINESS_VAULT",
    "path": "/BUSINESS_VAULT",
    "deleted": false,
    "upload_disabled": false,
    "insert_disabled": false,
    "build_disabled": false,
    "edit_disabled": false
  }
]

Error Responses ​

StatusConditionExample Message
400Missing project parameterA project id or name is required!
401Missing or invalid tokenNot authenticated
404Project not foundA project with the name 'X' does not exist!
404Pattern not foundA pattern with the name 'X' does not exist!

GET /api/v1/instance_folders/:id — Get Instance Folder ​

Retrieve a single instance folder by its ID, including the computed path.

Endpoint ​

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

Path Parameters ​

ParameterTypeRequiredDescription
idintegerYesThe instance folder ID.

Examples ​

cURL ​

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

JavaScript (Fetch) ​

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

const folder = await response.json();

Error Responses ​

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

POST /api/v1/instance_folders — Create ​

Not implemented

PUT /api/v1/instance_folders — Update ​

Not implemented

PATCH /api/v1/instance_folders/:id — Patch ​

Not implemented

DELETE /api/v1/instance_folders/:id — Remove ​

Not implemented