Get a derivation rule
Return a single derivation rule. Only rules usable by your company — the ones it owns plus the ones shared with it through collaborators — can be fetched; anything else is a 404.
Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Id of the derivation rule.
x >= 1Response
OK
Unique identifier of the derivation rule.
42
Name of the derivation rule, unique within the owning company.
256"raw_email_to_sha256"
What the rule does, for whoever is deciding whether to accept derived data.
2048"Hashes the raw email address with SHA-256."
Which companies, besides the one that owns the rule, may have the rule applied to their data. A rule grants a
single thing, so there is one use dimension. Only Narrative can share a rule broadly — with all companies or
with everyone outside an exclusion set.
The transformation that produces the target attribute's value from the source attribute's value. Expressions
reference the source attribute's shape through $source — for a rule from raw_email to sha256_hashed_email,
the value property maps to SHA2(NORMALIZE_EMAIL($source.value), 256).
The shape mirrors mapping expressions, except cached_mapping is not allowed: a cached mapping reads values out
of a stored dataset, so there would be nothing to substitute a $source reference into.
Expressions may use the current date or time (CURRENT_DATE, CURRENT_TIMESTAMP, …): the expression runs when a
query resolves the rule, so a rule like birthdate → age in years is correct as of each query that uses it. Enum
constraints and validation expressions on the target attribute do not restrict the transformation, exactly as
they do not restrict a dataset mapping.
- Option 1
- Option 2
Explains the lossy and imprecise flags to whoever is deciding whether to accept derived data. null when
the rule has no note.
2048Breaks ties when more than one rule reaches the same target attribute — cheapest first. Resolution over multi-step paths sums the cost of every rule on a path and prefers the cheapest total.
x >= 1Id of the user who created the rule.
Id of the user who last updated the rule.
Populated on create and update responses; empty on reads.

