Skip to main content

For the search interface,  Search for content - API Reference - Box Developer Documentation

I am wondering how to know the folder layers from the response. I see there is a property named Path_Collection, which seems has all folder names, but the sequence_id property is always 0 or null. How can we know which is the direct parent folder, which is the second level? Can we relay on the item sequence of the collection?

 

For example, for below response, can we consider the folder path is All Files/B/A ?

 

 "path_collection": {

                "total_count": 4,

                "entries":

                    {

                        "type": "folder",

                        "id": "0",

                        "sequence_id": null,

                        "etag": null,

                        "name": "All Files"

                    },

                    {

                        "type": "folder",

                        "id": "230155851619",

                        "sequence_id": "0",

                        "etag": "0",

                        "name": "B"

                    },

                    {

                        "type": "folder",

                        "id": "236064834114",

                        "sequence_id": "0",

                        "etag": "0",

                        "name": "B"

                    },

                    {

                        "type": "folder",

                        "id": "269498876496",

                        "sequence_id": "0",

                        "etag": "0",

                        "name": "A"

                    }

                ]

            }

Anyone can answer the question please?


Can you provide some more context here? I’m not sure I understand what you are asking. 

The sequence id is not the order of the folders...

https://developer.box.com/reference/resources/folder--mini/#param-sequence_id


Can you provide some more context here? I’m not sure I understand what you are asking. 

The sequence id is not the order of the folders...

https://developer.box.com/reference/resources/folder--mini/#param-sequence_id

Thanks for the response. My question is, from the response of the search endpoint, can we relay on the path_collection property to identify the folder layers?

 

For example, for this call, https://api.box.com/2.0/search?query=23145810&type=folder&ancestor_folder_ids=230155851619,

 

I got below response,

 

 

then can we conclude that Test123 folder’s direct parent is 証憑管理, and it’s grand parent is “All Files”?

Because the Entries property is just an array, I am not sure if the sequence of elements in the array are reliable, and I don’t see it is clearly documented. That’s why I raised the question.

Can you help to confirm?

 

 


Reply