Exposing Object ID and Association IDs to API

0
Hi,   Values ​​like createdDate and changedDate can be stored as System members in entities. Then, I expose these values ​​to the API in the message definition section, allowing for export mapping. In other words, I don't manually create the createdDate and changedDate attributes. To process this data in the data warehouse, I need to define the key ID and common fields (attributes). I want to use the object "id" value automatically assigned by Mendix as the key ID, and the "id" value representing the associations for the common fields between two entities. However, keeping these as manual attributes in the entities will take up unnecessary space and increase my workload. Can I use object id and association ids like createdDate and changedDate for API?
asked
1 answers
0

HI AYBERK AKBALIK

 You can expose system members like createdDate and changedDate in APIs. You cannot safely use the internal id or association IDs — they’re runtime-only and unstable.Best practice is add a BusinessKey or GUID attribute to your entities for stable integration with APIs and data warehouse.

So: Use system members for audit fields, and create a GUID/business key for IDs.

answered