API: Difference between revisions

Content deleted Content added
No edit summary
Tags: Reverted Visual edit Mobile edit Mobile web edit
unsourced addition, possibly LLM-generated
 
(47 intermediate revisions by 31 users not shown)
Line 3:
{{hatnote|"Api.php" redirects here. For the Wikipedia API, see {{Plain link|[Special:ApiHelp]}}.|selfref=true}}
 
An '''Applicationapplication Programmingprogramming Interfaceinterface''' ('''API''') is a connection between [[computer]]s or between [[computer program]]s. It is a type of software [[Interface (computing)|interface]], offering a service to other pieces of [[software]].<ref name=":0">{{cite book |last=Reddy |first=Martin |author-link= |date=2011 |title=API Design for C++ |url=https://books.google.com/books?id=IY29LylT85wC |publisher=Elsevier Science |page=1 |isbn=9780123850041}}</ref> A document or standard that describes how to build such a connection or interface is called an ''API specification''. A computer system that meets this standard is said to ''implement'' or ''expose'' an API. The term API may refer either to the specification or to the implementation.
 
In contrast to a [[user interface]], which connects a computer to a person, an application programming interface connects computers or pieces of software to each other. It is not intended to be used directly by a person (the [[end user]]) other than a [[computer programmer]]<ref name=":0" /> who is incorporating it into software. An API is often made up of different parts which act as tools or services that are available to the programmer. A program or a programmer that uses one of these parts is said to ''call'' that portion of the API. The calls that make up the API are also known as [[subroutine]]s, methods, requests, or [[communication endpoint|endpoint]]s. An API specification ''defines'' these calls, meaning that it explains how to use or implement them.
Line 34:
 
[[File:Univac 1108 Census Bureau.jpg|thumb|300px|Although the people who coined the term API were implementing software on a [[UNIVAC 1100/2200 series#1108|Univac 1108]], the goal of their API was to make [[hardware independent]] programs possible.<ref name="CottonGreatorex1968" />]]
The term "application program interface" (without an ''-ing'' suffix) is first recorded in a paper called ''Data structures and techniques for remote [[computer graphics]]'' presented at an [[AFIPS]] conference in 1968.<ref>{{Cite OED|application program interface}}</ref><ref name="Bloch2018" /> The authors of this paper use the term to describe the interaction of an [[application software|application]]—a graphics program in this case—with the rest of the computer system. A consistent application interface (consisting of [[Fortran]] subroutine calls) was intended to free the programmer from dealing with idiosyncrasies of the graphics display device, and to provide [[hardware independence]] if the computer or the display were replaced.<ref name="CottonGreatorex1968">{{cite conference |url=https://www.computer.org/csdl/pds/api/csdl/proceedings/download-article/12OmNyRPgFZ/pdf |title=Data structures and techniques for remote computer graphics |last1=Cotton |first1=Ira W. |last2=Greatorex |first2=Frank S. |date=December 1968 |conference=AFIPS 1968 Fall Joint Computer Conference |volume=I |book-title=AFIPS '68: Proceedings of the December 9–11, 1968, Fall Joint Computer Conference |publisher=Association for Computing Machinery |___location=San Francisco, California |pages=533–544 |isbn=978-1450378994 |oclc= 1175621908 |doi=10.1145/1476589.1476661 |url-access=subscription }}</ref>
 
The term was introduced to the field of [[database]]s by [[Christopher J. Date|C. J. Date]]<ref>{{cite book |last=Date |first=C. J. |author-link=Christopher J. Date |year=2019 |title=E. F. Codd and Relational Theory: A Detailed Review and Analysis of Codd's Major Database Writings |url=https://books.google.com/books?id=2Sy4DwAAQBAJ&pg=PA135 |page=135 |publisher=Lulu.com |isbn=978-1684705276}}</ref> in a 1974 paper called ''The [[Relational database|Relational]] and [[Network model|Network]] Approaches: Comparison of the Application Programming Interface''.<ref>{{cite conference |url=https://dl.acm.org/doi/pdf/10.1145/800297.811532 |title=The relational and network approaches: Comparison of the application programming interfaces |last1=Date |first1=C. J. |last2=Codd |first2=E. F. |date=January 1975 |editor=Randall Rustin |conference=SIGMOD Workshop 1974 |volume=2 |book-title=Proceedings of 1974 ACM-SIGMOD Workshop on Data Description, Access and Control |publisher=Association for Computing Machinery |___location=Ann Arbor, Michigan |pages=83–113 |isbn=978-1450374187 |oclc=1175623233 |doi=10.1145/800297.811532 |url-access=subscription }}</ref> An API became a part of the [[ANSI-SPARC Architecture|ANSI/SPARC framework]] for [[database management system]]s. This framework treated the application programming interface separately from other interfaces, such as the query interface. Database professionals in the 1970s observed these different interfaces could be combined; a sufficiently rich application interface could support the other interfaces as well.<ref name="NBS1981">{{cite report |date=April 1981 |title=Database architectures – a feasibility workshop |url=https://hdl.handle.net/2027/mdp.39015077587742?urlappend=%3Bseq=53 |publisher=U.S. Department of Commerce, National Bureau of Standards |pages=45–47 |access-date=September 18, 2020 |___location=Washington, DC|hdl=2027/mdp.39015077587742?urlappend=%3Bseq=53 |id=NBS special publication 500-76 |lccn=81600004}}</ref>
 
This observation led to APIs that supported all types of programming, not just application programming. By 1990, the API was defined simply as "a set of services available to a programmer for performing certain tasks" by technologist [[Carl Malamud]].<ref>{{cite book |last=Carl |first=Malamud |author-link=Carl Malamud |date=1990 |title=Analyzing Novell Networks |url=https://babel.hathitrust.org/cgi/pt?id=mdp.39015018454903&seq=314 |publisher=Van Nostrand Reinhold |page=294 |isbn=978-0442003647}}</ref>
Line 76:
}}
</ref>
 
 
===Operating systems===
Line 82 ⟶ 83:
[[Linux]] and [[Berkeley Software Distribution]] are examples of operating systems that implement the POSIX APIs.<ref name="WestDedrick16">{{Cite journal |last1=West |first1=Joel |last2=Dedrick |first2=Jason |date=2001 |title=Open source standardization: the rise of Linux in the network era |url=http://www.joelwest.org/Papers/WestDedrick2001b.pdf |journal=Knowledge, Technology & Policy |volume=14 |issue=2 |pages=88–112 |doi=10.1007/PL00022278 |access-date=2 August 2016}}</ref>
 
[[Microsoft]] has shown a strong commitment to a backward-compatible API, particularly within its [[Windows API]] (Win32) library, so older applications may run on newer versions of Windows using an executable-specific setting called "Compatibility Mode".<ref>
{{cite web
|author=Microsoft
Line 93 ⟶ 94:
|archive-url=https://web.archive.org/web/20090926235439/http://www.microsoft.com/windowsxp/using/helpandsupport/learnmore/appcompat.mspx
|archive-date=2009-09-26
}}</ref> How much Microsoft developers' access to the company's operating systems' internal APIs is an advantage is unclear. Richard A. Shaffer of ''Technologic Computer Letter'' in 1987 compared the situation to a baseball game in which "Microsoft owns all the bats and the field",<ref name="barney19871102">{{Cite magazine |last=Barney |first=Douglas |date=1987-11-02 |title=Balancing on the high wire of Microsoft's success |url=https://books.google.com/books?id=mUSIMiurpfYC&pg=PP81 |access-date=2025-06-08 |magazine=Computerworld |page=SR15 |volume=XXI |issue=44}}</ref> but [[Ed Esber]] of [[Ashton-Tate]] said in an interview that year that [[Bill Gates]] told him that his developers sometimes had to rewrite software based on early APIs. Gates noted in the interview that Microsoft's [[Apple Macintosh]] applications were more successful than those for MS-DOS, because his company did not have to also devote resources to [[Classic Mac OS|Mac OS]].<ref name="computerworld19871102interview">{{Cite interview |last=Gates |first=Bill |interviewer=Paul Gillin |title=The great software debate |last2=Manzi |first2=Jim |last3=Esber |first3=Ed |url=https://books.google.com/books?id=mUSIMiurpfYC&pg=PP73 |access-date=2025-06-08 |work=Computerworld |issue=44 |date=1987-11-02 |page=SR7 |volume=XXI}}</ref>
}}</ref>
 
An API differs from an [[application binary interface]] (ABI) in that an API is source code based while an ABI is [[Binary file|binary]] based. For instance, [[POSIX]] provides APIs while the [[Linux Standard Base]] provides an ABI.<ref>{{cite web|
Line 149 ⟶ 150:
|year = 2008
|access-date = 2019-10-01
|url-access= subscription
}}</ref> Part of this trend is related to the [[Semantic Web]] movement toward [[Resource Description Framework]] (RDF), a concept to promote web-based [[ontology engineering]] technologies. Web APIs allow the combination of multiple APIs into new applications known as [[mashup (web application hybrid)|mashup]]s.<ref>{{citation
|first = James
|last = Niccolai
Line 257 ⟶ 259:
*[[Comparison of application virtual machines]]
*[[Document Object Model]] (DOM)
*[[Double-chance function]]
*[[Foreign function interface]]
*[[Front and back ends]]
Line 280 ⟶ 282:
 
==Further reading==
* {{Cite journal |last=Taina Bucher |date=16 November 2013 |title=Objects of Intense Feeling: The Case of the Twitter API |url=http://computationalculture.net/article/objects-of-intense-feeling-the-case-of-the-twitter-api |journal=Computational Culture |issn=2047-2390 |number=3 |ref=none}} Argues that API"APIs are far from neutral tools" and form a key part of contemporary programming, understood as a fundamental part of culture.
* [https://www.supremecourt.gov/opinions/20pdf/18-956_d18f.pdf What is an API?] – in the USSupremeU.S. Supreme [[Court opinion]], [[Google LLC v. Oracle America, Inc.|Google v. Oracle 2021]], pp.&nbsp;3–7 – "For each task, there is [[source code|computer code]]; API (also known as Application Program Interface) is the method for calling that 'computer code' (instruction like a [[recipe]] – rather than cooking instruction, this is [[Computer|machine]] instruction) to be carry out"
* [http://ondrejka.net/history/2014/02/28/maury.html Maury, Innovation and Change] – Cory Ondrejka \ February 28, 2014 \ " ...proposed a public API to let computers talk to each other". ([https://web.archive.org/web/20211018221509/https://www.textise.net/showText.aspx?strURL=http://ondrejka.net/history/2014/02/28/maury.html Textise] URL)
 
==External links==