Frage

This should be a relatively easy question. I have documents in my Box account that I'd like to view on a webpage. To do so I need the document ID. Is there an easy way to find the document id? I'm using this documentation http://developers.box.com/docs/ and tried:

curl https://api.box.com/2.0/files \ 
-H "Authorization: Bearer ACCESS_TOKEN"

But I receive a couldn't resolve host error.

My document resides in a folder as well. Will I need to query something different to find the document id found inside a folder?

War es hilfreich?

Lösung

Here's the API call you're looking for. This will return you file IDs for every file in a specified folder:

http://developers.box.com/docs/#folders-retrieve-a-folders-items

You've got a few options for finding the folder ID. You can use the root folder, which has an ID of 0, so you can get the files and folders in there and continue inspecting your Box account based on those Ids. Or you can use the search API endpoint to search by keyword and return folder and file IDs.

http://developers.box.com/docs/#search-searching-a-users-account

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top