Traits are Atlas types that act like decorators to provide a
mechanism for classification. Traits can
be applied to any Atlas entities (instances of classes). An entity can have any number of traits.
For example, a SECURITY_CLEARANCE trait could be defined with an
attribute ‘security_level’. An Atlas
entity (e.g. an instance of Person class) could be tagged with the
SECURITY_CLEARANCE trait by providing a value for the trait’s ‘security_level’
In order to use a trait, you first need to define the trait
type. You can do that by posting to the
Types resource of the Atlas REST APIs.
A type is the description of any representable item. In this case we are creating a trait type but
the same resource is used to represent enums, structs and classes as well.
Submits a types definition containing a type definition
representing a trait.