MediaWiki API result

This is the HTML representation of the JSON format. HTML is good for debugging, but is unsuitable for application use.

Specify the format parameter to change the output format. To see the non-HTML representation of the JSON format, set format=json.

See the complete documentation, or the API help for more information.

{
    "batchcomplete": "",
    "query": {
        "pages": {
            "125056": {
                "pageid": 125056,
                "ns": 0,
                "title": "API",
                "revisions": [
                    {
                        "user": "WikiEd2",
                        "timestamp": "2024-02-06T21:07:20Z",
                        "slots": {
                            "main": {
                                "contentmodel": "wikitext",
                                "contentformat": "text/x-wiki",
                                "*": "{{short description|Software interface between computer programs}}\n[[File:Screenshot of NASA API documentation.png|thumb|Screenshot of [[Web API|web API]] documentation written by NASA]]\n\nAn {{strong|application programming interface}} ({{strong|API}}) is a way for two or more [[Computer program|computer program]]s or components to communicate with each other. It is a type of software interface, offering a service to other pieces of [[Software|software]].<ref>{{cite book |last=Reddy |first=Martin |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 or use such a connection or interface is called an {{em|API specification}}. A computer system that meets this standard is said to {{em|implement}} or {{em|expose}} an API. The term API may refer either to the specification or to the implementation. Whereas a system's [[User interface|user interface]] dictates how its end-users interact with the system in question, its API dictates how to write code that takes advantage of that system's capabilities.\n\nIn contrast to a [[User interface|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|end user]]) other than a computer programmer who is incorporating it into the 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 {{em|call}} that portion of the API. The calls that make up the API are also known as [[Subroutine|subroutine]]s, methods, requests, or [[Communication endpoint|endpoint]]s. An API specification {{em|defines}} these calls, meaning that it explains how to use or implement them.\n\nOne purpose of APIs is to [[Information hiding|hide the internal details]] of how a system works, exposing only those parts that a programmer will find useful, and keeping them consistent even if the internal details change later. An API may be custom-built for a particular pair of systems, or it may be a shared standard allowing [[Engineering:Interoperability|interoperability]] among many systems.\n\nThere are APIs for [[Programming language|programming language]]s, [[Library (computing)|software libraries]], computer [[Operating system|operating system]]s, and [[Computer hardware|computer hardware]]. APIs originated in the 1940s, though the term did not emerge until the 1960s and 1970s. Contemporary usage of the term API often refers to [[Web API|web API]]s,<ref name=\"Lane2019\"/> which allow communication between computers that are joined by the [[Engineering:Internet Protocol television|internet]]. Recent developments in APIs have led to the rise in popularity of [[Microservices|microservices]], which are loosely coupled services accessed through public APIs.<ref>{{cite web |last=Wood |first=Laura |date=2021-08-25 |title=Global Cloud Microservices Market (2021 to 2026) |url=https://www.businesswire.com/news/home/20210825005630/en/Global-Cloud-Microservices-Market-2021-to-2026---Growth-Trends-COVID-19-Impact-and-Forecasts---ResearchAndMarkets.com |website=businesswire.com |access-date=2022-03-29 |language=en-US}}</ref>\n\n== Purpose ==\nIn building applications, an API simplifies programming by abstracting the underlying implementation and only exposing objects or actions the developer needs. While a graphical interface for an [[Software:Email client|email client]] might provide a user with a button that performs all the steps for fetching and highlighting new emails, an API for file [[Input output|input/output]] might give the developer a [[Subroutine|function]] that copies a file from one location to another without requiring that the developer understand the [[Journaling file system|file system]] operations occurring behind the scenes.<ref name=\"Clarke4\">{{Cite web |url=http://www.drdobbs.com/windows/measuring-api-usability/184405654 |title=Measuring API Usability |last=Clarke |first=Steven |date=2004 |website=Dr. Dobb's |access-date=29 July 2016}}</ref>\n\n== History of the term ==\n\n[[File:Database management system diagram from 1978 workshop.png|thumb|upright=1.25|A diagram from 1978 proposing the expansion of the idea of the API to become a general programming interface, beyond application programs alone<ref name=\"NBS1981\" />]]\n\nThe term ''API'' initially described an interface only for end-user-facing programs, known as application programs. This origin is still reflected in the name \"application programming interface.\" Today, the term is broader, including also utility software and even [[Hardware interface design|hardware interfaces]].<ref name=\"Bloch2018\" />\n\n=== 1940s and 50s ===\n\nThe idea of the API is much older than the term itself. British computer scientists [[Biography:Maurice Wilkes|Maurice Wilkes]] and David Wheeler worked on a modular software library in the 1940s for EDSAC, an early computer. The [[Subroutine|subroutine]]s in this library were stored on punched paper tape organized in a [[Engineering:Filing cabinet|filing cabinet]]. This cabinet also contained what Wilkes and Wheeler called a \"library catalog\" of notes about each subroutine and how to incorporate it into a program. Today, such a catalog would be called an API (or an API specification or API documentation) because it instructs a programmer on how to use (or \"call\") each subroutine that the programmer needs.<ref name=\"Bloch2018\" />\n\nWilkes and Wheeler's 1951 book ''The Preparation of Programs for an Electronic Digital Computer'' contains the first published API specification. Joshua Bloch considers that Wilkes and Wheeler \"latently invented\" the API because it is more of a concept that is discovered than invented.<ref name=\"Bloch2018\">{{cite speech |last=Bloch |first=Joshua |title=A Brief, Opinionated History of the API |event=QCon |date=August 8, 2018 |location=San Francisco |publisher=InfoQ |url=https://www.infoq.com/presentations/history-api/ |access-date=September 18, 2020}}</ref>\n\n[[File:Univac 1108 Census Bureau.jpg|thumb|Although the people who coined the term API were implementing software on a Univac 1108, the goal of their API was to make hardware independent programs possible.<ref name=\"CottonGreatorex1968\" />]]\n\n=== 1960s and 70s ===\n\nThe term \"application program interface\" (without an ''\u2011ing'' suffix) is first recorded in a paper called ''Data structures and techniques for remote [[Computer graphics|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\u2014a graphics program in this case\u2014with 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\u201311, 1968, Fall Joint Computer Conference |publisher=Association for Computing Machinery |location=San Francisco, California |pages=533\u2013544 |isbn=978-1450378994 |oclc= 1175621908 |doi=10.1145/1476589.1476661 }}</ref>\n\nThe term was introduced to the field of [[Database|database]]s by C. J. Date<ref>{{cite book |last=Date |first=C. J. |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 |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\u2013113 |isbn=978-1450374187 |oclc=1175623233 |doi=10.1145/800297.811532 }}</ref> An API became a part of the [[Software:ANSI-SPARC Architecture|ANSI/SPARC framework]] for database management systems. 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 \u2013 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\u201347 |access-date=September 18, 2020 |location=Washington, DC|hdl=2027/mdp.39015077587742?urlappend=%3Bseq=53 |id=NBS special publication 500-76 |lccn=81600004}}</ref>\n\nThis observation led to APIs that supported all types of programming, not just application programming.\n\n=== 1990s ===\nBy 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 |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>\n\nThe idea of the API was expanded again with the dawn of remote procedure calls and [[Web API|web API]]s. As [[Computer network|computer network]]s became common in the 1970s and 1980s, programmers wanted to call libraries located not only on their local computers but on computers located elsewhere. These remote procedure calls were well supported by the [[Java (programming language)|Java]] language in particular. In the 1990s, with the spread of the [[Internet|internet]], standards like CORBA, [[Component Object Model|COM]], and [[Distributed Component Object Model|DCOM]] competed to become the most common way to expose API services.<ref name=\"JinSahniShevat2018\">{{cite book  |first1=Brenda |last1=Jin |first2=Saurabh |last2=Sahni |first3=Amir |last3=Shevat |year=2018 |title=Designing Web APIs |url=https://books.google.com/books?id=Dg1rDwAAQBAJ |location= |publisher=O'Reilly Media |isbn=9781492026877}}</ref>\n\n=== 2000s ===\n\nRoy Fielding's dissertation ''Architectural Styles and the Design of Network-based Software Architectures'' at UC Irvine in 2000 outlined [[Representational state transfer]] (REST) and described the idea of a \"network-based Application Programming Interface\" that Fielding contrasted with traditional \"library-based\" APIs.<ref>{{cite thesis |last=Fielding |first=Roy |date=2000 |title=Architectural Styles and the Design of Network-based Software Architectures |type=PhD |publisher=University of California, Irvine |url=https://www.ics.uci.edu/~fielding/pubs/dissertation/top.htm |access-date=September 18, 2020}}</ref> [[XML]] and [[JSON]] web APIs saw widespread commercial adoption beginning in 2000 and continuing as of 2022. The web API is now the most common meaning of the term API.<ref name=\"Lane2019\">{{cite web |last=Lane |first=Kin |date=October 10, 2019 |title=Intro to APIs: History of APIs |url=https://blog.postman.com/intro-to-apis-history-of-apis/ |access-date=September 18, 2020 |website=Postman |language=en-US |quote=When you hear the acronym \"API\" or its expanded version \"Application Programming Interface\", it is almost always in reference to our modern approach, in that we use HTTP to provide access to machine readable data in a JSON or XML format, often simply referred to as \"web APIs.\" APIs have been around almost as long as computing, but modern web APIs began taking shape in the early 2000s.}}</ref>\n\nThe [[Semantic Web]] proposed by Tim Berners-Lee in 2001 included \"semantic APIs\" that recasts the API as an [[Finance:Open innovation|open]], distributed data interface rather than a software behavior interface.<ref>{{cite journal |last1=Dotsika |first1=Fefie |date=August 2010 |title=Semantic APIs: Scaling up towards the Semantic Web |journal=International Journal of Information Management |volume=30 |issue=4 |pages=335\u2013342 |doi=10.1016/j.ijinfomgt.2009.12.003 }}</ref> [[Proprietary software|Proprietary]] interfaces and agents became more widespread than open ones, but the idea of the API as a data interface took hold. Because web APIs are widely used to exchange data of all kinds online, API has become a broad term describing much of the communication on the internet.<ref name=\"JinSahniShevat2018\" /> When used in this way, the term API has overlap in meaning with the term [[Communication protocol|communication protocol]].\n\n== Usage ==\n\n===Libraries and frameworks===\nThe interface to a [[Library (computing)|software library]] is one type of API. The API describes and prescribes the \"expected behavior\" (a specification) while the library is an \"actual implementation\" of this set of rules.\n\nA single API can have multiple implementations (or none, being abstract) in the form of different libraries that share the same programming interface.\n\nThe separation of the API from its implementation can allow programs written in one language to use a library written in another. For example, because [[Scala (programming language)|Scala]] and [[Java (programming language)|Java]] compile to compatible [[Software:Bytecode|bytecode]], Scala developers can take advantage of any Java API.<ref name=\"OderskySpoonVenners8\">{{Cite web |url=http://www.artima.com/pins1ed/combining-scala-and-java.html |title=Combining Scala and Java |last1=Odersky |first1=Martin |last2=Spoon |first2=Lex |date=10 December 2008 |website=artima.com |access-date=29 July 2016 |last3=Venners |first3=Bill}}</ref>\n\nAPI use can vary depending on the type of programming language involved.\nAn API for a [[Procedural programming|procedural language]] such as [[Lua (programming language)|Lua]] could consist primarily of basic routines to execute code, manipulate data or handle errors while an API for an [[Object-oriented programming|object-oriented language]], such as Java, would provide a specification of classes and its [[Class method|class method]]s.<ref>{{cite journal |last1=de Figueiredo |first1=Luiz Henrique |last2=Ierusalimschy |first2=Roberto |last3=Filho |first3=Waldemar Celes |title=The design and implementation of a language for extending applications |url=https://www.researchgate.net/publication/2778436 |journal=TeCGraf Grupo de Tecnologia Em Computacao Grafica |year=1994 |pages=273\u2013284 |citeseerx=10.1.1.47.5194 |s2cid=59833827 |access-date=29 July 2016}}</ref><ref name=\"Sintes16\">{{cite web |last1=Sintes |first1=Tony |date=2001-07-13 |df=dmy |url=https://www.infoworld.com/article/2077392/just-what-is-the-java-api-anyway.html |title=Just what is the Java API anyway? |website=JavaWorld |access-date=2020-07-18}}</ref> {{anchor|Hyrums}}Hyrum's law<ref>{{Cite book|editor-last=Winters|editor-first=Titus |title=Software engineering at Google: lessons learned from programming over time|date=2020|editor2=Tom Manshreck |editor3=Hyrum Wright|isbn=9781492082798 |location=Sebastopol, CA|oclc=1144086840 |publisher=O'Reilly Media }}</ref> states that \"With a sufficient number of users of an API, it does not matter what you promise in the contract: all observable behaviors of your system will be depended on by somebody.\" Meanwhile, several studies show that most applications that use an API tend to use a small part of the API.<ref>{{Cite conference |last1=Mastrangelo|first1=Luis|last2=Ponzanelli|first2=Luca|last3=Mocci|first3=Andrea|last4=Lanza|first4=Michele|last5=Hauswirth|first5=Matthias|last6=Nystrom|first6=Nathaniel|date=2015-10-23|title=Use at your own risk: the Java unsafe API in the wild |book-title=Proceedings of the 2015 ACM SIGPLAN International Conference on Object-Oriented Programming, Systems, Languages, and Applications|series=OOPSLA 2015|location=New York, NY, US|publisher=Association for Computing Machinery|pages=695\u2013710|doi=10.1145/2814270.2814313|isbn=978-1-4503-3689-5}}</ref>\n\n[[Language binding]]s are also APIs. By mapping the features and capabilities of one language to an interface implemented in another language, a language binding allows a library or service written in one language to be used when developing in another language.{{Citation needed|date=November 2023}}\n\nTools such as [[Software:SWIG|SWIG]] and F2PY, a [[Fortran]]-to-[[Python (programming language)|Python]] interface generator, facilitate the creation of such interfaces.<ref>{{Cite web |url=http://www.f2py.org/ |title=F2PY.org |publisher=F2PY.org |access-date=2011-12-18}}</ref>\n\nAn API can also be related to a software framework: a framework can be based on several libraries implementing several APIs, but unlike the normal use of an API, the access to the behavior built into the framework is mediated by extending its content with new classes plugged into the framework itself.\n\nMoreover, the overall program flow of control can be out of the control of the caller and in the framework's hands by [[Inversion of control|inversion of control]] or a similar mechanism.<ref>{{cite web\n|first = Martin\n|last = Fowler\n|title = Inversion Of Control\n|url = http://martinfowler.com/bliki/InversionOfControl.html\n}}\n</ref><ref>{{cite web\n|first = Mohamed\n|last = Fayad\n|title = Object-Oriented Application Frameworks\n|url = http://www.dre.vanderbilt.edu/~schmidt/CACM-frameworks.html\n}}\n</ref>\n\n===Operating systems===\nAn API can specify the interface between an application and the [[Operating system|operating system]].<ref name=\"Oreilly91\">{{Cite book |last=Lewine |first=Donald A. |url=http://shop.oreilly.com/product/9780937175736.do |title=POSIX Programmer's Guide |date=1991 |publisher=O'Reilly & Associates, Inc. |page=1 |isbn=9780937175736 |access-date=2 August 2016}}</ref> [[POSIX]], for example, provides a set of common API specifications that aim to enable an application written for a POSIX conformant operating system to be [[Compiler|compiled]] for another POSIX conformant operating system.\n\n[[Software:Linux|Linux]] and [[Software:Berkeley Software Distribution|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\u2013112 |doi=10.1007/PL00022278 |s2cid=46082812 |access-date=2 August 2016}}</ref>\n\n[[Company:Microsoft|Microsoft]] has shown a strong commitment to a backward-compatible API, particularly within its [[Software:Windows API|Windows API]] (Win32) library, so older applications may run on newer versions of Windows using an executable-specific setting called \"Compatibility Mode\".<ref>\n{{cite web\n |author=Microsoft\n |url=http://www.microsoft.com/windowsxp/using/helpandsupport/learnmore/appcompat.mspx\n |title=Support for Windows XP\n |publisher=Microsoft\n |page=4\n |date=October 2001\n |url-status=dead\n |archive-url=https://web.archive.org/web/20090926235439/http://www.microsoft.com/windowsxp/using/helpandsupport/learnmore/appcompat.mspx\n |archive-date=2009-09-26\n}}</ref>\n\nAn API differs from an [[Application binary interface|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|\nurl=http://www.linuxfoundation.org/collaborate/workgroups/lsb/lsb-introduction|\ntitle=LSB Introduction|\npublisher=Linux Foundation|\ndate=21 June 2012|\naccess-date=2015-03-27|\narchive-date=2015-04-02|\narchive-url=https://web.archive.org/web/20150402094250/http://www.linuxfoundation.org/collaborate/workgroups/lsb/lsb-introduction|\nurl-status=dead}}</ref><ref>{{cite web|\nfirst=Nick|\nlast=Stoughton|\nurl=https://db.usenix.org/publications/login/2005-04/openpdfs/standards2004.pdf|\ntitle=Update on Standards|\npublisher=[[Organization:USENIX|USENIX]]|date=April 2005|\naccess-date=2009-06-04}}</ref>\n\n===Remote APIs===\nRemote APIs allow developers to manipulate remote resources through protocols, specific standards for communication that allow different technologies to work together, regardless of language or platform.\nFor example, the Java Database Connectivity API allows developers to query many different types of [[Database|database]]s with the same set of functions, while the [[Java remote method invocation]] API uses the Java Remote Method Protocol to allow [[Remote procedure call|invocation]] of functions that operate remotely but appear local to the developer.<ref name=\"Bierhoff9\">{{Cite thesis |last=Bierhoff |first=Kevin |date=23 April 2009 |title=API Protocol Compliance in Object-Oriented Software |url=https://www.cs.cmu.edu/~kbierhof/thesis/bierhoff-thesis.pdf |type=PhD |publisher=Carnegie Mellon University |access-date=29 July 2016 |isbn=978-1-109-31660-5 |id={{ProQuest|304864018}} }}</ref><ref name=\"Wilson16\">{{cite web |last1=Wilson |first1=M. Jeff |date=2000-11-10 |df=dmy |url=https://www.infoworld.com/article/2076234/get-smart-with-proxies-and-rmi.html |title=Get smart with proxies and RMI |work=JavaWorld |access-date=2020-07-18}}</ref>\n\nTherefore, remote APIs are useful in maintaining the object abstraction in [[Object-oriented programming|object-oriented programming]]; a method call, executed locally on a [[Proxy pattern|proxy]] object, invokes the corresponding method on the remote object, using the remoting protocol, and acquires the result to be used locally as a return value.\n\nA modification of the proxy object will also result in a corresponding modification of the remote object.<ref name=\"AdvancedCorba\">{{cite book\n |last1        = Henning\n |first1       = Michi\n |last2       = Vinoski\n |first2      = Steve\n |year        = 1999\n |url         = https://archive.org/details/advancedcorbapro00henn\n |title       = Advanced CORBA Programming with C++\n |publisher   = Addison-Wesley\n |isbn        = 978-0201379273\n |url-access  = registration\n |access-date = 16 June 2015\n}}</ref>\n\n===Web APIs===\n{{Main|Web API}}\nWeb APIs are a service accessed from client devices (mobile phones, laptops, etc.) to a [[Web server|web server]] using the [[Hypertext Transfer Protocol]] (HTTP). Client devices send a request in the form of an HTTP request, and are met with a response message usually in JavaScript Object Notation ([[JSON]]) or Extensible Markup Language ([[XML]]) format. Developers typically use Web APIs to query a server for a specific set of data from that server.\n\nAn example might be a shipping company API that can be added to an eCommerce-focused website to facilitate ordering shipping services and automatically include current shipping rates, without the site developer having to enter the shipper's rate table into a web database. While \"web API\" historically has been virtually synonymous with web service, the recent trend (so-called [[Social:Web 2.0|Web 2.0]]) has been moving away from Simple Object Access Protocol ([[SOAP]]) based web services and [[Service-oriented architecture|service-oriented architecture]] (SOA) towards more direct [[Representational state transfer|representational state transfer]] (REST) style [[Web resource|web resource]]s and [[Resource-oriented architecture|resource-oriented architecture]] (ROA).<ref>{{cite web\n |first        = Djamal\n |last         = Benslimane\n |author2      = Schahram Dustdar\n |author3      = Amit Sheth\n |title        = Services Mashups: The New Generation of Web Applications\n |url          = http://dsonline.computer.org/portal/site/dsonline/menuitem.9ed3d9924aeb0dcd82ccc6716bbe36ec/index.jsp?&pName=dso_level1&path=dsonline/2008/09&file=w5gei.xml&xsl=article.xsl\n |work         = IEEE Internet Computing, vol. 12, no. 5\n |publisher    = Institute of Electrical and Electronics Engineers\n |pages        = 13\u201315\n |year         = 2008\n |access-date  = 2019-10-01\n |archive-url  = https://web.archive.org/web/20110928211221/http://dsonline.computer.org/portal/site/dsonline/menuitem.9ed3d9924aeb0dcd82ccc6716bbe36ec/index.jsp?&pName=dso_level1&path=dsonline%2F2008%2F09&file=w5gei.xml&xsl=article.xsl\n |archive-date = 2011-09-28\n |url-status   = dead\n}}</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|ontology engineering]] technologies. Web APIs allow the combination of multiple APIs into new applications known as [[Mashup (web application hybrid)|mashup]]s.<ref>{{citation\n |first       = James\n |last       = Niccolai\n |title       = So What Is an Enterprise Mashup, Anyway?\n |url       = https://www.pcworld.com/article/145039/so_what_is_an_enterprise_mashup_anyway.html\n |work       = PC World\n |date       = 2008-04-23\n }} </ref>\n\nIn the social media space, web APIs have allowed web communities to facilitate sharing content and data between communities and applications. In this way, content that is created in one place dynamically can be posted and updated to multiple locations on the web.<ref name=\"Parr16\">{{cite web|last1=Parr|first1=Ben|title=The Evolution of the Social Media API|url=http://mashable.com/2009/05/21/social-media-api/|website=Mashable|date=21 May 2009|access-date=26 July 2016}}\n</ref> For example, Twitter's REST API allows developers to access core Twitter data and the Search API provides methods for developers to interact with Twitter Search and trends data.<ref>{{Cite web|title=GET trends/place|url=https://developer.twitter.com/en/docs/trends/trends-for-location/api-reference/get-trends-place|website=developer.twitter.com|language=en|access-date=2020-04-30}}</ref>\n\n==Design==\nThe design of an API has a significant impact on its usage.<ref name=\"Clarke4\" /> First of all, the design of programming interfaces represents an important part of [[Software architecture|software architecture]], the organization of a complex piece of software.<ref name=\"GarlanShaw94\">{{Cite journal |last1=Garlan |first1=David |last2=Shaw |first2=Mary |date=January 1994 |title=An Introduction to Software Architecture |url=https://www.cs.cmu.edu/afs/cs/project/able/ftp/intro_softarch/intro_softarch.pdf |journal=Advances in Software Engineering and Knowledge Engineering |volume=1 |access-date=8 August 2016}}</ref> The principle of [[Information hiding|information hiding]] describes the role of programming interfaces as enabling [[Modular programming|modular programming]] by hiding the implementation details of the modules so that users of modules need not understand the complexities inside the modules.<ref name=\"Parnas72\">{{Cite journal |last=Parnas |first=D.L. |date=1972 |title=On the Criteria To Be Used in Decomposing Systems into Modules |journal=Communications of the ACM |volume=15 |issue=12 |pages=1053\u20131058 |doi=10.1145/361598.361623|s2cid=53856438 |doi-access=free }}</ref>\nAside from the previous underlying principle, other metrics for measuring the usability of an API may include properties such as functional efficiency, overall correctness, and learnability for novices.<ref>{{cite journal | url=https://dl.acm.org/doi/pdf/10.1145/2896587 | doi=10.1145/2896587 | title=Improving API usability | year=2016 | last1=Myers | first1=Brad A. | last2=Stylos | first2=Jeffrey | journal=Communications of the ACM | volume=59 | issue=6 | pages=62\u201369 | s2cid=543853 }}</ref> One straightforward and commonly adopted way of designing APIs is to follow Nielsen's heuristic evaluation guidelines. The [[Factory method pattern]] is also typical in designing APIs due to their reusable nature.<ref>Brian Ellis, Jeffrey Stylos, and Brad Myers. 2007. The Factory Pattern in API Design: A Usability Evaluation. In ''Proceedings of the 29th international conference on Software Engineering'' (''ICSE '07''). IEEE Computer Society, USA, 302\u2013312. DOI:https://doi.org/10.1109/ICSE.2007.85 http://www.cs.cmu.edu/~NatProg/papers/Ellis2007FactoryUsability.pdf</ref> Thus, the design of an API attempts to provide only the tools a user would expect.<ref name=\"Clarke4\" />\n\n=== Synchronous versus asynchronous ===\nAn application programming interface can be [[Asynchronous method invocation|synchronous or asynchronous]]. A synchronous API call is a design pattern where the call site is blocked while waiting for the called code to finish.<ref>[https://developer.cisco.com/docs/packaged-contact-center/#!synchronous-vs-asynchronous-writes Synchronous vs. Asynchronous Writes - Packaged Contact Center Enterprise - Document - Cisco DevNet]</ref> With an asynchronous API call, however, the call site is not blocked while waiting for the called code to finish, and instead the calling thread is notified when the reply arrives.\n\n==Security==\nAPI security is very critical when developing a public facing API. Common threats include [[SQL injection]], [[Denial-of-service attack]] (DoS), broken authentication, and exposing sensitive data.<ref>{{cite web |url=https://owasp.org/www-project-api-security/ |title=Global Cloud Microservices Market (2021 to 2026) |last=Silva |first=Paulo |date=2019 |access-date=2022-03-29}}</ref> Without ensuring proper security practices bad actors can get access to information they should not have or even gain privileges to make changes to your server. Some common security practices include proper connection security using [[HTTPS]], content security to mitigate data injection attacks,  and requiring an API key to use your service.<ref>{{cite web |url=https://developer.mozilla.org/en-US/docs/Web/Security |title=Web Security |date=2022-02-18 |access-date=2022-03-29}}</ref> Many public facing API services require you to use an assigned API key, and will refuse to serve data without sending the key with your request.<ref>{{Cite web |date=2022-03-01 |title=API Keys \u2013 What Is an API Key? {{!}} APILayer Blog |url=https://blog.apilayer.com/api-keys-what-is-an-api-key/ |access-date=2022-07-15 |language=en-US}}</ref>\n\n==Release policies==\nAPIs are one of the more common ways technology companies integrate. Those that provide and use APIs are considered as being members of a business ecosystem.<ref>{{cite web|\nlast=de Ternay|\nfirst=Guerric|\ntitle=Business Ecosystem: Creating an Economic Moat|\nurl=http://boostcompanies.com/business-ecosystem|\nwebsite=BoostCompanies|\ndate=Oct 10, 2015|\naccess-date=2016-02-01}}</ref>\n\nThe main policies for releasing an API are:<ref name=\"Boyd16\">{{Cite web |url=http://www.programmableweb.com/news/private-partner-or-public-which-api-strategy-best-business/2014/02/21 |title=Private, Partner or Public: Which API Strategy Is Best for Business? |last=Boyd |first=Mark |date=2014-02-21 |website=ProgrammableWeb |access-date=2 August 2016}}</ref>\n\n*<u>Private</u>: The API is for internal company use only.\n*<u>Partner</u>: Only specific business partners can use the API. For example, vehicle for hire companies such as [[Company:Uber|Uber]] and [[Company:Lyft|Lyft]] allow approved third-party developers to directly order rides from within their apps. This allows the companies to exercise quality control by curating which apps have access to the API and provides them with an additional revenue stream.<ref>{{Cite web |url=https://www.adexchanger.com/mobile/car-service-apis-everywhere-whats-partner-apps/ |title=Car Service APIs Are Everywhere, But What's In It For Partner Apps? |last=Weissbrot |first=Alison | website=AdExchanger |date=7 July 2016}}</ref>\n*<u>Public</u>: The API is available for use by the public. For example, [[Company:Microsoft|Microsoft]] makes the [[Software:Windows API|Windows API]] public, and [[Company:Apple Inc.|Apple]] releases its API Cocoa so that software can be written for their [[Computing platform|platforms]]. Not all public APIs are generally accessible by everybody. For example, Internet service providers like Cloudflare or Voxility, use RESTful APIs to allow customers and resellers access to their infrastructure information, DDoS stats, network performance, or dashboard controls.<ref name=\"Cloudflare\">{{Cite web |url=https://api.cloudflare.com/ |title=Cloudflare API v4 Documentation |date=25 February 2020 |website=cloudflare |access-date=27 February 2020}}</ref> Access to such APIs is granted either by \"API tokens\", or customer status validations.<ref name=\"SmashMagazine\">{{Cite web |url=https://www.smashingmagazine.com/2018/01/understanding-using-rest-api/ |title=Car Service APIs Are Everywhere, But What's In It For Partner Apps |last=Liew |first=Zell |date=17 January 2018 |website=Smashing Magazine |access-date=27 February 2020}}</ref>\n\n===Public API implications===\nAn important factor when an API becomes public is its \"interface stability\". Changes to the API\u2014for example adding new parameters to a function call\u2014could break compatibility with the clients that depend on that API.<ref name=\"researchgate.net\">{{Cite conference |last1=Shi |first1=Lin |url=https://www.researchgate.net/publication/225147411 |last2=Zhong |first2=Hao |last3=Xie |first3=Tao |last4=Li |first4=Mingshu |title=Fundamental Approaches to Software Engineering |chapter=An Empirical Study on Evolution of API Documentation |date=2011 |conference=International Conference on Fundamental Approaches to Software Engineering |isbn=978-3-642-19810-6 |series=Lecture Notes in Computer Science |volume=6603 |pages=416\u2013431 |doi=10.1007/978-3-642-19811-3_29 |access-date=22 July 2016 |doi-access=free }}</ref>\n\nWhen parts of a publicly presented API are subject to change and thus not stable, such parts of a particular API should be documented explicitly as \"unstable\". For example, in the [[Software:Google Guava|Google Guava]] library, the parts that are considered unstable, and that might change soon, are marked with the [[Java annotation]] <code>@Beta</code>.<ref>{{Cite web |url=https://code.google.com/p/guava-libraries/ |title=guava-libraries \u2013 Guava: Google Core Libraries for Java 1.6+ |website=Google Project Hosting |date=2014-02-04 |access-date=2014-02-11 |url-status=dead |archive-url=https://web.archive.org/web/20140326101728/https://code.google.com/p/guava-libraries/ |archive-date=Mar 26, 2014 }}</ref>\n\nA public API can sometimes declare parts of itself as ''deprecated'' or rescinded. This usually means that part of the API should be considered a candidate for being removed, or modified in a backward incompatible way. Therefore, these changes allow developers to transition away from parts of the API that will be removed or not supported in the future.<ref name=\"OracleDeprecation16\">{{Cite web |url=http://docs.oracle.com/javase/7/docs/technotes/guides/javadoc/deprecation/deprecation.html |title=How and When to Deprecate APIs |last=Oracle |website=Java SE Documentation |access-date=2 August 2016}}</ref>\n\nOn February 19, 2020, [[Company:Akamai Technologies|Akamai]] published their annual \"State of the Internet\" report, showcasing the growing trend of cybercriminals targeting public API platforms at financial services worldwide. From December 2017 through November 2019, Akamai witnessed 85.42 billion credential violation attacks. About 20%, or 16.55 billion, were against hostnames defined as API endpoints. Of these, 473.5 million have targeted financial services sector organizations.<ref name=\"VentureBeat\">{{Cite web |url=https://venturebeat.com/2020/02/19/akamai-cybercriminals-are-attacking-apis-at-financial-services-firms/ |title=Akamai: Cybercriminals are attacking APIs at financial services firms |last=Takanashi |first=Dean |date=19 February 2020 |website=Venture Beat |access-date=27 February 2020}}</ref>\n\n==Documentation==\nAPI documentation describes the services an API offers and how to use those services, aiming to cover everything a client would need to know for practical purposes.\n\nDocumentation is crucial for the development and maintenance of applications using the API.<ref name=\"DekelHerbsleb9\">{{Cite journal |last1=Dekel |first1=Uri |last2=Herbsleb |first2=James D. |date=May 2009 |title=Improving API Documentation Usability with Knowledge Pushing |journal=Institute for Software Research, School of Computer Science |citeseerx=10.1.1.446.4214}}</ref>\nAPI documentation is traditionally found in documentation files but can also be found in social media such as blogs, forums, and Q&A websites.<ref name=\"ParninTreude11\">{{Cite book |last1=Parnin |first1=Chris |last2=Treude |first2=Cristoph |title=Web2SE '11: Proceedings of the 2nd International Workshop on Web 2.0 for Software Engineering |chapter=Measuring API documentation on the web |date=May 2011 |pages=25\u201330 |doi=10.1145/1984701.1984706 |isbn=9781450305952 |s2cid=17751901}}</ref>\n\nTraditional documentation files are often presented via a documentation system, such as Javadoc or Pydoc, that has a consistent appearance and structure.\nHowever, the types of content included in the documentation differ from API to API.<ref name=\"MaalejRobillard12\">{{Cite journal |last1=Maalej |first1=Waleed |last2=Robillard |first2=Martin P. |date=April 2012 |title=Patterns of Knowledge in API Reference Documentation |url=https://mobis.informatik.uni-hamburg.de/wp-content/uploads/2013/03/TSE-2012-04-0081.R2_Maalej.pdf |journal=IEEE Transactions on Software Engineering |access-date=22 July 2016}}</ref>\n\nIn the interest of clarity, API documentation may include a description of classes and methods in the API as well as \"typical usage scenarios, code snippets, design rationales, performance discussions, and contracts\", but implementation details of the API services themselves are usually omitted.\n\nReference documentation for a REST API can be generated automatically from an OpenAPI document, which is a machine-readable text file that uses a prescribed format and syntax defined in the [[OpenAPI Specification]]. The OpenAPI document defines basic information such as the API's name and description, as well as describing operations the API provides access to.<ref>{{Cite web |title=Structure of an OpenAPI Document |url=https://oai.github.io/Documentation/specification-structure.html |access-date=2022-11-06 |website=OpenAPI Documentation |language=en-US}}</ref>\n\nAPI documentation can be enriched with metadata information like [[Java annotation]]s. This metadata can be used by the compiler, tools, and by the ''run-time'' environment to implement custom behaviors or custom handling.<ref>{{Cite web |url=http://download.oracle.com/javase/1,5.0/docs/guide/language/annotations.html |title=Annotations |publisher=[[Company:Sun Microsystems|Sun Microsystems]] |access-date=2011-09-30 |archive-url=https://web.archive.org/web/20110925021948/http://download.oracle.com/javase/1,5.0/docs/guide/language/annotations.html |archive-date=2011-09-25 |url-status=dead }}.</ref>\n\n==Dispute over copyright protection for APIs==\n\nIn 2010, Oracle Corporation sued Google for having distributed a new implementation of Java embedded in the Android operating system.<ref>{{Cite web |url=http://www.drdobbs.com/jvm/232901227 |title=Oracle and the End of Programming As We Know It |date=2012-05-01 |publisher=DrDobbs |access-date=2012-05-09}}</ref> Google had not acquired any permission to reproduce the Java API, although permission had been given to the similar OpenJDK project. Google had approached Oracle to negotiate a license for their API, but were turned down due to trust issues. Despite the disagreement, Google chose to use Oracle's code anyway. Judge William Alsup ruled in the ''Oracle v. Google'' case that APIs cannot be copyrighted in the U.S and that a victory for Oracle would have widely expanded copyright protection to a \"functional set of symbols\" and allowed the copyrighting of simple software commands:\n\n{{blockquote|To accept Oracle's claim would be to allow anyone to copyright one version of code to carry out a system of commands and thereby bar all others from writing its different versions to carry out all or part of the same commands.<ref>{{Cite web |url=http://www.tgdaily.com/business-and-law-features/63756-apis-cant-be-copyrighted-says-judge-in-oracle-case |title=APIs Can't be Copyrighted Says Judge in Oracle Case |date=2012-06-01 |publisher=TGDaily |access-date=2012-12-06}}</ref><ref>{{cite web\n | url = https://www.wired.com/wiredenterprise/wp-content/uploads/2012/05/Judge-Alsup-Ruling-on-Copyrightability-of-APIs.pdf\n | title = ''Oracle America, Inc. vs. Google Inc.''\n | date = 2012-05-31 | access-date = 2013-09-22\n | publisher = Wired\n}}</ref>}}\n\nAlsup's ruling was overturned in 2014 on appeal to the Court of Appeals for the Federal Circuit, though the question of whether such use of APIs constitutes [[Social:Fair use|fair use]] was left unresolved.<ref>{{Cite web|title=Oracle Am., Inc. v. Google Inc., No. 13-1021, Fed. Cir. 2014|url=https://law.justia.com/cases/federal/appellate-courts/cafc/13-1021/13-1021-2014-05-09.html|url-status=live|archive-url=https://web.archive.org/web/20141010070718/http://law.justia.com:80/cases/federal/appellate-courts/cafc/13-1021/13-1021-2014-05-09.html |archive-date=2014-10-10 }}</ref><ref>{{Cite news |last=Rosenblatt, Seth |url=https://www.cnet.com/news/court-sides-with-oracle-over-android-in-java-patent-appeal/ |title=Court sides with Oracle over Android in Java patent appeal |date=May 9, 2014 |work=CNET |access-date=2014-05-10}}</ref>\n\nIn 2016, following a two-week trial, a jury determined that Google's reimplementation of the Java API constituted [[Social:Fair use|fair use]], but Oracle vowed to appeal the decision.<ref>{{Cite web |url=https://arstechnica.com/tech-policy/2016/05/google-wins-trial-against-oracle-as-jury-finds-android-is-fair-use/ |title=Google beats Oracle \u2013 Android makes \"fair use\" of Java APIs |date=2016-05-26 |website=Ars Technica |access-date=2016-07-28}}</ref> Oracle won on its appeal, with the Court of Appeals for the Federal Circuit ruling that Google's use of the APIs did not qualify for fair use.<ref name=\"bbn march2018\">{{Cite web |url=https://www.bloomberg.com/news/articles/2018-03-27/oracle-wins-revival-of-billion-dollar-case-against-google |title=Oracle Wins Revival of Billion-Dollar Case Against Google |last=Decker |first=Susan |date=March 27, 2018 |website=Bloomberg Businessweek |access-date=March 27, 2018}}</ref> In 2019, Google appealed to the Supreme Court of the United States over both the copyrightability and fair use rulings, and the Supreme Court granted review.<ref name=\"ars Jan2019\">{{Cite web |url=https://arstechnica.com/tech-policy/2019/01/google-asks-supreme-court-to-overrule-disastrous-ruling-on-api-copyrights/ |title=Google asks Supreme Court to overrule disastrous ruling on API copyrights |last=Lee |first=Timothy |date=January 25, 2019 |website=[[Ars Technica]] |access-date=February 8, 2019}}</ref> Due to the COVID-19 pandemic, the oral hearings in the case were delayed until October 2020.<ref>{{Cite web|last=vkimber|date=2020-09-28|title=Google LLC v. Oracle America, Inc.|url=https://www.law.cornell.edu/supct/cert/18-956|access-date=2021-03-06|website=LII / Legal Information Institute|language=en}}</ref>\n\nThe case was decided by the Supreme Court in Google's favor with a ruling of 6\u20132. Justice Stephen Breyer delivered the opinion of the court and at one point mentioned that \"The declaring code is, if copyrightable at all, further than are most computer programs from the core of copyright.\" This means the code used in APIs are more similar to dictionaries than novels in terms of copyright protection.<ref>{{Cite web|date=April 5, 2021|title=Supreme Court of the United States, No. 18\u2013956, GOOGLE LLC, PETITIONER v. ORACLE AMERICA, INC.|url=https://www.supremecourt.gov/opinions/20pdf/18-956_d18f.pdf}}</ref>\n\n== Examples ==\n\n{{Div col}}\n* ASPI for [[Engineering:SCSI|SCSI]] device interfacing\n* Cocoa and Carbon for the [[Engineering:Macintosh|Macintosh]]\n* [[Software:DirectX|DirectX]] for [[Software:Microsoft Windows|Microsoft Windows]]\n* [[EHLLAPI]]\n* [[Software:List of Java APIs|Java APIs]]\n* [[Open Database Connectivity|ODBC]] for [[Software:Microsoft Windows|Microsoft Windows]]\n* [[Software:OpenAL|OpenAL]] cross-platform sound API\n* [[OpenCL]] cross-platform API for general-purpose computing for CPUs & GPUs\n* [[Software:OpenGL|OpenGL]] cross-platform graphics API\n* [[Software:OpenMP|OpenMP]] API that supports multi-platform shared memory multiprocessing programming in C, C++, and Fortran on many architectures, including Unix and Microsoft Windows platforms.\n* [[Server application programming interface]] (SAPI)\n* [[Software:Simple DirectMedia Layer|Simple DirectMedia Layer]] (SDL)\n{{Div col end}}\n\n==See also==\n{{Div col|colwidth=20em}}\n* [[API testing]]\n* [[API writer]]\n* [[Augmented web]]\n* [[Calling convention]]\n* [[Common Object Request Broker Architecture]] (CORBA)\n* Comparison of application virtual machines\n* [[Document Object Model]] (DOM)\n* [[Double-chance function]]\n* [[Foreign function interface]]\n* [[Front and back ends]]\n* [[Interface (computing)]]\n* [[Interface control document]]\n* List of 3D graphics APIs\n* [[Microservices]]\n* [[Name mangling]]\n* [[Open API]]\n* Open Service Interface Definitions\n* [[Parsing]]\n* [[Plug-in (computing)|Plugin]]\n* [[Software:RAML|RAML]]\n* [[Software development kit]] (SDK)\n* [[Company:Structured Financial Messaging System|Structured Financial Messaging System]]\n* [[Web API]]\n* [[Web content vendor]]\n* [[XPCOM]]\n{{Div col end}}\n\n== References ==\n{{Reflist}}\n\n==Further reading==\n* {{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 \"APIs are far from neutral tools\" and form a key part of contemporary programming, understood as a fundamental part of culture.\n* [https://www.supremecourt.gov/opinions/20pdf/18-956_d18f.pdf  What is an API?] \u2013 in the U.S. Supreme Court opinion, ''[[Google LLC v. Oracle America, Inc.|Google v. Oracle 2021]]'', pp.&nbsp;3\u20137 \u2013 \"For each task, there is [[Computer code|computer code]]; API (also known as Application Programming Interface) is the method for calling that '[[Computer code|computer code]]' (instruction \u2013 like a [[Philosophy:Recipe|recipe]] \u2013 rather than cooking instruction, this is [[Computer|machine]] instruction) to be carry out\"\n* [http://ondrejka.net/history/2014/02/28/maury.html Maury, Innovation and Change] \u2013 Cory Ondrejka, February 28, 2014, \" ...proposed a public API to let computers talk to each other\". ([https://www.textise.net/showText.aspx?strURL=http://ondrejka.net/history/2014/02/28/maury.html Textise] URL)\n\n==External links==\n* [https://go.forrester.com/what-it-means/ep218-google-oracle-api-case/  Forrester : IT industry : API Case : Google v. Oracle] \u2013 May 20, 2021 \u2013 content format: Audio with text \u2013 length 26:41\n\n{{Operating system}}\n\n[[Category:Application programming interfaces| ]]\n[[Category:Technical communication]]\n\n{{Sourceattribution|API}}"
                            }
                        },
                        "comment": "fixing"
                    }
                ]
            },
            "1": {
                "pageid": 1,
                "ns": 0,
                "title": "Main Page",
                "revisions": [
                    {
                        "user": "Jworkorg",
                        "timestamp": "2022-09-10T04:25:32Z",
                        "slots": {
                            "main": {
                                "contentmodel": "wikitext",
                                "contentformat": "text/x-wiki",
                                "*": "<strong>MediaWiki has been installed.</strong>\n\n<syntaxhighlight lang=\"php\">\n<?php\n// some php code\n</syntaxhighlight>\n\nThis is a testasa \n\nConsult the [https://www.mediawiki.org/wiki/Special:MyLanguage/Help:Contents User's Guide] for information on using the wiki software.\n\n== Getting started ==\n* [https://www.mediawiki.org/wiki/Special:MyLanguage/Manual:Configuration_settings Configuration settings list]\n* [https://www.mediawiki.org/wiki/Special:MyLanguage/Manual:FAQ MediaWiki FAQ]\n* [https://lists.wikimedia.org/postorius/lists/mediawiki-announce.lists.wikimedia.org/ MediaWiki release mailing list]\n* [https://www.mediawiki.org/wiki/Special:MyLanguage/Localisation#Translation_resources Localise MediaWiki for your language]\n* [https://www.mediawiki.org/wiki/Special:MyLanguage/Manual:Combating_spam Learn how to combat spam on your wiki]"
                            }
                        },
                        "comment": ""
                    }
                ]
            }
        }
    }
}