Skip to main content

GetProjects

API Playground

Retrieve all projects that the authenticated user has access to. Projects are cached for performance.

Your authentication token will be sent as: Authorization: Bearer <token>

Endpoint

GET https://devapi.marketiger3d.com/v2/Project/GetProjects

Authentication

This endpoint requires a Bearer token. Include the token in the Authorization header:

Authorization: Bearer <your_access_token>

Parameters

No parameters required.

Example Request

curl -X GET "https://devapi.marketiger3d.com/v2/Project/GetProjects" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN"
fetch('https://devapi.marketiger3d.com/v2/Project/GetProjects', {
method: 'GET',
headers: {
'Content-Type': 'application/json',
'Authorization': 'Bearer YOUR_ACCESS_TOKEN',
},
})
.then(response => response.json())
.then(data => {
if (data.success) {
const projects = data.data.projects;
console.log('Projects:', projects);
}
})
.catch(error => console.error('Error:', error));
var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Get, "https://devapi.marketiger3d.com/v2/Project/GetProjects");
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<ProjectsResponse>>(responseContent);

if (result.Success)
{
var projects = result.Data.Projects;
}

Response

Success Response (200 OK)

{
"success": true,
"data": {
"projects": [
{
"projectId": "8f1f0d34-5e21-4b1a-9c3c-3e6f0d9c2b17",
"name": "Example Project"
}
]
}
}

Response Schema

FieldTypeDescription
successbooleanIndicates if the request succeeded
dataobjectResponse data
data.projectsarrayArray of project objects
data.projects[].projectIdstringUnique identifier (GUID) of the project
data.projects[].namestringName of the project

Note: Keys are returned in lower camelCase as shown (projectId, name). Additional fields are not included in the current response.

Error Response (400 Bad Request)

{
"success": false,
"error": {
"type": "OPERATION_FAILED",
"message": "User or project not found"
}
}

Error Response (401 Unauthorized)

{
"success": false,
"error": {
"type": "AUTHENTICATION",
"message": "Authentication required. Please provide a valid Bearer token."
}
}

Error Codes

Error TypeStatusDescription
AUTHENTICATION401Missing or invalid Bearer token
OPERATION_FAILED400User not found or no projects assigned

Notes

  • Results are cached per user for performance
  • Only projects that the user has been assigned to are returned
  • Project IDs (GUIDs) are required for many other API endpoints
  • Use the project ID to access models, folders, and create orders for that 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 results: Store the project list locally and refresh periodically
  2. Use project IDs: Save project IDs for use in other API calls
  3. Handle empty lists: Users may not have access to any projects initially
  4. Check permissions: Verify project access before making project-specific requests