Why do we use SDK instead of using Box API


What is the use of using the SDK when we already have API. We can directly use those API.

I am trying to do chunk file upload. For that it initially creates a session and then uploads parts of a file (https://upload.box.com/api/2.0/files/upload_sessions/:upload_session_id) this the API to upload parts of a file. I checked in SDK how they uploading the parts of a file, in that they have handled all the file splitting and every required. But when I tried the https://upload.box.com/api/2.0/files/upload_sessions/:upload_session_id API in postman, I am not able to upload file.

My question if SDK are handling these splitting functionalities, Does API also handle all the scenarios?

What is the benefit of using SDK if we already have API?

Hi @Sakthi11 , welcome to the forum!

Typically the SDKs include some helper methods and data structures, to make life easier for developers.

We are however creating new SDKs, we call the Next Gen SDKs where there is a closer mapping between the API end points and the SDK methods.

The example you mention is a perfect example. The chunked upload end point will respond to Postman, but it will be very hard to complete a chunked upload using Postman, since Postman is missing the file handling pieces.

This is where the SDKs shine, making your life as a developer simpler. In my personal opinion, and although I work mainly with Python, I do like type hints and a some formality in my data structures, and the SDK implements the formal dictionaries for the response objects.

Here is an article discussing different ways of uploading files to Box, that might interest you:

1 Like