GetFolders
API Playground
Retrieve all folders for a specific project that belong to the authenticated user. Folders are used to organize 3D models within a project.
Your authentication token will be sent as: Authorization: Bearer <token>
UUID of the project to retrieve folders from
Endpoint
GET https://devapi.marketiger3d.com/v2/Folder/GetFolders
Authentication
This endpoint requires a Bearer token. Include the token in the Authorization header:
Authorization: Bearer <your_access_token>
Parameters
| Name | Type | Location | Required | Description |
|---|---|---|---|---|
| projectId | string | query | Yes | UUID of the project to retrieve folders from |
Parameter Schema
| Field | Type | Format | Required | Description |
|---|---|---|---|---|
| projectId | string | uuid | Yes | The unique identifier of the project |
Example Request
curl -X GET "https://devapi.marketiger3d.com/v2/Folder/GetFolders?projectId=123e4567-e89b-12d3-a456-426614174000" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN"
const projectId = '123e4567-e89b-12d3-a456-426614174000';
fetch(`https://devapi.marketiger3d.com/v2/Folder/GetFolders?projectId=${projectId}`, {
method: 'GET',
headers: {
'Content-Type': 'application/json',
'Authorization': 'Bearer YOUR_ACCESS_TOKEN',
},
})
.then(response => response.json())
.then(data => {
if (data.success) {
const folders = data.data.folders;
console.log('Folders:', folders);
}
})
.catch(error => console.error('Error:', error));
var client = new HttpClient();
var projectId = "123e4567-e89b-12d3-a456-426614174000";
var request = new HttpRequestMessage(HttpMethod.Get, $"https://devapi.marketiger3d.com/v2/Folder/GetFolders?projectId={projectId}");
request.Headers.Add("Content-Type", "application/json");
request.Headers.Authorization = new System.Net.Http.Headers.AuthenticationHeaderValue("Bearer", "YOUR_ACCESS_TOKEN");
var response = await client.SendAsync(request);
var responseContent = await response.Content.ReadAsStringAsync();
var result = JsonSerializer.Deserialize<APIResponse<FoldersResponse>>(responseContent);
if (result.Success)
{
var folders = result.Data.Folders;
}
Response
Success Response (200 OK)
{
"success": true,
"data": {
"folders": [
{
"id": "123e4567-e89b-12d3-a456-426614174000",
"folderName": "My Folder",
"projectId": "123e4567-e89b-12d3-a456-426614174000",
"owner": "user-id-here",
"parentFolder": 0
}
]
}
}
Response Schema
| Field | Type | Description |
|---|---|---|
| success | boolean | Indicates if the request succeeded |
| data | object | Response data |
| data.folders | array | Array of folder objects |
| data.folders[].id | string | Unique identifier (GUID) of the folder |
| data.folders[].folderName | string | Name of the folder |
| data.folders[].projectId | string | UUID of the project this folder belongs to |
| data.folders[].owner | string | User ID of the folder owner |
| data.folders[].parentFolder | number | ID of the parent folder (0 if root) |
Error Response (400 Bad Request)
{
"success": false,
"error": {
"type": "AUTHENTICATION",
"message": "User not found."
}
}
Error Codes
| Error Type | Status | Description |
|---|---|---|
| AUTHENTICATION | 400 | User not found or invalid token |
| NOT_FOUND | 404 | Project with specified ID not found |
Notes
- Only folders owned by the authenticated user are returned
- Folders are used to organize models within a project
- Use folder IDs when uploading models to place them in specific folders
- An empty array is returned if the user has no folders in the project
- Response format: The response is returned as a pre-serialized JSON string. When parsing, ensure your JSON deserializer handles the string correctly (the response body is already a JSON string, not a raw object)
Best Practices
- Cache folder structure: Store folder information locally to reduce API calls
- Handle empty results: Users may not have created any folders yet
- Use folder IDs: Save folder IDs for use when uploading models
- Verify project access: Ensure the user has access to the project before requesting folders