Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/cgwire/zou/llms.txt

Use this file to discover all available pages before exploring further.

Overview

Departments represent the organizational structure of your studio, such as Modeling, Animation, Rigging, Lighting, etc. Each department can have:
  • Team members (persons)
  • Associated software licenses
  • Hardware resources
  • Unique color for visual identification

Department Fields

id
string
Unique identifier for the department
name
string
required
Department name (must be unique)
color
string
required
Color in hex format for visual identification (e.g., “#FF5733”)
archived
boolean
default:"false"
Whether the department is archived
created_at
string
Creation timestamp
updated_at
string
Last update timestamp

Department-Person Relationship

Persons (users) can belong to multiple departments, and departments can have multiple members. This many-to-many relationship enables:
  • Cross-functional team organization
  • Department-based permissions (for supervisors)
  • Department-specific time tracking and reporting
  • Resource allocation by department

Assigning People to Departments

Use the Person API to manage department assignments:
# Add person to department
POST /api/actions/persons/{person_id}/departments/add
{
  "department_id": "dept-uuid"
}

# Remove person from department
DELETE /api/actions/persons/{person_id}/departments/{department_id}
See Person Management for details.

Software Licenses

Track which software is used by each department for budget forecasting and license management.

Software License Fields

id
string
Software license unique identifier
name
string
Software name (e.g., “Maya”)
short_name
string
Short name or abbreviation (e.g., “MAYA”)
file_extension
string
Default file extension (e.g., “.ma”)
department_id
string
Associated department ID

Managing Software Licenses

# Get all software licenses by department
GET /api/data/departments/software-licenses

# Get software for specific department
GET /api/data/departments/{department_id}/software-licenses

# Add software to department
POST /api/data/departments/{department_id}/software-licenses
{
  "software_id": "software-uuid"
}

# Remove software from department
DELETE /api/data/departments/{department_id}/software-licenses/{software_id}
All software license endpoints require admin permissions.

Example: Get All Software by Department

GET /api/data/departments/software-licenses
Response:
{
  "animation-dept-id": [
    {
      "id": "maya-id",
      "name": "Maya",
      "short_name": "MAYA",
      "file_extension": ".ma",
      "department_id": "animation-dept-id",
      "created_at": "2024-01-15T10:30:00Z",
      "updated_at": "2024-01-15T10:30:00Z"
    }
  ],
  "modeling-dept-id": [
    {
      "id": "blender-id",
      "name": "Blender",
      "short_name": "BLENDER",
      "file_extension": ".blend",
      "department_id": "modeling-dept-id",
      "created_at": "2024-01-15T11:00:00Z",
      "updated_at": "2024-01-15T11:00:00Z"
    }
  ]
}

Hardware Items

Track hardware resources allocated to each department for budget forecasting and capacity planning.

Hardware Item Fields

id
string
Hardware item unique identifier
name
string
Hardware name (e.g., “Workstation”)
description
string
Hardware description
department_id
string
Associated department ID

Managing Hardware Items

# Get all hardware items by department
GET /api/data/departments/hardware-items

# Get hardware for specific department
GET /api/data/departments/{department_id}/hardware-items

# Add hardware to department
POST /api/data/departments/{department_id}/hardware-items
{
  "hardware_item_id": "hardware-uuid"
}

# Remove hardware from department
DELETE /api/data/departments/{department_id}/hardware-items/{hardware_item_id}
All hardware item endpoints require admin permissions.

Example: Add Hardware to Department

POST /api/data/departments/{department_id}/hardware-items
Request:
{
  "hardware_item_id": "workstation-uuid"
}
Response:
{
  "id": "link-uuid",
  "department_id": "animation-dept-id",
  "hardware_item_id": "workstation-uuid",
  "created_at": "2024-01-15T10:30:00Z"
}

Department-Based Permissions

Supervisors can be restricted to specific departments:
  • Supervisors only see time tracking and data for their assigned departments
  • The departments field on the Person model controls this access
  • Admins and managers have access to all departments

Example Permission Flow

  1. Supervisor is assigned to “Animation” department
  2. When requesting time spent data, only tasks from Animation department are visible
  3. Department filtering is automatically applied based on the supervisor’s department assignments
See Person Management for role details.

Department Colors

Each department has a color code for visual identification in the UI:
  • Must be in hex format (e.g., “#FF5733”)
  • Used for color-coding tasks, schedules, and reports
  • Makes it easy to identify department ownership at a glance

Time Tracking by Department

Time spent data can be filtered by department:
GET /api/data/persons/time-spents/month-table/2024?department_id={dept_id}
This enables:
  • Department-specific productivity reports
  • Budget tracking by department
  • Resource allocation analysis
  • Department capacity planning

Permissions

Read Permissions

  • All authenticated users can view departments
  • Department list is publicly accessible to authenticated users

Create/Update/Delete Permissions

  • Only admins can create, update, or delete departments
  • Only admins can manage software and hardware associations

Examples

Create a New Department

POST /api/data/departments
{
  "name": "Animation",
  "color": "#FF5733"
}
Response:
{
  "id": "animation-dept-id",
  "name": "Animation",
  "color": "#FF5733",
  "archived": false,
  "created_at": "2024-01-15T10:30:00Z",
  "updated_at": "2024-01-15T10:30:00Z"
}

Update Department Color

PUT /api/data/departments/{department_id}
{
  "color": "#00A8E8"
}

Get All Departments

GET /api/data/departments
[
  {
    "id": "animation-dept-id",
    "name": "Animation",
    "color": "#FF5733",
    "archived": false,
    "created_at": "2024-01-15T10:30:00Z",
    "updated_at": "2024-01-15T10:30:00Z"
  },
  {
    "id": "modeling-dept-id",
    "name": "Modeling",
    "color": "#00A8E8",
    "archived": false,
    "created_at": "2024-01-15T11:00:00Z",
    "updated_at": "2024-01-15T11:00:00Z"
  }
]

Archive a Department

PUT /api/data/departments/{department_id}
{
  "archived": true
}
Archiving a department doesn’t remove it from the system or unassign people. It simply marks it as archived, which can be used to hide it from active department lists in the UI.

Assign Software to Department

POST /api/data/departments/{department_id}/software-licenses
{
  "software_id": "maya-uuid"
}
Response:
{
  "id": "link-uuid",
  "department_id": "animation-dept-id",
  "software_id": "maya-uuid",
  "created_at": "2024-01-15T10:30:00Z"
}

Budget Forecasting

Department associations with software and hardware are used for budget forecasting:
  1. Software Costs: Track which departments use which software licenses
  2. Hardware Costs: Track hardware allocation per department
  3. Personnel Costs: Use daily_salary from person records combined with department membership
  4. Time Tracking: Combine time spent data with department assignments
This enables detailed cost analysis and budget planning by department.

Build docs developers (and LLMs) love