Versions Compared

Key

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

...

Code Block
languagejs
{
	"name": "<domain- name>",
    "description": "<human readable description of the data domain>",
    "zoneUuid": "<owning_ zone_ uuid>",
    "domainType": "<domain- type>" 
}


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. TODO NEED SOME DESCRIPTION OF VALID CHARACTER PARAMETERS.
descriptionno0 to 255 characters long. If longer it will be truncated.A human readable description of the domain.
zoneUuidnoOwning zone's domain UUIDTODO 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.
domainTypenoMDM_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*

...

propertyrequiredvalid valuesdescription
modelSchemayesSee 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.
descriptionno0 to 255 characters long. If longer it will be truncated.A human readable description of the domain version.
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 Retrieving Data Records; the Display Property 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 UniquenessRules Property below.

...

  1. POST the Domain 

    For example, to create a simple "states" domain :

    POST /domains

    Code Block
    languagejs
    {
    	"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

  2. POST a Domain Version

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

    Code Block
    languagetext
    {
    	"displayProperty": "abbreviation",
    	"uniquenessRules": "abbreviation",
    	"modelSchema" {
    		"properties": {
    			"name": {
    				"type": "string",
    				"min": 2,
    				"max": 80,
    				"required": true
    			},
    			"abbreviation": {
    				"type": "string",
    				"min": 2,
    				"max": 2,
    				"required": true
    			}
    		}
    	}
    }



  3. 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
    languagejs
    {
    	"name": "states",
    	"version": 1,
    	"json": {
    		"name" : "California", 
    		"abbreviation" : "CA"
    	}
     }


...