Max
Max

Reputation: 62

Display file version previews via Box Content API

I'm curious if anyone has insights on whether the Box API allows for displaying previews of previous versions. I've experimented with embedded links, but it didn't work.

curl  -X GET \
  'https://api.box.com/2.0/files/11111/versions/2222?fields=expiring_embed_link' \
  --header 'Accept: */*' \
  --header 'authorization: Bearer token'

My goal is to develop a web integration app that can present different versions side by side, a feature currently missing in Box.

Upvotes: 0

Views: 60

Answers (1)

Max
Max

Reputation: 62

found how to do this with content preview ui. https://github.com/box/box-content-preview#parameters--options

      var preview1 = new Box.Preview();
      preview1.show('54321', 'token', {
        container: '.preview-container1',
        fileOptions: {fileVersionId: '12345'},
      });

Upvotes: 0

Related Questions