Gene Michael Stover (gene@acm.org)
created Wednesday, 2022 February 2
updated Tuesday, 2022 March 22
original at https://cybertiggyr.com/d2h10.html
For a few years now (since maybe 2019), many software developers I know have claimed that a single, exposed operation is an “API”. This is incorrect.
You probably know that API is an abbreviation for “Application Programming Interface”. I used to also see “Application Programmer's Interface” and “Application Programmers' Interface”. It is the set of types & operations that a software system presents to programmers that call it from their code.
An API is the interface that one software system presents to other software systems. It's the whole interface, not just one part, not just one operation.
Unless an API happens to contain just one operation, one operation is not an API.
By operation, I mean procedure, function, remote procedure, or entry point. In a truly object oriented context, an operation could be a message.
Don't just take my word for it. Let's see how some authorities have defined API.
year | who | link | what |
---|---|---|---|
2022 | Oxford Languages | bing | a set of functions and procedures allowing the creation of applications that access the features or data of an operating system, application, or other service. |
2021 | IBM | ibm | a set of defined rules that explain how computers or applications communicate with one another |
There's more evidence if you look at the usage of the term.
year | who | link | what |
---|---|---|---|
1983 | wikipedia | [Berkeley sockets API is a bunch of types & operations; it's not a bunch of APIs, each a single operation] | |
1985 | Alfred Spector | acm's dl | [on page 3, mentions that some operations (plural) are part of the application programming interface] |
1991 | acm's dl | [Though they describe CL/TD as an allegro common Lisp programming interface, it's an API, & it's a set of types & operations.] | |
199? | [Winsock API is documented like Berkeley sockets API — a single API that is a set of operations] |
Copyright © 2022 Gene Michael Stover. All rights reserved. Permission to copy store, transmit, and view in electronic form is granted. Permission to link to this document is granted.