Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

A  domain model schema (model) is a JSON object describing the schema for a data domain; it defines the properties that make up the domain's schema. The root node of the model schema is the properties element. See Domains and Domains below.

...

POST the Domain

The first step in creating a domain is to define the domain name, its type and the owning zone:

...

propertyrequiredvalid valuesdescription
nameyesMust 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.
zoneUuidnoOwning zone's domain UUIDTODO ROBBIE: The zone that the domain, the domain's versions and its MDRs 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.
domainTypenoMASTER_CENTRALIZED or MASTER_FEDERATED

The domain type which can be either:

MASTER CENTRALIZED (defaul TODO ROBBIE - still?t) When the domain master data is centrally stored in YOUnite. This is used when the entire organization is comfortable or mandated to migrate a domain to a single store. Central stores are optimal for reference data such as a list of states countries, zip-codes, etc. 

MASTER FEDERATED domains do not store their data centrally 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*

The model is not created in this step. Models are tied to specific versions covered below.

...

POST a Domain Version

With the domain in place, its first version can be created. The domain version defines the properties that make up domain version's model. The domain version numbers are automatically generated and start with 1 and continue in ascending order. The root node of the model schema is the properties element. See Domains and Domains below.

A domain version is defined with a domain JSON Object as described below:

POST /domains/versions/<zone-uuid>

Code Block
languagetext
{
	"modelSchema": {
		"properties": {
			"<property-name>": {
				"type": "<property-type>",
				...item1 properties....
			},
			"<property-name>": {
				 ... 
			}
		}
	},
	"displayProperty": "<property-name>",
	"uniquenssRuless": "<property-name1> [, <property-name2>, .....]"
}

Descriptions of the Domain Version Properties:

Define the Domain 

For example, to create a simple states domain including the modelSchema:

POST /domains

...

languagejs
titleDefining a Model Schema

...

propertyrequiredvalid valuesdescription
namemodelSchemayesMust 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.
versionnoPositive integerThe version number. If the version number is omitted the version starts with 1 and is incremented for each new version of the domain.
domainTypenoCENTRALIZED or FEDERATED

The domain type which can be either:

CENTRALIZED (default) When the domain master data is centrally stored in YOUnite. This is used when the entire organization is comfortable or mandated to migrate a domain to a single store. Central stores are optimal for reference data such as a list of states countries, zip-codes, etc. 

FEDERATED domains do not store their data centrally 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*

modelSchemayesSee Domains and Domains 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 Domains and Domains below.
displayPropertyyesA valid model schema property nameA property defined in the modelSchema that acts as an index for the domain. The data values for the displayProperty must always be unique. See Domains below.
uniquenessRulesnoOne or more valid model schema property namesRequired 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 Domains below.

...

See Domains and Domains 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 Domains and Domains below.
displayPropertyyesA valid model schema property nameA property defined in the modelSchema that acts as an index for the domain. The data values for the displayProperty must always be unique. See Domains below.
uniquenessRulesnoOne or more valid model schema property namesRequired 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 Domains below.

Creating a Domain is Three-Step Process

For example, we'll create a centralized data domain and load one MDR:

  1. POST the Domain
  2. POST a Domain Version
  3. POST (or Map) the Master Data
  1. POST the Domain 

    For example, to create a simple states domain :

    POST /domains

    Code Block
    languagejs
    titleDefining a Model Schema
    {
    	"name": "states",
    	"zoneUuid": "a1aca070-846f-44e5-9471-c73b46c35f4a",
    	"domainType": "MASTER_CENTRALIZED"
     }

    The location header returned provides the URI for POSTing a domain version below.

    e.g.

    Location /domains/7f28180b-7d9f-42b5-b5ed-d4a0e7ec09fc

  2. POST a Domain Version

    POST /domains/versions/7f28180b-7d9f-42b5-b5ed-d4a0e7ec09fc

  3. POST Master Data Records to the Domain

    Once the domain/version has been created, master data can be POSTed to it using the /mdr endpoint:
    POST /mdr/statesmdrs
Code Block
languagejs
titleDefining a Model Schema
{
	"data" "name": "states",
	"version": 1,
	"json": { 
		"name" : "California", 
		"abbreviation" : "CA"
	}
}

...