10Duke Enterprise release 3 documentation is no longer being updated

Manage entitlements using Graph API

Resolve an organization’s default entitlement

If this gives a count > 1:

/graph/Organization[@id='ORG_ID']/~OneToMany/Entitlement{count}

Then use:

/graph/Organization[@id='ORG_ID']/~OneToMany/Entitlement[@defaultEntitlement=true]

Else this is sufficient:

/graph/Organization[@id='ORG_ID']/~OneToMany/Entitlement

Note:

  • If an organization is assigned more than one entitlement instances, exactly one of them must have defaultEntitlement=true.

  • If an organization has only one entitlement and its defaultEntitlement=true OR null, it’s treated as the default.

Create or update an organization’s default entitlement

POST /graph 

{
	"__objType": "Entitlement",
	"referenceFields": {
		"__objType": "HashMap",
		"Entries": [{
			"__objType": "KeyValue",
			"value": {
				"__objType": "String",
				"value": "${ORGANIZATION_ID}"
			},
			"key": {
				"__objType": "String",
				"value": "ref_Organization_id"
			}
		}]
	},
	"active": true,
	"title": "${ORGANIZATION_NAME} default entitlement",
	"defaultEntitlement": true,
	"id": "${ENTITLEMENT_ID}"
}

To create or update a non-default entitlement, just change defaultEntitlement=false.