新しいBoxサポートサイトへようこそ。 変更点の詳細はこちらをご確認ください .

Batch Support for Thumbnails

回答済み
新規投稿

コメント

4件のコメント

  • jcleblanc

    Hi ,

     

    For transparency, the batch API is actually a feature that is only available as a method in the Java SDK, and is an undocumented API endpoint. The reason for this is because the only value it brings is in reducing the roundtrip time of API requests (bundle a bunch of requests into a single trip). This feature does not reduce (or is even cognizant of) rate limiting concerns, and it doesn't reduce your API requests from X API requests down to 1 when using the API.

     

    Due to this, and the fact that it isn't an officially support endpoint, I'd recommend that you set up the requests in parallel within your own code, rather than using the Batch method. 

     

    - Jon

    0
    コメントアクション Permalink
  • Stephan5

    Hi Jon,

     

    thanks for your quick reply!!

     

    I didn't even think about rate limiting when asking the question. To make sure I understand you correctly:

     

    Even if I'd make sure that my app stays within the allowed rate limits, the batch endpoint does not support get thumbnails? So something like 'once per second, fetch 5 thumbnails in a single batch request' wouldn't work?

     

    Background of my question is that I'd like to build an app where users can browse through a list of all of their images on box.com, and it would be a great UX if they would be able to immediately see thumbnails, not only file names & other metadata...

    0
    コメントアクション Permalink
  • jcleblanc

    Hi ,

     

    The Batch API should support any API call, technically, including the option to fetch thumbnails. It's entirely possible that there is an issue with that specific endpoint, which I'll look into. 

     

    There's another potential option. We have another way of fetching thumbnails, through our Representations API. There's an endpoint to fetch a thumbnail, PDF, etc. in there - that call may work directly in the batch API as well if you'd prefer to go down that route.

     

    Hope that helps,

    Jon

    0
    コメントアクション Permalink
  • Stephan5

    Hi  ,

     

    thanks a lot, batching calls to the Representations API worked great (and quite fast) !! 🙂

     

    Unfortunately, I now bumped into a new problem:

     

    The URLs returned from the Representations API require an authentication header (the user's access token). That means I cannot simply use them in an element, as those requests will all 401.

     

    Is there a way to bypass this limitation, and receive short-living URLs that do not require any authentication? 2 minutes would be enough...

     

    Apologies for keeping asking questions, I hope this one is the last! 🙂

     

    Cheers,

    Stephan

    0
    コメントアクション Permalink

サインインしてコメントを残してください。