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

Prompt for input on unknown environment variable #285

Open
nizmow opened this Issue May 27, 2013 · 173 comments

Comments

@nizmow
Copy link

nizmow commented May 27, 2013

It would be useful to me if you could prompt for input when an environment variable (in {{variable}} syntax) is encountered. This is partially for convenience (a lot of input to API calls is pretty transient) and especially since I'm providing a Postman collection as part of our API documentation to a client. it would make it easier for them to see what inputs are required.

@a85

This comment has been minimized.

Copy link

a85 commented May 29, 2013

Thanks. Will think about this scenario. There is a separate issue for associating environments with collections (#213) that I am looking into. This would at least ensure that if you provide the collection to someone else, they will have the environment too.

@ghost ghost assigned a85 Jun 24, 2013

@a85 a85 removed this from the v0.9.4 milestone Dec 5, 2014

@nizmow nizmow removed this from the v0.9.4 milestone Dec 5, 2014

@mherwig

This comment has been minimized.

Copy link

mherwig commented Sep 2, 2015

I recently discovered postman and searched for this exact feature, which I really need.
Can't you just allow standard javascript prompts in the pre-request scripts?

@abhijitkane

This comment has been minimized.

Copy link
Member

abhijitkane commented Sep 2, 2015

This is a restriction of Chrome apps. alert, confirm, and prompt are not available in Chrome apps. We're working on a way to notify users when variables have not been defined, but I can't offer an ETA on that just yet.

@alanwill

This comment has been minimized.

Copy link

alanwill commented Nov 30, 2015

Throwing in my vote for this feature. I have similar situations like the OP where I need to test out a few different parameters and it would be a lot easier to be prompted and pass the input vs configuring and reconfiguring the environment for each run.

@rickyah

This comment has been minimized.

Copy link

rickyah commented Feb 8, 2016

+1

1 similar comment
@zookz

This comment has been minimized.

Copy link

zookz commented Apr 6, 2016

+1

@alexgoldstone

This comment has been minimized.

Copy link

alexgoldstone commented Apr 20, 2016

My use case for this is:

  1. Make API request to create new user
  2. API sends verification code by email
  3. I should manually look at email and enter the code into Postman before tests can continue

I am using the Mac version of the Postman software but my colleagues use the Windows (Chrome) version so implementation would need to support both clients.

@ghost

This comment has been minimized.

Copy link

ghost commented May 4, 2016

+1. For two factor authentication this would be awesome.

@LexFrench

This comment has been minimized.

Copy link

LexFrench commented Jun 14, 2016

+1

@cdraeger

This comment has been minimized.

Copy link

cdraeger commented Jun 17, 2016

+1 (I Just stumbled upon this and it would be very useful for me)

@BRivSr

This comment has been minimized.

Copy link

BRivSr commented Jun 29, 2016

+1
A Prompt for variables would work nice for non static values.

@midrissi

This comment has been minimized.

Copy link

midrissi commented Jul 12, 2016

👍
it would be so nice

@JRoppert

This comment has been minimized.

Copy link

JRoppert commented Jul 23, 2016

+1

Any news about that feature?

@neosab

This comment has been minimized.

Copy link

neosab commented Jul 25, 2016

+1

@kburnell

This comment has been minimized.

Copy link

kburnell commented Jul 26, 2016

+1 this feature would be very helpful

@aditikul aditikul added the roadmap label Aug 1, 2016

@rambino

This comment has been minimized.

Copy link

rambino commented Aug 5, 2016

+1

1 similar comment
@wojo

This comment has been minimized.

Copy link

wojo commented Sep 15, 2016

+1

@madebysid madebysid added the feature label Oct 26, 2016

@AndreJacomeSilva

This comment has been minimized.

Copy link

AndreJacomeSilva commented Dec 20, 2016

+1

@a85 a85 removed their assignment Dec 21, 2016

@bajabob

This comment has been minimized.

Copy link

bajabob commented Jan 10, 2017

+1

@madebysid

This comment has been minimized.

Copy link

madebysid commented Jan 11, 2017

Guys, we're working on something similar that will address this issue. Will keep you updated.

@CieNTi

This comment has been minimized.

Copy link

CieNTi commented Jan 30, 2017

+1

Thanks :D

@rzizza

This comment has been minimized.

Copy link

rzizza commented Feb 2, 2017

+1 ! This would be incredibly useful

@cy-banfield

This comment has been minimized.

Copy link

cy-banfield commented Feb 2, 2017

+1! Especially useful for passwords that shouldn't be stored.

@ios7hash

This comment has been minimized.

Copy link

ios7hash commented Feb 28, 2017

+1 Needed since before 2013! Including a custom Authorization Type that sets variables with Test scripts that clear them would be sufficient and seems straight forward.

@MikeTheCanuck

This comment has been minimized.

Copy link

MikeTheCanuck commented Jun 15, 2018

Our scenario is a little different from the "secrets" scenario that many mention above.

We are developing a query API and I am constructing a Collection of queries that we could use to help our developers, field staff and customers learn the query syntax more quickly - and get results faster for the most common queries we're using.

Some of the most powerful queries are the ones where a unique value is being sought (e.g. name of a computer or user), and this will vary over time and with different environments. I'm looking to prompt the user for e.g. "computerId", and I'll be satisfied with a pre-launch Javascript, or a direct UI prompt or whatever else means the user doesn't have to remember or go digging to find something that ought to be requested of them as they submit the request.

@SherloxFR

This comment has been minimized.

Copy link

SherloxFR commented Jun 18, 2018

Yeah they are "working on something similar" since January 2017, they didn't provided any detail and I don't think we can expect this feature coming out soon.
Must admit I am disappointed by the response from Postman to the community engagement / requests.
I will mute this thread as it seems to be useless, please feel free to identify me if you need to.

@v-mwalk

This comment has been minimized.

Copy link

v-mwalk commented Jun 18, 2018

Guess after 5 years this (OP request) wont be done?

@a85

This comment has been minimized.

Copy link

a85 commented Jun 24, 2018

Everyone,

Thank you for your patience with the issue. Your feedback (especially use cases) helps a lot. We build almost our entire roadmap based on user feedback so please keep the feedback coming. I know sometimes it might look like that an issue is not being worked upon but at one time we are working across hundreds of feature requests + improvements with a relatively small team of engineers (Check out the closed issues in this tracker as evidence of stuff that has been closed).

Postman itself has grown a lot with more than 5 million users and we are scaling up fast to meet the challenge of giving everybody a great experience.

One thing that has helped Postman solve problems the right way is by drawing a connecting thread across several issues that might not seem related in the first place. We go through the ENTIRE issue tracker regularly as a team over and over again. We also try to make sure that the solution we build is simple and solves multiple problems instead of solving just one problem. We try to get to the root cause of the problem instead of implementing the first solution that comes to mind. Admittedly this will make it look like there is no progress but you can take it from me that the team is working hard on reading through every issue and every comment.

Separately, we are working towards making our communication process better and more transparent. We will be publishing public RFCs more frequently now as well update our public roadmap more often. We'll also try to post detailed explanations for the current status of the issue.


Specifically on this issue:

I'd like to split this in multiple feature requests. Since the feature request was first posted, Postman has changed a lot. There are several sub issues here that I have listed below along with the current state of solving for each of them:

1. Adding a value at runtime when a request is executed - As I mentioned before we now have more control over the variable lifecycle. We didn't have this before. We are also introducing the idea of "Sessions" as I mentioned before in 6.2. Please go through the RFC that I posted in the community channel: https://community.getpostman.com/t/sessions-in-postman/1925. Essentially, we are creating the notion of a current/session value of a variable which is separate from an initial value. When a variable is finally resolved - we will now know better what is it's current value. This will help us provide additional UI cues on what to do if a variable is not resolved or is unknown. Also, the notion of an undefined variable is separate from an unknown variable. Introducing sessions will help us indicate better what kind of issue is encountered while resolving a variable. We are also looking at providing more control over the entire lifecycle of request execution and a more generic solution might involve introducing breakpoints that can help pause execution when something is not right.

2. Authentication - Providing username/passwords is a completely separate issue that the one above. We are constantly improving authentication mechanisms and would like to treat the username/password problem as a separate issue.

3. Security - Session values will NOT be synced to our servers. Check out the RFC for more details: https://community.getpostman.com/t/sessions-in-postman/1925.

4. Showing alerts/prompts for collection consumers - I think these are very interesting use cases and we would like to study this in more detail. We just announced the development of a plug-in layer for Postman and instead of doing a one-off prompting mechanisms we are looking at exposing the UI layer as an API on which interesting plug-ins can be built. We don't want to introduce a prompting mechanism without configuration options because collection requests are run individually as well as run as part of an entire collection in a UI environment as well as a headless environment where you can't expect to prompt. We'd like to build a solution that fulfills this scenario and hence a specific API for prompting will be better in the long run.

I'd love your opinion. We are pretty close to getting to solving this.

@a85 a85 self-assigned this Jun 29, 2018

@vkaegis vkaegis added this to the 6.2 milestone Jul 2, 2018

@vkaegis vkaegis self-assigned this Jul 2, 2018

@yspotts

This comment has been minimized.

Copy link

yspotts commented Jul 5, 2018

Thanks @a85 for the detailed response.
I'd like to pass along my use case, as it seems to cross over between security and Showing alerts.
We use Oauth2 implicit/authorization flow with MFA. So, the Oauth2 security for the apis is not sufficient as we need to be prompted for an MFA access code before obtaining the Oauth2 access token. My thought was to create a pre-request script to generate the access token manually, but there is no way to prompt to ask for the MFA access code.

So, if Postman can handle this use case in whatever way is easiest, that would be great.

@jayarjo

This comment has been minimized.

Copy link

jayarjo commented Jul 12, 2018

Would definitely help to have a way to alert/prompt the user from pre-request/test scripts +1

@guillaumegarcia13

This comment has been minimized.

Copy link

guillaumegarcia13 commented Jul 17, 2018

If not a prompt, what about a sticky toast with a link to the environment settings? (just thinking out loud)

@hrobertson

This comment has been minimized.

Copy link

hrobertson commented Jul 18, 2018

@vkaegis vkaegis removed this from the 6.2 milestone Aug 6, 2018

@numaanashraf numaanashraf added feature and removed feature Usability labels Aug 7, 2018

@Alacritous

This comment has been minimized.

Copy link

Alacritous commented Sep 1, 2018

How is this not done? It's been years since this was requested? My requirement is for a javascript prompt in the prerequest script section because I'm making a Node-Red admin API environment and to check the status of an installed node, or to install or delete nodes the user has to be able to tell the system which node/package that they want to install/uninstall/change/update/whatever. Just a javascript prompt like

x = prompt("enter package name to install");

That's all. Without this one feature, the usefulness of Postman for me drops to zero.

@rlogiacco

This comment has been minimized.

Copy link

rlogiacco commented Sep 1, 2018

@darrenliddell

This comment has been minimized.

Copy link

darrenliddell commented Sep 4, 2018

+1 Would be nice to think about how the variables get rendered in the generated web documentation for an API, probably separate from this, but would be good at point of publish to be able to set variables with "example" values to be displayed on the public api documentation

@Alacritous

This comment has been minimized.

Copy link

Alacritous commented Sep 4, 2018

@mfyz

This comment has been minimized.

Copy link

mfyz commented Nov 15, 2018

+1

@lukeocodes

This comment has been minimized.

Copy link

lukeocodes commented Nov 15, 2018

@rlogiacco I wonder if it needs to be a JS prompt? Couldn't it be a modal? They could trigger their own event when variables are unset. I assume they've given it a great deal of thought, given the attention on this issue.

@scottmmmm

This comment has been minimized.

Copy link

scottmmmm commented Dec 18, 2018

+1

Would make it easier to use Collections, particularly for APIs using hypermedia links.

@kclinden

This comment has been minimized.

Copy link

kclinden commented Jan 2, 2019

+1

@patdaman

This comment has been minimized.

Copy link

patdaman commented Jan 3, 2019

Adding this would make it so that our dev teams can add accounts to our services without us needing to create a web app for the same purpose. We don't need an entire application to fill out a form, and I am just trying to keep them from manually editing JSON
+1

@thetreythomas

This comment has been minimized.

Copy link

thetreythomas commented Jan 13, 2019

I'll go ahead and throw my +1 in the ocean.

@a85 - Any updates on on this comment you made:

We just announced the development of a plug-in layer for Postman and instead of doing a one-off prompting mechanisms we are looking at exposing the UI layer as an API on which interesting plug-ins can be built. We don't want to introduce a prompting mechanism without configuration options because collection requests are run individually as well as run as part of an entire collection in a UI environment as well as a headless environment where you can't expect to prompt. We'd like to build a solution that fulfills this scenario and hence a specific API for prompting will be better in the long run.

After reading all the use cases above, mine is a little different. I want to be able to choose a path a test might go down.

  1. Run a GET
  2. If the previous GET is a 200, prompt the user how they want to continue.
  3. For example... Just run the rest of the collection on a specific piece of hardware
  4. Or run just the API calls of the new feature
  5. Or run all the tests for regression.

This could easily be setup in Newman, but not everyone is comfortable on the command prompt.

@ucatal

This comment has been minimized.

Copy link

ucatal commented Jan 18, 2019

+1

2 similar comments
@HIkira

This comment has been minimized.

Copy link

HIkira commented Feb 18, 2019

+1

@TenguTech

This comment has been minimized.

Copy link

TenguTech commented Feb 20, 2019

+1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment