Skip to content
This repository has been archived by the owner on Sep 23, 2021. It is now read-only.

Collection monitor not updating the environment variables which are set in tests #34

Open
germainalb opened this issue Jan 4, 2019 · 1 comment

Comments

@germainalb
Copy link

Hi everyone,
I have an issue on postman. I want to monitor a collection. The collection starts by refresh a access token. Then I use this token to access some data. Then I have to save this refresh_token in my environment variable to reuse it later. I have read on the net that I should use a postman API. I use this endpoint to refresh my data:
PUT https://api.getpostman.com/environments/{{environment_uid}}
Headers:
Content-Type application/x-www-form-urlencoded
x-api-key {{postman_api_key}}
Body:
{
"environment": {
"name": "MonitorProd",
"values": [
{"key": "refresh_token", "value": ?????? },
{"key": "token", "value": ?????},
{"key": "postman_api_key", "value": "yyyyyyyyyyyyyyyyyyyyyyyyy"},
{"key": "environment_uid", "value": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxx"}
]
}
}

What should I put for the refresh_token value and the token_value ?? Because I should have it in my environment but I can't use them in the body, am I right ?
Thank you for your future answer !

@germainalb
Copy link
Author

sorry wrong section

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant