Windchill REST Services > Windchill REST Services Framework Capabilities > Domain Configuration > Configuring a Domain > Import JSON File
  
Import JSON File
The import.json file is used to specify the domains that are imported by the domain being configured. The imported domains are specified in the imports property, which is a collection of JSON objects. Each object is of the form:
{“name”:”<domain name>”, “version”:”<domain version>”}
where:
<domain name> is the name of the domain being imported.
<domain version> is the version of the domain being imported.
* 
Starting with Windchill REST Services 2.7, The configuration option IncludeImportedEntitySets in domain configurations (import.json) is deprecated and will be removed in a future release of Windchill REST Services. It is recommended to set to it false until its removal.
The flag includeImportedEntitySets can be set to true or false to include or exclude the imported entity sets respectively. The default value is true.
If includeImportedEntitySets is false, imported entity sets are excluded from the domain. A configuration error is generated if the domain has a containment navigation property with a target type that has an entity set.
* 
Do not change the value of includeImportedEntitySets on the PTC-provided domains.
In the following example of import.json, the Product Management domain imports the PTC, DataAdmin, DocMgmt, and PrincipalMgmt domains with version 1. The Product Management domain will contain only Product Management entity sets as includeImportedEntitySets is set to false.
{
"imports":[
{"name":"PTC", "version":"1"},
{"name":"DataAdmin", "version":"1"},
{"name":"DocMgmt", "version":"1"},
{"name":"PrincipalMgmt", "version":"1"}
],
"includeImportedEntitySets": false,
“functions”: [],
“actions”: []
}
As part of import json configuration, set the enforceValidODataIdentifier flag to true. The default is false to preserve the backwards compatibility. When set to true, the Odata specifications compliance for Odata Identifiers (for example, entity names, property names, and so on) is enforced for the generated names and the defined names in the JSON configuration files. For more information, see Naming Convention for Subtypes and Version Changes in Domains for Windchill REST Services 12.0.2.20. When set to false, the naming conventions are not applied for the names with underscore (_) and names with the starting digit.
{
"imports":[
{"name":"PTC", "version":"1"},
{"name":"DataAdmin", "version":"1"},
{"name":"DocMgmt", "version":"1"},
{"name":"PrincipalMgmt", "version":"1"}
],
"enforceValidODataIdentifier": true,
“functions”: [],
“actions”: []
}
Navigation Bindings for Domains
For domains versions which do not have the flag includeImportedEntitySets with a value false (all domains versioned prior to 1.7), bindings are generated exactly as they have been in the past to avoid breaking changes.
For domains versioned in 1.7 and later that have the flag includeImportedEntitySets with a value false the following rules apply:
The binding target is generated as follows:
If the entity set exists in the entity container of the current context, the short entity set name is used.
If the entity set exists in an entity container other than the current context, the target is preceded by the fully qualified entity container path.
Misconfiguration error is displayed if the binding target entity set cannot be located in the current or imported domain.
The binding paths are generated as follows:
For direct navigations defined on the context entity type, the name of the navigation property is used.
For direct navigations defined on derived entity types which do not have an entity set, a type casting of the derived entity's navigation property is used.
For indirect navigations from an exposed entity type which navigate through one or more contained navigations to another non-contained entity, the path is a concatenation of the navigations and type casts as required.
NavigationPropertyBinding elements are not generated for containment navigations.
NavigationPropertyBinding elements are generated for non-containment navigations.