Core Concepts
Resource Types
Define categories of resources being tracked.
Resource types define the categories of things you're tracking — users, orders, deployments, documents, or anything else in your system.
Creating a resource type
POST /api/resource-types{
"title": "User Account",
"description": "User account resource",
"mnemonic": "USER",
"icon": "👤",
"fontColorHex": "#ffffff",
"bgColorHex": "#3b82f6"
}Fields
| Field | Required | Description |
|---|---|---|
title | Yes | Human-readable name |
mnemonic | Yes | Short uppercase code — used by CLI, SDK, and mnemonic-based API calls |
description | No | What this resource type represents |
icon | No | Emoji or icon identifier for UI display |
fontColorHex | No | Text color for UI badges |
bgColorHex | No | Background color for UI badges |
Response
{
"resourceTypeId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"title": "User Account",
"description": "User account resource",
"mnemonic": "USER",
"icon": "👤",
"fontColorHex": "#ffffff",
"bgColorHex": "#3b82f6",
"isSystem": false,
"createdDate": "2024-01-15T10:00:00.000Z",
"modifiedDate": "2024-01-15T10:00:00.000Z"
}System resource types
Some resource types are marked isSystem: true. These are used internally by Provenance and cannot be updated or deleted.
Pagination
List endpoints support optional pagination:
# Without pagination — returns flat array
GET /api/resource-types
# With pagination — returns { data, pagination }
GET /api/resource-types?page=1&limit=20Filtering
# Filter by mnemonic
GET /api/resource-types?mnemonic=USER
# Filter by title
GET /api/resource-types?title=User%20AccountAPI reference
| Method | Endpoint | Description |
|---|---|---|
GET | /api/resource-types | List all (supports page, limit, mnemonic, title params) |
GET | /api/resource-types/:id | Get by ID |
POST | /api/resource-types | Create |
PUT | /api/resource-types/:id | Update |
DELETE | /api/resource-types/:id | Delete (non-system only) |
Design tips
- Use nouns for resource types:
USER,ORDER,DEPLOYMENT,DOCUMENT - Keep mnemonics short and uppercase — they're used in CLI commands and SDK calls
- One resource type per domain entity — don't over-granularize
- Use
iconand color fields to make the UI dashboard visually scannable