Forum Discussion

Han's avatar
Han
Ace
7 years ago

View data returned from API V1 call

I am trying to retrieve some data from API V1 calls. I am still trying to figure out exactly what calls I need, and I think it would be helpful to be able to print out my responses. Is there a way to easily print out all the data from an api response? 

Right now my method is assigning variables, however this doesn't work for longer responses. For example, I am trying to find out what data I get from this response:

<#assign forumName = restadmin("/boards/id/${coreNode.id}/ancestors").ancestors.ancestor>
  • Han - Yes, you can print the API result in text format using below object. 

     

    1. restd()

    2. restadmind()

     

    In your example. 

    <#assign forumName = restadmid("/boards/id/${coreNode.id}/ancestors")>

     

    ${forumName}

     

  • Han - Yes, you can print the API result in text format using below object. 

     

    1. restd()

    2. restadmind()

     

    In your example. 

    <#assign forumName = restadmid("/boards/id/${coreNode.id}/ancestors")>

     

    ${forumName}

     

    • Han's avatar
      Han
      Ace

      Thanks TariqHussain I did not realise you could just print a var straight out. That is what I was looking for :)