Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

JMWE CallRest - How to capture object returned

Margaret Boisvert
Contributor
January 3, 2024

New to Nunjucks so please forgive me if this is a stupid question...
In the documentation for CallRest filter, I don't see any examples of capturing the response so that it can be evaluated.  Is that possible?  I don't have a deep understanding of filters yet so I hope I am just missing something simple.

2 answers

2 accepted

2 votes
Answer accepted
David Fischer
Community Champion
January 4, 2024

Hi @Margaret Boisvert ,

The callRest filter actually returns the value returned by the REST call, so you can, for example, capture it in a variable:

{% set result = "https://my.api" | callRest() %}

The value (the parsed JSON output) will then be available in the result variable:

{{ result.foo }}

0 votes
Answer accepted
Pablo Vergara (Appfire) January 3, 2024

Hi @Margaret Boisvert 

I'm Pablo from the Appfire support team. I just saw your question and would like to help.

An automated support case has been created on our portal, and I have updated you as the case reported.

Please double-check and let me know if you can access the case details by visiting https://appfire.atlassian.net/browse/SUPPORT-164159

We can continue interacting directly via the support portal.

Best regards,

- Pablo Vergara / Appfire support team

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events