...
Code Block | ||
---|---|---|
| ||
{ "name": "<domain- name>", "description": "<human readable description of the data domain>", "zoneUuid": "<owning_ zone_ uuid>", "domainType": "<domain- type>" } |
property | required | valid values | description |
---|---|---|---|
name | yes | Must be at least 3 characters long but no longer than 128. | The domain name. Must be unique to the entire YOUnite deployment since domains are typically shared. TODO NEED SOME DESCRIPTION OF VALID CHARACTER PARAMETERS. |
description | no | 0 to 255 characters long. If longer it will be truncated. | A human readable description of the domain. |
zoneUuid | no | Owning zone's domain UUID | TODO ROBBIE: The zone that the domain, the domain's versions and its data records will be tied to. If this is omitted the caller's current zone will be used. Note that the caller must have permissions to create a domain for the zone. |
domainType | no | MDM_DATA_STORE or FEDERATED | The domain type can be either: MDM_DATA_STORE (default TODO ROBBIE - still?) Is when the domain's data records are stored in YOUnite. This is used when the entire organization is comfortable or mandated to migrate a domain to a single store. MDM_DATA_STORE is optimal for reference data such as a list of states, countries, zip-codes, etc. FEDERATED domains do not store their data in YOUnite, but reference and update data on the systems in which it resides. Federated domains require adaptors and metadata and scope configurations and are covered in detail *TODO: TUTORIAL ON FEDERATED* |
...
property | required | valid values | description |
---|---|---|---|
modelSchema | yes | See Model Schema Properties and Post a Domain below. | A JSON model describing the schema for the data domain; it defines the properties that make up the domains schema. The root node of the model schema is the properties element. See Valid Property Names and Valid Types for ModelSchema Properties below. |
description | no | 0 to 255 characters long. If longer it will be truncated. | A human readable description of the domain version. |
displayProperty | yes | A valid model schema property name | A property defined in the modelSchema that acts as an index for the domain. The data values for the displayProperty must always be unique. See Retrieving Data Records; the Display Property below. |
uniquenessRules | no | One or more valid model schema property names | Required data and their associated rules that are cache'd to make sure duplicate data entries are not POSTed to the domain. This defaults to the displayProperty if it is not provided. See UniquenessRules Property below. |
...
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", "modelSchema" { "properties": { "name": { "type": "string", "min": 2, "max": 80, "required": true }, "abbreviation": { "type": "string", "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" } }
...