API: Difference between revisions

Content deleted Content added
No edit summary
Tags: Reverted Visual edit Mobile edit Mobile web edit
Line 1:
{{short description|Connection between computers or programs}}
{{other uses}}An '''application programming interface''' ('''API''') is a connection or fetching, in technical terms, between computers or between computer programs. It is a type of software interface, offering a service to other pieces of software. 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.
{{other uses}}
{{hatnote|"Api.php" redirects here. For the Wikipedia API, see {{Plain link|[Special:ApiHelp]}}.|selfref=true}}
 
AnIn '''applicationcontrast programmingto a user interface''', ('''API''')which isconnects a connectioncomputer orto a fetchingperson, inan technicalapplication terms,programming betweeninterface [[computer]]sconnects computers or betweenpieces [[computerof program]]ssoftware to each other. It is anot typeintended ofto softwarebe [[Interfaceused (computing)|interface]],directly offeringby a serviceperson to(the end user) other piecesthan ofa [[software]].computer programmer<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 |title=API Design for C++ |date=2011 |publisher=Elsevier Science |pageisbn=19780123850041 |isbnpage=97801238500411}}</ref> Awho documentis orincorporating standardit thatinto describessoftware. howAn toAPI buildis suchoften amade connectionup of different parts which act as tools or interfaceservices isthat calledare anavailable ''APIto specification''the programmer. A computerprogram systemor a programmer that meetsuses thisone standardof these parts is said to ''implementcall'' orthat ''expose''portion anof the API. The termcalls that make up the API mayare referalso eitherknown toas thesubroutines, specificationmethods, requests, or endpoints. An API specification ''defines'' these calls, meaning that it explains how to theuse or implement implementationthem.
 
One purpose of APIs is to [[information hiding|hide the internal details]] of how a system works, exposing only those parts a programmer will find useful and keeping them consistent even if the internal details later change. An API may be custom-built for a particular pair of systems, or it may be a shared standard allowing [[interoperability]] among many systems.
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.
 
The term API is often used to refer to [[web API]]sAPIs,<ref name="Lane2019"/> which allow communication between computers that are joined by the [[internet]]. There are also APIs for [[programming language]]slanguages, [[library (computing)|software libraries]], computer [[operating system]]ssystems, and [[computer hardware]]. APIs originated in the 1940s, though the term did not emerge until the 1960s and 70s.
One purpose of APIs is to [[information hiding|hide the internal details]] of how a system works, exposing only those parts a programmer will find useful and keeping them consistent even if the internal details later change. An API may be custom-built for a particular pair of systems, or it may be a shared standard allowing [[interoperability]] among many systems.
 
The term API is often used to refer to [[web API]]s,<ref name="Lane2019"/> which allow communication between computers that are joined by the [[internet]]. There are also APIs for [[programming language]]s, [[library (computing)|software libraries]], computer [[operating system]]s, and [[computer hardware]]. APIs originated in the 1940s, though the term did not emerge until the 1960s and 70s.
 
== Purpose ==