...
Code Block | ||
---|---|---|
| ||
{
"modelSchema": {
"properties": {
"<property-name>": {
"type": "<property-type>",
...item1 properties....
},
"<property-name>": {
...
}
}
},
"descriptin": "<description>",
"displayProperty": "<property-name>",
"uniquenssRuless": "<property-name1> [, <property-name2>, .....]"
} |
...
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.
Location /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" } }
...