Trimble Connect User Forum

 View Only
Expand all | Collapse all

API object properties not being returned

  • 1.  API object properties not being returned

    Posted 01-28-2019 09:50

    Hi all,

     

    I'm calling the following API endpoint: /bimdata/objects-query

     

    I'm authenticating correctly as getting 200 OK returns by the API.

    My intention is to return object properties yet for some reason I can't seem to see these in the response body.

     

    Below is my request body:

    {
    "filters": {
    "fileIds": [
    "sOtNh6SRKL8"
    ],
    "properties": [
    {
    "setName": "GTeam_Quantity_Data",
    "setItems": [
    {
    "name": "NetSurfaceArea"
    }
    ]
    }
    ]
    },
    "resultSetConfiguration": {
    "includeProperties": "all",
    "objectIdsOnly": false,
    "includeBoundingBox": false
    }
    }

    ------- *************************** -------------------------------

     

    And here is my response:

     

    [
    {
    "name": "SLAB",
    "type": "IFCSLAB",
    "objectId": "2_zl$bcezEpuT51FBScWJl",
    "fileId": "sOtNh6SRKL8",
    "versionId": "sOtNh6SRKL8"
    },
    {
    "name": "SLAB",
    "type": "IFCSLAB",
    "objectId": "0i2i8KkkH5zwFYQF$h_aGd",
    "fileId": "sOtNh6SRKL8",
    "versionId": "sOtNh6SRKL8"
    }
    ]

     

    I made sure to set up the includeProperties setting to true on my request body yet still not seeing any object properties.

     

    Do you know why this could be occurring?

     

    Thanks in advance,

    Sergio



  • 2.  Re: API object properties not being returned

    Posted 01-29-2019 04:31

    Hi Sergio,

     

    Please modify the request body, line 11 with :

     

    "Name" : "NetSurfaceArea"

     

    Let me know if that works.

     

    Regards,

    Ankit Sulodia



  • 3.  Re: API object properties not being returned

    Posted 01-29-2019 07:08

    Hi Ankit,

     

    Thanks for your help.

     

    I have changed "name" to "Name" yet still not getting any properties in the return:

    It now looks like this:

    [     {         "name": "Undefined",         "type": "IFCSITE",         "objectId": "15J0fXfYHCIftexZmPTl6j",         "fileId": "sOtNh6SRKL8",         "versionId": "sOtNh6SRKL8"     },     {         "name": "DRG PROJ NAME",         "type": "IFCPROJECT",         "objectId": "1UbMWMN_H57wJUYCj_hAFh",         "fileId": "sOtNh6SRKL8",         "versionId": "sOtNh6SRKL8"     },     {         "name": "Undefined",         "type": "IFCBUILDING",         "objectId": "3He$VaknjAxexMzkeQ_KPv",         "fileId": "sOtNh6SRKL8",         "versionId": "sOtNh6SRKL8"     },     {         "name": "Undefined",         "type": "IFCBUILDINGSTOREY",         "objectId": "0bkZXPlv51_w3Iztvl8ECH",         "fileId": "sOtNh6SRKL8",         "versionId": "sOtNh6SRKL8"     },     {         "name": "SLAB",         "type": "IFCSLAB",         "objectId": "0i2i8KkkH5zwFYQF$h_aGd",         "fileId": "sOtNh6SRKL8",         "versionId": "sOtNh6SRKL8"     },     {         "name": "SLAB",         "type": "IFCSLAB",         "objectId": "2_zl$bcezEpuT51FBScWJl",         "fileId": "sOtNh6SRKL8",         "versionId": "sOtNh6SRKL8"     } ]

     

    I would expect the return to include a properties array just like the sample return found in the documentation:

    [   {     "name": "Level 03 - T.O. Basement Slab",     "type": "IfcBuildingStorey",     "objectId": "eabed363-0187-429d-91a7-2d7d264a0fe4",     "fileId": "acIKX4f6WM8",     "versionId": "nk_d341SbSc",     "boundingBox": {       "min": [         0,         0,         0      ],       "max": [         0,         0,         0      ]     }   },   {     "name": "Default",     "type": "IfcBuildingElementProxy",     "objectId": "850f4571-facc-4f2b-a9bf-3388ee48e9fb",     "fileId": "acIKX4f6WM8",     "versionId": "nk_d341SbSc",     "boundingBox": {       "min": [         4.76851416015625,         -3.1367045898437502,         2.6590625      ],       "max": [         6.62075537109375,         -2.617723388671875,         2.82733740234375      ]     },     "properties": [       {         "setName": "Phasing",         "setItems": [           {             "name": "Phase Created",             "type": "STRING",             "value": "Project Completion",             "rank": 1          },           {             "name": "Phase Demolished",             "type": "STRING",             "value": "None",             "rank": 2          }         ]       },       {         "setName": "GTeam_Quantity_Data",         "setItems": [           {             "name": "NetVolume",             "type": "VOLUMEUNIT",             "value": 0.041234799777128,             "rank": 1          },           {             "name": "NetSurfaceArea",             "type": "AREAUNIT",             "value": 1.02469834657479,             "rank": 2          }         ]       }     ]   } ]

     

    Any ideas as to why the object's properties aren't being displayed?

     

    Regards,

    Sergio.



  • 4.  Re: API object properties not being returned

    Posted 02-11-2019 01:23

    Hello Sergio,

     

    i had similar problems and it was because i was not using the correct serviceURI. i was using North America's when my project was located in Europe. I changed it and the information started to be displayed.

     

    Regards,

    Gonzalo.