I am trying to fetch Journey components using API. I am collecting such elements as description, key, ID, etc. The request and response are working fine (as in the documentation - link).

        id = content["items"][x]["id"];
        Platform.Response.Write("id: " + id);
        key = content["items"][x]["key"];
        Platform.Response.Write("key: " + key);
        cname = content["items"][x]["name"];

So basically code above fetches the id, key and name of the Journey. Now I want to get the goals and tags of the journey with the code below:

tags = content["tags"][x]["name"];

But response is "undefined". I tried to get the lenght of array, but it also returns undefined valuse. How should I correctly fetch tags?

Also tried (but didn't work):

tags = content["items"][x]["tags"][x]["name"];
  • Upd.: Tried same code to fetch the value of GOAL from Journey and it worked. But still undefined when trying to get the value of tag name Oct 26, 2021 at 12:30
  • Upd.:: Figured out that I was using an API call that was returning list of all journeys without some data, there is another API call that requires Journey ID and returns all the info about journey. Nov 19, 2021 at 8:40


You must log in to answer this question.

Browse other questions tagged .