Insomnia: [Feature request] Export API from insomnia

Created on 1 Sep 2019  ยท  5Comments  ยท  Source: Kong/insomnia

  • Insomnia Version: Latest
  • Operating System: Mac/Windows

    Details

We're in need of storing our APIs in house on a hosted git repo. I've written a script to organise the repo similar to folder / subfolder sections created in insomnia so that it's easy for PR reviews.

However, currently a manual step is needed to be performed each time we import/ export:

  • For export, I need to use the app & export workspace as JSON & pass this generated file as input to my script to parse this. Is there a way I can export data as JSON through an API/ command so that I can include this in my script.

Alternatively can insomnia generate an export structure similar to folder/subfolder/request structure we've created in the UI.

PS: I do know there's insomnia plus that solves the problem of syncing between teammates but our use case is a little more than just this & also due to our security restrictions we can't store our APIs anywhere outside our network :(

Most helpful comment

I've reverse engineered Insomnia & found that they use NeDB to store all of the content on a machine. I wrote a node script to read of this DB & organize into folders in our desired format. Will share a sample soon by removing our project specific customizations.

All 5 comments

๐Ÿ‘‹ Thanks for opening your first issue! If you're reporting a ๐Ÿž bug, please make sure
you include steps to reproduce it. If you're requesting a feature ๐ŸŽ, please provide real
use cases that would benefit. ๐Ÿ‘ช

To help make this a smooth process, please be sure you have first read the
contributing guidelines.

This is would be fantastic. Similar to other posts, storing our API as a part of the Git Repo is extremely helpful in the server side development and current the way I'm doing it is just exporting as JSON and checking it in.

@knomdlo if it's not confidential i would be curious to see how your script works to separate the date into folders, i think thats a really good way of handing changes (instead of going thru an entire json file)!

I've reverse engineered Insomnia & found that they use NeDB to store all of the content on a machine. I wrote a node script to read of this DB & organize into folders in our desired format. Will share a sample soon by removing our project specific customizations.

Thanks @knomdlo i would love to see it too!

@knomdlo me too! We are looking to do the same thing!

Was this page helpful?
0 / 5 - 0 ratings