Unfortunately, we currently don't support this in the Rest API block. But this can be done using the code block. (https://morphdesk.freshdesk.com/support/solutions/articles/60000664429-how-to-use-code-block-)
This is intentional to keep the Rest API block simple/easy. A lot of our customers don't have a strong technical background. So we try to keep all the blocks/actions simple. For any advance use-case, we suggest using Code block.