Artifact Types
When uploading an artifact to the lake, distributors MUST select an Artifact Type. This is a template that defines:- What type of document is being uploaded
- What lock types are required
- What lock types are optional
- Default weights for each lock
Why Artifact Types?
Without artifact types, distributors would manually define locks for every upload. This leads to:- Inconsistency: One upload has
policy_number, another haspolicy_num - Missing fields: Important locks forgotten
- Incompatible weights: Same lock has different weights across uploads
Template Structure
Each artifact type template contains:| Field | Description | Example |
|---|---|---|
| Name | Human-readable document type | ”Insurance Declaration Page” |
| Description | What this document is | ”Standard insurance policy declaration” |
| Owner | Who created this template | Distributor ID |
| Status | Lifecycle stage | draft, pending_approval, published, deprecated |
| Locks | List of lock definitions | See below |
Lock Definitions
Each lock in a template has:| Field | Description | Example |
|---|---|---|
| Name | Lock type identifier | policy_number |
| Data Type | What kind of value | string, number, date, boolean |
| Description | What this lock represents | ”Insurance policy number” |
| Validation | Rules for the value | regex, min/max length |
| Weight | Default weight score | 20 |
| Required | Is this lock mandatory? | true/false |
Example: Insurance Declaration Template
Private vs Shared Templates
Private Templates
Created by a single distributor for their own use.- Only the creator can use them
- No conflicts with other distributors
- Full flexibility to customize
Shared Templates
Curated by Docyard admins for industry-wide use.- Any distributor can use them
- Ensures consistency across the industry
- Undergoes admin vetting
Template Lifecycle
Status Definitions
| Status | Description | Can upload artifacts? |
|---|---|---|
draft | Template being created | ❌ No |
pending_approval | Submitted for admin review | ❌ No |
published | Approved and live | ✅ Yes |
deprecated | No longer recommended | ⚠️ Existing uploads still work |
Admin Vetting Process
All new templates (especially shared ones) must be vetted by Docyard admins:-
Technical Review
- Are lock types properly structured?
- Are validation rules correct?
- Are data types appropriate?
-
Business Review
- Does the template make business sense?
- Is the name/description clear?
- Could this be shared across distributors?
-
Approval Decision
- Approve: Published to registry
- Reject: Returned with feedback
- Request Changes: Awaiting modifications
Using Templates
When uploading an artifact, distributors:- Select a template from the registry
- Fill in values for all required locks
- Optionally adjust weights
- Set the threshold score
- Upload the content
Artifact Types for Collectors
Collectors don’t interact with templates directly. They see:- Artifact Type Name: As metadata in search results
- Lock Types: As searchable/filterable fields
- Document Type: A system-level lock all artifacts must have
Next Steps
- Understand the Lock-Key-Weight Model
- Learn about Distributors
- See the API Reference