Skip to main content

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

NameTypeLocationRequiredDescription
projectIdstringqueryYesUUID of the project to retrieve folders from

Parameter Schema

FieldTypeFormatRequiredDescription
projectIdstringuuidYesThe 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

FieldTypeDescription
successbooleanIndicates if the request succeeded
dataobjectResponse data
data.foldersarrayArray of folder objects
data.folders[].idstringUnique identifier (GUID) of the folder
data.folders[].folderNamestringName of the folder
data.folders[].projectIdstringUUID of the project this folder belongs to
data.folders[].ownerstringUser ID of the folder owner
data.folders[].parentFoldernumberID of the parent folder (0 if root)

Error Response (400 Bad Request)

{
"success": false,
"error": {
"type": "AUTHENTICATION",
"message": "User not found."
}
}

Error Codes

Error TypeStatusDescription
AUTHENTICATION400User not found or invalid token
NOT_FOUND404Project 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

  1. Cache folder structure: Store folder information locally to reduce API calls
  2. Handle empty results: Users may not have created any folders yet
  3. Use folder IDs: Save folder IDs for use when uploading models
  4. Verify project access: Ensure the user has access to the project before requesting folders