Project Metadata API Documentation
Project metadata functionality allows organizations to collect structured information about their projects using customizable checklists. This feature is built on top of the core checklist system and provides a standardized way to gather project details, compliance information, and other metadata.
Overview
Project metadata uses the checklist system to enable organizations to:
- Define custom metadata collection forms for their projects
- Ensure consistent data collection across all projects
- Track completion status of metadata requirements
- Manage access controls for viewing and editing metadata
Configuration
Setting Up Project Metadata
- Create a Project Metadata Checklist
First, create a checklist with type PROJECT_METADATA
:
1 2 3 4 5 6 7 8 9 |
|
- Add Questions to the Checklist
1 2 3 4 5 6 7 8 9 10 11 |
|
- Assign Checklist to Customer
Assign the checklist to a customer to enable metadata collection for all their projects:
1 2 3 4 5 6 7 |
|
API Endpoints
Project metadata endpoints are available at both project and customer levels:
Project-Level Endpoints
Base URL: /api/projects/<project-uuid>/
Customer-Level Compliance Endpoints
Base URL: /api/customers/<customer-uuid>/
These endpoints provide aggregated compliance information across all projects in a customer organization. All endpoints support efficient database-level pagination to handle large numbers of projects.
Customer-Level Compliance Overview
Get an overview of project metadata compliance across all customer projects.
1 2 |
|
Permissions Required:
- Customer owner
- Customer support
- Staff user
Response:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
|
Customer-Level Compliance Projects List
Get paginated list of projects with their completion status.
1 2 |
|
Query Parameters:
page
- Page number (default: 1)page_size
- Number of projects per page (default: 10, max: 300)
Permissions Required:
- Customer owner
- Customer support
- Staff user
Response:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 |
|
Response Headers:
X-Result-Count
- Total number of projectsLink
- Pagination links (first, prev, next, last)
Customer-Level Question Answers
Get paginated list of questions with answers across all projects.
1 2 |
|
Query Parameters:
page
- Page number (default: 1)page_size
- Number of questions per page (default: 10, max: 300)
Permissions Required:
- Customer owner
- Customer support
- Staff user
Response:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 |
|
Response Headers:
X-Result-Count
- Total number of questionsLink
- Pagination links (first, prev, next, last)
Enhanced Fields:
Each question and its answers now include additional metadata for better usability:
question_options
- Available options for select-type questions (single_select, multi_select), empty array for other typesanswer_labels
- Human-readable labels for select-type answers:- For
single_select
: String with the selected option label - For
multi_select
: Array of strings with selected option labels - For other question types:
null
min_value
- Minimum allowed value for number-type questions,null
for other question typesmax_value
- Maximum allowed value for number-type questions,null
for other question types
Customer-Level Compliance Details
Get paginated detailed compliance information for each project.
1 2 |
|
Query Parameters:
page
- Page number (default: 1)page_size
- Number of projects per page (default: 10, max: 300)
Permissions Required:
- Customer owner
- Customer support
- Staff user
Response:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 |
|
Response Headers:
X-Result-Count
- Total number of projectsLink
- Pagination links (first, prev, next, last)
Answer Fields Description:
Each answer in the response includes both machine-readable and human-readable data:
question_type
- The type of question (text_input, text_area, boolean, number, single_select, multi_select)question_options
- Available options for select-type questions, empty array for other typesmin_value
- Minimum allowed value for number-type questions,null
for other question typesmax_value
- Maximum allowed value for number-type questions,null
for other question typesanswer_data
- The raw answer data (UUIDs for select questions, direct values for others)answer_labels
- Human-readable labels converted from UUIDs:- For
single_select
: String with the selected option label - For
multi_select
: Array of strings with selected option labels - For other question types:
null
Performance Notes
All customer-level compliance endpoints use database-level pagination for optimal performance:
- Efficient Data Loading: Only retrieves data for the current page, not all records
- Bulk Operations: Uses optimized database queries with
select_related()
andprefetch_related()
- Memory Efficient: Handles large numbers of projects without memory issues
- Pagination Headers: Returns
X-Result-Count
header with total count andLink
header with navigation links
Available Actions
1. Get Project Metadata Checklist
Retrieves the metadata checklist for a project, including all questions and existing answers.
1 2 |
|
Permissions Required:
- Project member (admin, manager, or member)
- Customer owner
Response:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 |
|
2. Get Completion Status
Retrieves only the completion status information for the project metadata.
1 2 |
|
Permissions Required:
- Project member (admin, manager, or member)
- Customer owner
Response:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 |
|
3. Submit Metadata Answers
Submit or update answers to metadata questions.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 |
|
Permissions Required:
- Customer owner
- Project manager
Answer Data Formats:
Question Type | Format | Example |
---|---|---|
text_input |
String | "Short text answer" |
text_area |
String | "Long text answer with multiple lines" |
boolean |
Boolean | true or false |
number |
Number | 42 or 3.14 |
single_select |
Array with one UUID | ["option-uuid"] |
multi_select |
Array with multiple UUIDs | ["option-uuid-1", "option-uuid-2"] |
Response:
1 2 3 4 5 6 7 8 9 10 11 12 13 |
|
Error Responses
Common Error Codes
400 Bad Request
1 2 3 |
|
403 Forbidden
1 2 3 |
|
404 Not Found
1 2 3 |
|
Validation Errors
When submitting invalid answers:
1 2 3 4 5 6 7 8 9 |
|
Permission Model
The project metadata system uses a granular permission model:
View Permissions (checklist, completion_status)
- Project Admin: Can view metadata for their projects
- Project Manager: Can view metadata for their projects
- Project Member: Can view metadata for their projects
- Customer Owner: Can view metadata for all projects in their organization
Update Permissions (submit_answers)
- Customer Owner: Can update metadata for all projects in their organization
- Project Manager: Can update metadata for their projects
Administrative Permissions (checklist management)
- Staff Users: Can create and manage checklists
- Customer Owners: Can assign checklists to their organization
Lifecycle Management
Automatic Checklist Completion Creation
When a customer has a project metadata checklist configured:
- New Project Creation: ChecklistCompletion is automatically created for new projects
- Existing Projects: ChecklistCompletion is created for all existing projects when checklist is assigned
- Checklist Removal: All associated ChecklistCompletions are automatically deleted
Data Integrity
- Answers are tied to the user who submitted them
- Multiple users can provide answers to the same checklist
- Answer history is maintained with creation and modification timestamps
- Completion status is calculated in real-time based on required questions
Best Practices
For API Consumers
- Check Completion Status: Always check if metadata is required before showing forms
- Handle Missing Checklists: Gracefully handle cases where no checklist is configured
- Validate Before Submit: Validate answer formats client-side to reduce API errors
- Show Progress: Use completion_percentage to show users their progress
- Cache Appropriately: Checklist structure changes infrequently, status changes often
- Use Customer-Level Endpoints: For organizational dashboards, use customer-level compliance endpoints for efficient aggregated views
- Leverage Pagination: Take advantage of database-level pagination for large datasets with appropriate page sizes
- Use Enhanced Fields: Take advantage of enhanced question metadata for better user experience:
- Display
question_options
to show available choices for select questions - Use
answer_labels
for human-readable display while keepinganswer_data
for form submissions - Use
min_value
andmax_value
for client-side validation of number inputs - All enhanced fields are optimized to avoid N+1 query issues
For Administrators
- Plan Question Structure: Design questions before creating projects
- Use Clear Descriptions: Make question descriptions self-explanatory
- Set Appropriate Requirements: Mark essential questions as required
- Test Thoroughly: Test the complete flow before deploying to users
- Monitor Adoption: Track completion rates to ensure effective use