"item" type in API Response

Answered

Comments

8 comments

  • Avatar
    Harish lakshmana

    Can you also share the sample response which you received during simulation?

    0
    Comment actions Permalink
  • Avatar
    Sylvia Able

    This is the sample:

    {
    "name": "func_loc_equipment_api_src",
    "elements": [
    {
    "plant_id": "4124",
    "func_loc_id": "VTX-HMD-REF",
    "fnloc_desc": "DIAMINE REFINING SECTION",
    "super_fnloc_id": "VTX-HMD",
    "sup_fnloc_desc": "VICTORIA PLANT DIAMINE",
    "plant_section_id": "HMD",
    "section_responsb": "HMD",
    "equipment_id": "",
    "equip_desc": ""
    },
    {
    "plant_id": "4124",
    "func_loc_id": "VTX-HMD-REF-ACL",
    "fnloc_desc": "REF AIR COOLER SYSTEM",
    "super_fnloc_id": "VTX-HMD-REF",
    "sup_fnloc_desc": "DIAMINE REFINING SECTION",
    "plant_section_id": "HMD",
    "section_responsb": "HMD",
    "equipment_id": "",
    "equip_desc": ""
    },
    {
    "plant_id": "4124",
    "func_loc_id": "VTX-HMD-REF-AQN",
    "fnloc_desc": "REF AQUA NH3 RECOVERY SYSTEM",
    "super_fnloc_id": "VTX-HMD-REF",
    "sup_fnloc_desc": "DIAMINE REFINING SECTION",
    "plant_section_id": "HMD",
    "section_responsb": "HMD",
    "equipment_id": "",
    "equip_desc": ""
    },
    {
    "plant_id": "4124",
    "func_loc_id": "VTX-HMD-REF-AQW",
    "fnloc_desc": "REF AQUA WASTE TANK SYSTEM",
    "super_fnloc_id": "VTX-HMD-REF",
    "sup_fnloc_desc": "DIAMINE REFINING SECTION",
    "plant_section_id": "HMD",
    "section_responsb": "HMD",
    "equipment_id": "",
    "equip_desc": ""
    },
    {
    "plant_id": "4124",
    "func_loc_id": "VTX-HMD-REF-HPS",
    "fnloc_desc": "REF PIPING SYSTEM",
    "super_fnloc_id": "VTX-HMD-REF",
    "sup_fnloc_desc": "DIAMINE REFINING SECTION",
    "plant_section_id": "HMD",
    "section_responsb": "HMD",
    "equipment_id": "",
    "equip_desc": ""
    },
    {
    "plant_id": "4124",
    "func_loc_id": "VTX-HMD-REF-HRR",
    "fnloc_desc": "REF HMD BLENDING SYSTEM",
    "super_fnloc_id": "VTX-HMD-REF",
    "sup_fnloc_desc": "DIAMINE REFINING SECTION",
    "plant_section_id": "HMD",
    "section_responsb": "HMD",
    "equipment_id": "",
    "equip_desc": ""
    },
    {
    "plant_id": "4124",
    "func_loc_id": "VTX-HMD-REF-HWL",
    "fnloc_desc": "REF HOTWELL SYSTEM",
    "super_fnloc_id": "VTX-HMD-REF",
    "sup_fnloc_desc": "DIAMINE REFINING SECTION",
    "plant_section_id": "HMD",
    "section_responsb": "HMD",
    "equipment_id": "",
    "equip_desc": ""
    },
    {
    "plant_id": "4124",
    "func_loc_id": "VTX-HMD-REF-ICP",
    "fnloc_desc": "REF BLDG ICPS",
    "super_fnloc_id": "VTX-HMD-REF",
    "sup_fnloc_desc": "DIAMINE REFINING SECTION",
    "plant_section_id": "HMD",
    "section_responsb": "HMD",
    "equipment_id": "",
    "equip_desc": ""
    },
    {
    "plant_id": "4124",
    "func_loc_id": "VTX-HMD-REF-LPA",
    "fnloc_desc": "REF LOW PRESS NH3 SYSTEM",
    "super_fnloc_id": "VTX-HMD-REF",
    "sup_fnloc_desc": "DIAMINE REFINING SECTION",
    "plant_section_id": "HMD",
    "section_responsb": "HMD",
    "equipment_id": "",
    "equip_desc": ""
    },
    {
    "plant_id": "4124",
    "func_loc_id": "VTX-HMD-REF-N11",
    "fnloc_desc": "REF N112 SYS",
    "super_fnloc_id": "VTX-HMD-REF",
    "sup_fnloc_desc": "DIAMINE REFINING SECTION",
    "plant_section_id": "HMD",
    "section_responsb": "HMD",
    "equipment_id": "",
    "equip_desc": ""
    },
    {
    "plant_id": "4124",
    "func_loc_id": "VTX-HMD-REF-PTF",
    "fnloc_desc": "REF 509 HMD PRIMARY TANK FARM",
    "super_fnloc_id": "VTX-HMD-REF",
    "sup_fnloc_desc": "DIAMINE REFINING SECTION",
    "plant_section_id": "HMD",
    "section_responsb": "HMD",
    "equipment_id": "",
    "equip_desc": ""
    },
    {
    "plant_id": "4124",
    "func_loc_id": "VTX-HMD-REF-RBL",
    "fnloc_desc": "REF BARGE LOADING SYSTEM",
    "super_fnloc_id": "VTX-HMD-REF",
    "sup_fnloc_desc": "DIAMINE REFINING SECTION",
    "plant_section_id": "HMD",
    "section_responsb": "HMD",
    "equipment_id": "",
    "equip_desc": ""
    },
    {
    "plant_id": "4124",
    "func_loc_id": "VTX-HMD-REF-RCO",
    "fnloc_desc": "REF REFINER SYSTEM",
    "super_fnloc_id": "VTX-HMD-REF",
    "sup_fnloc_desc": "DIAMINE REFINING SECTION",
    "plant_section_id": "HMD",
    "section_responsb": "HMD",
    "equipment_id": "",
    "equip_desc": ""
    },
    {
    "plant_id": "4124",
    "func_loc_id": "VTX-HMD-REF-REA",
    "fnloc_desc": "REF ANALYZER SYSTEM",
    "super_fnloc_id": "VTX-HMD-REF",
    "sup_fnloc_desc": "DIAMINE REFINING SECTION",
    "plant_section_id": "HMD",
    "section_responsb": "HMD",
    "equipment_id": "",
    "equip_desc": ""
    },
    {
    "plant_id": "4124",
    "func_loc_id": "VTX-HMD-REF-RFS",
    "fnloc_desc": "REF FORESHOTS SYSTEM",
    "super_fnloc_id": "VTX-HMD-REF",
    "sup_fnloc_desc": "DIAMINE REFINING SECTION",
    "plant_section_id": "HMD",
    "section_responsb": "HMD",
    "equipment_id": "",
    "equip_desc": ""
    },
    {
    "plant_id": "4124",
    "func_loc_id": "VTX-HMD-REF-RPC",
    "fnloc_desc": "REF PURGE CONCENTRATOR SYSTEM",
    "super_fnloc_id": "VTX-HMD-REF",
    "sup_fnloc_desc": "DIAMINE REFINING SECTION",
    "plant_section_id": "HMD",
    "section_responsb": "HMD",
    "equipment_id": "",
    "equip_desc": ""
    },
    {
    "plant_id": "4124",
    "func_loc_id": "VTX-HMD-REF-RPE",
    "fnloc_desc": "REF PURGE ENRICHER SYSTEM",
    "super_fnloc_id": "VTX-HMD-REF",
    "sup_fnloc_desc": "DIAMINE REFINING SECTION",
    "plant_section_id": "HMD",
    "section_responsb": "HMD",
    "equipment_id": "",
    "equip_desc": ""
    },
    {
    "plant_id": "4124",
    "func_loc_id": "VTX-HMD-REF-RPP",
    "fnloc_desc": "REF PARALLEL PURGE SYSTEM",
    "super_fnloc_id": "VTX-HMD-REF",
    "sup_fnloc_desc": "DIAMINE REFINING SECTION",
    "plant_section_id": "HMD",
    "section_responsb": "HMD",
    "equipment_id": "",
    "equip_desc": ""
    },
    {
    "plant_id": "4124",
    "func_loc_id": "VTX-HMD-REF-RPS",
    "fnloc_desc": "REF PURGE SYSTEM",
    "super_fnloc_id": "VTX-HMD-REF",
    "sup_fnloc_desc": "DIAMINE REFINING SECTION",
    "plant_section_id": "HMD",
    "section_responsb": "HMD",
    "equipment_id": "",
    "equip_desc": ""
    },
    {
    "plant_id": "4124",
    "func_loc_id": "VTX-HMD-REF-RSU",
    "fnloc_desc": "REF BUILDING SERVICES",
    "super_fnloc_id": "VTX-HMD-REF",
    "sup_fnloc_desc": "DIAMINE REFINING SECTION",
    "plant_section_id": "HMD",
    "section_responsb": "HMD",
    "equipment_id": "",
    "equip_desc": ""
    },
    {
    "plant_id": "4124",
    "func_loc_id": "VTX-HMD-REF-RTC",
    "fnloc_desc": "REF TAILS CONCENTRATOR SYSTEM",
    "super_fnloc_id": "VTX-HMD-REF",
    "sup_fnloc_desc": "DIAMINE REFINING SECTION",
    "plant_section_id": "HMD",
    "section_responsb": "HMD",
    "equipment_id": "",
    "equip_desc": ""
    },
    {
    "plant_id": "4124",
    "func_loc_id": "VTX-HMD-REF-RTL",
    "fnloc_desc": "REF HMD REFINING TRUCK LOADING SYSTEM",
    "super_fnloc_id": "VTX-HMD-REF",
    "sup_fnloc_desc": "DIAMINE REFINING SECTION",
    "plant_section_id": "HMD",
    "section_responsb": "HMD",
    "equipment_id": "",
    "equip_desc": ""
    },
    {
    "plant_id": "4124",
    "func_loc_id": "VTX-HMD-REF-SPR",
    "fnloc_desc": "REF HMD SPARE EQUIPMENT",
    "super_fnloc_id": "VTX-HMD-REF",
    "sup_fnloc_desc": "DIAMINE REFINING SECTION",
    "plant_section_id": "HMD",
    "section_responsb": "HMD",
    "equipment_id": "",
    "equip_desc": ""
    },
    {
    "plant_id": "4124",
    "func_loc_id": "VTX-HMD-REF-VAM",
    "fnloc_desc": "REFINING VAMs",
    "super_fnloc_id": "VTX-HMD-REF",
    "sup_fnloc_desc": "DIAMINE REFINING SECTION",
    "plant_section_id": "HMD",
    "section_responsb": "HMD",
    "equipment_id": "",
    "equip_desc": ""
    }
    ],
    "links": [
    {
    "rel": "self",
    "href": "XXXXXXXXXXXXXXX/server/pm_data_services/func_loc_equipment_api/views/func_loc_equipment_api_src?$filter=(super_fnloc_id+%3D+'VTX-HMD-REF'+and+equipment_id+%3D+'')+or+(func_loc_id+%3D+'VTX-HMD-REF')&$orderby=func_loc_id+ASC,equipment_id+ASC"
    }
    ]
    }

    0
    Comment actions Permalink
  • Avatar
    Harish lakshmana

    Strange.

    I have not this happen to a string data before. You can try to type in sample data in place of empty string and it will detect it as string. It worked for me.

    like this.
    "equipment_id": "sample data",
    "equip_desc": "sample data"

     

    0
    Comment actions Permalink
  • Avatar
    Sylvia Able

    This works for me, but it really feels like a bug....  Is this something you can submit to the developer team to fix in future?

    thanks so much for your help!

    0
    Comment actions Permalink
  • Avatar
    Loren Bratzler

    Another thing to point out is I have often seen where the mapping tool will generate a red line on the mapping, indicating some kind of error, but if you go ahead and "finish" the configuration and test it, it may still work.

    0
    Comment actions Permalink
  • Avatar
    Harish lakshmana

    Loren,

    Red line indicates that AgilePoint will not be able to handle this type of data assignment from left side property to right side.

    Green line indicates, no data Conversion is required.

    Blue line indicates data is compatible but AgilePoint knows how to convert the data from one type to another. eg String to Number. or Sting to Boolean.

    0
    Comment actions Permalink
  • Avatar
    Loren Bratzler

    Harish - Yes I understand what the red line means.  But I am just saying that even though the mapping tool flags the data assignment as an error (with a red line), sometimes the mapping will still work if you publish and test the application.  I think this is a perfect example of that because it appears that the red line is appearing in Sylvia's case because the simulation brought back an empty string. As you pointed out, if you put data into the empty string in the simulation response, then the mapping is no longer flagged as an error.

    I tend to agree with her that this seems like a bug in the mapping tool.

    0
    Comment actions Permalink
  • Avatar
    Harish lakshmana

    For the specific case in this thread where string gets detected as item, I also believe there should be better way to figure that out. However not sure for general cases to address all the red lines.

    0
    Comment actions Permalink

Please sign in to leave a comment.