2 Replies Latest reply on Nov 11, 2019 5:07 AM by Vishesh R Simha

    REST API call to set preset value for structure feature

    Vishesh R Simha Active Member

      Hi All,

       

      What is the REST API to set preset value for structure feature.

       

      I am trying below REST API. But I didnt't succeed in adding a preset value

       

      REST URl:

      http://p360udevapp:1512/rest/V1.0/list/StructureFeature

       

      Body:

      {

         "entityIdentifier": "StructureFeaturePresetValue",

         "columns": [

              {"identifier": "StructureFeaturePresetValue.StructureValueProxy(Manual)"}

         ],

         "rows": [

              {

                  "object":

                  { "id": "276@432" },

                  "values": ["Card"]

              }    

          ]

      }

       

      Error:

      {

          "counters": {

              "errors": 1,

              "warnings": 0,

              "createdObjects": 0,

              "updatedObjects": 1,

              "objectsWithErrors": 1,

              "objectsWithWarnings": 0

          },

          "entries": [

              {

                  "row": 0,

                  "objectType": "Structure feature",

                  "object": {

                      "id": "276@10200",

                      "label": "82129",

                      "entityId": 4300

                  },

                  "severity": "ERROR",

                  "category": "DATATYPE",

                  "propertyLabel": "Preset value",

                  "message": "Value 'Card' could not be converted into target type. Check logs for details.",

                  "logDate": "2019-11-04",

                  "logTime": "04:55:20"

              }

          ],

          "objects": [

              {

                  "row": 0,

                  "object": {

                      "id": "276@10200",

                      "label": "82129",

                      "entityId": 4300

                  },

                  "status": [

                      "UPDATED",

                      "ERROR"

                  ]

              }

          ]

      }

       

      --------------------------------------------------------------------------------------------------------------------------------------

       

      276 - StructureAttributeID of structure feature MPN

      432 - StructureGroupID of structure group BATTERY

       

      I am trying to add preset value "Card" to structure feature MPN of structure group BATTERY.

      I dont have any preset value called "Manual". However there are only two values in preset value enumeration

      In actual these are not the preset values I have configured in PIM. The list of values I have configured in PIM are not available in enum