5

I am going through a Computer Networking books that defines Internet API as the "set of rules" defined by Internet through which data is transferred from one end-user to another. Protocols are again defined in the very same manner, but it makes me a bit confused as what exactly the main difference between them is.

The book is computer networking by James F. KUROSE and KEITH W.Rose. In one of the paragraph it says that "The internet API is a set of rules that a sending program must follow so that Internet can deliver the data to the destination".

Now for Google, Internet Protocols is "A set of rules governing the format of data sent over the Internet or other network."

Both of them can't be wrong. There is one point that I am missing.

Please Help.

mfs
  • 3,984
  • 6
  • 32
  • 51
  • It would be very helpful if you provided some example from your book of what it considers an Internet API and what it considers an Internet Protocol. – Bakuriu Jan 31 '15 at 10:13
  • @Bakuriu I have edited my question. Please check. – mfs Jan 31 '15 at 10:25
  • 1
    Forget the "internet" prefix and focus on the difference between an API and a Protocol – kolossus Feb 01 '15 at 04:01

3 Answers3

3

API stands for Application Programming Interface, it referes to methods, data, and rules to interact with a component from an application you are programming. If somebody says Internet API it might refer to a set of methods, data and rules you must consider in your application. I don't know of a generic "Internet API" ... The definition for Protocol you can find it in Wikipedia (also for API). A protocol includes definitions for message format, data flows, and sometimes algorithms that let two entities communicate with each other. A Protocol defines the way two entities communicate, a protocol API is an interface for an application to use a protocol implementation. I hope this helps, I don't agree with such concept as "Internet API" and I think the definition of protocol that you found is incomplete.

rodolk
  • 5,606
  • 3
  • 28
  • 34
0

I have been reading the same book and what i understand is that, a protocol is much standardized set of rules they are very low level instructions. An API on the other hand comes in a picture at a much higher level.

An API must in an itself contain various internet protocols to communicate.

A protocol is like a package delivery, but an API is like a letter delivery(content specific)

Any content can be sent over a protocol, but only well defined info can be sent over an API.

picture this a protocol transmits raw data, an API transmits processed information.

0

API are meant for programming, with APIs you can communicate with some application component to collect data/edit/restrict... those APIs like REST for example use the protocol HTTP/HTTPS requests and responses, it also uses TLS/SSL protocols for security transport. Protocols is meant for communication between DEVICES, API communicated between APPLICATIONS. I hope you make use of those paragraphs below : #HTTP is a communication protocol with a given mechanism for server-client data transfer. It's most commonly used in REST API just because REST was inspired by WWW (world wide web) which largely used HTTP before REST was defined, so it's easier to implement REST API style with HTTP. #A HTTP API is ANY API that makes use of HTTP as their transfer protocol. This means that even SOAP can be considered a HTTP API, as long as it will use HTTP for transport, but most HTTP APIs will make more and better use of the infrastructure and possibilities of HTTP. #HTTP APIs make it easier to create APIs with the most common functionalities required to create serverless apps or to proxy requests to HTTP endpoints. They provide features like throttling, metrics, and logging that are typical in API Gateways.

Hsan
  • 1