Use returned data in next step
-
Firstly, im a fresh and totally newbie at API, JSON
After 1 week of research. I read all blog about JSON and JSONPATH at https://www.wundermatics.com/blog/
But sadly, I can’t solve the problem by myshelf.
So that, i write this. Hope some API master or WunderAutomation can help me sort this outMy scenario is:
STEP 1: Send a REST API CALL, JSON, POST to https://app.sinbyte.com/api/project/
Response example should like this:{ "status": "ok", "message": "Get projects success", "data": [{ "id": 2491, "user_profile": 1, "name": "https://abcdef.com", "url": "https://abcdef.com" },{ "id": 6630, "user_profile": 777, "name": "https://def.com", "url": "https://def.com" }] }
STEP 2: I need to send another REST API CALL, JSON, POST to https://app.sinbyte.com/api/campaign/
And this time, the body have to contain the ID that of data that contain the url match the site_url.
In this example, i send the api form https://def.com, then the body should be something like:
{ "type": "upload", "project_id": 6630, "campaign_id": 33616, "urls": ["{{ post.url }}"] }
How can i find that 6630. I tried
{{rest.response.select((a) => a.url == {{site_url}}).id}}
but not workAPI document here. Anyhelp appriciated
- The topic ‘Use returned data in next step’ is closed to new replies.