REST API Search with property is not working properly

Hello ,

Our vault has a class called "MCA". MCA objects has Documents in it. I want to get object IDs of documents of a given MCA. (I am trying to download the files)

When I examine the Document objects I can see that those documents' class is "MCA" and has a property called "Scale calibration" and  scale calibration property value is the name of it's parent MCA. So to get the document objects of a given MCA, all I have to do is filter by object type = 0 (because they are files) and by property value of "Scale calibration".

I got the ID of the "Scale calibration" property by using this endpoint -  /REST/structure/properties

"ID": 1529,
"Name": "Scale Calibration",


And I am using this endpoint and query parameters to filter the document objects of  MCA = R320 - 3789803 - 26317 
- /REST/objects?o=0&p1529=R320%20-%203789803%20-%2026317

I assume the returns objects' "Scale calibration" property should always be "R320 - 3789803 - 26317". But the response includes objects, that does not even have a value for the "Scale calibration" property. And the response does not contains the actual file objects in MCA = "R320 - 3789803 - 26317".

Could anyone help me with this? What am I doing wrong in here?




Parents
  • {
            "IsCreatePermissionAllowed": true,
            "Permissions": {
                "CanRead": true,
                "CanEdit": true,
                "CanAttachObjects": false
            },
            "AllObjectTypes": true,
            "AutomaticValueType": 0,
            "BasedOnValueList": true,
            "ContentType": 0,
            "DataType": 10,
            "DependencyPD": -106,
            "DependencyRelation": 2,
            "GUID": "{xxxxxxxxxxxxxxxxxxxx}", // I replaced this
            "ID": 1529
            "Name": "Scale Calibration",
            "ObjectType": 0,
            "OwnerPropertyDef": {
                "ID": -106,
                "DependencyRelation": 2,
                "IsRelationFiltering": true
            },
            "Predefined": true,
            "SortAscending": true,
            "HasStaticFilter": false,
            "ThisIsConflictPD": false,
            "ThisIsDefaultPD": true,
            "ThisIsOwnerPD": false,
            "UpdateType": 0,
            "ValueList": 236,
            "ValueListSortingType": 0,
            "IsOwnerPropertyDef": false,
            "SortingType": 0
        },

    is it 0 ? 
  • Okay, the data type is 10.  10 is a multi-select-lookup: M-Files Web Service: MFDataType

    The issue is how you're encoding your search.  If you want to search for lookups then you need to search by their internal ID, whereas you're passing the name.  This is (awkwardly) stated in this table on the search conditions page: M-Files Web Service: Syntax encoding

    Do you know the ID of the item with that "R320 - 3789803 - 26317" name?

Reply Children