The DSC REST API is generated automatically based on the data model using DSC REST API Generator (DRAG) utility. The DSC data model is an XML file with nodes describing Predix Experience (Px) containers and types. The data model is parsed to create the REST API definitions or entry points.
The schema of the XML files is based on the application's DEF files and uses the YANG data modeling language (as defined in RFC-6020) for descriptions and can exist in different formats such and YIN and YANG. These formats are interchangeable and have the same information. The YIN notation enables YANG data model to be represented in XML and use a rich set of XML-based tools for data filtering and validation, generation of code and documentation.
During the nightly build, the DSC data models are generated as YIN files for every supported application. After the data models are generated, the DSC REST API Generator (DRAG) processes the data models and produces a web application (DRAG instance), which serves the REST API.
Upon receiving an HTTP request, the DRAG instance converts the incoming HTTP method (GET, POST, PUT, or DELETE) and URL into a TL1 command.
There is one dedicated TL1 socket connection for each user/password combination.
The objects which can be operated upon (POST/PUT/DELETE) are subsets of objects that can be read (GET). For example, in the case of the DSC application, an API can read DSC instances in response to a read request but can not create a DSC instance in response to create request. In other words, for each object, the REST API does not necessary support all four HTTP methods.
For more information about the HTTP methods, see HTTP Methods.
The DSC data models contain all the definitions required for the provisioning. The following table summarizes supported applications and corresponding data models.
The following table does not include the Alarm Synchronization or the Inventory Management because their resources are not automatically generated into YIN files and do not appear in the REST API Reference Guide. Instead these features use special customized resources. For more information on these features, refer to Alarm Synchronization and Inventory Management.