Versions Compared

Key

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

...

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

...

  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",
    	"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
    			}
    		}
    	}
    }



  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"
    	}
     }


...