Submit and vote on feature ideas.

Welcome to the new Parasoft forums! We hope you will enjoy the site and try out some of the new features, like sharing an idea you may have for one of our products or following a category.

Extract REST API Output(Literal) to Databank without External File Usage

bharatbarz
bharatbarz Posts: 44

Team, I have a REST API which gives output just as a literal and not in JSON/XML output. I wrote into a file and then wrote a Python Script to get into JSON databank. Is there any way to get output in JSON/XML without writing into a file.

Tagged:

Best Answer

  • jakubiak
    jakubiak Posts: 795 admin
    Answer ✓

    Instead of writing into a file, you can attach an Extension Tool and write a script that returns the literal content wrapped inside XML or JSON. Then you can attach a XML/JSON Data Bank to the Extension Tool.

Answers

  • bharatbarz
    bharatbarz Posts: 44

    How to refer to the literal content in Script ? If Generated Data Source or Data Source, i would use context.getValue. But for this case, which one should i be using ?

  • bharatbarz
    bharatbarz Posts: 44

    Hi jakubiak. I got the answer. Thanks a lot for your guidance.

Tagged