3

I have a variable named primary_address_id which can be set or updated via several API requests. For example, I may call AddAddress and specify that the new address should be the primary, or I can call MakePrimaryAddress to set an existing address as the primary.

I'm coming from Postman where I have tests defined for each of these API endpoints to update primary_address_id -- simple. But I can't find a way to do this in Paw; it seems I have to set the value to the response of just a single request. Am I missing something obvious? Or is this feature planned for a future release?

A workaround is to set the value of primary_address_id to the response from GetPrimaryAddress, but that means if I'm adding or updating an address I have to make a second call just to update my environment (which I may forget to do). If I could trigger GetPrimaryAddress to run after the Add/Update/List/etc endpoints that would be an acceptable workaround, but I shouldn't need to manually make two separate requests to accomplish this.

Matt
  • 56
  • 3

1 Answers1

3

It sounds like you will need to make two subsequent requests but you can make groups of requests that will execute in sequence from one command.

Right click the request list and click "New Group" then within that group you can make a sequence of requests that will update your desired environment variable each time.

Create a new group of requests

To run a group of requests click on the group name; in this case "Address" and then click "Send Requests"

Execute group of requests in sequence

Hope this helps.

Winsor
  • 51
  • 3