1-to-N Mappings between SDK API and REST APIs #2102
-
I saw that most mappings for SDK and REST API request are 1-to-1 mapping, i.e., one SDK API will send one single request (REST API), so I am wondering whether there are any SDK APIs that send multiple requests? If there are, could anyone give me some examples (especially for S3)? If not, why so? Is it because it is a good design to use the 1-to-1 mapping? |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments
-
Hi @rmt2021, Good morning. You are correct, most low level SDK API(s) have 1-to-1 mapping with service API operations. However, there are some high level API(s) and libraries which encapsulate the complex low-level API operations. One example is Thanks, |
Beta Was this translation helpful? Give feedback.
-
@ashishdhingra thanks for your reply! May I ask why it is good to have the 1-to-1 mapping? Also, are there SDK APIs that have multiple REST APIs with different HTTP methods (e.g., DELETE+POST)? I think for multiple uploads, all of the REST APIs are PUT/POST. Is there a case that one SDK API triggers different types of REST APIs instead of multiple REST APIs with same verb? Thanks again! |
Beta Was this translation helpful? Give feedback.
-
Hello! Reopening this discussion to make it searchable. |
Beta Was this translation helpful? Give feedback.
Hi @rmt2021,
Good morning.
You are correct, most low level SDK API(s) have 1-to-1 mapping with service API operations. However, there are some high level API(s) and libraries which encapsulate the complex low-level API operations. One example is
TransferUtility
in AWSSDK.S3 package. More details at Uploading an object using multipart upload (class might be named differently in other SDK(s)).Thanks,
Ashish