Skip to content

Programmatically export data #2932

Closed
Closed

Description

@Psychokiller1888

Hi!

Scenario

Problem

Insomnia Documenter uses the export json file to create a nice looking documentation: https://api.projectalice.io/ . This json file can be obtained by exporting the Insomnia data as in: application => preferences => data => export, but not programatically using inso cli. This leads to me having to pull the latest changes made by the team, daily, export the data and upload it to my webhost.

Possible solutions

  1. CLI command to export the data, in the inso npm package. This would allow Github actions to install the CLI and export the data in the desired format.
  • PROS: integrated
  • CONS: one more step
  1. The Insomnia "push" function does, if setting enabled to, export the data and include them in the commit/push
  • PROS: totally transparent, no extra steps, awesome
  • CONS: not intuitive as includes extra data to a commit without the user to be really aware of it. Would also need branch settings and others.
  1. Have insomnia documenter use not the exported data, but the raw data available on Github
  • PROS: Nothing for you guys to do, works out of the box
  • CONS: Unlikely to happen as the documenter dev is very busy
  1. Feel free to add in comments

Benefits

Having such a function would allow a totally automated workflow when pushing new data on the API repo, allowing everyone to generate nice documentation without any hassle. I must say, it competes easily with Postman

Activity

  1. nijikokun commented on Dec 14, 2020

    @nijikokun
    Contributor

    I think this is definitely something suited for Inso, as we have export functions for Designer but not Core.

  2. added
    PA-inso
    on Dec 14, 2020
  3. smacktoid commented on Jan 20, 2021

    @smacktoid

    I like this idea. I'm spending a lot of time at the moment maintaining a set of exported insomnia workspaces for my team. We're updating the collections regularly and exporting them back to the git repository is a pain once you've done it for the tenth time in a day.

  4. develohpanda commented on Jan 21, 2021

    @develohpanda
    Contributor

    Hi @scottmmmm, have you explored using the Git sync functionality within Designer? It will sync directly to a git repository, instead of having to manually export your workspace and commit into git. https://support.insomnia.rest/article/96-git-sync

  5. smacktoid commented on Jan 21, 2021

    @smacktoid

    Thanks for the suggestion. We can't use Designer for this as we don't use OpenAPI. We use Core to create a set of requests that show how each of our APIs work.

  6. develohpanda commented on Jan 21, 2021

    @develohpanda
    Contributor

    Oh! You can still use Designer, just don't write a specification and go straight to the debug tab. You can export your workspace(s) from Core and import into Designer, and use the requests as-is without OpenAPI.

    We are looking to consolidate the sync systems soon, but as an interim solution. 😊

  7. smacktoid commented on Jan 21, 2021

    @smacktoid

    That is interesting. Hadn't realised the designer could be used in that way.

    Unfortunately issue 2639 means I can't use git sync with our corporate git repository, but if that ever gets resolved it looks promising.

  8. muuvmuuv commented on Apr 26, 2021

    @muuvmuuv

    We would also benefit from that. We have our public API on GitLab with Git sync and to debug and test local instances we use a insomnia.json. With that I don't need that extra steps to go to settings → export data.

  9. locked and limited conversation to collaborators on Jun 30, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    PA-inso

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions