cancel
Showing results for 
Search instead for 
Did you mean: 

publish/unpublish an api through the registry api

SOLVED
jeifit
New Contributor

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

1 ACCEPTED SOLUTION

Accepted Solutions
HKosova
Moderator

Re: publish/unpublish an api through the registry api

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


Helen Kosova
SmartBear Documentation Team Lead
________________________
Did my reply answer your question? Give Kudos or Accept it as a Solution to help others. ⬇️⬇️⬇️

View solution in original post

7 REPLIES 7
MarcusJ
Moderator

Re: publish/unpublish an api through the registry api

Hi Josh,

 

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

 

Regards,

Marcus

SmartBear Support



Did my reply answer your question? Give Kudos or Accept it as a Solution to help others. ⬇️⬇️⬇️
MarcusJ
Moderator

Re: publish/unpublish an api through the registry api

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

 

Regards,

Marcus

SmartBear Support



Did my reply answer your question? Give Kudos or Accept it as a Solution to help others. ⬇️⬇️⬇️
jeifit
New Contributor

Re: publish/unpublish an api through the registry api

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

jeifit
New Contributor

Re: publish/unpublish an api through the registry api

@MarcusJ could you provide a link to the enhancement request that you made?

MarcusJ
Moderator

Re: publish/unpublish an api through the registry api

Hi,

 

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

 

Regards,

Marcus

SmartBear Support



Did my reply answer your question? Give Kudos or Accept it as a Solution to help others. ⬇️⬇️⬇️
jeifit
New Contributor

Re: publish/unpublish an api through the registry api

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

HKosova
Moderator

Re: publish/unpublish an api through the registry api

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


Helen Kosova
SmartBear Documentation Team Lead
________________________
Did my reply answer your question? Give Kudos or Accept it as a Solution to help others. ⬇️⬇️⬇️

View solution in original post

New Here?
Join us and watch the welcome video:
Announcements
Top Kudoed Authors