Migration Guide Templates API v1 to v2

Below you can find a quick overview of the changes, as well as a detailed description of the changes for each affected endpoint.

In Templates API v2 we have introduced several changes, aimed at simplifying the data structure. The changes include removal of 5 endpoints, simplifying 1 endpoint and adding 1 new endpoint.

Property Sets

Property sets and property set uses were both used to filter properties. In order to simplify usage and increase adoption property sets are removed as an entity from the data structure and are no longer a part of the relation between template and properties. In order to filter properties use property set uses.

Measures

Measures are removed as an entity from the data structure and are no longer a part of the relation between property and units. Instead a data type is specified for each property.

Properties

The response for properties is simplified and no longer contains concept type and dependencies.

Changed endpoints


GET Get properties of template.

Request response changes:

v1:

                    [
                      {
                        "guid": "string",
                        "versionGuid": "string",
                        "defaultName": "string",
                        "name": "string",
                        "conceptTypeId": 0,
                        "measure": {
                          "guid": "string",
                          "versionGuid": "string",
                          "defaultName": "string",
                          "name": "string",
                          "dataTypeGuid": "string",
                          "dataTypeTitle": "string"
                        },
                        "unit": {
                          "guid": "string",
                          "versionGuid": "string",
                          "defaultName": "string",
                          "name": "string"
                        },
                        "valueCount": 0,
                        "propertySets": [
                          {
                            "guid": "string",
                            "versionGuid": "string",
                            "defaultName": "string",
                            "name": "string",
                            "propertySetUse": {
                              "guid": "string",
                              "title": "string"
                            },
                            "dependencies": [
                              {
                                "guid": "string",
                                "versionGuid": "string",
                                "defaultName": "string",
                                "name": "string"
                              }
                            ]
                          }
                        ]
                      }
                    ]
                    

v2:

                    [
                      {
                        "guid": "string",
                        "versionGuid": "string",
                        "defaultName": "string",
                        "name": "string",
                        "dataType": "string",
                        "unit": {
                          "guid": "string",
                          "versionGuid": "string",
                          "defaultName": "string",
                          "name": "string"
                        },
                        "propertySetUses": [
                          {
                            "guid": "string",
                            "name": "string"
                          }
                        ]
                      }
                    ]