The Zurich release has arrived! Interested in new features and functionalities? Click here for more

How can we create a swagger file for Rest Api's, if we want to expose that rest api to some third party?

Shubhanshi2
Kilo Contributor

Creating a swagger file for Rest Api's to expose it some external service.

7 REPLIES 7

Jace Benson
Mega Sage

People have asked for this in the past.  You would have to generate this as its not something the vendor provides today.

This has been asked before.  See this thread.

Hi Jace,

because the link in your post isn't working (anymore?). Are there any news about a way to create the swagger file on an existing REST API out of the ServiceNow instance - is there a way and if so, how this can be done?

-thank you in advance-

Unfortunately I'm not aware of anyone maintaining Swagger files for ServiceNow's APIs.  

While this is an old thread, it still shows up when searching for Swagger documentation for ServiceNow APIs...and I found that ServiceNow does generate a YAML file for any API...even your own scripted APIs!  In your instance, under REST API Explorer, select the API you want to generate the documentation for and you'll have 2 links in the left column - one for the YAML file and one for a JSON file...

DanT__0-1677703313825.png

This saved me a ton of headache today!

 

Dan T.

(typical message asking you to validate me by clicking Helpful if you like my post)