Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[feature]: Ability to save API response #1875

Open
bhav15h opened this issue Oct 14, 2021 · 39 comments · May be fixed by #4075
Open

[feature]: Ability to save API response #1875

bhav15h opened this issue Oct 14, 2021 · 39 comments · May be fixed by #4075
Labels
feature New feature or request

Comments

@bhav15h
Copy link

bhav15h commented Oct 14, 2021

Is your feature request related to a problem? Please describe.
I would like to be able to save an API response similar to the feature in postman.

  1. This will then allow us to preview the API instead of having to do a request to get the response.
  2. Also this is helpful whereby if you use a token to authenticate and the token has expired, instead of reauthenticate to view a response you get to quickly see the structure and response of the API.

Describe the solution you'd like
The solution for this is when a request to an API has returned a result we have a new button to save the response. This would be nested under the saved API request.
We should be able to rename the saved response as there could be different responses from 1 request. e.g if an exception was raised in the api we could receive a different response.

Describe alternatives you've considered
At the moment the only alternative is to save the response in a file locally, but this is very hectic and not easily sharable to other people in the team as we may have a long list of 100 APIs.

Additional context
Postman seem to have done it very well.

@liyasthomas
Copy link
Member

Hi @bhav15h, saving response along with the request seems like an handy feature. We'll consider implementing this on a later stage. If anyone wants to contribute to this feature request, feel free to pick it up.

@liyasthomas liyasthomas added feature New feature or request hacktoberfest Hacktoberfest labels Oct 14, 2021
@sguzmanm
Copy link
Contributor

Hi, this seems interesting, mind if I look into it?

@liyasthomas
Copy link
Member

@sguzmanm yes, feel free to pick this up.

@liyasthomas liyasthomas changed the title Ability to save API response as example Ability to save API response Oct 19, 2021
@sguzmanm
Copy link
Contributor

Hi @liyasthomas I've been having a hard time trying to work on the issue since I see it's too big, would you mind looking at the linked PR for further guidance?

@Selvestr1
Copy link

Is your feature request related to a problem? Please describe. I would like to be able to save an API response similar to the feature in postman.

  1. This will then allow us to preview the API instead of having to do a request to get the response.
  2. Also this is helpful whereby if you use a token to authenticate and the token has expired, instead of reauthenticate to view a response you get to quickly see the structure and response of the API.

Describe the solution you'd like The solution for this is when a request to an API has returned a result we have a new button to save the response. This would be nested under the saved API request. We should be able to rename the saved response as there could be different responses from 1 request. e.g if an exception was raised in the api we could receive a different response.

Describe alternatives you've considered At the moment the only alternative is to save the response in a file locally, but this is very hectic and not easily sharable to other people in the team as we may have a long list of 100 APIs.

Additional context Postman seem to have done it very well.

@liyasthomas liyasthomas removed the hacktoberfest Hacktoberfest label Nov 16, 2021
@chirag-jn
Copy link

Hey @liyasthomas, are there plans to add this feature anytime soon?

@m-roberts
Copy link

+1 for this feature. Postman has the ability to save an API response as an "example" under requests in a collection.

@AndrewBastin
Copy link
Member

This is something we have debated a lot on whether or not to implement, even had the PR in. But what we think is "Examples" as a thing within requests are more of a documentation thing and not exactly a "Testing" thing.

We are really vary and careful with the things we want to the REST Testing pages because we do not want to build Hoppscotch into an open-source Postman. This doesn't mean we will not tackle this issue (this issue is still open and will remain open until a solution is pushed), but we are planning on a solution we think is more better suited for the documentation way of doing things, this will take some time though as we are focused on other things to tackle before going for this.

@Elghazal
Copy link

Elghazal commented Sep 7, 2022

+1 for this feature

@mojerro
Copy link

mojerro commented Sep 25, 2022

I think this feature is connected with #1598. If we have the mock ability, then this feature is very convenient and can be a part of the mock feature

Also, I think it can be very convenient if we can generate API doc automated. But for now, I need to save my API doc in another place and rewrite the response again.

@liyasthomas liyasthomas changed the title Ability to save API response [feature]: Ability to save API response Oct 2, 2022
@Msiavashi
Copy link

Msiavashi commented Feb 22, 2023

I'd like to look into implementing this feature.

@AndrewBastin Have you been able to find a solution yet? I agree that examples are more of a documentation, though having both integrated seamlessly works nicely sometimes. The way Postman handles it is quick and easy to access and reproduce.

Please let me know if there has been any progress in this regard.

Thanks

@DarkPhoenix2704
Copy link

+1 For this Feature

@rohit-serri
Copy link

Recently Switched to HoppScotch from postman, this feature would be a important addition. Any Updates on this? can i help in any way by contributing to the repo? i might need some guidance if anyone is able to help

@Hamma111
Copy link

I came across HoppScotch to find it as a lovely open source project, and it really is. But the only thing holding me back from migrating my projects to HoppScotch is ability save responses/mock/examples.

It is very convenient to save API response, right with the actual API, with certain payloads etc to give idea to team about different scenarios.

+1 to this feature please

@JayJayDee
Copy link

+1 For this Feature

1 similar comment
@lixh00
Copy link

lixh00 commented Aug 23, 2023

+1 For this Feature

@SamJakob
Copy link
Contributor

SamJakob commented Sep 3, 2023

See also #2018 with respect to being able to save responses as 'examples'.

@tranghaviet
Copy link

+1 For this Feature

@tomasztomys
Copy link

+1

1 similar comment
@RussianProtein
Copy link

+1

@CMFerrer
Copy link

+1 for this feature

@umaraziz0
Copy link

+1 for this feature

@sarankumar-ns
Copy link

+1

3 similar comments
@lakuapik
Copy link

+1

@ricardomedina98
Copy link

+1

@yaseeen96
Copy link

+1

@LeulAria
Copy link

can we have this feature plz 💯

@AlirezaAbsolution
Copy link

+1

1 similar comment
@kumarahul98
Copy link

+1

@stavan-vc
Copy link

+1!
Please add soon.

@Kimilhee
Copy link

+1 For this Feature.
Please.

@cheol-95
Copy link

+1 For this Feature.

@AayushTaneja
Copy link

+1

3 similar comments
@nupis-DanielS
Copy link

+1

@GuidoHeintz
Copy link

+1

@khanakia
Copy link

khanakia commented Apr 2, 2024

+1

@codeasashu codeasashu linked a pull request May 19, 2024 that will close this issue
9 tasks
@lifang218c
Copy link

+1 need to. mock response examples! thanks

@BlackMocca
Copy link

+1

1 similar comment
@niloy-netcom
Copy link

+1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.