How to Use Variables in Postman

  Рет қаралды 37,015

Postman

Postman

Күн бұрын

Variables allow you to store and reuse values in your requests and scripts.
Try it yourself: www.postman.com/devrel/worksp...
Learn more: learning.postman.com/docs/sen...
00:00 - Start
00:20 - Variable Scopes
01:58 - How to re-use values using variables
03:52 - How to hide sensitive data using variables
05:48 - How to update values on the fly using variables
08:00 - How to loop over values from a file using variables

Пікірлер: 12
@cjchand
@cjchand 2 ай бұрын
Excellent overview of Postman variable types and scopes. Truly appreciate the relevant examples used. This is perfect to help educate my users on the right way to manage secrets. Thanks!
@45632476
@45632476 2 жыл бұрын
Thank you for a clear explanation. I've expanded my instruments now with "values".
@7bagette
@7bagette Жыл бұрын
Running with a data file was game changer, thank you!
@markussiebeneick4075
@markussiebeneick4075 2 жыл бұрын
In the how to hide sensitive data section, by replacing Initial value with Enter API Key Here, should you instead say Add API Key in Current Value?
@postman
@postman 2 жыл бұрын
If used in "Current Value" then the collection would be pulling that text instead of the API Key and therefore the authentication would fail. Replacing the initial value with "add your api key as the current value" would be a good alternative here.
@alexr7289
@alexr7289 Жыл бұрын
Is there a way to view the variables used in the API call in the summary screen without having to drill into the call ie show it on the POST line.
@postman
@postman Жыл бұрын
Hey Alex, if you hover over the variable you'll see what it's resolving to.
@fabioquixada2316
@fabioquixada2316 Жыл бұрын
Niiiiice!!!
@shirishcin
@shirishcin Жыл бұрын
difference between int variable and string variable ? how can we declare those ? any difference "{{name}}" and for int as {{idnum}}
@postman
@postman Жыл бұрын
Postman stores variables as strings. If you want to use an integer variable in a script, you can cast `idnum` to an integer data type, such as `parseInt(idnum)`.
@jp-uno
@jp-uno Жыл бұрын
your example didn't work at 7:25 because it wasn't an integer. How to set to set the variable as an integer?
@postman
@postman Жыл бұрын
You can either save the value as an integer instead of string. Or you can cast the value to an integer by using the JavaScript method `parseInt()`.
БОЛЬШОЙ ПЕТУШОК #shorts
00:21
Паша Осадчий
Рет қаралды 9 МЛН
That's how money comes into our family
00:14
Mamasoboliha
Рет қаралды 10 МЛН
Can You Draw A PERFECTLY Dotted Line?
00:55
Stokes Twins
Рет қаралды 107 МЛН
NERF WAR HEAVY: Drone Battle!
00:30
MacDannyGun
Рет қаралды 54 МЛН
Use Response Data in a Request | Postman Flows
3:29
Postman
Рет қаралды 17 М.
Postman Beginner Tutorial 9 | Environments
12:15
Automation Step by Step
Рет қаралды 45 М.
Loop request based on data from response in Postman
13:13
Valentin Despa
Рет қаралды 57 М.
Mock Servers | The Exploratory
7:00
Postman
Рет қаралды 33 М.
Postman Tutorial #10 -Variables in Postman | Variable Scope in Postman
12:35
Software Testing Mentor
Рет қаралды 13 М.
#6 How to Create Postman Variables | Environment Variables | Collection Variables
8:51
Data-driven testing using Postman
13:37
Valentin Despa
Рет қаралды 58 М.
Самый дорогой кабель Apple
0:37
Romancev768
Рет қаралды 337 М.
Собери ПК и Получи 10,000₽
1:00
build monsters
Рет қаралды 2,4 МЛН
Зачем ЭТО электрику? #секрет #прибор #энерголикбез
0:56
Александр Мальков
Рет қаралды 57 М.