Provenance
Core Concepts

Actions

Define operations that can be performed on resources.

Actions represent the operations that can be performed — create, update, delete, login, deploy, or any domain-specific verb.

Creating an action

POST /api/actions
{
  "title": "Create",
  "description": "Resource creation action",
  "mnemonic": "CREATE",
  "icon": "➕",
  "fontColorHex": "#ffffff",
  "bgColorHex": "#22c55e"
}

Fields

FieldRequiredDescription
titleYesHuman-readable name
mnemonicYesShort uppercase code
descriptionNoWhat this action represents
iconNoEmoji or icon identifier for UI display
fontColorHexNoText color for UI badges
bgColorHexNoBackground color for UI badges

Response

{
  "actionId": "e5f6a7b8-c9d0-1234-ef56-789012345678",
  "title": "Create",
  "description": "Resource creation action",
  "mnemonic": "CREATE",
  "icon": "➕",
  "fontColorHex": "#ffffff",
  "bgColorHex": "#22c55e",
  "isSystem": false,
  "createdDate": "2024-01-15T10:00:00.000Z"
}

System actions

Actions marked isSystem: true are used internally and cannot be updated or deleted.

Pagination

# Without pagination — returns flat array
GET /api/actions

# With pagination — returns { data, pagination }
GET /api/actions?page=1&limit=20

Paginated responses exclude system actions.

API reference

MethodEndpointDescription
GET/api/actionsList all (supports page, limit, actionId params)
GET/api/actions/:idGet by ID
POST/api/actionsCreate
PUT/api/actions/:idUpdate (non-system only)
DELETE/api/actions/:idDelete (non-system only)

Design tips

  • Use verbs for actions: CREATE, UPDATE, DELETE, LOGIN, DEPLOY, APPROVE
  • Actions are shared across resource types — a single CREATE action works for users, orders, and deployments
  • Keep the list focused — 10–20 actions covers most systems
  • Use colors to visually distinguish action types in the UI (e.g., green for create, red for delete)