Forum Discussion

akatanov-albums's avatar
akatanov-albums
New Contributor
5 years ago

Default version

Hi,

Is there some possibility to mark particular version of my API as a default one through registry-api or another API?

 

  • MarcusJ's avatar
    MarcusJ
    5 years ago

    Hi,

     

    Curently you can not do this with the RegistryAPI, however, we have an existing enhancement request to implement this feature.

     

    Regards,

    Marcus James

    SmartBear Support

  • This is now possible - you can set the default version by using "PUT​ /apis​/{owner}​/{api}​/settings​/default":

    curl -X PUT "https://api.swaggerhub.com/apis/OWNER/API_NAME/settings/default"
         -H "Authorization: SWAGGERHUB_API_KEY"
         -H "Content-Type: application/json"
         -d "{\"version\": \"1.0.0\"}"

    API docs

  • HKosova's avatar
    HKosova
    SmartBear Alumni (Retired)

    This is now possible - you can set the default version by using "PUT​ /apis​/{owner}​/{api}​/settings​/default":

    curl -X PUT "https://api.swaggerhub.com/apis/OWNER/API_NAME/settings/default"
         -H "Authorization: SWAGGERHUB_API_KEY"
         -H "Content-Type: application/json"
         -d "{\"version\": \"1.0.0\"}"

    API docs

    • MarcusJ's avatar
      MarcusJ
      Moderator

      Hi,

       

      Curently you can not do this with the RegistryAPI, however, we have an existing enhancement request to implement this feature.

       

      Regards,

      Marcus James

      SmartBear Support