Use this tag for issues with pre-request scripts in postman, use the "postman" tag for general issues
Questions tagged [postman-pre-request-script]
319 questions
0
votes
0 answers
How to send POST request from Postman to mongodb in Digital Ocean cloud server?
I was able to login my MERN stack application locally when I ran in my laptop, but when I deployed to the digital ocean droplet server, all of my existing database inside MongoDB had been deleted, so as of now I am not able to login into my…

Jonh
- 95
- 1
- 2
- 13
0
votes
1 answer
How can I update variable values in json body of a request (incrementing of time)
In Postman calls, how can I update variable values in json body of a request with increasing time. I need to call the endpoint for 2048 times. Each call should have the end_time with 5mins difference. I'm unable to convert the value to normal time…

Learner
- 157
- 1
- 4
- 13
0
votes
1 answer
I wrote a javascript code that calculates a Fibonacci nth term, how Can I use it in Postman
I would appreciate your assistance if possible ,
I wrote a javascript code that calculates a Fibonacci nth term, how Can I use it in Postman.
I send an initial request to an endpoint and the response sends back data (a n term for example: 43)
I…
0
votes
1 answer
Postman:Execute request in collection runner after successfully completing first request
I am trying to deploy cloud VM’s using Postman and below is the workflow that I am trying accomplish.
1.) Send request to deploy VM image. (it may take few minutes for the vm to be successfully deployed).
2.) Send another request to check the status…

Mir
- 37
- 1
- 7
0
votes
0 answers
Running a collection in a Newman
I created a collection in Postman which contains a single request, I am running the collection by uploading a test case (.csv) file, It's working perfectly.
But I want to do the same via Newman. So I have installed the Newman and I have copied my…

HARISH
- 169
- 5
- 15
0
votes
0 answers
Executing multiple tests in the Postman Runner
I am running a collection runner to execute multiple test cases in Postman
I have a Postman folder, where I have created a POST request.
In the body of the request, I provide something like this:
{
"subscriber": {{name}},
"action":…

HARISH
- 169
- 5
- 15
0
votes
0 answers
Assert an element from an Array in Postman
Problem in this Loop //Test to Check W2B001 is received same from API as well//Test that the response is an Int or date
I have an Array like this
"dates": [{
"id": 1,
"date": "2019-06-30T00:00:00"
},
{
"id": 2,
…

Ravindran Antonysamy
- 76
- 6
0
votes
1 answer
Postman setNextRequest in for-loop not getting called from Runner
Collection has two requests.
Post - Create Account
Post - Create AccountProfile
Create AccountProfile adds an AccountProfile object to the Account.
There are 13 account-profile-types.
What I want to do is create 13 accounts, one for each account…

Guy
- 666
- 1
- 10
- 34
0
votes
2 answers
How to login using SSO oauth 2.0 and then storing token to run all other API from postman automation script?
I am not able to automate postman script for this procedure:
Open postman then in authorization tab select type->OAuth 2.0, Add authorization data->Request Headers and Access token->Get Access Token
Filled fields-Token Name, Grant…

Riya
- 37
- 2
- 7
0
votes
1 answer
Is it possible to POST parameters when running the "Collection runner" in POSTMAN
Problem is that I'm trying to change the settings of the website with POST and would like to confirm that the settings changed with a new GET request after the change, but as I'm running the collection it's just running the tests but not the POST…

Zhockos
- 41
- 4
0
votes
3 answers
Permission denied when try to fetch records from zoho people
I am trying to fetch records from zoho people API .. For this i am using POSTMAn. I successfully create token in postman and when i try to apply this link in get field then this shows an error "permission denied" i tried from past few days but did…

Bakhtawar Ashiq
- 63
- 1
- 9
0
votes
4 answers
How to get current year in the Postman script
I have a requirement to get current year in the Postman pre-req script.
I'm planning to get the current date, then convert the date to string and apply sub-string to get year value
I would like to know, is this the right way of doing it, or is there…

Parthiban
- 43
- 1
- 11
0
votes
1 answer
POSTMAN Script Raw Data Input
I an trying to send Raw data to populate fields, the main one i need to populate is "additional info" but due to multiple variables being in additional info, im getting a syntax error
Below is what i have tried to do
Works fine if additional info is…

zahmed
- 1
0
votes
2 answers
How to download attachment file in Postman
I am using postman for API calls as I am trying to download on batch thousands of files from a database.
https://website.com/services/rest/connect/v1.4/incidents/439006/fileAttachments/?download
This creates the call but I then have to click save…

Nick
- 13
- 1
- 5
0
votes
0 answers
Postman : How to retrieve a value of a variable inside an array (which is not available in the response body) to parameterize as a global variable
I'm trying to get a value of a variable inside an array to store it as a global variable for reuse on collection runner. The issue is this variable data is not exposed on any response data.
$scope.loadWorkAreasAndMenu = function (callback) {
…

Anand Sathiyaseelan
- 39
- 6