Id Conventions
Id prefixes
Id fields returned by the Nyckel API are made up of a human-readable prefix, an underscore, and an alpha-numeric id — for example label_2n5a7za51n329v0l or function_a1b2c3d4.
It is not strictly necessary to send the prefix when calling API endpoints — the underlying id is unique on its own — but we recommend treating the entire string, including the prefix, as the canonical id. Two practical reasons:
- Logs and dashboards are dramatically easier to scan when every id tells you what kind of resource it is.
- You can’t mistake one resource type for another in code reviews, support tickets, or database joins.
Store and pass the full prefixed string everywhere; only strip the prefix if you have a very specific reason to.