You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
When developing an app meant to support several different Discord API implementations, sometimes on different versions, it would be very useful to be able to easily find the software you're working with and its version.
Why? Sometimes issues only arise only on one implementation, an implementation has extra features or a bug is found in an implementation. Even after bugs are fixed administrators do not update immediately and instances still run faulty versions. Knowing if you're working with a server on an affected version means the difference between your app working and crashing.
Describe the solution you'd like
A new route along the lines of /api/version, which returns the server's software (spacebar) and its version.
A return schema may look like this:
{
"version": "0.2.1",
"server": "spacebar"
}
(Other server implementations could then simply change the "server" field to identify themselves)
Describe alternatives you've considered
Why .well-known is not enough
As a convention, .well-known/spacebar does exist (though not always), but that doesn't expose the server version and is only available on the base url (http://spacebar.chat/.well-known/spacebar exists, but http://old.server.spacebar.chat/.well-known/spacebar or http://old.server.spacebar.chat/api/.well-known/spacebar do not - and apps may only have the api url, not the base url)
Other viable alternatives
Spacebar already has the route /api/ping, which could also be updated to add this version information
the route /api/policies/instance/ could also include this information
However, adding a new route is preferable to changing an existing one - this would break existing apps relying on the old schema and new apps expecting them to have the new fields on old instances
Is your feature request related to a problem? Please describe.
When developing an app meant to support several different Discord API implementations, sometimes on different versions, it would be very useful to be able to easily find the software you're working with and its version.
Why? Sometimes issues only arise only on one implementation, an implementation has extra features or a bug is found in an implementation. Even after bugs are fixed administrators do not update immediately and instances still run faulty versions. Knowing if you're working with a server on an affected version means the difference between your app working and crashing.
Describe the solution you'd like
A new route along the lines of
/api/version
, which returns the server's software (spacebar) and its version.A return schema may look like this:
(Other server implementations could then simply change the "server" field to identify themselves)
Describe alternatives you've considered
Why .well-known is not enough
As a convention,
.well-known/spacebar
does exist (though not always), but that doesn't expose the server version and is only available on the base url (http://spacebar.chat/.well-known/spacebar
exists, buthttp://old.server.spacebar.chat/.well-known/spacebar
orhttp://old.server.spacebar.chat/api/.well-known/spacebar
do not - and apps may only have the api url, not the base url)Other viable alternatives
However, adding a new route is preferable to changing an existing one - this would break existing apps relying on the old schema and new apps expecting them to have the new fields on old instances
Additional context
This was also discussed in the spacebar guild, see https://discord.com/channels/806142446094385153/806142446529806367/1289269996404473959
The text was updated successfully, but these errors were encountered: