Is it important to add a version number to the API endpoint name?

Options

Hi all,

I am looking at best practices for API naming and many forums indicate to place a version number with the name.

eg: /v1/subscribers/details

Is this important / worthy to implement as it adds more characters to each API name?

Or OK to leave out for most applications?

Tagged:

Answers

  • Cameron B
    Cameron B Member, Administrator

    ADMIN

    Options

    I think it depends on personal preference, as well as business goals that you may have. I think in terms of segmenting API endpoints for organization, it is important, and this is a great method to achieve that.

    However, is it necessary? Probably not. Are you going to be making your endpoints public, or are you creating an API for public use? Will this API be built upon, or will a new version of it be created in the future?

    Ultimately, to summarize, it's completely up to you, and it depends on your business needs.

    For me, I have used prefixes such as the version in certain projects, and in others, I just use the default CRUD endpoints that Xano creates for us.

    Maybe others have some insight they'd like to contribute, but this is my answer :)

  • KenJ
    KenJ Member
    Options

    Thanks @Cameron B,

    I have no plans to make my endpoints public, only used by my Weweb fronend.

    As for what the API would be built on, this is my first commercial release ambition and trying to work through the staging and production best practices.

    I am trying to realease the first version that is quite good but expect to keep improving the API's over time but do have complete control over the front and back ends.

    So at this time I might dispense with versioning.

    Thanking you