Forum Discussion

jeifit's avatar
jeifit
New Contributor
7 years ago
Solved

publish/unpublish an api through the registry api

The registry api, documented here https://app.swaggerhub.com/apis/swagger-hub/registry-api/1.0.45#/, allows the ability to create, update, read, and delete an api. However, it does not appear to provide the ability to publish / unpublish an api. I need the ability to publish / unpublish through the api. Is there an undocumented feature I could use? If not, could this be added?

 

Thanks,

Josh

  • Registry API now also lets you publish/unpublish definitions. Example:

    curl -X PUT "https://api.swaggerhub.com/apis/OWNER/API_NAME/VERSION/settings/lifecycle"
         -H "Authorization: SWAGGERHUB_API_KEY"
         -H "Content-Type: application/json"
         -d "{\"published\": true}"

    API docs

7 Replies

  • Hi Josh,

     

    I will need to open an enhancement request for you to do this with the registry API.

     

    Regards,

    Marcus

    SmartBear Support

    • MarcusJ's avatar
      MarcusJ
      Moderator

      I have opened an enhancement request for this functionality to be added.

       

      Regards,

      Marcus

      SmartBear Support

  • jeifit's avatar
    jeifit
    New Contributor

    Thanks. Could you provide a link to the enhancement request?

    • MarcusJ's avatar
      MarcusJ
      Moderator

      Hi,

       

      The enhancement request is internal, I can't provide you with a link to see the enhancement request.

       

      Regards,

      Marcus

      SmartBear Support

  • jeifit's avatar
    jeifit
    New Contributor

    Ok, thanks for the reply. Is there any way that you know of that I could get notified if this feature gets added?

  • HKosova's avatar
    HKosova
    SmartBear Alumni (Retired)

    Registry API now also lets you publish/unpublish definitions. Example:

    curl -X PUT "https://api.swaggerhub.com/apis/OWNER/API_NAME/VERSION/settings/lifecycle"
         -H "Authorization: SWAGGERHUB_API_KEY"
         -H "Content-Type: application/json"
         -d "{\"published\": true}"

    API docs