<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://www.mediawiki.org/w/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=207.191.199.140</id>
	<title>MediaWiki - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://www.mediawiki.org/w/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=207.191.199.140"/>
	<link rel="alternate" type="text/html" href="https://www.mediawiki.org/wiki/Special:Contributions/207.191.199.140"/>
	<updated>2026-08-23T01:50:53Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.47.0-wmf.16</generator>
	<entry>
		<id>https://www.mediawiki.org/w/index.php?title=API_versioning&amp;diff=6003304</id>
		<title>API versioning</title>
		<link rel="alternate" type="text/html" href="https://www.mediawiki.org/w/index.php?title=API_versioning&amp;diff=6003304"/>
		<updated>2023-06-26T11:19:31Z</updated>

		<summary type="html">&lt;p&gt;207.191.199.140: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;languages/&amp;gt;&lt;br /&gt;
{{Deprecation policies}}&lt;br /&gt;
This page describes the API versioning policy for the Wikimedia [[REST API|REST APIs]], which are documented at [https://en.wikipedia.org/api/rest_v1/?doc /api/rest_v1/?doc] for each wiki.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&lt;br /&gt;
== Global API version == &amp;lt;!--T:1--&amp;gt;&lt;br /&gt;
&amp;lt;/translate&amp;gt;&lt;br /&gt;
The global API version is part of the path.&lt;br /&gt;
Example: &amp;lt;code&amp;gt;/v1/&amp;lt;/code&amp;gt;.&lt;br /&gt;
Following the principles of [http://semver.org/ semantic versioning], it is incremented when a &#039;&#039;&#039;stable end point&#039;&#039;&#039; is changed in a backwards-incompatible manner.&lt;br /&gt;
For the global version, we consider changes breaking if stable end points are removed, or the request structure changes in incompatible ways.&lt;br /&gt;
Content types are versioned using content negotiation, and do not trigger global version increments.&lt;br /&gt;
Since the introduction of a new major API version is a very disruptive event, we try hard to avoid breaking stable end points.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&lt;br /&gt;
== End point stability == &amp;lt;!--T:2--&amp;gt;&lt;br /&gt;
&amp;lt;/translate&amp;gt;&lt;br /&gt;
Each API end point is marked with a stability class: &#039;&#039;Stable&#039;&#039;, &#039;&#039;unstable&#039;&#039;, &#039;&#039;experimental&#039;&#039; or &#039;&#039;deprecated&#039;&#039;.&lt;br /&gt;
Typically, API end points start out as experimental or unstable, and over time graduate to become part of the stable API.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&lt;br /&gt;
=== Stable === &amp;lt;!--T:3--&amp;gt;&lt;br /&gt;
&amp;lt;/translate&amp;gt;&lt;br /&gt;
Stable end points are guaranteed to not change in incompatible ways.&lt;br /&gt;
This means that you can be sure that the basic interface as documented by the spec will continue to work as described.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&lt;br /&gt;
=== Unstable === &amp;lt;!--T:4--&amp;gt;&lt;br /&gt;
&amp;lt;/translate&amp;gt;&lt;br /&gt;
End points marked as unstable can change in incompatible ways without incrementing the &#039;&#039;major&#039;&#039; API version, but they will increment minor versions.&lt;br /&gt;
We will reach out to users and make a concerted effort to avoid breaking existing consumers.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&lt;br /&gt;
=== [[Extension Matrix/experimental|Experimental]] === &amp;lt;!--T:5--&amp;gt;&lt;br /&gt;
&amp;lt;/translate&amp;gt;&lt;br /&gt;
Experimental end points can change in incompatible ways at any time, without incrementing the API version.&lt;br /&gt;
You are welcome to use them at your own risk.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&lt;br /&gt;
=== Deprecated === &amp;lt;!--T:6--&amp;gt;&lt;br /&gt;
&amp;lt;/translate&amp;gt;&lt;br /&gt;
If an end point is marked as deprecated, it means that it has not been useful to clients and will consequently be removed in the near future.&lt;br /&gt;
If your code is using such an end point, you should stop using it as soon as possible.&lt;br /&gt;
We will always make sure to provide users with alternative ways of obtaining the same information.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&lt;br /&gt;
== Content format stability and negotiation == &amp;lt;!--T:7--&amp;gt;&lt;br /&gt;
&amp;lt;/translate&amp;gt;&lt;br /&gt;
Changes in the structure of the returned content will be clearly indicated by a change in the profile part of the mime type:&lt;br /&gt;
 text/html; charset=utf-8; profile=&amp;quot;[[Specs/HTML/2.0.0|https://www.mediawiki.org/wiki/Specs/HTML/2.0.0]]&amp;quot;&lt;br /&gt;
For longer-term output format stability, you should send an &amp;lt;code&amp;gt;Accept&amp;lt;/code&amp;gt; header with the mime type you expect:&lt;br /&gt;
 Accept: text/html; charset=utf-8; profile=&amp;quot;&amp;lt;nowiki&amp;gt;https://www.mediawiki.org/wiki/Specs/HTML/2.0.0&amp;lt;/nowiki&amp;gt;&amp;quot;&lt;br /&gt;
In case of output format changes, the API will then continue to respond with the requested format (subject to semantic versioning protocol, see below), even if a newer format is available.&lt;br /&gt;
Support for old output formats will normally be maintained until usage drops below a low threshold.&lt;br /&gt;
Phased-out formats will be announced with ample warning on [[mail:mediawiki-api-announce|the API-announce list]].&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&lt;br /&gt;
=== Background: How we interpret semver in format negotiations === &amp;lt;!--T:8--&amp;gt;&lt;br /&gt;
&amp;lt;/translate&amp;gt;&lt;br /&gt;
Our profile URLs generally end with a version number based on the [http://semver.org/ semver semantic versioning scheme].&lt;br /&gt;
In semantic versioning, all backwards-incompatible changes trigger an increment of the major version number (ex: 1.2.1 to 2.0.0).&lt;br /&gt;
As the goal of our format negotiation mechanism is to avoid breaking clients, this is what we are focusing on.&lt;br /&gt;
Clients are encouraged to provide the exact version they tested with, but the API will typically return the &#039;&#039;&#039;&#039;&#039;latest&#039;&#039;&#039;&#039;&#039; content-type that is compatible with the requested &#039;&#039;&#039;&#039;&#039;major&#039;&#039;&#039;&#039;&#039; version More specifically, we will return the latest minor version compatible with the requested major version, but won&#039;t make guarantees about the returned patch version for performance reasons.&lt;br /&gt;
&lt;br /&gt;
The exact protocol is:&lt;br /&gt;
&lt;br /&gt;
# If client-requested version is matching semver &#039;&#039;major&#039;&#039; version and has lower &#039;&#039;minor&#039;&#039; version then stored - return stored content&lt;br /&gt;
# If the client-requested version is semver &#039;&#039;major&#039;&#039; or &#039;&#039;minor&#039;&#039; greater then stored version - update the content&lt;br /&gt;
## If updated content is matching requested &#039;&#039;major&#039;&#039; version and has higher or equal &#039;&#039;minor&#039;&#039; version - return&lt;br /&gt;
## If updated content has lower &#039;&#039;major&#039;&#039; or &#039;&#039;minor&#039;&#039; version - return 406 error&lt;br /&gt;
## If updated content has higher major version - go to point 3.&lt;br /&gt;
# If requested version is semver &#039;&#039;major&#039;&#039; lower then stored - transform content to downgrade.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&lt;br /&gt;
== See also == &amp;lt;!--T:9--&amp;gt;&lt;br /&gt;
&amp;lt;/translate&amp;gt;&lt;br /&gt;
* The [[Specs|Specs page hierarchy on this wiki]] documents versioned content formats.&lt;br /&gt;
* See this [[Phab:T124365|RFC discussion]] as well as [[Talk:API versioning|this section of this article&#039;s talk page]] for background on how we arrived at the format versioning strategy outlined here.&lt;br /&gt;
&lt;br /&gt;
[[Category:MediaWiki development{{#translation:}}]]&lt;/div&gt;</summary>
		<author><name>207.191.199.140</name></author>
	</entry>
</feed>