Get Directory File Listing

Today I got an error using the Directory Listing API for REST. I had specified a page size of 200 and I received an error stating that the page size limit is 100.

When there are more than 100 files (500 files) in a directory, how do you enumerate all 500 files?

I see the “totalObjects”:500 in the response JSON data. Is this object string going to be there in the future?

If I can count on this string being there telling me the total objects, then I can adjust the offset in the call for the Directory Listing to get the next page of data until there isn’t anymore.

A few months ago, I thought the totalObjects was going to be removed???

Hello Roy

In the current release we still use ‘total objects’. We’ll inform you as soon as the changes will be made.

Regards,
Anton

Additionally, are you saying that the total objects will be removed for sure in the future and some other method will be put into place so that developers can enumerate file listings?

Sure, that’s exactly what I meant.

Regards,
Anton

Will this not break developers code that currently uses the totalObjects to enumerate all files in a directory that contains more than 100 files?

Unfortunately, I’m pretty sure it will.

Regards,
Anton

We are currently working on the new version of Backendless - version 4.0. The new release will contain some important changes that will break backward compatibility. There will be two clusters running: one with the existing (3.x) apps and the other with the 4.0 version of Backendless. There will also be a way to migrate the backend from 3.x to 4.0 (and keep the 3.x running for some time). There will be grace period so everyone can migrate their client app to 4.0.

Regards,
Mark

Thanks for the information - It does help

Will the new API be the same as requesting data collections now (using a nextPage URL property)? I am refactoring some code and if so, I can take that into account.

it will be the same with nextPage

Hi Mark and Sergey

To be honest with you, I am really happy with what you have done with the changes on file-Referencing. Kudos to you guys.
It is unfortunate that i don’t know how to apply it in my code yet but I believe it is part of the 4.0 package. Can’t wait to see the docs on the new changes. But if the docs are ready, kindly let us know.

Keep up with the good work.

Yes, documentation about the upcoming changes, even when incomplete, will get a lot of us excited.

Thanks for the hard work!