Skip to main content
This guide covers the catalog setup you make as the vendor — both from the Stigg console and via the Stigg REST API. Most of these are one-time or infrequent operations; the Check and Ingest calls happen per-request at runtime.

Via the Stigg console

Define entity types

In the Stigg app, go to Governance → Entity types. The list shows all entity types defined for the environment, along with their attribution keys and the last time each was updated.
Entity types list

Entity types list

Click + New entity type to open the creation drawer.
New entity type — empty

New entity type drawer

Fill in:
  • Display name — a human-readable label (e.g. Organization). The entity type ID is auto-generated from it and can be edited.
  • Attribution keys — the dimension keys your usage events carry to identify instances of this type (e.g. orgId). Type a key and press Enter to add it; multiple keys are supported.
New entity type — filling in

Filling in name and attribution key

New entity type — ready to create

Attribution key added — ready to create

Once created, the new type appears in the list. Hover a row and click the menu to Edit it.
Entity type created

Newly created entity type with edit option

Edit entity type

Edit entity type drawer

View and manage entities for a customer

To view governance data for a specific customer:
  1. Go to Customers → Customer accounts and open the customer record.
Customer accounts list

Customer accounts list

  1. Click the Governance tab.
The tab shows the customer’s entity hierarchy on the left, their entity types in the Type column, and — for each entitlement — the current usage vs. limit broken out by scope (Node-wide and per-model or other dimension).
Customer Governance tab overview

Customer Governance tab — entity hierarchy with usage

Sort and prioritize entities

Use the Order by control (the sliders icon next to the type filter) to rank entities by consumption. Two modes are available:
  • Usage — ranks by absolute consumption, so the heaviest consumers appear first
  • Utilization — ranks by percentage of limit used, so entities closest to being blocked surface first
Sort order panel

Order by — Usage vs. Utilization

Switching to Utilization is the fastest way to spot entities that are about to hit their limit and may need a budget increase or intervention before they get blocked.

Add an entity to a customer

Click + Add entity to open the drawer.
Add entity — empty

Add entity drawer — empty

Fill in:
  • Entity ID — the unique identifier used in API calls (e.g. org-acme)
  • Entity type — select from the entity types defined for this environment
Add entity — entity type dropdown

Selecting an entity type

  • Parent entity (optional) — place this entity under a parent in the hierarchy (e.g. nest a user under a team)
Add entity — parent selected

Selecting a parent entity

  • Cardinality (optional) — restrict this entity’s budget to a specific sub-context by selecting entities to slice by
Add entity — cardinality dropdown

Cardinality — selecting entities to slice by

After adding entities, the full hierarchy is visible in the Governance tab with all entitlement columns.
Full governance hierarchy

Full governance hierarchy with all entities and entitlement columns

Edit an entitlement value inline

Click any entitlement cell in the Governance tab to edit the limit value inline, then confirm with the checkmark.
Inline edit entitlement

Inline editing an entitlement value


Via the SDK

Install the Stigg TypeScript client and initialize it with your server-side API key:
All examples in the governance docs use this client instance.

Via the REST API

All governance operations use the Stigg REST API. Authenticate with your server-side API key:

Step 1 — Define entity types

Entity types are the categories of resource you want to govern (e.g., org, team, user, agent). Define them once per environment. The attributionKeys are the dimension keys your ingest events carry to identify instances of each type.
The upsert is idempotent — re-submitting the same payload is safe. Up to 100 types per request. Response (200 OK):

Listing entity types


Step 2 — Provision entities per customer

When a customer creates an org, team, or user in your product, provision the corresponding entity in governance. The ownerId is the customer’s ID in your system.
Up to 100 entities per request. Idempotent — safe to re-run during re-syncs. Metadata patch semantics: keys present in metadata are merged over existing values. Set a key to "" to delete it. Omitting metadata entirely leaves the stored metadata unchanged. Response (200 OK):

Listing entities

Getting a single entity

Archiving and unarchiving entities

Archiving is a soft-delete: the entity disappears from the list but remains accessible via GET-by-ID.
Both return 204 No Content.

Step 3 — Create assignments

Assignments set the usage limit for an (entity, feature/credit) pair — they are the governance equivalent of entitlements, and appear as entitlement columns in the Stigg console’s Governance tab. They are typically created by your customers through an in-app interface, but you can also set them programmatically.
Patch semantics: on re-upsert, omitting usageLimit or cadence preserves the existing value. On first create, both are required. usageLimit: null — tracked but unlimited: setting usageLimit to null means usage is still counted and appears in check responses, but the limit never blocks. Useful for observability before enforcing. Response (200 OK):

Hierarchy — placing entities in a tree

The parentId field places an entity under a parent in the governance hierarchy. The check endpoint evaluates every budget in the chain from the target entity to the root — a request is only granted when all budgets along the path allow it.
parentId is tri-state: omitting it leaves the current parent unchanged (new nodes default to root); null detaches the entity to root; an entity ID sets or changes the parent. Reparenting is only allowed for leaf nodes — a node with children cannot be moved.

Dimension-scoped sub-budgets

Add a tighter budget for a specific context by setting scopeEntityIds. The scoped budget applies only when every listed entity is present in the resolved set for the request.

Listing assignments

What’s next

Check and ingest

Gate access before consumption and record usage after

Query the governance tree

Fetch usage and budget data for dashboards and admin UIs