Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[feature] api_versions entry for /api/v2/instance #3466

Open
GeopJr opened this issue Oct 20, 2024 · 0 comments
Open

[feature] api_versions entry for /api/v2/instance #3466

GeopJr opened this issue Oct 20, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@GeopJr
Copy link

GeopJr commented Oct 20, 2024

Is your feature request related to a problem ?

As more unique features get added to GoToSocial, it'd be nice to have some way for clients to keep track of API changes and features outside of nodeinfo. For example, for the interaction limits, there's no way of knowing if they are supported without either checking nodeinfo or by using the api and checking if it fails.

Additionally, as Mastodon and GTS move at different speeds, it'd be nice to also display what version of Mastodon's API is supported.

Describe the solution you'd like.

The latest Mastodon version, added an api_versions entry in /api/v2/instance. It's a String => Int object, so other software (like GTS) can add their own api versions:

"api_versions": {
    "mastodon": 1,
    "gotosocial": 1
},

Something to consider however is how often it should be bumped, especially when GTS is still beta. Mastodon is already on version 2, between api_versions getting merged and released.

IMO, "mastodon": 1 (or 2), should probably be added when GTS supports all Mastodon 4.3 APIs, which might be less than ideal if stuff like 'notifications filters' never make it in.

Describe alternatives you've considered.

From my side, the alternatives mentioned in the first text input (nodeinfo, try the API).

An alternative to api_versions, could be *oma's pleroma.metadata.features entry, which lists all features it supports:

  "pleroma": {
    "metadata": {
      "features": [
        "pleroma_api",
        "akkoma_api",
        "mastodon_api",
        "mastodon_api_streaming",
        "polls",
        "v2_suggestions",
        "pleroma_explicit_addressing",
        "shareable_emoji_packs",
        "multifetch",
        "pleroma:api/v1/notifications:include_types_filter",
        "quote_posting",
        "editing",
        "bubble_timeline",
        "media_proxy",
        "pleroma_emoji_reactions",
        "exposable_reactions",
        "profile_directory",
        "akkoma:machine_translation",
        "custom_emoji_reactions",
        "pleroma:get:main/ostatus"
      ],
    },
  }

Additional context.

There are some interesting takes on the Mastodon PR mastodon/mastodon#31354

@GeopJr GeopJr added the enhancement New feature or request label Oct 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant