Searching sub folders with AdvancedSearch API

  • 1
  • Question
  • Updated 2 weeks ago
I'm trying to get 5 of the latest files from a folder and all it's sub folders. This is my payload i'm sending to the Items/AdvancedSearch endpoint:

        $query = [
            'Query' => [
                'ItemTypes' => ['File'],
                'ParentID' => [$parentId],
                'CreatorID' => [],
                'SearchQuery' => '*'
            ],
            'Paging' => [
                'Count' => 5,
                'Skip' => 0
            ],
            'Sort' => [
                'SortBy' => 'CreationDate',
                'Ascending' => false
            ],
            'TimeoutInSeconds' => 10
        ];

But it is not returning files that have been added to sub folders. Is this possible to do?

Thanks
Photo of Ben Southall

Ben Southall

  • 12 Posts
  • 1 Reply Like

Posted 2 weeks ago

  • 1

Be the first to post a reply!