diff --git a/content/en/api/versions.md b/content/en/api/versions.md new file mode 100644 index 0000000000..51f6e58287 --- /dev/null +++ b/content/en/api/versions.md @@ -0,0 +1,47 @@ +--- +title: API Versions +description: How to detect new features within the Mastodon API. +menu: + docs: + weight: 40 + parent: api +--- + +Since Mastodon version 4.3.0, the [Instance Details]({{< relref "methods/instance#v2" >}}) endpoint has returned a property indicating the Mastodon API Version, which is separate from the release number, and is just an integer that can be used to detect the presence of new methods or properties on the Mastodon API. + +```json +// GET /api/v2/instance +{ + // ... + "api_versions": { + "mastodon": 5, + }, + // ... +} +``` + +## Changelog +### Version 1 + +- *None* + +### Version 2 + +- Grouped notifications API: https://github.com/mastodon/mastodon/pull/31840 + +### Version 3 + +- API for updating attribution domains: https://github.com/mastodon/mastodon/pull/32730 + +### Version 4 + +- Media deletion methods: https://github.com/mastodon/mastodon/pull/34035 + +### Version 5 + +- `blur` filter for media attachments: + https://github.com/mastodon/mastodon/pull/34256 + +--- + +When the Mastodon API gains new features in the future, this version number will be updated, and this page updated accordingly. \ No newline at end of file diff --git a/content/en/methods/instance.md b/content/en/methods/instance.md index c144af958b..5f1197fb77 100644 --- a/content/en/methods/instance.md +++ b/content/en/methods/instance.md @@ -29,7 +29,8 @@ Obtain general information about the server. **OAuth:** Public\ **Version history:**\ 4.0.0 - added\ -4.3.0 - added `configuration.vapid.public_key` +4.3.0 - added `configuration.vapid.public_key`\ +4.3.0 - added `api_versions.mastodon`, see [API Versions]({{< relref "api/versions" >}}) and [Instance]({{< relref "entities/Instance#api_versions" >}}) for more info. #### Response @@ -144,6 +145,9 @@ Obtain general information about the server. "approval_required": false, "message": null }, + "api_versions": { + "mastodon": 5 + }, "contact": { "email": "staff@mastodon.social", "account": {