...
- POST the Domain
- POST a Domain Version
- POST (or Map if it was is a federated data domain) the Data record
...
POST the Domain
For example, to create a simple "states" domain :
POST /domains
Code Block language js { "name": "states", "description": "A reference domain of states that should be referenced by all applications in the local YOUnite ecosystem", "zoneUuid": "a1aca070-846f-44e5-9471-c73b46c35f4a", "domainType": "MDM_DATA_STORE" }
The location header returned provides the URI for POSTing a domain version below.
e.g.
LocationLocation /domains/7f28180b-7d9f-42b5-b5ed-d4a0e7ec09fc
POST a Domain Version
POST /domains/versions/
7f28180b-7d9f-42b5-b5ed-d4a0e7ec09fc
Code Block language text { "displayProperty": "abbreviation", "uniquenessRules": "abbreviation", "description": "A reference list of states in the North American States: USA, Mexico and Canada", "modelSchema" { "properties": { "name": { "type": "string", "description": "The state's official name", "min": 2, "max": 80, "required": true }, "abbreviation": { "type": "string", "description": "The state's official abbreviation", "min": 2, "max": 2, "required": true } } } }
POST Data Records to the Domain
Once the domain/version has been created, data records can be POSTed to it using the /dr endpoint:POST /drs
Code Block language js { "name": "states", "version": 1, "json": { "name" : "California", "abbreviation" : "CA" } }
Retrieving Data Records
The data recordds records for a the default version of a domain can be retrieved with the following:
...
- MDM provides uniqueness rules to prevent data record duplication prevention in the case where a simple
displayProperty
won't suffice. - Optionally, specify a comma-separated list of domain properties whose values, in aggregate, must be unique across all the data records for the domain.
- If not provided, MDM will use the
displayProperty
as theuniquenessRules
. - Uniqueness rule properties are limited to type STRING
- Values in
uniquenessRules
properties are case sensitive e.g. "California" is NOT equal to "california"
...
If the list is long, some adaptors that are associated with the domain might not contain all of the properties and will be unable to add new records to a data domain.
It is important that for an a service associated with a domain that it should have the scope governance through ACLs to create data records for a domain, . And that it stores or has access to all of the properties that are defined with the "required" optoin option and that are part of the uniqueness rules list.
...
- Must start with a letter or "\_" (underscore).
- Can only contain digits, "-" (dash) and "\_" (underscore) only.
- Can be up to 64 characters in length.
- Are case in-sensitive.
- If two properties have the same name at the same level only one will be used. In Example 1 below, only one name "property" will be used. In Example 2, both will be used because "
name"
occurs at different levels in the JSON structure.
...
Property | Description |
---|---|
enumType | Types of enums:
|
xrefLocation | If For example, if a version of a domain "countries"contains a list of data record values that represent all countries then a domain can reference it by specifying an enumeration type of
A subset of the data record values in the domain can be specified using the |
data | An array containing a comma separated list of enum values. e.g. Is a three-item string enumeration. If the
Assuming the display values for Canada, the United States and Mexico are those shown above in the data elements. |
default | If the item is not provided or is null, the default value is used. |
required | A non-null value for this item must be provided (false by default). |
description | A human-readable description of the property. |
...
See type enum
and the data
property to limit the cross-reference to a subset of the domain's data records (e.g. if a domain "Company"
exists of with all Global 1000 companies, an enumeration of EU_Companies
could be created referencing only the Global 1000 companies in the European Union).
...