There must be some software developers here I'm studying for a certification that uses C# or Python to implement a solution. It should how to use REST API (i.e. make HTTP request, get JSON response) and SDK (install the service and call it) They say REST API simply allow you to call the service, whereas SDK allows you to customize the service. When I trace the code, I cannot wrap this around my head because 1. REST API is more lines of code 2. SDK seems streamlined The Instructors could not provide satisfactory explanation (they say get minimum passing in cert exam, and you are good to go) This is driving me bonkers. Google doesn't help either :-(
I followed until the above. Did not follow the below: If there is any link which explains what you are doing, someone could help.
Here is link to code in Python that uses REST API, AI-102-AIEngineer/rest-client.py at master · MicrosoftLearning/AI-102-AIEngineer Here is link to code in Python that uses SDK, AI-102-AIEngineer/sdk-client.py at master · MicrosoftLearning/AI-102-AIEngineer Big difference is in how GetLanguage() is implemented When using REST API, GetLanguage() does following 1. # Construct the JSON request body (a collection of documents, each with an ID and text) 2. # Let's take a look at the JSON we'll send to the service 3. # Make an HTTP request to the REST interface 4. # Add the authentication key to the request header 5. # Use the Text Analytics language API 6. # Send the request 7. # If the call was successful, get the response When using SDK, GetLanguage() does following 1. # Create client using endpoint and key 2. # Call the service to get the detected language
There is a popular eg for SDK and API SDK is like a house with furnitures,telephone line,appliances,etc.API is something that allows communication via the telephone line in and out of the house. SDK is a tool to build app and api is like an interface for app communications.
It seems I do more coding to use the telephone line than I do to import SDK packages. Maybe I haven't used both methods enough