Dimension Service API  2.0.0
api index

AttributeDefinition Object

since: 0.6
Metadata that defines a single Attribute for use within a single Dimension. The metadata defines the data type of values that can be stored for the attribute as well as a set of type-specific constraints that require individual attribute values to pass certain validation rules.

Values for a defined attribute are assigned to other objects in the Dimension structure; for example, Attributes defined at the Node-level can have values assigned to individual Dimension Nodes. Often, a single defined attribute will have a wide variety of values at any one time, depending on which object is being queried; in most cases an individual object (e.g. Node) can have up to one value per attribute.

Fields

id
0.6required when...
name is not set
string
The system-defined internal object ID (in UUID canonical string format).

If both the id and name fields are present, then the id field should take precedent to avoid ambiguity in cases where the ID and name could be mismatched.

name
0.6required when...
id is not set
string
The name used to identify the Attribute to external systems, which must be unique within the set of Attributes defined in the same Dimension.

If both the id and name fields are present, then the id field should take precedent to avoid ambiguity in cases where the ID and name could be mismatched.

0.6 min length: 1
0.6 max length: 255
label
0.6optional
Human-readable, descriptive text shown to users instead of the machine-readable or cryptic id/name fields. The value may vary based on the requesting user's language and locale preferences (subject to available content).
labels
0.6optional
List of all the human-readable, descriptive text strings that describe this Attribute. This list should contain one entry for each locale configured in the owning Dimenson, but may contain entries for additional locales.

See: Dimension.locales

constraints
0.6optional
Describes the set of constraints that apply to this Attribute. Primarily, this defines the type of data allowed, as implied by the constraint's type field. Many data types support additional type-specific constraint parameters.
default
0.6optional
When a value is requested for this Attribute from an object, but that object does not have its own value assigned and does not inherit a value from any other object, then this value will be returned instead.

This value, if set, must match the appropriate data type and meet all validation criteria established by the attribute's defined constraints.

Related API Resources

Related API Objects

Example 1

{
  "id"           :"c689acc7-ee13-3482-aa7b-c6a13419431c",
  "name"         :"POP_SIZE",
  "label":{
    "locale" :"en",
    "value"  :"Population"
  },
  "constraints":{
    "type": "integer-constraints",
    "min": 0
  }
}