Salta al contenuto
0
  • Home
  • Piero Bosio
  • Blog
  • Mondo
  • Fediverso
  • News
  • Categorie
  • Old Web Site
  • Recenti
  • Popolare
  • Tag
  • Utenti
  • Home
  • Piero Bosio
  • Blog
  • Mondo
  • Fediverso
  • News
  • Categorie
  • Old Web Site
  • Recenti
  • Popolare
  • Tag
  • Utenti
Skin
  • Chiaro
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Scuro
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Predefinito (Nessuna skin)
  • Nessuna skin
Collassa

Piero Bosio Social Web Site Personale Logo Fediverso

Social Forum federato con il resto del mondo. Non contano le istanze, contano le persone
  1. Home
  2. Categorie
  3. General Discussion
  4. On a fediverse server with a versioned client API, what would you expect to happen if an API call is made with a version number higher than what the server supports?

On a fediverse server with a versioned client API, what would you expect to happen if an API call is made with a version number higher than what the server supports?

Pianificato Fissato Bloccato Spostato General Discussion
smithereenactivitypubmastodev
8 Post 6 Autori 48 Visualizzazioni
  • Da Vecchi a Nuovi
  • Da Nuovi a Vecchi
  • Più Voti
Rispondi
  • Risposta alla discussione
Effettua l'accesso per rispondere
Questa discussione è stata eliminata. Solo gli utenti con diritti di gestione possono vederla.
  • grishka@mastodon.social
    grishka@mastodon.social
    grishka@mastodon.social
    scritto su ultima modifica di
    #1

    On a fediverse server with a versioned client API, what would you expect to happen if an API call is made with a version number higher than what the server supports? Should it return an error? Should it take it to mean its highest supported version? Something else?

    The API isn't RESTful, the version number is global for all methods (endpoints) and has the format "major.minor".

    #Smithereen #ActivityPub #mastodev

    mro@digitalcourage.social nikclayton@mastodon.social rimu@piefed.social 3 Risposte Ultima Risposta
    1
    0
    • julian@activitypub.space julian@activitypub.space ha condiviso questa discussione su
    • grishka@mastodon.social grishka@mastodon.social

      On a fediverse server with a versioned client API, what would you expect to happen if an API call is made with a version number higher than what the server supports? Should it return an error? Should it take it to mean its highest supported version? Something else?

      The API isn't RESTful, the version number is global for all methods (endpoints) and has the format "major.minor".

      #Smithereen #ActivityPub #mastodev

      mro@digitalcourage.social
      mro@digitalcourage.social
      mro@digitalcourage.social
      scritto su ultima modifica di
      #2

      Hi @grishka,
      using highest sounds like best effort and makes most sense to me.

      grishka@mastodon.social 1 Risposta Ultima Risposta
      0
      • mro@digitalcourage.social mro@digitalcourage.social

        Hi @grishka,
        using highest sounds like best effort and makes most sense to me.

        grishka@mastodon.social
        grishka@mastodon.social
        grishka@mastodon.social
        scritto su ultima modifica di
        #3

        @mro but what if there are incompatible changes that the app doesn't expect? Like some object having a different format, or some method behaving differently

        1 Risposta Ultima Risposta
        0
        • grishka@mastodon.social grishka@mastodon.social

          On a fediverse server with a versioned client API, what would you expect to happen if an API call is made with a version number higher than what the server supports? Should it return an error? Should it take it to mean its highest supported version? Something else?

          The API isn't RESTful, the version number is global for all methods (endpoints) and has the format "major.minor".

          #Smithereen #ActivityPub #mastodev

          nikclayton@mastodon.social
          nikclayton@mastodon.social
          nikclayton@mastodon.social
          scritto su ultima modifica di
          #4

          @grishka Return an error that tells the client it's used an unsupported version.

          By definition, the server does not know the semantics of the call the client made, so trying to guess and return something in the hope it's correct takes us out of the realm of engineering and into clairvoyance.

          julian@activitypub.space 1 Risposta Ultima Risposta
          0
          • nikclayton@mastodon.social nikclayton@mastodon.social

            @grishka Return an error that tells the client it's used an unsupported version.

            By definition, the server does not know the semantics of the call the client made, so trying to guess and return something in the hope it's correct takes us out of the realm of engineering and into clairvoyance.

            julian@activitypub.space
            julian@activitypub.space
            julian@activitypub.space
            scritto su ultima modifica di
            #5

            nikclayton@mastodon.social agreed.

            It's one thing for a server with a newer API version to be backwards compatible with a request from an older version, but it's impossible to predict the future and handle requests from a newer API client.

            Bouncing an error back would be the safest choice.

            cc grishka@mastodon.social

            1 Risposta Ultima Risposta
            0
            • grishka@mastodon.social grishka@mastodon.social

              On a fediverse server with a versioned client API, what would you expect to happen if an API call is made with a version number higher than what the server supports? Should it return an error? Should it take it to mean its highest supported version? Something else?

              The API isn't RESTful, the version number is global for all methods (endpoints) and has the format "major.minor".

              #Smithereen #ActivityPub #mastodev

              rimu@piefed.social
              rimu@piefed.social
              rimu@piefed.social
              scritto su ultima modifica di
              #6

              Isn't the convention to put the version in the url? e.g. /api/v3/site

              In which case a too-high version gives you a 404 error.

              grishka@mastodon.social 1 Risposta Ultima Risposta
              0
              • rimu@piefed.social rimu@piefed.social

                Isn't the convention to put the version in the url? e.g. /api/v3/site

                In which case a too-high version gives you a 404 error.

                grishka@mastodon.social
                grishka@mastodon.social
                grishka@mastodon.social
                scritto su ultima modifica di
                #7

                @rimu that's for RESTful APIs, mine isn't that because I dislike the concept. I just take the version as the `v` parameter

                trwnh@mastodon.social 1 Risposta Ultima Risposta
                0
                • grishka@mastodon.social grishka@mastodon.social

                  @rimu that's for RESTful APIs, mine isn't that because I dislike the concept. I just take the version as the `v` parameter

                  trwnh@mastodon.social
                  trwnh@mastodon.social
                  trwnh@mastodon.social
                  scritto su ultima modifica di
                  #8

                  @grishka @rimu putting the version in the uri is an older convention and not necessarily a REST(ful) thing either. what i've seen is to use content negotiation via an Accept-Version header

                  basically if you use conneg then 405 Not Acceptable; if you put versions in uris then 404 Not Found; if you take some parameter or payload then i guess maybe 422 Unprocessable Entity?

                  1 Risposta Ultima Risposta
                  0

                  Ciao! Sembra che tu sia interessato a questa conversazione, ma non hai ancora un account.

                  Stanco di dover scorrere gli stessi post a ogni visita? Quando registri un account, tornerai sempre esattamente dove eri rimasto e potrai scegliere di essere avvisato delle nuove risposte (tramite email o notifica push). Potrai anche salvare segnalibri e votare i post per mostrare il tuo apprezzamento agli altri membri della comunità.

                  Con il tuo contributo, questo post potrebbe essere ancora migliore 💗

                  Registrati Accedi
                  Rispondi
                  • Risposta alla discussione
                  Effettua l'accesso per rispondere
                  • Da Vecchi a Nuovi
                  • Da Nuovi a Vecchi
                  • Più Voti


                  Feed RSS
                  On a fediverse server with a versioned client API, what would you expect to happen if an API call is made with a version number higher than what the server supports?
                  @pierobosio@soc.bosio.info
                  NodeBB Contributors
                  • Accedi

                  • Accedi o registrati per effettuare la ricerca.
                  • Primo post
                    Ultimo post